diff --git a/internal/dev_server/ui/dist/index.html b/internal/dev_server/ui/dist/index.html index 2db3e210..6482f129 100644 --- a/internal/dev_server/ui/dist/index.html +++ b/internal/dev_server/ui/dist/index.html @@ -54,7 +54,7 @@ * LICENSE file in the root directory of this source tree. */var xo=m;function RI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BI=typeof Object.is=="function"?Object.is:RI,VI=xo.useState,II=xo.useEffect,FI=xo.useLayoutEffect,ZI=xo.useDebugValue;function OI(e,t){var n=t(),r=VI({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return FI(function(){i.value=n,i.getSnapshot=t,d5(i)&&o({inst:i})},[e,n,t]),II(function(){return d5(i)&&o({inst:i}),e(function(){d5(i)&&o({inst:i})})},[e]),ZI(n),n}function d5(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!BI(e,n)}catch{return!0}}function HI(e,t){return t()}var NI=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?HI:OI;q9.useSyncExternalStore=xo.useSyncExternalStore!==void 0?xo.useSyncExternalStore:NI;G9.exports=q9;var I3=G9.exports;const Y9=m.createContext(!1),ca=m.createContext(null);function F3(e){if(m.useContext(ca))return e.content;let{collection:n,document:r}=WI(e.createCollection);return O.createElement(O.Fragment,null,O.createElement(sI,null,O.createElement(ca.Provider,{value:r},e.content)),O.createElement(zI,{render:e.children,collection:n}))}function zI({collection:e,render:t}){return t(e)}function KI(e,t,n){let r=Jn(),i=m.useRef(r);i.current=r;let o=m.useCallback(()=>i.current?n():t(),[t,n]);return I3.useSyncExternalStore(e,o)}const jI=typeof O.useSyncExternalStore=="function"?O.useSyncExternalStore:KI;function WI(e){let[t]=m.useState(()=>new XV((e==null?void 0:e())||new YV)),n=m.useCallback(a=>t.subscribe(a),[t]),r=m.useCallback(()=>{let a=t.getCollection();return t.isSSR&&t.resetAfterSSR(),a},[t]),i=m.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=jI(n,r,i);return We(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const Kf=m.createContext(null);function UI(e,t,n,r,i,o){let a=m.useCallback(c=>{c==null||c.setProps(t,n,r,o)},[t,n,r,o]),u=m.useContext(Kf);if(u){let c=u.ownerDocument.nodesByProps.get(t);return c||(c=u.ownerDocument.createElement(e),c.setProps(t,n,r,o),u.appendChild(c),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(t,c)),i?O.createElement(Kf.Provider,{value:c},i):null}return O.createElement(e,{ref:a},i)}function X9(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),r=m.forwardRef((i,o)=>{if(!m.useContext(Y9)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return UI(e,i,o,"children"in i?i.children:null,null,u=>O.createElement(n,{node:u}))});return r.displayName=t.name,r}function GI(e){return I9({...e,addIdAndValue:!0})}const Y6=m.createContext(null);function Q9(e){let t=m.useContext(Y6),n=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope||(t==null?void 0:t.idScope),i=GI({...e,idScope:r,dependencies:n});return m.useContext(ca)&&(i=O.createElement(qI,null,i)),t=m.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),O.createElement(Y6.Provider,{value:t},i)}function qI({children:e}){let t=m.useContext(ca),n=m.useMemo(()=>O.createElement(ca.Provider,{value:null},O.createElement(Y9.Provider,{value:!0},e)),[e]);return Jn()?O.createElement(Kf.Provider,{value:t},n):pi.createPortal(n,t)}const J9=m.createContext(null),YI={CollectionRoot({collection:e,renderDropIndicator:t}){return X6(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return X6(e,t,n)}};function X6(e,t,n){return I9({items:t?e.getChildren(t.key):e,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,u=e.getKeyAfter(a);return O.createElement(O.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(u==null||((i=e.getItem(u))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const Nc=m.createContext(YI);function XI(e){return m.useMemo(()=>e!=null?new Set([e]):null,[e])}const jf=Symbol("default");function ht({values:e,children:t}){for(let[n,r]of e)t=O.createElement(n.Provider,{value:r},t);return t}function $0(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:u}=e;return m.useMemo(()=>{let c,d,p;return typeof t=="function"?c=t({...u,defaultClassName:i}):c=t,typeof n=="function"?d=n({...u,defaultStyle:a||{}}):d=n,typeof r=="function"?p=r({...u,defaultChildren:o}):r==null?p=o:p=r,{className:c??i,style:d||a?{...a,...d}:void 0,children:p??o,"data-rac":""}},[t,n,r,i,o,a,u])}function l0(e,t){return n=>t(typeof e=="function"?e(n):e,n)}function S2(e,t){let n=m.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!t&&!n.slots[jf])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||jf;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function _0(e,t,n){let r=S2(n,e.slot)||{},{ref:i,...o}=r,a=er(m.useMemo(()=>Fc(t,i),[t,i])),u=Ce(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?u.style=c=>{let d=typeof o.style=="function"?o.style(c):o.style,p={...c.defaultStyle,...d},v=typeof e.style=="function"?e.style({...c,defaultStyle:p}):e.style;return{...p,...v}}:u.style={...o.style,...e.style}),[u,a]}function Ro(){let[e,t]=m.useState(!0),n=m.useRef(!1),r=m.useCallback(i=>{n.current=!0,t(!!i)},[]);return We(()=>{n.current||t(!1)},[]),[r,e]}function zc(e,t=!0){let[n,r]=m.useState(!0);return eb(e,n&&t,m.useCallback(()=>r(!1),[])),n&&t}function tc(e,t){let[n,r]=m.useState(!1),[i,o]=m.useState("idle");return!t&&e.current&&i==="idle"&&(n=!0,r(!0),o("exiting")),!e.current&&i==="exited"&&o("idle"),eb(e,n,m.useCallback(()=>{o("exited"),r(!1)},[])),n}function eb(e,t,n){let r=m.useRef(null);t&&e.current&&(r.current=window.getComputedStyle(e.current).animation),We(()=>{if(t&&e.current){let i=window.getComputedStyle(e.current);if(i.animationName&&i.animationName!=="none"&&i.animation!==r.current){let o=u=>{u.target===e.current&&(a.removeEventListener("animationend",o),M3.flushSync(()=>{n()}))},a=e.current;return a.addEventListener("animationend",o),()=>{a.removeEventListener("animationend",o)}}else n()}},[e,t,n])}function Kc(e){const t=/^(data-.*)$/;let n={};for(const r in e)t.test(r)||(n[r]=e[r]);return n}let qi="default",Wf="",bu=new WeakMap;function Q6(e){if(Oc()){if(qi==="default"){const t=c0(e);Wf=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}qi="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(bu.set(e,e.style.userSelect),e.style.userSelect="none")}function qs(e){if(Oc()){if(qi!=="disabled")return;qi="restoring",setTimeout(()=>{z9(()=>{if(qi==="restoring"){const t=c0(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Wf||""),Wf="",qi="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&bu.has(e)){let t=bu.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),bu.delete(e)}}const da=O.createContext({register:()=>{}});da.displayName="PressResponderContext";function QI(e,t){return t.get?t.get.call(e):t.value}function tb(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function JI(e,t){var n=tb(e,t,"get");return QI(e,n)}function eF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tF(e,t,n){eF(e,t),t.set(e,n)}function nF(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function J6(e,t,n){var r=tb(e,t,"set");return nF(e,r,n),n}function rF(e){let t=m.useContext(da);if(t){let{register:n,...r}=t;e=Ce(r,e),n()}return B3(t,e.ref),e}var Ys=new WeakMap;class Xs{continuePropagation(){J6(this,Ys,!1)}get shouldStopPropagation(){return JI(this,Ys)}constructor(t,n,r,i){tF(this,Ys,{writable:!0,value:void 0}),J6(this,Ys,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const u=a==null?void 0:a.getBoundingClientRect();let c,d=0,p,v=null;r.clientX!=null&&r.clientY!=null&&(p=r.clientX,v=r.clientY),u&&(p!=null&&v!=null?(c=p-u.left,d=v-u.top):(c=u.width/2,d=u.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=c,this.y=d}}const em=Symbol("linkClicked");function wo(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:u,preventFocusOnPress:c,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:p,ref:v,...h}=rF(e),[y,x]=m.useState(!1),C=m.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:E,removeAllGlobalListeners:S}=K9(),b=ct((_,H)=>{let R=C.current;if(a||R.didFirePressStart)return!1;let F=!0;if(R.isTriggeringEvent=!0,r){let re=new Xs("pressstart",H,_);r(re),F=re.shouldStopPropagation}return n&&n(!0),R.isTriggeringEvent=!1,R.didFirePressStart=!0,x(!0),F}),w=ct((_,H,R=!0)=>{let F=C.current;if(!F.didFirePressStart)return!1;F.ignoreClickAfterPress=!0,F.didFirePressStart=!1,F.isTriggeringEvent=!0;let re=!0;if(i){let z=new Xs("pressend",H,_);i(z),re=z.shouldStopPropagation}if(n&&n(!1),x(!1),t&&R&&!a){let z=new Xs("press",H,_);t(z),re&&(re=z.shouldStopPropagation)}return F.isTriggeringEvent=!1,re}),M=ct((_,H)=>{let R=C.current;if(a)return!1;if(o){R.isTriggeringEvent=!0;let F=new Xs("pressup",H,_);return o(F),R.isTriggeringEvent=!1,F.shouldStopPropagation}return!0}),A=ct(_=>{let H=C.current;H.isPressed&&H.target&&(H.isOverTarget&&H.pointerType!=null&&w(fr(H.target,_),H.pointerType,!1),H.isPressed=!1,H.isOverTarget=!1,H.activePointerId=null,H.pointerType=null,S(),p||qs(H.target))}),D=ct(_=>{d&&A(_)}),V=m.useMemo(()=>{let _=C.current,H={onKeyDown(F){if(f5(F.nativeEvent,F.currentTarget)&&F.currentTarget.contains(F.target)){var re;nm(F.target,F.key)&&F.preventDefault();let z=!0;if(!_.isPressed&&!F.repeat){_.target=F.currentTarget,_.isPressed=!0,z=b(F,"keyboard");let N=F.currentTarget,te=ae=>{f5(ae,N)&&!ae.repeat&&N.contains(ae.target)&&_.target&&M(fr(_.target,ae),"keyboard")};E(c0(F.currentTarget),"keyup",f2(te,R),!0)}z&&F.stopPropagation(),F.metaKey&&p2()&&((re=_.metaKeyEvents)===null||re===void 0||re.set(F.key,F.nativeEvent))}else F.key==="Meta"&&(_.metaKeyEvents=new Map)},onClick(F){if(!(F&&!F.currentTarget.contains(F.target))&&F&&F.button===0&&!_.isTriggeringEvent&&!ai.isOpening){let re=!0;if(a&&F.preventDefault(),!_.ignoreClickAfterPress&&!_.ignoreEmulatedMouseEvents&&!_.isPressed&&(_.pointerType==="virtual"||zf(F.nativeEvent))){!a&&!c&&Ot(F.currentTarget);let z=b(F,"virtual"),N=M(F,"virtual"),te=w(F,"virtual");re=z&&N&&te}_.ignoreEmulatedMouseEvents=!1,_.ignoreClickAfterPress=!1,re&&F.stopPropagation()}}},R=F=>{var re;if(_.isPressed&&_.target&&f5(F,_.target)){var z;nm(F.target,F.key)&&F.preventDefault();let te=F.target;w(fr(_.target,F),"keyboard",_.target.contains(te)),S(),F.key!=="Enter"&&Z3(_.target)&&_.target.contains(te)&&!F[em]&&(F[em]=!0,ai(_.target,F,!1)),_.isPressed=!1,(z=_.metaKeyEvents)===null||z===void 0||z.delete(F.key)}else if(F.key==="Meta"&&(!((re=_.metaKeyEvents)===null||re===void 0)&&re.size)){var N;let te=_.metaKeyEvents;_.metaKeyEvents=void 0;for(let ae of te.values())(N=_.target)===null||N===void 0||N.dispatchEvent(new KeyboardEvent("keyup",ae))}};if(typeof PointerEvent<"u"){H.onPointerDown=N=>{if(N.button!==0||!N.currentTarget.contains(N.target))return;if(DI(N.nativeEvent)){_.pointerType="virtual";return}p5(N.currentTarget)&&N.preventDefault(),_.pointerType=N.pointerType;let te=!0;_.isPressed||(_.isPressed=!0,_.isOverTarget=!0,_.activePointerId=N.pointerId,_.target=N.currentTarget,!a&&!c&&Ot(N.currentTarget),p||Q6(_.target),te=b(N,_.pointerType),E(c0(N.currentTarget),"pointermove",F,!1),E(c0(N.currentTarget),"pointerup",re,!1),E(c0(N.currentTarget),"pointercancel",z,!1)),te&&N.stopPropagation()},H.onMouseDown=N=>{N.currentTarget.contains(N.target)&&N.button===0&&(p5(N.currentTarget)&&N.preventDefault(),N.stopPropagation())},H.onPointerUp=N=>{!N.currentTarget.contains(N.target)||_.pointerType==="virtual"||N.button===0&&Mi(N,N.currentTarget)&&M(N,_.pointerType||N.pointerType)};let F=N=>{N.pointerId===_.activePointerId&&(_.target&&Mi(N,_.target)?!_.isOverTarget&&_.pointerType!=null&&(_.isOverTarget=!0,b(fr(_.target,N),_.pointerType)):_.target&&_.isOverTarget&&_.pointerType!=null&&(_.isOverTarget=!1,w(fr(_.target,N),_.pointerType,!1),D(N)))},re=N=>{N.pointerId===_.activePointerId&&_.isPressed&&N.button===0&&_.target&&(Mi(N,_.target)&&_.pointerType!=null?w(fr(_.target,N),_.pointerType):_.isOverTarget&&_.pointerType!=null&&w(fr(_.target,N),_.pointerType,!1),_.isPressed=!1,_.isOverTarget=!1,_.activePointerId=null,_.pointerType=null,S(),p||qs(_.target))},z=N=>{A(N)};H.onDragStart=N=>{N.currentTarget.contains(N.target)&&A(N)}}else{H.onMouseDown=z=>{if(z.button!==0||!z.currentTarget.contains(z.target))return;if(p5(z.currentTarget)&&z.preventDefault(),_.ignoreEmulatedMouseEvents){z.stopPropagation();return}_.isPressed=!0,_.isOverTarget=!0,_.target=z.currentTarget,_.pointerType=zf(z.nativeEvent)?"virtual":"mouse",!a&&!c&&Ot(z.currentTarget),b(z,_.pointerType)&&z.stopPropagation(),E(c0(z.currentTarget),"mouseup",F,!1)},H.onMouseEnter=z=>{if(!z.currentTarget.contains(z.target))return;let N=!0;_.isPressed&&!_.ignoreEmulatedMouseEvents&&_.pointerType!=null&&(_.isOverTarget=!0,N=b(z,_.pointerType)),N&&z.stopPropagation()},H.onMouseLeave=z=>{if(!z.currentTarget.contains(z.target))return;let N=!0;_.isPressed&&!_.ignoreEmulatedMouseEvents&&_.pointerType!=null&&(_.isOverTarget=!1,N=w(z,_.pointerType,!1),D(z)),N&&z.stopPropagation()},H.onMouseUp=z=>{z.currentTarget.contains(z.target)&&!_.ignoreEmulatedMouseEvents&&z.button===0&&M(z,_.pointerType||"mouse")};let F=z=>{if(z.button===0){if(_.isPressed=!1,S(),_.ignoreEmulatedMouseEvents){_.ignoreEmulatedMouseEvents=!1;return}_.target&&Mi(z,_.target)&&_.pointerType!=null?w(fr(_.target,z),_.pointerType):_.target&&_.isOverTarget&&_.pointerType!=null&&w(fr(_.target,z),_.pointerType,!1),_.isOverTarget=!1}};H.onTouchStart=z=>{if(!z.currentTarget.contains(z.target))return;let N=iF(z.nativeEvent);if(!N)return;_.activePointerId=N.identifier,_.ignoreEmulatedMouseEvents=!0,_.isOverTarget=!0,_.isPressed=!0,_.target=z.currentTarget,_.pointerType="touch",!a&&!c&&Ot(z.currentTarget),p||Q6(_.target),b(Kr(_.target,z),_.pointerType)&&z.stopPropagation(),E(fn(z.currentTarget),"scroll",re,!0)},H.onTouchMove=z=>{if(!z.currentTarget.contains(z.target))return;if(!_.isPressed){z.stopPropagation();return}let N=tm(z.nativeEvent,_.activePointerId),te=!0;N&&Mi(N,z.currentTarget)?!_.isOverTarget&&_.pointerType!=null&&(_.isOverTarget=!0,te=b(Kr(_.target,z),_.pointerType)):_.isOverTarget&&_.pointerType!=null&&(_.isOverTarget=!1,te=w(Kr(_.target,z),_.pointerType,!1),D(Kr(_.target,z))),te&&z.stopPropagation()},H.onTouchEnd=z=>{if(!z.currentTarget.contains(z.target))return;if(!_.isPressed){z.stopPropagation();return}let N=tm(z.nativeEvent,_.activePointerId),te=!0;N&&Mi(N,z.currentTarget)&&_.pointerType!=null?(M(Kr(_.target,z),_.pointerType),te=w(Kr(_.target,z),_.pointerType)):_.isOverTarget&&_.pointerType!=null&&(te=w(Kr(_.target,z),_.pointerType,!1)),te&&z.stopPropagation(),_.isPressed=!1,_.activePointerId=null,_.isOverTarget=!1,_.ignoreEmulatedMouseEvents=!0,_.target&&!p&&qs(_.target),S()},H.onTouchCancel=z=>{z.currentTarget.contains(z.target)&&(z.stopPropagation(),_.isPressed&&A(Kr(_.target,z)))};let re=z=>{_.isPressed&&z.target.contains(_.target)&&A({currentTarget:_.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};H.onDragStart=z=>{z.currentTarget.contains(z.target)&&A(z)}}return H},[E,a,c,S,p,A,D,w,b,M]);return m.useEffect(()=>()=>{var _;p||qs((_=C.current.target)!==null&&_!==void 0?_:void 0)},[p]),{isPressed:u||y,pressProps:Ce(h,V)}}function Z3(e){return e.tagName==="A"&&e.hasAttribute("href")}function f5(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof fn(i).HTMLInputElement&&!nb(i,n)||i instanceof fn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&Z3(i))&&n!=="Enter")}function iF(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function tm(e,t){const n=e.changedTouches;for(let r=0;rt.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Mi(e,t){let n=t.getBoundingClientRect(),r=oF(e);return lF(n,r)}function p5(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function nm(e,t){return e instanceof HTMLInputElement?!nb(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Z3(e)}const aF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function nb(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":aF.has(e.type)}const rb=O.forwardRef(({children:e,...t},n)=>{let r=m.useRef(!1),i=m.useContext(da);n=er(n||(i==null?void 0:i.ref));let o=Ce(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return B3(i,n),m.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with component."),r.current=!0)},[]),O.createElement(da.Provider,{value:o},e)});function sF({children:e}){let t=m.useMemo(()=>({register:()=>{}}),[]);return O.createElement(da.Provider,{value:t},e)}class uF{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function ib(e){let t=m.useRef({isFocused:!1,observer:null});We(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=ct(r=>{e==null||e(r)});return m.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=a=>{t.current.isFocused=!1,i.disabled&&n(new uF("blur",a)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let u=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function O3(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=m.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),a=ib(o),u=m.useCallback(c=>{const d=c0(c.target);c.target===c.currentTarget&&d.activeElement===c.target&&(n&&n(c),i&&i(!0),a(c))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?u:void 0,onBlur:!t&&(r||i)?o:void 0}}}let Er=null,fa=new Set,Bl=new Map,si=!1,Uf=!1;const cF={Tab:!0,Escape:!0};function jc(e,t){for(let n of fa)n(e,t)}function dF(e){return!(e.metaKey||!p2()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nc(e){si=!0,dF(e)&&(Er="keyboard",jc("keyboard",e))}function un(e){Er="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(si=!0,jc("pointer",e))}function ob(e){zf(e)&&(si=!0,Er="virtual")}function lb(e){e.target===window||e.target===document||(!si&&!Uf&&(Er="virtual",jc("virtual",e)),si=!1,Uf=!1)}function ab(){si=!1,Uf=!0}function rc(e){if(typeof window>"u"||Bl.get(fn(e)))return;const t=fn(e),n=c0(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){si=!0,r.apply(this,arguments)},n.addEventListener("keydown",nc,!0),n.addEventListener("keyup",nc,!0),n.addEventListener("click",ob,!0),t.addEventListener("focus",lb,!0),t.addEventListener("blur",ab,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",un,!0),n.addEventListener("pointermove",un,!0),n.addEventListener("pointerup",un,!0)):(n.addEventListener("mousedown",un,!0),n.addEventListener("mousemove",un,!0),n.addEventListener("mouseup",un,!0)),t.addEventListener("beforeunload",()=>{sb(e)},{once:!0}),Bl.set(t,{focus:r})}const sb=(e,t)=>{const n=fn(e),r=c0(e);t&&r.removeEventListener("DOMContentLoaded",t),Bl.has(n)&&(n.HTMLElement.prototype.focus=Bl.get(n).focus,r.removeEventListener("keydown",nc,!0),r.removeEventListener("keyup",nc,!0),r.removeEventListener("click",ob,!0),n.removeEventListener("focus",lb,!0),n.removeEventListener("blur",ab,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",un,!0),r.removeEventListener("pointermove",un,!0),r.removeEventListener("pointerup",un,!0)):(r.removeEventListener("mousedown",un,!0),r.removeEventListener("mousemove",un,!0),r.removeEventListener("mouseup",un,!0)),Bl.delete(n))};function fF(e){const t=c0(e);let n;return t.readyState!=="loading"?rc(e):(n=()=>{rc(e)},t.addEventListener("DOMContentLoaded",n)),()=>sb(e,n)}typeof document<"u"&&fF();function $o(){return Er!=="pointer"}function So(){return Er}function ub(e){Er=e,jc(e,null)}function pF(){rc();let[e,t]=m.useState(Er);return m.useEffect(()=>{let n=()=>{t(Er)};return fa.add(n),()=>{fa.delete(n)}},[]),Jn()?null:e}const vF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hF(e,t,n){var r;const i=typeof window<"u"?fn(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?fn(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?fn(n==null?void 0:n.target).HTMLElement:HTMLElement,u=typeof window<"u"?fn(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!vF.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof u&&!cF[n.key])}function mF(e,t,n){rc(),m.useEffect(()=>{let r=(i,o)=>{hF(!!(n!=null&&n.isTextInput),i,o)&&e($o())};return fa.add(r),()=>{fa.delete(r)}},t)}function Ta(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=m.useRef({isFocusWithin:!1}),a=m.useCallback(d=>{o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(d),i&&i(!1))},[n,i,o]),u=ib(a),c=m.useCallback(d=>{!o.current.isFocusWithin&&document.activeElement===d.target&&(r&&r(d),i&&i(!0),o.current.isFocusWithin=!0,u(d))},[r,i,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let ic=!1,v5=0;function Gf(){ic=!0,setTimeout(()=>{ic=!1},50)}function rm(e){e.pointerType==="touch"&&Gf()}function gF(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",rm):document.addEventListener("touchend",Gf),v5++,()=>{v5--,!(v5>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",rm):document.removeEventListener("touchend",Gf))}}function Ut(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,a]=m.useState(!1),u=m.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;m.useEffect(gF,[]);let{hoverProps:c,triggerHoverEnd:d}=m.useMemo(()=>{let p=(y,x)=>{if(u.pointerType=x,i||x==="touch"||u.isHovered||!y.currentTarget.contains(y.target))return;u.isHovered=!0;let C=y.currentTarget;u.target=C,t&&t({type:"hoverstart",target:C,pointerType:x}),n&&n(!0),a(!0)},v=(y,x)=>{if(u.pointerType="",u.target=null,x==="touch"||!u.isHovered)return;u.isHovered=!1;let C=y.currentTarget;r&&r({type:"hoverend",target:C,pointerType:x}),n&&n(!1),a(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=y=>{ic&&y.pointerType==="mouse"||p(y,y.pointerType)},h.onPointerLeave=y=>{!i&&y.currentTarget.contains(y.target)&&v(y,y.pointerType)}):(h.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=y=>{!u.ignoreEmulatedMouseEvents&&!ic&&p(y,"mouse"),u.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=y=>{!i&&y.currentTarget.contains(y.target)&&v(y,"mouse")}),{hoverProps:h,triggerHoverEnd:v}},[t,n,r,i,u]);return m.useEffect(()=>{i&&d({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:c,isHovered:o}}function cb(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=m.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=ct(c=>{n&&Qs(c,t)&&(i&&i(c),o.current.isPointerDown=!0)}),u=ct(c=>{n&&n(c)});m.useEffect(()=>{let c=o.current;if(r)return;const d=t.current,p=c0(d);if(typeof PointerEvent<"u"){let v=h=>{c.isPointerDown&&Qs(h,t)&&u(h),c.isPointerDown=!1};return p.addEventListener("pointerdown",a,!0),p.addEventListener("pointerup",v,!0),()=>{p.removeEventListener("pointerdown",a,!0),p.removeEventListener("pointerup",v,!0)}}else{let v=y=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&Qs(y,t)&&u(y),c.isPointerDown=!1},h=y=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&Qs(y,t)&&u(y),c.isPointerDown=!1};return p.addEventListener("mousedown",a,!0),p.addEventListener("mouseup",v,!0),p.addEventListener("touchstart",a,!0),p.addEventListener("touchend",h,!0),()=>{p.removeEventListener("mousedown",a,!0),p.removeEventListener("mouseup",v,!0),p.removeEventListener("touchstart",a,!0),p.removeEventListener("touchend",h,!0)}}},[t,r,a,u])}function Qs(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function im(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function db(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:im(e.onKeyDown),onKeyUp:im(e.onKeyUp)}}}const yF=500;function fb(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=yF,accessibilityDescription:a}=e;const u=m.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:d}=K9(),{pressProps:p}=wo({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),u.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...h,type:"longpress"}),u.current=void 0},o),h.pointerType==="touch")){let y=x=>{x.preventDefault()};c(h.target,"contextmenu",y,{once:!0}),c(window,"pointerup",()=>{setTimeout(()=>{d(h.target,"contextmenu",y)},30)},{once:!0})}},onPressEnd(h){u.current&&clearTimeout(u.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),v=LI(i&&!t?a:void 0);return{longPressProps:Ce(p,v)}}function ui(e){const t=c0(e);if(So()==="virtual"){let n=t.activeElement;z9(()=>{t.activeElement===n&&e.isConnected&&Ot(e)})}else Ot(e)}function bF(e){const t=fn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:a,visibility:u}=o(e);i=a!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function xF(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function pb(e,t){return e.nodeName!=="#comment"&&bF(e)&&xF(e,t)&&(!e.parentElement||pb(e.parentElement,e))}const om=O.createContext(null),qf="react-aria-focus-scope-restore";let i0=null;function Wc(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,o=m.useRef(null),a=m.useRef(null),u=m.useRef([]),{parentNode:c}=m.useContext(om)||{},d=m.useMemo(()=>new Xf({scopeRef:u}),[u]);We(()=>{let h=c||D0.root;if(D0.getTreeNode(h.scopeRef)&&i0&&!lc(i0,h.scopeRef)){let y=D0.getTreeNode(i0);y&&(h=y)}h.addChild(d),D0.addNode(d)},[d,c]),We(()=>{let h=D0.getTreeNode(u);h&&(h.contain=!!n)},[n]),We(()=>{var h;let y=(h=o.current)===null||h===void 0?void 0:h.nextSibling,x=[],C=E=>E.stopPropagation();for(;y&&y!==a.current;)x.push(y),y.addEventListener(qf,C),y=y.nextSibling;return u.current=x,()=>{for(let E of x)E.removeEventListener(qf,C)}},[t]),EF(u,r,n),CF(u,n),TF(u,r,n),PF(u,i),m.useEffect(()=>{const h=c0(u.current?u.current[0]:void 0).activeElement;let y=null;if(nt(h,u.current)){for(let x of D0.traverse())x.scopeRef&&nt(h,x.scopeRef.current)&&(y=x);y===D0.getTreeNode(u)&&(i0=y.scopeRef)}},[u]),We(()=>()=>{var h,y,x;let C=(x=(y=D0.getTreeNode(u))===null||y===void 0||(h=y.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&x!==void 0?x:null;(u===i0||lc(u,i0))&&(!C||D0.getTreeNode(C))&&(i0=C),D0.removeTreeNode(u)},[u]);let p=m.useMemo(()=>wF(u),[]),v=m.useMemo(()=>({focusManager:p,parentNode:d}),[d,p]);return O.createElement(om.Provider,{value:v},O.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,O.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function wF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,u=r||c0(n[0]).activeElement,c=n[0].previousElementSibling,d=Y2(n),p=xr(d,{tabbable:i,accept:a},n);p.currentNode=nt(u,n)?u:c;let v=p.nextNode();return!v&&o&&(p.currentNode=c,v=p.nextNode()),v&&br(v,!0),v},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,u=r||c0(n[0]).activeElement,c=n[n.length-1].nextElementSibling,d=Y2(n),p=xr(d,{tabbable:i,accept:a},n);p.currentNode=nt(u,n)?u:c;let v=p.previousNode();return!v&&o&&(p.currentNode=c,v=p.previousNode()),v&&br(v,!0),v},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=Y2(n),a=xr(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let u=a.nextNode();return u&&br(u,!0),u},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=Y2(n),a=xr(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let u=a.previousNode();return u&&br(u,!0),u}}}const H3=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],$F=H3.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";H3.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const SF=H3.join(':not([hidden]):not([tabindex="-1"]),');function Y2(e){return e[0].parentElement}function $l(e){let t=D0.getTreeNode(i0);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function CF(e,t){let n=m.useRef(void 0),r=m.useRef(void 0);We(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=c0(i?i[0]:void 0);let a=d=>{if(d.key!=="Tab"||d.altKey||d.ctrlKey||d.metaKey||!$l(e)||d.isComposing)return;let p=o.activeElement,v=e.current;if(!v||!nt(p,v))return;let h=Y2(v),y=xr(h,{tabbable:!0},v);if(!p)return;y.currentNode=p;let x=d.shiftKey?y.previousNode():y.nextNode();x||(y.currentNode=d.shiftKey?v[v.length-1].nextElementSibling:v[0].previousElementSibling,x=d.shiftKey?y.previousNode():y.nextNode()),d.preventDefault(),x&&br(x,!0)},u=d=>{(!i0||lc(i0,e))&&nt(d.target,e.current)?(i0=e,n.current=d.target):$l(e)&&!oc(d.target,e)?n.current?n.current.focus():i0&&i0.current&&Yf(i0.current):$l(e)&&(n.current=d.target)},c=d=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(o.activeElement&&$l(e)&&!oc(o.activeElement,e))if(i0=e,o.body.contains(d.target)){var p;n.current=d.target,(p=n.current)===null||p===void 0||p.focus()}else i0.current&&Yf(i0.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",u,!1),i==null||i.forEach(d=>d.addEventListener("focusin",u,!1)),i==null||i.forEach(d=>d.addEventListener("focusout",c,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",u,!1),i==null||i.forEach(d=>d.removeEventListener("focusin",u,!1)),i==null||i.forEach(d=>d.removeEventListener("focusout",c,!1))}},[e,t]),We(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function vb(e){return oc(e)}function nt(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function oc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of D0.traverse(D0.getTreeNode(t)))if(n&&nt(e,n.current))return!0;return!1}function _F(e){return oc(e,i0)}function lc(e,t){var n;let r=(n=D0.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function br(e,t=!1){if(e!=null&&!t)try{ui(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function hb(e,t=!0){let n=e[0].previousElementSibling,r=Y2(e),i=xr(r,{tabbable:t},e);i.currentNode=n;let o=i.nextNode();return t&&!o&&(r=Y2(e),i=xr(r,{tabbable:!1},e),i.currentNode=n,o=i.nextNode()),o}function Yf(e,t=!0){br(hb(e,t))}function PF(e,t){const n=O.useRef(t);m.useEffect(()=>{if(n.current){i0=e;const r=c0(e.current?e.current[0]:void 0);!nt(r.activeElement,i0.current)&&e.current&&Yf(e.current)}n.current=!1},[e])}function EF(e,t,n){We(()=>{if(t||n)return;let r=e.current;const i=c0(r?r[0]:void 0);let o=a=>{let u=a.target;nt(u,e.current)?i0=e:vb(u)||(i0=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[e,t,n])}function kF(e){let t=D0.getTreeNode(i0);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function TF(e,t,n){const r=m.useRef(typeof document<"u"?c0(e.current?e.current[0]:void 0).activeElement:null);We(()=>{let i=e.current;const o=c0(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!i0||lc(i0,e))&&nt(o.activeElement,e.current)&&(i0=e)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(u=>u.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",a,!1))}},[e,n]),We(()=>{const i=c0(e.current?e.current[0]:void 0);if(!t)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!$l(e)||a.isComposing)return;let u=i.activeElement;if(!nt(u,e.current))return;let c=D0.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,p=xr(i.body,{tabbable:!0});p.currentNode=u;let v=a.shiftKey?p.previousNode():p.nextNode();if((!d||!i.body.contains(d)||d===i.body)&&(d=void 0,c.nodeToRestore=void 0),(!v||!nt(v,e.current))&&d){p.currentNode=d;do v=a.shiftKey?p.previousNode():p.nextNode();while(nt(v,e.current));a.preventDefault(),a.stopPropagation(),v?br(v,!0):vb(d)?br(d,!0):u.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[e,t,n]),We(()=>{const i=c0(e.current?e.current[0]:void 0);if(!t)return;let o=D0.getTreeNode(e);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let u=D0.getTreeNode(e);if(!u)return;let c=u.nodeToRestore;if(t&&c&&(nt(i.activeElement,e.current)||i.activeElement===i.body&&kF(e))){let d=D0.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let p=d.getTreeNode(e);for(;p;){if(p.nodeToRestore&&p.nodeToRestore.isConnected){lm(p.nodeToRestore);return}p=p.parent}for(p=d.getTreeNode(e);p;){if(p.scopeRef&&p.scopeRef.current&&D0.getTreeNode(p.scopeRef)){let v=hb(p.scopeRef.current,!0);lm(v);return}p=p.parent}}})}}}},[e,t])}function lm(e){e.dispatchEvent(new CustomEvent(qf,{bubbles:!0,cancelable:!0}))&&br(e)}function xr(e,t,n){let r=t!=null&&t.tabbable?SF:$F,i=c0(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(t==null||(a=t.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&pb(o)&&(!n||nt(o,n))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}class N3{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new Xf({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&nt(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new N3;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Xf({scopeRef:null}),this.fastMap.set(null,this.root)}}class Xf{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let D0=new N3;function tr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=m.useRef({isFocused:!1,isFocusVisible:t||$o()}),[o,a]=m.useState(!1),[u,c]=m.useState(()=>i.current.isFocused&&i.current.isFocusVisible),d=m.useCallback(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),p=m.useCallback(y=>{i.current.isFocused=y,a(y),d()},[d]);mF(y=>{i.current.isFocusVisible=y,d()},[],{isTextInput:n});let{focusProps:v}=O3({isDisabled:r,onFocusChange:p}),{focusWithinProps:h}=Ta({isDisabled:!r,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:u,focusProps:r?h:v}}let mb=O.createContext(null);function MF(e){let t=m.useContext(mb)||{};B3(t,e);let{ref:n,...r}=t;return r}function AF(e,t){let{children:n,...r}=e,i=er(t),o={...r,ref:i};return O.createElement(mb.Provider,{value:o},n)}let LF=O.forwardRef(AF);function Uc(e,t){let{focusProps:n}=O3(e),{keyboardProps:r}=db(e),i=Ce(n,r),o=MF(t),a=e.isDisabled?{}:o,u=m.useRef(e.autoFocus);return m.useEffect(()=>{u.current&&t.current&&ui(t.current),u.current=!1},[t]),{focusableProps:Ce({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}const DF=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),RF=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function BF(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return DF.has(n.script)}let t=e.split("-")[0];return RF.has(t)}const VF=Symbol.for("react-aria.i18n.locale");function gb(){let e=typeof window<"u"&&window[VF]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:BF(e)?"rtl":"ltr"}}let Qf=gb(),Sl=new Set;function am(){Qf=gb();for(let e of Sl)e(Qf)}function IF(){let e=Jn(),[t,n]=m.useState(Qf);return m.useEffect(()=>(Sl.size===0&&window.addEventListener("languagechange",am),Sl.add(n),()=>{Sl.delete(n),Sl.size===0&&window.removeEventListener("languagechange",am)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const FF=O.createContext(null);function Bo(){let e=IF();return m.useContext(FF)||e}const ZF=Symbol.for("react-aria.i18n.locale"),OF=Symbol.for("react-aria.i18n.strings");let Ai;class Gc{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=HF(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[ZF];if(Ai===void 0){let i=window[OF];if(!i)return null;Ai={};for(let o in i)Ai[o]=new Gc({[n]:i[o]},n)}let r=Ai==null?void 0:Ai[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function HF(e,t,n="en-US"){if(t[e])return t[e];let r=NF(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function NF(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const sm=new Map,um=new Map;class zF{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=sm.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),sm.set(o,a));let u=a.select(t);return i=n[u]||n.other,typeof i=="function"?i():i}number(t){let n=um.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),um.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const cm=new WeakMap;function KF(e){let t=cm.get(e);return t||(t=new Gc(e),cm.set(e,t)),t}function jF(e,t){return t&&Gc.getGlobalDictionaryForPackage(t)||KF(e)}function Vo(e,t){let{locale:n}=Bo(),r=jF(e,t);return m.useMemo(()=>new zF(n,r),[n,r])}let h5=new Map,Jf=!1;try{Jf=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let ac=!1;try{ac=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const yb={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class WF{format(t){let n="";if(!Jf&&this.options.signDisplay!=null?n=GF(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!ac){var r;let{unit:i,unitDisplay:o="short",locale:a}=this.resolvedOptions();if(!i)return n;let u=(r=yb[i])===null||r===void 0?void 0:r[o];n+=u[a]||u.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Jf&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!ac&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=UF(t,n),this.options=n}}function UF(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!ac){var r;let{unit:a,unitDisplay:u="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=yb[a])===null||r===void 0)&&r[u]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${u}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,u)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),o=e.format(n),a=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(a,"+").replace("!!!",o)}else return e.format(n)}}function qF(e={}){let{locale:t}=Bo();return m.useMemo(()=>new WF(t,e),[t,e])}let m5=new Map;function z3(e){let{locale:t}=Bo(),n=t+(e?Object.entries(e).sort((i,o)=>i[0]{v&&(v(A),console.warn("onClick is deprecated, please use onPress"))}})}}const bb=7e3;let g5=null;function XF(e,t="assertive",n=bb){g5||(g5=new QF),g5.announce(e,t,n)}class QF{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=bb){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function K3(e,t,n){let{validationBehavior:r,focus:i}=e;We(()=>{if(r==="native"&&(n!=null&&n.current)){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(c),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(eZ(n.current))}});let o=ct(()=>{t.resetValidation()}),a=ct(c=>{var d;t.displayValidation.isInvalid||t.commitValidation();let p=n==null||(d=n.current)===null||d===void 0?void 0:d.form;if(!c.defaultPrevented&&n&&p&&tZ(p)===n.current){var v;i?i():(v=n.current)===null||v===void 0||v.focus(),ub("keyboard")}c.preventDefault()}),u=ct(()=>{t.commitValidation()});m.useEffect(()=>{let c=n==null?void 0:n.current;if(!c)return;let d=c.form;return c.addEventListener("invalid",a),c.addEventListener("change",u),d==null||d.addEventListener("reset",o),()=>{c.removeEventListener("invalid",a),c.removeEventListener("change",u),d==null||d.removeEventListener("reset",o)}},[n,a,u,o,r])}function JF(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function eZ(e){return{isInvalid:!e.validity.valid,validationDetails:JF(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function tZ(e){for(let t=0;tdm(rZ(a,i)),[a,i]);o!=null&&o.validationDetails.valid&&(o=null);let p=m.useContext($b),v=m.useMemo(()=>r?Array.isArray(r)?r.flatMap(R=>t7(p[R])):t7(p[r]):[],[p,r]),[h,y]=m.useState(p),[x,C]=m.useState(!1);p!==h&&(y(p),C(!1));let E=m.useMemo(()=>dm(x?[]:v),[x,v]),S=m.useRef(Bi),[b,w]=m.useState(Bi),M=m.useRef(Bi),A=()=>{if(!D)return;V(!1);let R=d||o||S.current;y5(R,M.current)||(M.current=R,w(R))},[D,V]=m.useState(!1);return m.useEffect(A),{realtimeValidation:c||E||d||o||Bi,displayValidation:u==="native"?c||E||b:c||E||d||o||b,updateValidation(R){u==="aria"&&!y5(b,R)?w(R):S.current=R},resetValidation(){let R=Bi;y5(R,M.current)||(M.current=R,w(R)),u==="native"&&V(!1),C(!0)},commitValidation(){u==="native"&&V(!0),C(!0)}}}function t7(e){return e?Array.isArray(e)?e:[e]:[]}function rZ(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return t7(n)}return[]}function dm(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:wb}:null}function y5(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Sb(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:o,name:a,children:u,"aria-label":c,"aria-labelledby":d,validationState:p="valid",isInvalid:v}=e,h=D=>{D.stopPropagation(),t.setSelected(D.target.checked)},y=u!=null,x=c!=null||d!=null;!y&&!x&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:C,isPressed:E}=wo({isDisabled:r}),{pressProps:S,isPressed:b}=wo({isDisabled:r||i,onPress(){t.toggle()}}),{focusableProps:w}=Uc(e,n),M=Ce(C,w),A=a0(e,{labelable:!0});return V3(n,t.isSelected,t.setSelected),{labelProps:Ce(S,{onClick:D=>D.preventDefault()}),inputProps:Ce(A,{"aria-invalid":v||p==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:h,disabled:r,...o==null?{}:{value:o},name:a,type:"checkbox",...M}),isSelected:t.isSelected,isPressed:E||b,isDisabled:r,isReadOnly:i,isInvalid:v||p==="invalid"}}function Cb(e,t,n){let r=qc({...e,value:t.isSelected}),{isInvalid:i,validationErrors:o,validationDetails:a}=r.displayValidation,{labelProps:u,inputProps:c,isSelected:d,isPressed:p,isDisabled:v,isReadOnly:h}=Sb({...e,isInvalid:i},t,n);K3(e,r,n);let{isIndeterminate:y,isRequired:x,validationBehavior:C="aria"}=e;return m.useEffect(()=>{n.current&&(n.current.indeterminate=!!y)}),{labelProps:u,inputProps:{...c,checked:d,"aria-required":x&&C==="aria"||void 0,required:x&&C==="native"},isSelected:d,isPressed:p,isDisabled:v,isReadOnly:h,isInvalid:i,validationErrors:o,validationDetails:a}}const iZ=new WeakMap;function j3(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=Kt(t);let a=Kt(),u={};n?(r=r?`${a} ${r}`:a,u={id:a,htmlFor:o==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=j9({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function _b(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:o,fieldProps:a}=j3(e),u=Kn([!!t,!!n,r,i]),c=Kn([!!t,!!n,r,i]);return a=Ce(a,{"aria-describedby":[u,c,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:a,descriptionProps:{id:u},errorMessageProps:{id:c}}}function W3(e={}){let{isReadOnly:t}=e,[n,r]=$2(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function o(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:o}}function oZ(e,t,n){const r=W3({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(E){E?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(E)}});let{name:i,descriptionId:o,errorMessageId:a,validationBehavior:u}=iZ.get(t);var c;u=(c=e.validationBehavior)!==null&&c!==void 0?c:u;let{realtimeValidation:d}=qc({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),p=m.useRef(Bi),v=()=>{t.setInvalid(e.value,d.isInvalid?d:p.current)};m.useEffect(v);let h=t.realtimeValidation.isInvalid?t.realtimeValidation:d,y=u==="native"?t.displayValidation:h;var x;let C=Cb({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(x=e.isRequired)!==null&&x!==void 0?x:t.isRequired,validationBehavior:u,[e7]:{realtimeValidation:h,displayValidation:y,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(E){p.current=E,v()}}},r,n);return{...C,inputProps:{...C.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?a:null,o].filter(Boolean).join(" ")||void 0}}}const On={top:"top",bottom:"top",left:"left",right:"left"},sc={top:"bottom",bottom:"top",left:"right",right:"left"},lZ={top:"left",left:"top"},n7={top:"height",left:"width"},Pb={width:"totalWidth",height:"totalHeight"},Js={};let xt=typeof document<"u"&&window.visualViewport;function fm(e){let t=0,n=0,r=0,i=0,o=0,a=0,u={},c=(xt==null?void 0:xt.scale)>1;if(e.tagName==="BODY"){let v=document.documentElement;r=v.clientWidth,i=v.clientHeight;var d;t=(d=xt==null?void 0:xt.width)!==null&&d!==void 0?d:r;var p;n=(p=xt==null?void 0:xt.height)!==null&&p!==void 0?p:i,u.top=v.scrollTop||e.scrollTop,u.left=v.scrollLeft||e.scrollLeft,xt&&(o=xt.offsetTop,a=xt.offsetLeft)}else({width:t,height:n,top:o,left:a}=so(e)),u.top=e.scrollTop,u.left=e.scrollLeft,r=t,i=n;return R3()&&(e.tagName==="BODY"||e.tagName==="HTML")&&c&&(u.top=0,u.left=0,o=xt.pageTop,a=xt.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:u,top:o,left:a}}function aZ(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function pm(e,t,n,r,i,o,a){let u=i.scroll[e],c=r[n7[e]],d=r.scroll[On[e]]+o,p=c+r.scroll[On[e]]-o,v=t-u+a[e]-r[On[e]],h=t-u+n+a[e]-r[On[e]];return vp?Math.max(p-h,d-v):0}function sZ(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function vm(e){if(Js[e])return Js[e];let[t,n]=e.split(" "),r=On[t]||"right",i=lZ[r];On[n]||(n="center");let o=n7[r],a=n7[i];return Js[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},Js[e]}function b5(e,t,n,r,i,o,a,u,c,d){let{placement:p,crossPlacement:v,axis:h,crossAxis:y,size:x,crossSize:C}=r,E={};E[y]=e[y],v==="center"?E[y]+=(e[C]-n[C])/2:v!==y&&(E[y]+=e[C]-n[C]),E[y]+=o;const S=e[y]-n[C]+c+d,b=e[y]+e[C]-c-d;if(E[y]=aa(E[y],S,b),p===h){const w=u?a[x]:t[Pb[x]];E[sc[h]]=Math.floor(w-e[h]+i)}else E[h]=Math.floor(e[h]+e[x]+i);return E}function uZ(e,t,n,r,i,o,a,u){const c=r?n.height:t[Pb.height];let d=e.top!=null?n.top+e.top:n.top+(c-e.bottom-a),p=u!=="top"?Math.max(0,t.height+t.top+t.scroll.top-d-(i.top+i.bottom+o)):Math.max(0,d+a-(t.top+t.scroll.top)-(i.top+i.bottom+o));return Math.min(t.height-o*2,p)}function hm(e,t,n,r,i,o){let{placement:a,axis:u,size:c}=o;return a===u?Math.max(0,n[u]-e[u]-e.scroll[u]+t[u]-r[u]-r[sc[u]]-i):Math.max(0,e[c]+e[u]+e.scroll[u]-t[u]-n[u]-n[c]-r[u]-r[sc[u]]-i)}function cZ(e,t,n,r,i,o,a,u,c,d,p,v,h,y,x,C){let E=vm(e),{size:S,crossAxis:b,crossSize:w,placement:M,crossPlacement:A}=E,D=b5(t,u,n,E,p,v,d,h,x,C),V=p,_=hm(u,d,t,i,o+p,E);if(a&&r[S]>_){let Q=vm(`${sc[M]} ${A}`),me=b5(t,u,n,Q,p,v,d,h,x,C);hm(u,d,t,i,o+p,Q)>_&&(E=Q,D=me,V=p)}let H="bottom";E.axis==="top"?E.placement==="top"?H="top":E.placement==="bottom"&&(H="bottom"):E.crossAxis==="top"&&(E.crossPlacement==="top"?H="bottom":E.crossPlacement==="bottom"&&(H="top"));let R=pm(b,D[b],n[w],u,c,o,d);D[b]+=R;let F=uZ(D,u,d,h,i,o,n.height,H);y&&y{if(!n||r===null)return;let i=o=>{let a=o.target;if(!t.current||a instanceof Node&&!a.contains(t.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let u=r||Eb.get(t.current);u&&u()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let k0=typeof document<"u"&&window.visualViewport;function kb(e){let{direction:t}=Bo(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:p=0,crossOffset:v=0,shouldUpdatePosition:h=!0,isOpen:y=!0,onClose:x,maxHeight:C,arrowBoundaryOffset:E=0}=e,[S,b]=m.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),w=[h,a,i.current,r.current,o.current,u,c,d,p,v,y,t,C,E,n],M=m.useRef(k0==null?void 0:k0.scale);m.useEffect(()=>{y&&(M.current=k0==null?void 0:k0.scale)},[y]);let A=m.useCallback(()=>{if(h===!1||!y||!i.current||!r.current||!d||(k0==null?void 0:k0.scale)!==M.current)return;let H=null;if(o.current&&o.current.contains(document.activeElement)){let N=document.activeElement.getBoundingClientRect(),te=o.current.getBoundingClientRect();H={type:"top",offset:N.top-te.top},H.offset>te.height/2&&(H.type="bottom",H.offset=N.bottom-te.bottom)}let R=i.current;if(!C&&i.current){var F;R.style.top="0px",R.style.bottom="";var re;R.style.maxHeight=((re=(F=window.visualViewport)===null||F===void 0?void 0:F.height)!==null&&re!==void 0?re:window.innerHeight)+"px"}let z=dZ({placement:hZ(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:p,crossOffset:v,maxHeight:C,arrowSize:n,arrowBoundaryOffset:E});if(R.style.top="",R.style.bottom="",R.style.left="",R.style.right="",Object.keys(z.position).forEach(N=>R.style[N]=z.position[N]+"px"),R.style.maxHeight=z.maxHeight!=null?z.maxHeight+"px":void 0,H){let N=document.activeElement.getBoundingClientRect(),te=o.current.getBoundingClientRect(),ae=N[H.type]-te[H.type];o.current.scrollTop+=ae-H.offset}b(z)},w);We(A,w),vZ(A),ec({ref:i,onResize:A}),ec({ref:r,onResize:A});let D=m.useRef(!1);We(()=>{let H,R=()=>{D.current=!0,clearTimeout(H),H=setTimeout(()=>{D.current=!1},500),A()},F=()=>{D.current&&R()};return k0==null||k0.addEventListener("resize",R),k0==null||k0.addEventListener("scroll",F),()=>{k0==null||k0.removeEventListener("resize",R),k0==null||k0.removeEventListener("scroll",F)}},[A]);let V=m.useCallback(()=>{D.current||x()},[x,D]);pZ({triggerRef:r,isOpen:y,onClose:x&&V});var _;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...S.position,maxHeight:(_=S.maxHeight)!==null&&_!==void 0?_:"100vh"}},placement:S.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:S.arrowOffsetLeft,top:S.arrowOffsetTop}},updatePosition:A}}function vZ(e){We(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function hZ(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const pr=[];function Tb(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:u}=e;m.useEffect(()=>(i&&pr.push(t),()=>{let x=pr.indexOf(t);x>=0&&pr.splice(x,1)}),[i,t]);let c=()=>{pr[pr.length-1]===t&&n&&n()},d=x=>{(!u||u(x.target))&&pr[pr.length-1]===t&&(x.stopPropagation(),x.preventDefault())},p=x=>{(!u||u(x.target))&&(pr[pr.length-1]===t&&(x.stopPropagation(),x.preventDefault()),c())},v=x=>{x.key==="Escape"&&!a&&!x.nativeEvent.isComposing&&(x.stopPropagation(),x.preventDefault(),c())};cb({ref:t,onInteractOutside:o&&i?p:null,onInteractOutsideStart:d});let{focusWithinProps:h}=Ta({isDisabled:!r,onBlurWithin:x=>{!x.relatedTarget||_F(x.relatedTarget)||(!u||u(x.relatedTarget))&&n()}}),y=x=>{x.target===x.currentTarget&&x.preventDefault()};return{overlayProps:{onKeyDown:v,...h},underlayProps:{onPointerDown:y}}}function Mb(e,t,n){let{type:r}=e,{isOpen:i}=t;m.useEffect(()=>{n&&n.current&&Eb.set(n.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let a=Kt();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?a:null,onPress:t.toggle},overlayProps:{id:a}}}const x5=typeof document<"u"&&window.visualViewport,mZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let eu=0,w5;function Ab(e={}){let{isDisabled:t}=e;We(()=>{if(!t)return eu++,eu===1&&(Oc()?w5=yZ():w5=gZ()),()=>{eu--,eu===0&&w5()}},[t])}function gZ(){return f2(Yi(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Yi(document.documentElement,"overflow","hidden"))}function yZ(){let e,t,n=d=>{e=W9(d.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Yi(e,"overscrollBehavior","contain"))},r=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()},i=d=>{let p=d.target;bm(p)&&p!==document.activeElement&&(d.preventDefault(),u(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""})),t&&t()},o=d=>{let p=d.target;bm(p)&&(u(),p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",x5&&(x5.height{ym(p)}):x5.addEventListener("resize",()=>ym(p),{once:!0}))}))},a=null,u=()=>{if(a)return;let d=()=>{window.scrollTo(0,0)},p=window.pageXOffset,v=window.pageYOffset;a=f2(dl(window,"scroll",d),Yi(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Yi(document.documentElement,"overflow","hidden"),Yi(document.body,"marginTop",`-${v}px`),()=>{window.scrollTo(p,v)}),window.scrollTo(0,0)},c=f2(dl(document,"touchstart",n,{passive:!1,capture:!0}),dl(document,"touchmove",r,{passive:!1,capture:!0}),dl(document,"touchend",i,{passive:!1,capture:!0}),dl(document,"focus",o,!0));return()=>{t==null||t(),a==null||a(),c()}}function Yi(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function dl(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ym(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=W9(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function bm(e){return e instanceof HTMLInputElement&&!mZ.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const r7=O.createContext(null);function bZ(e){let{children:t}=e,n=m.useContext(r7),[r,i]=m.useState(0),o=m.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return O.createElement(r7.Provider,{value:o},t)}function xZ(){let e=m.useContext(r7);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function wZ(e){let{modalProviderProps:t}=xZ();return O.createElement("div",{"data-overlay-container":!0,...e,...t})}function $Z(e){return O.createElement(bZ,null,O.createElement(wZ,e))}function SZ(e){let t=Jn(),{portalContainer:n=t?null:document.body,...r}=e;if(O.useEffect(()=>{if(n!=null&&n.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let i=O.createElement($Z,r);return M3.createPortal(i,n)}var Lb={};Lb={dismiss:"تجاهل"};var Db={};Db={dismiss:"Отхвърляне"};var Rb={};Rb={dismiss:"Odstranit"};var Bb={};Bb={dismiss:"Luk"};var Vb={};Vb={dismiss:"Schließen"};var Ib={};Ib={dismiss:"Απόρριψη"};var Fb={};Fb={dismiss:"Dismiss"};var Zb={};Zb={dismiss:"Descartar"};var Ob={};Ob={dismiss:"Lõpeta"};var Hb={};Hb={dismiss:"Hylkää"};var Nb={};Nb={dismiss:"Rejeter"};var zb={};zb={dismiss:"התעלם"};var Kb={};Kb={dismiss:"Odbaci"};var jb={};jb={dismiss:"Elutasítás"};var Wb={};Wb={dismiss:"Ignora"};var Ub={};Ub={dismiss:"閉じる"};var Gb={};Gb={dismiss:"무시"};var qb={};qb={dismiss:"Atmesti"};var Yb={};Yb={dismiss:"Nerādīt"};var Xb={};Xb={dismiss:"Lukk"};var Qb={};Qb={dismiss:"Negeren"};var Jb={};Jb={dismiss:"Zignoruj"};var ex={};ex={dismiss:"Descartar"};var tx={};tx={dismiss:"Dispensar"};var nx={};nx={dismiss:"Revocare"};var rx={};rx={dismiss:"Пропустить"};var ix={};ix={dismiss:"Zrušiť"};var ox={};ox={dismiss:"Opusti"};var lx={};lx={dismiss:"Odbaci"};var ax={};ax={dismiss:"Avvisa"};var sx={};sx={dismiss:"Kapat"};var ux={};ux={dismiss:"Скасувати"};var cx={};cx={dismiss:"取消"};var dx={};dx={dismiss:"關閉"};var fx={};fx={"ar-AE":Lb,"bg-BG":Db,"cs-CZ":Rb,"da-DK":Bb,"de-DE":Vb,"el-GR":Ib,"en-US":Fb,"es-ES":Zb,"et-EE":Ob,"fi-FI":Hb,"fr-FR":Nb,"he-IL":zb,"hr-HR":Kb,"hu-HU":jb,"it-IT":Wb,"ja-JP":Ub,"ko-KR":Gb,"lt-LT":qb,"lv-LV":Yb,"nb-NO":Xb,"nl-NL":Qb,"pl-PL":Jb,"pt-BR":ex,"pt-PT":tx,"ro-RO":nx,"ru-RU":rx,"sk-SK":ix,"sl-SI":ox,"sr-SP":lx,"sv-SE":ax,"tr-TR":sx,"uk-UA":ux,"zh-CN":cx,"zh-TW":dx};const xm={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function px(e={}){let{style:t,isFocusable:n}=e,[r,i]=m.useState(!1),{focusWithinProps:o}=Ta({isDisabled:!n,onFocusWithinChange:u=>i(u)}),a=m.useMemo(()=>r?t:t?{...xm,...t}:xm,[r]);return{visuallyHiddenProps:{...o,style:a}}}function Yc(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...o}=e,{visuallyHiddenProps:a}=px(e);return O.createElement(n,Ce(o,a),t)}function CZ(e){return e&&e.__esModule?e.default:e}function i7(e){let{onDismiss:t,...n}=e,r=Vo(CZ(fx),"@react-aria/overlays"),i=j9(n,r.format("dismiss")),o=()=>{t&&t()};return O.createElement(Yc,null,O.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let fl=new WeakMap,nn=[];function vx(e,t=document.body){let n=new Set(e),r=new Set,i=c=>{for(let h of c.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(h);let d=h=>{if(n.has(h)||r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let y of n)if(h.contains(y))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},p=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT,{acceptNode:d}),v=d(c);if(v===NodeFilter.FILTER_ACCEPT&&o(c),v!==NodeFilter.FILTER_REJECT){let h=p.nextNode();for(;h!=null;)o(h),h=p.nextNode()}},o=c=>{var d;let p=(d=fl.get(c))!==null&&d!==void 0?d:0;c.getAttribute("aria-hidden")==="true"&&p===0||(p===0&&c.setAttribute("aria-hidden","true"),r.add(c),fl.set(c,p+1))};nn.length&&nn[nn.length-1].disconnect(),i(t);let a=new MutationObserver(c=>{for(let d of c)if(!(d.type!=="childList"||d.addedNodes.length===0)&&![...n,...r].some(p=>p.contains(d.target))){for(let p of d.removedNodes)p instanceof Element&&(n.delete(p),r.delete(p));for(let p of d.addedNodes)(p instanceof HTMLElement||p instanceof SVGElement)&&(p.dataset.liveAnnouncer==="true"||p.dataset.reactAriaTopLayer==="true")?n.add(p):p instanceof Element&&i(p)}});a.observe(t,{childList:!0,subtree:!0});let u={observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return nn.push(u),()=>{a.disconnect();for(let c of r){let d=fl.get(c);d===1?(c.removeAttribute("aria-hidden"),fl.delete(c)):fl.set(c,d-1)}u===nn[nn.length-1]?(nn.pop(),nn.length&&nn[nn.length-1].observe()):nn.splice(nn.indexOf(u),1)}}function _Z(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...u}=e,{overlayProps:c,underlayProps:d}=Tb({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:p,arrowProps:v,placement:h}=kb({...u,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:null});return Ab({isDisabled:i||!t.isOpen}),We(()=>{if(t.isOpen&&!i&&r.current)return vx([r.current])},[i,t.isOpen,r]),{popoverProps:Ce(c,p),arrowProps:v,underlayProps:d,placement:h}}const PZ=m.createContext({});function EZ(){var e;return(e=m.useContext(PZ))!==null&&e!==void 0?e:{}}const hx=O.createContext(null);function mx(e){let t=Jn(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,o]=m.useState(!1),a=m.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:u}=EZ();if(!e.portalContainer&&u&&(n=u()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=O.createElement(Wc,{restoreFocus:!0,contain:i&&!r},c)),c=O.createElement(hx.Provider,{value:a},O.createElement(sF,null,c)),M3.createPortal(c,n)}function gx(){let e=m.useContext(hx),t=e==null?void 0:e.setContain;We(()=>{t==null||t(!0)},[t])}function kZ(e,t,n){let{overlayProps:r,underlayProps:i}=Tb({...e,isOpen:t.isOpen,onClose:t.close},n);return Ab({isDisabled:!t.isOpen}),gx(),m.useEffect(()=>{if(t.isOpen)return vx([n.current])},[t.isOpen,n]),{modalProps:Ce(r),underlayProps:i}}const U3=new WeakMap;function TZ(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function MZ(e,t){let n=U3.get(e);if(!n)throw new Error("Unknown list");return`${n.id}-option-${TZ(t)}`}function o7(e){return $I()?e.altKey:e.ctrlKey}function Vi(e){return p2()?e.metaKey:e.ctrlKey}const AZ=1e3;function yx(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=m.useRef({search:"",timeout:null}).current,o=a=>{let u=LZ(a.key);if(!u||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))return;u===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=u;let c=t.getKeyForSearch(i.search,n.focusedKey);c==null&&(c=t.getKeyForSearch(i.search)),c!=null&&(n.setFocusedKey(c),r&&r(c)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},AZ)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:null}}}function LZ(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function DZ(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:u=!1,selectOnFocus:c=t.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:p,allowsTabNavigation:v=!1,isVirtualized:h,scrollRef:y=r,linkBehavior:x="action"}=e,{direction:C}=Bo(),E=Hc(),S=R=>{if(R.altKey&&R.key==="Tab"&&R.preventDefault(),!r.current.contains(R.target))return;const F=(Q,me)=>{if(Q!=null){if(t.isLink(Q)&&x==="selection"&&c&&!o7(R)){pi.flushSync(()=>{t.setFocusedKey(Q,me)});let _e=y.current.querySelector(`[data-key="${CSS.escape(Q.toString())}"]`),X=t.getItemProps(Q);E.open(_e,R,X.href,X.routerOptions);return}if(t.setFocusedKey(Q,me),t.isLink(Q)&&x==="override")return;R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&!o7(R)&&t.replaceSelection(Q)}};switch(R.key){case"ArrowDown":if(n.getKeyBelow){var re,z;R.preventDefault();let Q=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n);Q==null&&o&&(Q=(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n,t.focusedKey)),F(Q)}break;case"ArrowUp":if(n.getKeyAbove){var N,te;R.preventDefault();let Q=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):(N=n.getLastKey)===null||N===void 0?void 0:N.call(n);Q==null&&o&&(Q=(te=n.getLastKey)===null||te===void 0?void 0:te.call(n,t.focusedKey)),F(Q)}break;case"ArrowLeft":if(n.getKeyLeftOf){var ae,q;R.preventDefault();let Q=n.getKeyLeftOf(t.focusedKey);Q==null&&o&&(Q=C==="rtl"?(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):(q=n.getLastKey)===null||q===void 0?void 0:q.call(n,t.focusedKey)),F(Q,C==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var U,oe;R.preventDefault();let Q=n.getKeyRightOf(t.focusedKey);Q==null&&o&&(Q=C==="rtl"?(U=n.getLastKey)===null||U===void 0?void 0:U.call(n,t.focusedKey):(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),F(Q,C==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){R.preventDefault();let Q=n.getFirstKey(t.focusedKey,Vi(R));t.setFocusedKey(Q),Vi(R)&&R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&t.replaceSelection(Q)}break;case"End":if(n.getLastKey){R.preventDefault();let Q=n.getLastKey(t.focusedKey,Vi(R));t.setFocusedKey(Q),Vi(R)&&R.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Q):c&&t.replaceSelection(Q)}break;case"PageDown":if(n.getKeyPageBelow){R.preventDefault();let Q=n.getKeyPageBelow(t.focusedKey);F(Q)}break;case"PageUp":if(n.getKeyPageAbove){R.preventDefault();let Q=n.getKeyPageAbove(t.focusedKey);F(Q)}break;case"a":Vi(R)&&t.selectionMode==="multiple"&&u!==!0&&(R.preventDefault(),t.selectAll());break;case"Escape":!a&&t.selectedKeys.size!==0&&(R.stopPropagation(),R.preventDefault(),t.clearSelection());break;case"Tab":if(!v){if(R.shiftKey)r.current.focus();else{let Q=xr(r.current,{tabbable:!0}),me,_e;do _e=Q.lastChild(),_e&&(me=_e);while(_e);me&&!me.contains(document.activeElement)&&Ot(me)}break}}},b=m.useRef({top:0,left:0});U6(y,"scroll",h?null:()=>{b.current={top:y.current.scrollTop,left:y.current.scrollLeft}});let w=R=>{if(t.isFocused){R.currentTarget.contains(R.target)||t.setFocused(!1);return}if(R.currentTarget.contains(R.target)){if(t.setFocused(!0),t.focusedKey==null){let z=te=>{te!=null&&(t.setFocusedKey(te),c&&t.replaceSelection(te))},N=R.relatedTarget;var F,re;N&&R.currentTarget.compareDocumentPosition(N)&Node.DOCUMENT_POSITION_FOLLOWING?z((F=t.lastSelectedKey)!==null&&F!==void 0?F:n.getLastKey()):z((re=t.firstSelectedKey)!==null&&re!==void 0?re:n.getFirstKey())}else h||(y.current.scrollTop=b.current.top,y.current.scrollLeft=b.current.left);if(t.focusedKey!=null){let z=y.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);z&&(z.contains(document.activeElement)||Ot(z),So()==="keyboard"&&q6(z,{containingElement:r.current}))}}},M=R=>{R.currentTarget.contains(R.relatedTarget)||t.setFocused(!1)};const A=m.useRef(i);m.useEffect(()=>{if(A.current){let R=null;i==="first"&&(R=n.getFirstKey()),i==="last"&&(R=n.getLastKey());let F=t.selectedKeys;if(F.size){for(let re of F)if(t.canSelectItem(re)){R=re;break}}t.setFocused(!0),t.setFocusedKey(R),R==null&&!p&&ui(r.current)}},[]);let D=m.useRef(t.focusedKey);m.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==D.current||A.current)&&(y!=null&&y.current)){let R=So(),F=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!F)return;(R==="keyboard"||A.current)&&(U9(y.current,F),R!=="virtual"&&q6(F,{containingElement:r.current}))}!p&&t.isFocused&&t.focusedKey==null&&D.current!=null&&ui(r.current),D.current=t.focusedKey,A.current=!1}),U6(r,"react-aria-focus-scope-restore",R=>{R.preventDefault(),t.setFocused(!0)});let V={onKeyDown:S,onFocus:w,onBlur:M,onMouseDown(R){y.current===R.target&&R.preventDefault()}},{typeSelectProps:_}=yx({keyboardDelegate:n,selectionManager:t});d||(V=Ce(_,V));let H;return p||(H=t.focusedKey==null?0:-1),{collectionProps:{...V,tabIndex:H}}}function bx(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:o,focus:a,isDisabled:u,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:p="action"}=e,v=Hc(),h=q=>{if(q.pointerType==="keyboard"&&o7(q))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(p==="selection"){let U=t.getItemProps(n);v.open(r.current,q,U.href,U.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(p==="override"||p==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):q&&q.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||q&&(Vi(q)||q.pointerType==="touch"||q.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};m.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!o&&(a?a():document.activeElement!==r.current&&ui(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,o]),u=u||t.isDisabled(n);let y={};!o&&!u?y={tabIndex:n===t.focusedKey?0:-1,onFocus(q){q.target===r.current&&t.setFocusedKey(n)}}:u&&(y.onMouseDown=q=>{q.preventDefault()});let x=t.isLink(n)&&p==="override",C=t.isLink(n)&&p!=="selection"&&p!=="none",E=!u&&t.canSelectItem(n)&&!x,S=(c||C)&&!u,b=S&&(t.selectionBehavior==="replace"?!E:!E||t.isEmpty),w=S&&E&&t.selectionBehavior==="replace",M=b||w,A=m.useRef(null),D=M&&E,V=m.useRef(!1),_=m.useRef(!1),H=q=>{if(c&&c(),C){let U=t.getItemProps(n);v.open(r.current,q,U.href,U.routerOptions)}},R={};i?(R.onPressStart=q=>{A.current=q.pointerType,V.current=D,q.pointerType==="keyboard"&&(!M||$m())&&h(q)},d?(R.onPressUp=b?null:q=>{q.pointerType!=="keyboard"&&E&&h(q)},R.onPress=b?H:null):R.onPress=q=>{if(b||w&&q.pointerType!=="mouse"){if(q.pointerType==="keyboard"&&!wm())return;H(q)}else q.pointerType!=="keyboard"&&E&&h(q)}):(R.onPressStart=q=>{A.current=q.pointerType,V.current=D,_.current=b,E&&(q.pointerType==="mouse"&&!b||q.pointerType==="keyboard"&&(!S||$m()))&&h(q)},R.onPress=q=>{(q.pointerType==="touch"||q.pointerType==="pen"||q.pointerType==="virtual"||q.pointerType==="keyboard"&&M&&wm()||q.pointerType==="mouse"&&_.current)&&(M?H(q):E&&h(q))}),y["data-key"]=n,R.preventFocusOnPress=o;let{pressProps:F,isPressed:re}=wo(R),z=w?q=>{A.current==="mouse"&&(q.stopPropagation(),q.preventDefault(),H(q))}:void 0,{longPressProps:N}=fb({isDisabled:!D,onLongPress(q){q.pointerType==="touch"&&(h(q),t.setSelectionBehavior("toggle"))}}),te=q=>{A.current==="touch"&&V.current&&q.preventDefault()},ae=t.isLink(n)?q=>{ai.isOpening||q.preventDefault()}:void 0;return{itemProps:Ce(y,E||b?F:{},D?N:{},{onDoubleClick:z,onDragStartCapture:te,onClick:ae}),isPressed:re,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:u,allowsSelection:E,hasAction:M}}function wm(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function $m(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}class Sm{getItemRect(t){let n=this.ref.current,r=t!=null?n.querySelector(`[data-key="${CSS.escape(t.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;return{width:t.scrollWidth,height:t.scrollHeight}}getVisibleRect(){let t=this.ref.current;return{x:t.scrollLeft,y:t.scrollTop,width:t.offsetWidth,height:t.offsetHeight}}constructor(t){this.ref=t}}class G3{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}getNextKey(t){for(t=this.collection.getKeyAfter(t);t!=null;){let n=this.collection.getItem(t);if(n.type==="item"&&!this.isDisabled(n))return t;t=this.collection.getKeyAfter(t)}return null}getPreviousKey(t){for(t=this.collection.getKeyBefore(t);t!=null;){let n=this.collection.getItem(t);if(n.type==="item"&&!this.isDisabled(n))return t;t=this.collection.getKeyBefore(t)}return null}findKey(t,n,r){let i=this.layoutDelegate.getItemRect(t);if(!i)return null;let o=i;do t=n(t),i=this.layoutDelegate.getItemRect(t);while(i&&r(o,i));return t}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();for(;t!=null;){let n=this.collection.getItem(t);if((n==null?void 0:n.type)==="item"&&!this.isDisabled(n))return t;t=this.collection.getKeyAfter(t)}return null}getLastKey(){let t=this.collection.getLastKey();for(;t!=null;){let n=this.collection.getItem(t);if(n.type==="item"&&!this.isDisabled(n))return t;t=this.collection.getKeyBefore(t)}return null}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(!ua(n))return this.getFirstKey();if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i;)t=this.getKeyAbove(t),r=t==null?null:this.layoutDelegate.getItemRect(t)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i;)t=this.getKeyAbove(t),r=t==null?null:this.layoutDelegate.getItemRect(t)}return t??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(!ua(n))return this.getLastKey();if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xo||new G3({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:u,layoutDelegate:a}),[o,a,n,r,i,u,c]),{collectionProps:p}=DZ({...e,ref:i,selectionManager:t,keyboardDelegate:d});return{listProps:p}}function RZ(e,t,n){let r=a0(e,{labelable:!0}),i=e.selectionBehavior||"toggle",o=e.linkBehavior||(i==="replace"?"action":"override");i==="toggle"&&o==="action"&&(o="override");let{listProps:a}=xx({...e,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:o}),{focusWithinProps:u}=Ta({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),c=Kt(e.id);U3.set(t,{id:c,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:o});let{labelProps:d,fieldProps:p}=j3({...e,id:c,labelElementType:"span"});return{labelProps:d,listBoxProps:Ce(r,u,t.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...Ce(p,a)})}}class BZ{build(t,n){return this.context=n,Cm(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let i of t.items)yield*this.getFullNode({value:i},{renderer:n})}else{let i=[];O.Children.forEach(n,a=>{i.push(a)});let o=0;for(let a of i){let u=this.getFullNode({element:a,index:o},{});for(let c of u)o++,yield c}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let u=(a=o.key)!==null&&a!==void 0?a:o.id;if(u==null)throw new Error("No key found for item");return u}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){let o=t.element;if(!o&&t.value&&n&&n.renderer){let c=this.cache.get(t.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=t.index,c.parentKey=i?i.key:null,yield c;return}o=n.renderer(t.value)}if(O.isValidElement(o)){let c=o.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let h=typeof o.type=="function"?o.type.name:o.type;throw new Error(`Unknown element <${h}> in collection.`)}let d=c.getCollectionNode(o.props,this.context),p=t.index,v=d.next();for(;!v.done&&v.value;){let h=v.value;t.index=p;let y=h.key;y||(y=h.element?null:this.getKey(o,t,n,r));let C=[...this.getFullNode({...h,key:y,index:p,wrapper:VZ(t.wrapper,h.wrapper)},this.getChildState(n,h),r?`${r}${o.key}`:o.key,i)];for(let E of C){if(E.value=h.value||t.value,E.value&&this.cache.set(E.value,E),t.type&&E.type!==t.type)throw new Error(`Unsupported type <${$5(E.type)}> in <${$5(i.type)}>. Only <${$5(t.type)}> is supported.`);p++,yield E}v=d.next(C)}return}if(t.key==null)return;let a=this,u={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:t.value,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:t.textValue,"aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes,childNodes:Cm(function*(){if(!t.hasChildNodes)return;let c=0;for(let d of t.childNodes()){d.key!=null&&(d.key=`${u.key}${d.key}`),d.index=c;let p=a.getFullNode(d,a.getChildState(n,d),u.key,u);for(let v of p)c++,yield v}})};yield u}constructor(){this.cache=new WeakMap}}function Cm(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function VZ(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function $5(e){return e[0].toUpperCase()+e.slice(1)}function wx(e,t,n){let r=m.useMemo(()=>new BZ,[]),{children:i,items:o,collection:a}=e;return m.useMemo(()=>{if(a)return a;let c=r.build({children:i,items:o},n);return t(c)},[r,i,o,a,n,t])}function $x(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function IZ(e){return FZ(e)}function FZ(e,t){for(let n of e)return n}function S5(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[..._m(e,t),t],i=[..._m(e,n),n],o=r.slice(0,i.length).findIndex((a,u)=>a!==i[u]);return o!==-1?(t=r[o],n=i[o],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function _m(e,t){let n=[];for(;(t==null?void 0:t.parentKey)!=null;)t=e.getItem(t.parentKey),n.unshift(t);return n}const Pm=new WeakMap;function Sx(e){let t=Pm.get(e);if(t!=null)return t;t=0;let n=r=>{for(let i of r)i.type==="section"?n($x(i,e)):t++};return n(e),Pm.set(e,t),t}function ZZ(e,t,n){var r,i;let{key:o}=e,a=U3.get(t);var u;let c=(u=e.isDisabled)!==null&&u!==void 0?u:t.selectionManager.isDisabled(o);var d;let p=(d=e.isSelected)!==null&&d!==void 0?d:t.selectionManager.isSelected(o);var v;let h=(v=e.shouldSelectOnPressUp)!==null&&v!==void 0?v:a==null?void 0:a.shouldSelectOnPressUp;var y;let x=(y=e.shouldFocusOnHover)!==null&&y!==void 0?y:a==null?void 0:a.shouldFocusOnHover;var C;let E=(C=e.shouldUseVirtualFocus)!==null&&C!==void 0?C:a==null?void 0:a.shouldUseVirtualFocus;var S;let b=(S=e.isVirtualized)!==null&&S!==void 0?S:a==null?void 0:a.isVirtualized,w=Kn(),M=Kn(),A={role:"option","aria-disabled":c||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?p:void 0};p2()&&R3()||(A["aria-label"]=e["aria-label"],A["aria-labelledby"]=w,A["aria-describedby"]=M);let D=t.collection.getItem(o);if(b){let ae=Number(D==null?void 0:D.index);A["aria-posinset"]=Number.isNaN(ae)?void 0:ae+1,A["aria-setsize"]=Sx(t.collection)}let V=a!=null&&a.onAction?()=>{var ae;return a==null||(ae=a.onAction)===null||ae===void 0?void 0:ae.call(a,o)}:void 0,{itemProps:_,isPressed:H,isFocused:R,hasAction:F,allowsSelection:re}=bx({selectionManager:t.selectionManager,key:o,ref:n,shouldSelectOnPressUp:h,allowsDifferentPressOrigin:h&&x,isVirtualized:b,shouldUseVirtualFocus:E,isDisabled:c,onAction:V||!(D==null||(r=D.props)===null||r===void 0)&&r.onAction?f2(D==null||(i=D.props)===null||i===void 0?void 0:i.onAction,V):void 0,linkBehavior:a==null?void 0:a.linkBehavior}),{hoverProps:z}=Ut({isDisabled:c||!x,onHoverStart(){$o()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(o))}}),N=a0(D==null?void 0:D.props);delete N.id;let te=N9(D==null?void 0:D.props);return{optionProps:{...A,...Ce(N,_,z,te),id:MZ(t,o)},labelProps:{id:w},descriptionProps:{id:M},isFocused:R,isFocusVisible:R&&$o(),isSelected:p,isDisabled:c,isPressed:H,allowsSelection:re,hasAction:F}}function OZ(e){let{heading:t,"aria-label":n}=e,r=Kt();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":t?r:void 0}}}var Cx={};Cx={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var _x={};_x={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Px={};Px={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ex={};Ex={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var kx={};kx={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Tx={};Tx={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Mx={};Mx={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Ax={};Ax={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Lx={};Lx={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Dx={};Dx={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Rx={};Rx={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Bx={};Bx={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Vx={};Vx={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Ix={};Ix={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Fx={};Fx={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Zx={};Zx={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Ox={};Ox={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Hx={};Hx={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Nx={};Nx={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var zx={};zx={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Kx={};Kx={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var jx={};jx={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Wx={};Wx={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Ux={};Ux={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Gx={};Gx={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var qx={};qx={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Yx={};Yx={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Xx={};Xx={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Qx={};Qx={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Jx={};Jx={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var ew={};ew={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var tw={};tw={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var nw={};nw={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var rw={};rw={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var iw={};iw={"ar-AE":Cx,"bg-BG":_x,"cs-CZ":Px,"da-DK":Ex,"de-DE":kx,"el-GR":Tx,"en-US":Mx,"es-ES":Ax,"et-EE":Lx,"fi-FI":Dx,"fr-FR":Rx,"he-IL":Bx,"hr-HR":Vx,"hu-HU":Ix,"it-IT":Fx,"ja-JP":Zx,"ko-KR":Ox,"lt-LT":Hx,"lv-LV":Nx,"nb-NO":zx,"nl-NL":Kx,"pl-PL":jx,"pt-BR":Wx,"pt-PT":Ux,"ro-RO":Gx,"ru-RU":qx,"sk-SK":Yx,"sl-SI":Xx,"sr-SP":Qx,"sv-SE":Jx,"tr-TR":ew,"uk-UA":tw,"zh-CN":nw,"zh-TW":rw};function HZ(e){return e&&e.__esModule?e.default:e}function ow(e,t,n){let{type:r="menu",isDisabled:i,trigger:o="press"}=e,a=Kt(),{triggerProps:u,overlayProps:c}=Mb({type:r},t,n),d=y=>{if(!i&&!(o==="longPress"&&!y.altKey)&&n&&n.current)switch(y.key){case"Enter":case" ":if(o==="longPress")return;case"ArrowDown":"continuePropagation"in y||y.stopPropagation(),y.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in y||y.stopPropagation(),y.preventDefault(),t.toggle("last");break;default:"continuePropagation"in y&&y.continuePropagation()}},p=Vo(HZ(iw),"@react-aria/menu"),{longPressProps:v}=fb({isDisabled:i||o!=="longPress",accessibilityDescription:p.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),h={onPressStart(y){y.pointerType!=="touch"&&y.pointerType!=="keyboard"&&!i&&t.open(y.pointerType==="virtual"?"first":null)},onPress(y){y.pointerType==="touch"&&!i&&t.toggle()}};return delete u.onPress,{menuTriggerProps:{...u,...o==="press"?h:v,id:a,onKeyDown:d},menuProps:{...c,"aria-labelledby":a,autoFocus:t.focusStrategy||!0,onClose:t.close}}}const lw=new WeakMap;function NZ(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=e;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let u=a0(e,{labelable:!0}),{listProps:c}=xx({...a,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return lw.set(t,{onClose:e.onClose,onAction:e.onAction}),{menuProps:Ce(u,{onKeyDown:i,onKeyUp:o},{role:"menu",...c,onKeyDown:d=>{d.key!=="Escape"&&c.onKeyDown(d)}})}}function zZ(e,t,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":u,onPressStart:c,onPressUp:d,onPress:p,onPressChange:v,onPressEnd:h,onHoverStart:y,onHoverChange:x,onHoverEnd:C,onKeyDown:E,onKeyUp:S,onFocus:b,onFocusChange:w,onBlur:M}=e,A=!!u;var D;let V=(D=e.isDisabled)!==null&&D!==void 0?D:t.selectionManager.isDisabled(i);var _;let H=(_=e.isSelected)!==null&&_!==void 0?_:t.selectionManager.isSelected(i),R=lw.get(t),F=t.collection.getItem(i),re=e.onClose||R.onClose,z=Hc(),N=le=>{var Se;if(!A){if(!(F==null||(Se=F.props)===null||Se===void 0)&&Se.onAction?F.props.onAction():e.onAction&&e.onAction(i),R.onAction){let Ae=R.onAction;Ae(i)}le.target instanceof HTMLAnchorElement&&z.open(le.target,le,F.props.href,F.props.routerOptions)}},te="menuitem";A||(t.selectionManager.selectionMode==="single"?te="menuitemradio":t.selectionManager.selectionMode==="multiple"&&(te="menuitemcheckbox"));let ae=Kn(),q=Kn(),U=Kn(),oe={id:r,"aria-disabled":V||void 0,role:te,"aria-label":e["aria-label"],"aria-labelledby":ae,"aria-describedby":[q,U].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":u,"aria-expanded":e["aria-expanded"]};t.selectionManager.selectionMode!=="none"&&!A&&(oe["aria-checked"]=H),a&&(oe["aria-posinset"]=F==null?void 0:F.index,oe["aria-setsize"]=Sx(t.collection));let Q=le=>{le.pointerType==="keyboard"&&N(le),c==null||c(le)},me=le=>{le.pointerType!=="keyboard"&&(N(le),!A&&re&&(o??(t.selectionManager.selectionMode!=="multiple"||t.selectionManager.isLink(i)))&&re()),d==null||d(le)},{itemProps:_e,isFocused:X}=bx({selectionManager:t.selectionManager,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:K,isPressed:ee}=wo({onPressStart:Q,onPress:p,onPressUp:me,onPressChange:v,onPressEnd:h,isDisabled:V}),{hoverProps:ue}=Ut({isDisabled:V,onHoverStart(le){$o()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i)),y==null||y(le)},onHoverChange:x,onHoverEnd:C}),{keyboardProps:de}=db({onKeyDown:le=>{if(le.repeat){le.continuePropagation();return}switch(le.key){case" ":!V&&t.selectionManager.selectionMode==="none"&&!A&&o!==!1&&re&&re();break;case"Enter":!V&&o!==!1&&!A&&re&&re();break;default:A||le.continuePropagation(),E==null||E(le);break}},onKeyUp:S}),{focusProps:ce}=O3({onBlur:M,onFocus:b,onFocusChange:w}),ie=a0(F.props);delete ie.id;let ye=N9(F.props);return{menuItemProps:{...oe,...Ce(ie,ye,A?{onFocus:_e.onFocus,"data-key":_e["data-key"]}:_e,K,ue,de,ce),tabIndex:_e.tabIndex!=null?-1:void 0},labelProps:{id:ae},descriptionProps:{id:q},keyboardShortcutProps:{id:U},isFocused:X,isSelected:H,isPressed:ee,isDisabled:V}}function KZ(e){let{heading:t,"aria-label":n}=e,r=Kt();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":t?r:void 0}}}function aw(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:o=!1,type:a="text",validationBehavior:u="aria"}=e,[c,d]=$2(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=Uc(e,t),v=qc({...e,value:c}),{isInvalid:h,validationErrors:y,validationDetails:x}=v.displayValidation,{labelProps:C,fieldProps:E,descriptionProps:S,errorMessageProps:b}=_b({...e,isInvalid:h,errorMessage:e.errorMessage||y}),w=a0(e,{labelable:!0});const M={type:a,pattern:e.pattern};return V3(t,c,d),K3(e,v,t),m.useEffect(()=>{if(t.current instanceof fn(t.current).HTMLTextAreaElement){let A=t.current;Object.defineProperty(A,"defaultValue",{get:()=>A.value,set:()=>{},configurable:!0})}},[t]),{labelProps:C,inputProps:Ce(w,n==="input"?M:void 0,{disabled:r,readOnly:o,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:c,onChange:A=>d(A.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...p,...E}),descriptionProps:S,errorMessageProps:b,isInvalid:h,validationErrors:y,validationDetails:x}}function jZ(e,t){let{role:n="dialog"}=e,r=Kn();r=e["aria-label"]?void 0:r;let i=m.useRef(!1);return m.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){ui(t.current);let o=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),ui(t.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),gx(),{dialogProps:{...a0(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}},titleProps:{id:r}}}function WZ(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:o,formatOptions:a={style:"percent"}}=e,u=a0(e,{labelable:!0}),{labelProps:c,fieldProps:d}=j3({...e,labelElementType:"span"});t=aa(t,n,r);let p=(t-n)/(r-n),v=qF(a);if(!o&&!i){let h=a.style==="percent"?p:t;i=v.format(h)}return{progressBarProps:Ce(u,{...d,"aria-valuenow":o?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":o?void 0:i,role:"progressbar"}),labelProps:c}}var sw={};sw={"Clear search":"مسح البحث"};var uw={};uw={"Clear search":"Изчистване на търсене"};var cw={};cw={"Clear search":"Vymazat hledání"};var dw={};dw={"Clear search":"Ryd søgning"};var fw={};fw={"Clear search":"Suche zurücksetzen"};var pw={};pw={"Clear search":"Απαλοιφή αναζήτησης"};var vw={};vw={"Clear search":"Clear search"};var hw={};hw={"Clear search":"Borrar búsqueda"};var mw={};mw={"Clear search":"Tühjenda otsing"};var gw={};gw={"Clear search":"Tyhjennä haku"};var yw={};yw={"Clear search":"Effacer la recherche"};var bw={};bw={"Clear search":"נקה חיפוש"};var xw={};xw={"Clear search":"Obriši pretragu"};var ww={};ww={"Clear search":"Keresés törlése"};var $w={};$w={"Clear search":"Cancella ricerca"};var Sw={};Sw={"Clear search":"検索をクリア"};var Cw={};Cw={"Clear search":"검색 지우기"};var _w={};_w={"Clear search":"Išvalyti iešką"};var Pw={};Pw={"Clear search":"Notīrīt meklēšanu"};var Ew={};Ew={"Clear search":"Tøm søk"};var kw={};kw={"Clear search":"Zoekactie wissen"};var Tw={};Tw={"Clear search":"Wyczyść zawartość wyszukiwania"};var Mw={};Mw={"Clear search":"Limpar pesquisa"};var Aw={};Aw={"Clear search":"Limpar pesquisa"};var Lw={};Lw={"Clear search":"Ştergeţi căutarea"};var Dw={};Dw={"Clear search":"Очистить поиск"};var Rw={};Rw={"Clear search":"Vymazať vyhľadávanie"};var Bw={};Bw={"Clear search":"Počisti iskanje"};var Vw={};Vw={"Clear search":"Obriši pretragu"};var Iw={};Iw={"Clear search":"Rensa sökning"};var Fw={};Fw={"Clear search":"Aramayı temizle"};var Zw={};Zw={"Clear search":"Очистити пошук"};var Ow={};Ow={"Clear search":"清除搜索"};var Hw={};Hw={"Clear search":"清除搜尋條件"};var Nw={};Nw={"ar-AE":sw,"bg-BG":uw,"cs-CZ":cw,"da-DK":dw,"de-DE":fw,"el-GR":pw,"en-US":vw,"es-ES":hw,"et-EE":mw,"fi-FI":gw,"fr-FR":yw,"he-IL":bw,"hr-HR":xw,"hu-HU":ww,"it-IT":$w,"ja-JP":Sw,"ko-KR":Cw,"lt-LT":_w,"lv-LV":Pw,"nb-NO":Ew,"nl-NL":kw,"pl-PL":Tw,"pt-BR":Mw,"pt-PT":Aw,"ro-RO":Lw,"ru-RU":Dw,"sk-SK":Rw,"sl-SI":Bw,"sr-SP":Vw,"sv-SE":Iw,"tr-TR":Fw,"uk-UA":Zw,"zh-CN":Ow,"zh-TW":Hw};function UZ(e){return e&&e.__esModule?e.default:e}function GZ(e,t,n){let r=Vo(UZ(Nw),"@react-aria/searchfield"),{isDisabled:i,isReadOnly:o,onSubmit:a,onClear:u,type:c="search"}=e,d=S=>{const b=S.key;b==="Enter"&&(i||o)&&S.preventDefault(),!(i||o)&&(b==="Enter"&&a&&(S.preventDefault(),a(t.value)),b==="Escape"&&(t.value===""?S.continuePropagation():(t.setValue(""),u&&u())))},p=()=>{t.setValue(""),u&&u()},v=()=>{var S;(S=n.current)===null||S===void 0||S.focus()},{labelProps:h,inputProps:y,descriptionProps:x,errorMessageProps:C,...E}=aw({...e,value:t.value,onChange:t.setValue,onKeyDown:o?e.onKeyDown:f2(d,e.onKeyDown),type:c},n);return{labelProps:h,inputProps:{...y,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:i||o,onPress:p,onPressStart:v},descriptionProps:x,errorMessageProps:C,...E}}const zw=new WeakMap;function qZ(e,t,n){let{keyboardDelegate:r,isDisabled:i,isRequired:o,name:a,validationBehavior:u="aria"}=e,c=z3({usage:"search",sensitivity:"base"}),d=m.useMemo(()=>r||new G3(t.collection,t.disabledKeys,null,c),[r,t.collection,t.disabledKeys,c]),{menuTriggerProps:p,menuProps:v}=ow({isDisabled:i,type:"listbox"},t,n),h=_=>{switch(_.key){case"ArrowLeft":{_.preventDefault();let H=t.selectedKey!=null?d.getKeyAbove(t.selectedKey):d.getFirstKey();H&&t.setSelectedKey(H);break}case"ArrowRight":{_.preventDefault();let H=t.selectedKey!=null?d.getKeyBelow(t.selectedKey):d.getFirstKey();H&&t.setSelectedKey(H);break}}},{typeSelectProps:y}=yx({keyboardDelegate:d,selectionManager:t.selectionManager,onTypeSelect(_){t.setSelectedKey(_)}}),{isInvalid:x,validationErrors:C,validationDetails:E}=t.displayValidation,{labelProps:S,fieldProps:b,descriptionProps:w,errorMessageProps:M}=_b({...e,labelElementType:"span",isInvalid:x,errorMessage:e.errorMessage||C});y.onKeyDown=y.onKeyDownCapture,delete y.onKeyDownCapture;let A=a0(e,{labelable:!0}),D=Ce(y,p,b),V=Kt();return zw.set(t,{isDisabled:i,isRequired:o,name:a,validationBehavior:u}),{labelProps:{...S,onClick:()=>{e.isDisabled||(n.current.focus(),ub("keyboard"))}},triggerProps:Ce(A,{...D,isDisabled:i,onKeyDown:f2(D.onKeyDown,h,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[V,D["aria-labelledby"],D["aria-label"]&&!D["aria-labelledby"]?D.id:null].filter(Boolean).join(" "),onFocus(_){t.isFocused||(e.onFocus&&e.onFocus(_),e.onFocusChange&&e.onFocusChange(!0),t.setFocused(!0))},onBlur(_){t.isOpen||(e.onBlur&&e.onBlur(_),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))}}),valueProps:{id:V},menuProps:{...v,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||(e.onBlur&&e.onBlur(_),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))},"aria-labelledby":[b["aria-labelledby"],D["aria-label"]&&!b["aria-labelledby"]?D.id:null].filter(Boolean).join(" ")},descriptionProps:w,errorMessageProps:M,isInvalid:x,validationErrors:C,validationDetails:E}}function YZ(e,t,n){let r=zw.get(t)||{},{autoComplete:i,name:o=r.name,isDisabled:a=r.isDisabled}=e,{validationBehavior:u,isRequired:c}=r,d=pF(),{visuallyHiddenProps:p}=px();V3(e.selectRef,t.selectedKey,t.setSelectedKey),K3({validationBehavior:u,focus:()=>n.current.focus()},t,e.selectRef);var v;return{containerProps:{...p,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{type:"text",tabIndex:d==null||t.isFocused||t.isOpen?-1:0,style:{fontSize:16},onFocus:()=>n.current.focus(),disabled:a},selectProps:{tabIndex:-1,autoComplete:i,disabled:a,required:u==="native"&&c,name:o,value:(v=t.selectedKey)!==null&&v!==void 0?v:"",onChange:h=>t.setSelectedKey(h.target.value)}}}function XZ(e){let{state:t,triggerRef:n,label:r,name:i,isDisabled:o}=e,a=m.useRef(null),{containerProps:u,inputProps:c,selectProps:d}=YZ({...e,selectRef:a},t,n);var p;return t.collection.size<=300?O.createElement("div",{...u,"data-testid":"hidden-select-container"},O.createElement("input",c),O.createElement("label",null,r,O.createElement("select",{...d,ref:a},O.createElement("option",null),[...t.collection.getKeys()].map(v=>{let h=t.collection.getItem(v);if(h.type==="item")return O.createElement("option",{key:h.key,value:h.key},h.textValue)})))):i?O.createElement("input",{type:"hidden",autoComplete:d.autoComplete,name:i,disabled:o,value:(p=t.selectedKey)!==null&&p!==void 0?p:""}):null}function QZ(e,t,n){let{labelProps:r,inputProps:i,isSelected:o,isPressed:a,isDisabled:u,isReadOnly:c}=Sb(e,t,n);return{labelProps:r,inputProps:{...i,role:"switch",checked:o},isSelected:o,isPressed:a,isDisabled:u,isReadOnly:c}}function JZ(e,t){let n=a0(e,{labelable:!0}),{hoverProps:r}=Ut({onHoverStart:()=>t==null?void 0:t.open(!0),onHoverEnd:()=>t==null?void 0:t.close()});return{tooltipProps:Ce(n,r,{role:"tooltip"})}}function eO(e,t,n){let{isDisabled:r,trigger:i}=e,o=Kt(),a=m.useRef(!1),u=m.useRef(!1),c=()=>{(a.current||u.current)&&t.open(u.current)},d=S=>{!a.current&&!u.current&&t.close(S)};m.useEffect(()=>{let S=b=>{n&&n.current&&b.key==="Escape"&&(b.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",S,!0),()=>{document.removeEventListener("keydown",S,!0)}},[n,t]);let p=()=>{i!=="focus"&&(So()==="pointer"?a.current=!0:a.current=!1,c())},v=()=>{i!=="focus"&&(u.current=!1,a.current=!1,d())},h=()=>{u.current=!1,a.current=!1,d(!0)},y=()=>{$o()&&(u.current=!0,c())},x=()=>{u.current=!1,a.current=!1,d(!0)},{hoverProps:C}=Ut({isDisabled:r,onHoverStart:p,onHoverEnd:v}),{focusableProps:E}=Uc({isDisabled:r,onFocus:y,onBlur:x},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...Ce(E,C,{onPointerDown:h,onKeyDown:h})},tooltipProps:{id:o}}}const tO=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),Xc=m.createContext({});function nO(e,t){[e,t]=_0(e,t,Xc);let n=e,{buttonProps:r,isPressed:i}=YF(e,t),{focusProps:o,isFocused:a,isFocusVisible:u}=tr(e),{hoverProps:c,isHovered:d}=Ut(e),p=$0({...e,values:{isHovered:d,isPressed:i,isFocused:a,isFocusVisible:u,isDisabled:e.isDisabled||!1},defaultClassName:"react-aria-Button"});return O.createElement("button",{...a0(e,{propNames:tO}),...Ce(r,o,c),...p,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-pressed":n.isPressed||i||void 0,"data-hovered":d||void 0,"data-focused":a||void 0,"data-focus-visible":u||void 0})}const Kw=L3(nO),C2=m.createContext({});function rO(e,t){[e,t]=_0(e,t,C2);let{elementType:n="span",...r}=e;return O.createElement(n,{className:"react-aria-Text",...r,ref:t})}const jw=m.forwardRef(rO);class Em{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let a of o.childNodes)n(a)};for(let o of t)n(o);let r,i=0;for(let[o,a]of this.keyMap)r?(r.nextKey=o,a.prevKey=r.key):(this.firstKey=o,a.prevKey=void 0),a.type==="item"&&(a.index=i++),r=a,r.nextKey=void 0;this.lastKey=r==null?void 0:r.key}}class Cn extends Set{constructor(t,n,r){super(t),t instanceof Cn?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function iO(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ww(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=e,a=m.useRef(!1),[,u]=m.useState(!1),c=m.useRef(null),d=m.useRef(null),[,p]=m.useState(null),v=m.useMemo(()=>km(e.selectedKeys),[e.selectedKeys]),h=m.useMemo(()=>km(e.defaultSelectedKeys,new Cn),[e.defaultSelectedKeys]),[y,x]=$2(v,h,e.onSelectionChange),C=m.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[E,S]=m.useState(i);i==="replace"&&E==="toggle"&&typeof y=="object"&&y.size===0&&S("replace");let b=m.useRef(i);return m.useEffect(()=>{i!==b.current&&(S(i),b.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:S,get isFocused(){return a.current},setFocused(w){a.current=w,u(w)},get focusedKey(){return c.current},get childFocusStrategy(){return d.current},setFocusedKey(w,M="first"){c.current=w,d.current=M,p(w)},selectedKeys:y,setSelectedKeys(w){(r||!iO(w,y))&&x(w)},disabledKeys:C,disabledBehavior:o}}function km(e,t){return e?e==="all"?"all":new Cn(e):t}class Uw{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&S5(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&S5(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Cn([t],t,t);else{let r=this.state.selectedKeys,i=r.anchorKey||t;n=new Cn(r,i,t);for(let o of this.getKeyRange(i,r.currentKey||t))n.delete(o);for(let o of this.getKeyRange(t,i))this.canSelectItem(o)&&n.add(o)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?S5(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let r=[],i=t;for(;i;){let o=this.collection.getItem(i);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===n)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Cn(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Cn([t],t,t):new Cn;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Cn;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let i=this.collection.getItem(r);i.type==="item"&&t.push(r),i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(IZ($x(i,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Cn)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null}}function Gw(e){let{filter:t}=e,n=Ww(e),r=m.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=m.useCallback(d=>t?new Em(t(d)):new Em(d),[t]),o=m.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),a=wx(e,i,o),u=m.useMemo(()=>new Uw(a,n),[a,n]);const c=m.useRef(null);return m.useEffect(()=>{if(n.focusedKey!=null&&!a.getItem(n.focusedKey)){const d=c.current.getItem(n.focusedKey),p=[...c.current.getKeys()].map(E=>{const S=c.current.getItem(E);return S.type==="item"?S:null}).filter(E=>E!==null),v=[...a.getKeys()].map(E=>{const S=a.getItem(E);return S.type==="item"?S:null}).filter(E=>E!==null),h=p.length-v.length;let y=Math.min(h>1?Math.max(d.index-h+1,0):d.index,v.length-1),x,C=!1;for(;y>=0;){if(!u.isDisabled(v[y].key)){x=v[y];break}yd.index&&(y=d.index),y--)}n.setFocusedKey(x?x.key:null)}c.current=a},[a,u,n,n.focusedKey]),{collection:a,disabledKeys:r,selectionManager:u}}function oO(e){var t;let[n,r]=$2(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),i=m.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:a,selectionManager:u}=Gw({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:d=>{var p;let v=(p=d.values().next().value)!==null&&p!==void 0?p:null;v===n&&e.onSelectionChange&&e.onSelectionChange(v),r(v)}}),c=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:a,selectionManager:u,selectedKey:n,setSelectedKey:r,selectedItem:c}}function Io(e){let[t,n]=$2(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=m.useCallback(()=>{n(!0)},[n]),i=m.useCallback(()=>{n(!1)},[n]),o=m.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:o}}function lO(e){let t=Io(e),[n,r]=m.useState(null),[i,o]=m.useState([]),a=()=>{o([]),t.close()};return{focusStrategy:n,...t,open(d=null){r(d),t.open()},toggle(d=null){r(d),t.toggle()},close(){a()},expandedKeysStack:i,openSubmenu:(d,p)=>{o(v=>p>v.length?v:[...v.slice(0,p),d])},closeSubmenu:(d,p)=>{o(v=>v[p]===d?v.slice(0,p):v)}}}function aO(e){let[t,n]=$2(Tm(e.value),Tm(e.defaultValue)||"",e.onChange);return{value:t,setValue:n}}function Tm(e){if(e!=null)return e.toString()}function sO(e){let t=Io(e),[n,r]=m.useState(null),i=oO({...e,onSelectionChange:c=>{e.onSelectionChange!=null&&e.onSelectionChange(c),t.close(),o.commitValidation()}}),o=qc({...e,value:i.selectedKey}),[a,u]=m.useState(!1);return{...o,...i,...t,focusStrategy:n,open(c=null){i.collection.size!==0&&(r(c),t.open())},toggle(c=null){i.collection.size!==0&&(r(c),t.toggle())},isFocused:a,setFocused:u}}const uO=1500,Mm=500;let F2={},cO=0,pl=!1,vr=null,Z2=null;function qw(e={}){let{delay:t=uO,closeDelay:n=Mm}=e,{isOpen:r,open:i,close:o}=Io(e),a=m.useMemo(()=>`${++cO}`,[]),u=m.useRef(void 0),c=m.useRef(o),d=()=>{F2[a]=h},p=()=>{for(let x in F2)x!==a&&(F2[x](!0),delete F2[x])},v=()=>{clearTimeout(u.current),u.current=null,p(),d(),pl=!0,i(),vr&&(clearTimeout(vr),vr=null),Z2&&(clearTimeout(Z2),Z2=null)},h=x=>{x||n<=0?(clearTimeout(u.current),u.current=null,c.current()):u.current||(u.current=setTimeout(()=>{u.current=null,c.current()},n)),vr&&(clearTimeout(vr),vr=null),pl&&(Z2&&clearTimeout(Z2),Z2=setTimeout(()=>{delete F2[a],Z2=null,pl=!1},Math.max(Mm,n)))},y=()=>{p(),d(),!r&&!vr&&!pl?vr=setTimeout(()=>{vr=null,pl=!0,v()},t):r||v()};return m.useEffect(()=>{c.current=o},[o]),m.useEffect(()=>()=>{clearTimeout(u.current),F2[a]&&delete F2[a]},[a]),{isOpen:r,open:x=>{!x&&t>0&&!u.current?y():v()},close:h}}class dO{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.iterable=t,n=n||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||n.has(a.key)))for(let u of a.childNodes)r(u)};for(let a of t)r(a);let i,o=0;for(let[a,u]of this.keyMap)i?(i.nextKey=a,u.prevKey=i.key):(this.firstKey=a,u.prevKey=void 0),u.type==="item"&&(u.index=o++),i=u,i.nextKey=void 0;this.lastKey=i==null?void 0:i.key}}function fO(e){let{onExpandedChange:t}=e,[n,r]=$2(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=Ww(e),o=m.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=wx(e,m.useCallback(c=>new dO(c,{expandedKeys:n}),[n]),null);return m.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:c=>{r(pO(n,c))},setExpandedKeys:r,selectionManager:new Uw(a,i)}}function pO(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}const Ma=m.createContext(null);function vO(e,t){let n=m.useContext(Ma);return n!=null&&n.isInvalid?O.createElement(mO,{...e,ref:t}):null}const hO=m.forwardRef(vO),mO=m.forwardRef((e,t)=>{let n=m.useContext(Ma),r=$0({...e,defaultClassName:"react-aria-FieldError",defaultChildren:n.validationErrors.length===0?void 0:n.validationErrors.join(" "),values:n});return r.children==null?null:O.createElement(jw,{slot:"errorMessage",...r,ref:t})}),Co=m.createContext(null);function gO(e,t){[e,t]=_0(e,t,Co);let{validationErrors:n,validationBehavior:r="native",children:i,className:o,...a}=e;return O.createElement("form",{noValidate:r!=="native",...a,ref:t,className:o||"react-aria-Form"},O.createElement(Co.Provider,{value:{...e,validationBehavior:r}},O.createElement($b.Provider,{value:n??{}},i)))}const Yw=m.forwardRef(gO),Aa=m.createContext({});function yO(e,t){[e,t]=_0(e,t,Aa);let{elementType:n="label",...r}=e;return O.createElement(n,{className:"react-aria-Label",...r,ref:t})}const bO=L3(yO),xO=m.createContext(null);function wO(e,t){let{inputRef:n=null,...r}=e;[e,t]=_0(r,t,qV);let{validationBehavior:i}=S2(Co)||{};var o,a;let u=(a=(o=e.validationBehavior)!==null&&o!==void 0?o:i)!==null&&a!==void 0?a:"native",c=m.useContext(xO),d=er(Fc(n,e.inputRef!==void 0?e.inputRef:null)),{labelProps:p,inputProps:v,isSelected:h,isDisabled:y,isReadOnly:x,isPressed:C,isInvalid:E}=c?oZ({...e,value:e.value,children:typeof e.children=="function"?!0:e.children},c,d):Cb({...e,children:typeof e.children=="function"?!0:e.children,validationBehavior:u},W3(e),d),{isFocused:S,isFocusVisible:b,focusProps:w}=tr(),M=y||x,{hoverProps:A,isHovered:D}=Ut({...e,isDisabled:M}),V=$0({...e,defaultClassName:"react-aria-Checkbox",values:{isSelected:h,isIndeterminate:e.isIndeterminate||!1,isPressed:C,isHovered:D,isFocused:S,isFocusVisible:b,isDisabled:y,isReadOnly:x,isInvalid:E,isRequired:e.isRequired||!1}}),_=a0(e);return delete _.id,O.createElement("label",{...Ce(_,p,A,V),ref:t,slot:e.slot||void 0,"data-selected":h||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-pressed":C||void 0,"data-hovered":D||void 0,"data-focused":S||void 0,"data-focus-visible":b||void 0,"data-disabled":y||void 0,"data-readonly":x||void 0,"data-invalid":E||void 0,"data-required":e.isRequired||void 0},O.createElement(Yc,{elementType:"span"},O.createElement("input",{...Ce(v,w),ref:d})),V.children)}const $O=m.forwardRef(wO),q3=m.createContext({});let SO=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i};function CO(e,t){[e,t]=_0(e,t,q3);let{hoverProps:n,isHovered:r}=Ut(e),{isFocused:i,isFocusVisible:o,focusProps:a}=tr({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",c=$0({...e,values:{isHovered:r,isFocused:i,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return O.createElement("input",{...Ce(SO(e),a,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":u||void 0})}const _O=L3(CO);var Xw={};Xw={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var Qw={};Qw={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var Jw={};Jw={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var e$={};e$={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var t$={};t$={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var n$={};n$={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var r$={};r$={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var i$={};i$={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var o$={};o$={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var l$={};l$={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var a$={};a$={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var s$={};s$={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var u$={};u$={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var c$={};c$={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var d$={};d$={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var f$={};f$={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var p$={};p$={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var v$={};v$={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var h$={};h$={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var m$={};m$={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var g$={};g$={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var y$={};y$={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var b$={};b$={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var x$={};x$={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var w$={};w$={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var $$={};$$={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var S$={};S$={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var C$={};C$={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var _$={};_$={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var P$={};P$={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var E$={};E$={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var k$={};k$={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var T$={};T$={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var M$={};M$={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var A$={};A$={"ar-AE":Xw,"bg-BG":Qw,"cs-CZ":Jw,"da-DK":e$,"de-DE":t$,"el-GR":n$,"en-US":r$,"es-ES":i$,"et-EE":o$,"fi-FI":l$,"fr-FR":a$,"he-IL":s$,"hr-HR":u$,"hu-HU":c$,"it-IT":d$,"ja-JP":f$,"ko-KR":p$,"lt-LT":v$,"lv-LV":h$,"nb-NO":m$,"nl-NL":g$,"pl-PL":y$,"pt-BR":b$,"pt-PT":x$,"ro-RO":w$,"ru-RU":$$,"sk-SK":S$,"sl-SI":C$,"sr-SP":_$,"sv-SE":P$,"tr-TR":E$,"uk-UA":k$,"zh-CN":T$,"zh-TW":M$};const Qc=m.createContext({}),L$=m.createContext(null);function PO(e,t){let{render:n}=m.useContext(L$);return O.createElement(O.Fragment,null,n(e,t))}const EO=m.forwardRef(PO);function D$(e,t){var n;let r=e==null?void 0:e.renderDropIndicator,i=e==null||(n=e.isVirtualDragging)===null||n===void 0?void 0:n.call(e),o=m.useCallback(a=>{if(i||t!=null&&t.isDropTarget(a))return r?r(a):O.createElement(EO,{target:a})},[t==null?void 0:t.target,i,r]);return e!=null&&e.useDropIndicator?o:void 0}function kO(e,t,n){var r,i;let o=e.focusedKey,a=null;if(!(t==null||(r=t.isVirtualDragging)===null||r===void 0)&&r.call(t)&&(n==null||(i=n.target)===null||i===void 0?void 0:i.type)==="item"){a=n.target.key;var u;n.target.dropPosition==="after"&&(a=(u=n.collection.getKeyAfter(a))!==null&&u!==void 0?u:a)}return m.useMemo(()=>new Set([o,a].filter(c=>c!==null)),[o,a])}const R$=m.createContext({}),B$=m.createContext({}),Y3=m.createContext(null),La=m.createContext(null);function TO(e,t){[e,t]=_0(e,t,Y3);let n=m.useContext(La);return n?O.createElement(V$,{state:n,props:e,listBoxRef:t}):O.createElement(F3,{content:O.createElement(Q9,e)},r=>O.createElement(MO,{props:e,listBoxRef:t,collection:r}))}function MO({props:e,listBoxRef:t,collection:n}){e={...e,collection:n,children:null,items:null};let r=Gw(e);return O.createElement(V$,{state:r,props:e,listBoxRef:t})}const AO=m.forwardRef(TO);function V$({state:e,props:t,listBoxRef:n}){let{dragAndDropHooks:r,layout:i="stack",orientation:o="vertical"}=t,{collection:a,selectionManager:u}=e,c=!!(r!=null&&r.useDraggableCollectionState),d=!!(r!=null&&r.useDroppableCollectionState),{direction:p}=Bo(),{disabledBehavior:v,disabledKeys:h}=u,y=z3({usage:"search",sensitivity:"base"}),{isVirtualized:x,layoutDelegate:C,dropTargetDelegate:E,CollectionRoot:S}=m.useContext(Nc),b=m.useMemo(()=>t.keyboardDelegate||new G3({collection:a,collator:y,ref:n,disabledKeys:h,disabledBehavior:v,layout:i,orientation:o,direction:p,layoutDelegate:C}),[a,y,n,v,h,o,p,t.keyboardDelegate,i,C]),{listBoxProps:w}=RZ({...t,shouldSelectOnPressUp:c||t.shouldSelectOnPressUp,keyboardDelegate:b,isVirtualized:x},e,n),M=m.useRef(c),A=m.useRef(d);m.useEffect(()=>{M.current!==c&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),A.current!==d&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.")},[c,d]);let D,V,_,H=!1,R=null,F=m.useRef(null);if(c&&r){D=r.useDraggableCollectionState({collection:a,selectionManager:u,preview:r.renderDragPreview?F:void 0}),r.useDraggableCollection({},D,n);let U=r.DragPreview;R=r.renderDragPreview?O.createElement(U,{ref:F},r.renderDragPreview):null}if(d&&r){V=r.useDroppableCollectionState({collection:a,selectionManager:u});let U=r.dropTargetDelegate||E||new r.ListDropTargetDelegate(a,n,{orientation:o,layout:i,direction:p});_=r.useDroppableCollection({keyboardDelegate:b,dropTargetDelegate:U},V,n),H=V.isDropTarget({type:"root"})}let{focusProps:re,isFocused:z,isFocusVisible:N}=tr(),te={isDropTarget:H,isEmpty:e.collection.size===0,isFocused:z,isFocusVisible:N,layout:t.layout||"stack",state:e},ae=$0({className:t.className,style:t.style,defaultClassName:"react-aria-ListBox",values:te}),q=null;return e.collection.size===0&&t.renderEmptyState&&(q=O.createElement("div",{role:"option",style:{display:"contents"}},t.renderEmptyState(te))),O.createElement(Wc,null,O.createElement("div",{...a0(t),...Ce(w,re,_==null?void 0:_.collectionProps),...ae,ref:n,slot:t.slot||void 0,onScroll:t.onScroll,"data-drop-target":H||void 0,"data-empty":e.collection.size===0||void 0,"data-focused":z||void 0,"data-focus-visible":N||void 0,"data-layout":t.layout||"stack","data-orientation":t.orientation||"vertical"},O.createElement(ht,{values:[[Y3,t],[La,e],[Qc,{dragAndDropHooks:r,dragState:D,dropState:V}],[B$,{elementType:"div"}],[L$,{render:RO}],[J9,{render:LO}]]},O.createElement(S,{collection:a,scrollRef:n,persistedKeys:kO(u,r,V),renderDropIndicator:D$(r,V)})),q,R))}function LO(e,t,n){let r=m.useContext(La),{dragAndDropHooks:i,dropState:o}=m.useContext(Qc),{CollectionBranch:a}=m.useContext(Nc),[u,c]=Ro();var d;let{headingProps:p,groupProps:v}=OZ({heading:c,"aria-label":(d=e["aria-label"])!==null&&d!==void 0?d:void 0}),h=$0({defaultClassName:"react-aria-Section",className:e.className,style:e.style,values:{}});return O.createElement("section",{...a0(e),...v,...h,ref:t},O.createElement(R$.Provider,{value:{...p,ref:u}},O.createElement(a,{collection:r.collection,parent:n,renderDropIndicator:D$(i,o)})))}const DO=X9("item",function(t,n,r){let i=er(n),o=m.useContext(La),{dragAndDropHooks:a,dragState:u,dropState:c}=m.useContext(Qc),{optionProps:d,labelProps:p,descriptionProps:v,...h}=ZZ({key:r.key,"aria-label":t==null?void 0:t["aria-label"]},o,i),{hoverProps:y,isHovered:x}=Ut({isDisabled:!h.allowsSelection&&!h.hasAction,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),C=null;u&&a&&(C=a.useDraggableItem({key:r.key},u));let E=null;c&&a&&(E=a.useDroppableItem({target:{type:"item",key:r.key,dropPosition:"on"}},c,i));let S=u&&u.isDragging(r.key),b=$0({...t,id:void 0,children:t.children,defaultClassName:"react-aria-ListBoxItem",values:{...h,isHovered:x,selectionMode:o.selectionManager.selectionMode,selectionBehavior:o.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:S,isDropTarget:E==null?void 0:E.isDropTarget}});m.useEffect(()=>{r.textValue||console.warn("A `textValue` prop is required for elements with non-plain text children in order to support accessibility features such as type to select.")},[r.textValue]);let w=t.href?"a":"div";return O.createElement(w,{...Ce(d,y,C==null?void 0:C.dragProps,E==null?void 0:E.dropProps),...b,ref:i,"data-allows-dragging":!!u||void 0,"data-selected":h.isSelected||void 0,"data-disabled":h.isDisabled||void 0,"data-hovered":x||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-dragging":S||void 0,"data-drop-target":(E==null?void 0:E.isDropTarget)||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode},O.createElement(ht,{values:[[C2,{slots:{label:p,description:v}}]]},b.children))});function RO(e,t){t=er(t);let{dragAndDropHooks:n,dropState:r}=m.useContext(Qc),{dropIndicatorProps:i,isHidden:o,isDropTarget:a}=n.useDropIndicator(e,r,t);return o?null:O.createElement(VO,{...e,dropIndicatorProps:i,isDropTarget:a,ref:t})}function BO(e,t){let{dropIndicatorProps:n,isDropTarget:r,...i}=e,o=$0({...i,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:r}});return O.createElement("div",{...n,...o,role:"option",ref:t,"data-drop-target":r||void 0})}const VO=m.forwardRef(BO),X3=m.createContext({});function IO(e,t){[e,t]=_0(e,t,X3);let{isDisabled:n,isInvalid:r,onHoverStart:i,onHoverChange:o,onHoverEnd:a,...u}=e,{hoverProps:c,isHovered:d}=Ut({onHoverStart:i,onHoverChange:o,onHoverEnd:a,isDisabled:n}),{isFocused:p,isFocusVisible:v,focusProps:h}=tr({within:!0});n??(n=!!e["aria-disabled"]&&e["aria-disabled"]!=="false"),r??(r=!!e["aria-invalid"]&&e["aria-invalid"]!=="false");let y=$0({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:v,isDisabled:n,isInvalid:r},defaultClassName:"react-aria-Group"});var x,C;return O.createElement("div",{...Ce(u,h,c),...y,ref:t,role:(x=e.role)!==null&&x!==void 0?x:"group",slot:(C=e.slot)!==null&&C!==void 0?C:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":v||void 0,"data-disabled":n||void 0,"data-invalid":r||void 0},y.children)}const I$=m.forwardRef(IO),F$=m.createContext({placement:"bottom"}),_o=m.createContext(null);function FO(e,t){[e,t]=_0(e,t,_o);let n=m.useContext(_2),r=Io(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,o=tc(t,i.isOpen)||e.isExiting||!1;if(uI()){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),O.createElement(O.Fragment,null,u)}return i&&!i.isOpen&&!o?null:O.createElement(OO,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:o})}const ZO=m.forwardRef(FO);function OO({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){let i=m.useRef(null),[o,a]=m.useState(0);We(()=>{i.current&&e.isOpen&&a(i.current.getBoundingClientRect().width)},[e.isOpen,i]);var u;let{popoverProps:c,underlayProps:d,arrowProps:p,placement:v}=_Z({...r,offset:(u=r.offset)!==null&&u!==void 0?u:8,arrowSize:o},e),h=r.popoverRef,y=zc(h,!!v)||r.isEntering||!1,x=$0({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:v,isEntering:y,isExiting:t}}),C={...c.style,...x.style};return O.createElement(mx,{isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&O.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),O.createElement("div",{...Ce(a0(r),c),...x,ref:h,slot:r.slot||void 0,style:C,"data-trigger":r.trigger,"data-placement":v,"data-entering":y||void 0,"data-exiting":t||void 0},!r.isNonModal&&O.createElement(i7,{onDismiss:e.close}),O.createElement(F$.Provider,{value:{...p,placement:v,ref:i}},x.children),O.createElement(i7,{onDismiss:e.close})))}const Z$=m.createContext(null),_2=m.createContext(null);function O$(e){let t=Io(e),n=m.useRef(null),{triggerProps:r,overlayProps:i}=Mb({type:"dialog"},t,n);return r.id=Kt(),i["aria-labelledby"]=r.id,O.createElement(ht,{values:[[_2,t],[Z$,i],[_o,{trigger:"DialogTrigger",triggerRef:n}]]},O.createElement(rb,{...r,ref:n,isPressed:t.isOpen},e.children))}function HO(e,t){let n=e["aria-labelledby"];[e,t]=_0(e,t,Z$);let{dialogProps:r,titleProps:i}=jZ({...e,"aria-labelledby":n},t),o=m.useContext(_2),a=e.children;typeof a=="function"&&(a=a({close:(o==null?void 0:o.close)||(()=>{})})),!r["aria-label"]&&!r["aria-labelledby"]&&(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a , it must have an aria-label or aria-labelledby attribute for accessibility.'));var u;return O.createElement("section",{...a0(e),...r,ref:t,slot:e.slot||void 0,style:e.style,className:(u=e.className)!==null&&u!==void 0?u:"react-aria-Dialog"},O.createElement(ht,{values:[[B9,{slots:{[jf]:{},title:{...i,level:2}}}]]},a))}const NO=m.forwardRef(HO);function zO(e,t){[e,t]=_0(e,t,B9);let{children:n,level:r=3,className:i,...o}=e,a=`h${r}`;return O.createElement(a,{...o,ref:t,className:i??"react-aria-Heading"},n)}const H$=m.forwardRef(zO),KO=m.createContext({}),N$=m.createContext(null),Q3=m.createContext(null),z$=m.createContext(null);function jO(e){let t=lO(e),n=m.useRef(null),{menuTriggerProps:r,menuProps:i}=ow({...e,type:"menu"},t,n),[o,a]=m.useState(null),u=m.useCallback(()=>{n.current&&a(n.current.offsetWidth+"px")},[n]);ec({ref:n,onResize:u});let c=m.useRef(null);return O.createElement(ht,{values:[[N$,{...i,ref:c}],[_2,t],[z$,t],[_o,{trigger:"MenuTrigger",triggerRef:n,scrollRef:c,placement:"bottom start",style:{"--trigger-width":o}}]]},O.createElement(rb,{...r,ref:n,isPressed:t.isOpen},e.children))}const WO=m.createContext(null);function UO(e,t){return[e,t]=_0(e,t,N$),O.createElement(F3,{content:O.createElement(Q9,e)},n=>n.size>0&&O.createElement(GO,{props:e,collection:n,menuRef:t}))}function GO({props:e,collection:t,menuRef:n}){let r=fO({...e,collection:t,children:void 0}),[i,o]=m.useState(null),{isVirtualized:a,CollectionRoot:u}=m.useContext(Nc),{menuProps:c}=NZ({...e,isVirtualized:a},r,n),d=m.useContext(z$),p=m.useContext(_o),v=(p==null?void 0:p.trigger)==="SubmenuTrigger";cb({ref:n,onInteractOutside:E=>{d&&!(i!=null&&i.contains(E.target))&&d.close()},isDisabled:v||(d==null?void 0:d.expandedKeysStack.length)===0});let h=m.useRef(null),[y,x]=m.useState({left:0});m.useEffect(()=>{if(i&&h.current!==i&&y.left===0){h.current=i;let{left:E}=i.getBoundingClientRect();x({left:-1*E})}},[y,i]);let C=$0({defaultClassName:"react-aria-Menu",className:e.className,style:e.style,values:{}});return O.createElement(Wc,null,O.createElement("div",{...a0(e),...c,...C,ref:n,slot:e.slot||void 0,onScroll:e.onScroll},O.createElement(ht,{values:[[Q3,r],[B$,{elementType:"div"}],[_o,{UNSTABLE_portalContainer:i||void 0}],[J9,{render:YO}],[WO,{parentMenuRef:n}],[l7,null]]},O.createElement(u,{collection:t,persistedKeys:XI(r.selectionManager.focusedKey),scrollRef:n}))),O.createElement("div",{ref:o,style:{width:"100vw",position:"absolute",top:0,...y}}))}const qO=m.forwardRef(UO);function YO(e,t,n){var r,i;let o=m.useContext(Q3),{CollectionBranch:a}=m.useContext(Nc),[u,c]=Ro();var d;let{headingProps:p,groupProps:v}=KZ({heading:c,"aria-label":(d=n.props["aria-label"])!==null&&d!==void 0?d:void 0}),h=$0({defaultClassName:"react-aria-Section",className:(r=n.props)===null||r===void 0?void 0:r.className,style:(i=n.props)===null||i===void 0?void 0:i.style,values:{}});return O.createElement("section",{...a0(e),...v,...h,ref:t},O.createElement(R$.Provider,{value:{...p,ref:u}},O.createElement(a,{collection:o.collection,parent:n})))}const l7=m.createContext(null),XO=X9("item",function(t,n,r){var i;[t,n]=_0(t,n,l7);let o=(i=S2(l7))===null||i===void 0?void 0:i.id,a=m.useContext(Q3),u=er(n),{menuItemProps:c,labelProps:d,descriptionProps:p,keyboardShortcutProps:v,...h}=zZ({...t,id:o,key:r.key},a,u),{isFocusVisible:y,focusProps:x}=tr(),{hoverProps:C,isHovered:E}=Ut({isDisabled:h.isDisabled}),S=$0({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:E,isFocusVisible:y,selectionMode:a.selectionManager.selectionMode,selectionBehavior:a.selectionManager.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),b=t.href?"a":"div";return O.createElement(b,{...Ce(c,x,C),...S,ref:u,"data-disabled":h.isDisabled||void 0,"data-hovered":E||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":y||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":a.selectionManager.selectionMode==="none"?void 0:a.selectionManager.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},O.createElement(ht,{values:[[C2,{slots:{label:d,description:p}}],[KO,v]]},S.children))}),QO=m.createContext(null),J3=m.createContext(null);function JO(e,t){if(m.useContext(J3))return O.createElement(Am,{...e,modalRef:t},e.children);let{isDismissable:r,isKeyboardDismissDisabled:i,isOpen:o,defaultOpen:a,onOpenChange:u,children:c,isEntering:d,isExiting:p,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:h,...y}=e;return O.createElement(K$,{isDismissable:r,isKeyboardDismissDisabled:i,isOpen:o,defaultOpen:a,onOpenChange:u,isEntering:d,isExiting:p,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:h},O.createElement(Am,{...y,modalRef:t},c))}const eH=m.forwardRef(JO);function tH(e,t){[e,t]=_0(e,t,QO);let n=m.useContext(_2),r=Io(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,o=er(t),a=m.useRef(null),u=tc(o,i.isOpen),c=tc(a,i.isOpen),d=u||c||e.isExiting||!1,p=Jn();return!i.isOpen&&!d||p?null:O.createElement(nH,{...e,state:i,isExiting:d,overlayRef:o,modalRef:a})}const K$=m.forwardRef(tH);function nH({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:o}=kZ(t,r,n),a=zc(t.overlayRef)||t.isEntering||!1,u=$0({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:t.isExiting,state:r}}),c=MI(),d={...u.style,"--visual-viewport-height":c.height+"px"};return O.createElement(mx,{isExiting:t.isExiting,portalContainer:e},O.createElement("div",{...Ce(a0(t),o),...u,style:d,ref:t.overlayRef,"data-entering":a||void 0,"data-exiting":t.isExiting||void 0},O.createElement(ht,{values:[[J3,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[_2,r]]},u.children)))}function Am(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=m.useContext(J3),o=m.useContext(_2),a=m.useMemo(()=>Fc(e.modalRef,n),[e.modalRef,n]),u=er(a),c=zc(u),d=$0({...e,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:o}});return O.createElement("div",{...Ce(a0(e),t),...d,ref:u,"data-entering":c||void 0,"data-exiting":r||void 0},i&&O.createElement(i7,{onDismiss:o.close}),d.children)}const rH=m.createContext(null);function iH(e,t){[e,t]=_0(e,t,rH);let{value:n=0,minValue:r=0,maxValue:i=100,isIndeterminate:o=!1}=e;n=aa(n,r,i);let[a,u]=Ro(),{progressBarProps:c,labelProps:d}=WZ({...e,label:u}),p=o?void 0:(n-r)/(i-r)*100,v=$0({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:p,valueText:c["aria-valuetext"],isIndeterminate:o}});return O.createElement("div",{...c,...v,ref:t,slot:e.slot||void 0},O.createElement(Aa.Provider,{value:{...d,ref:a,elementType:"span"}},v.children))}const oH=m.forwardRef(iH),lH=m.createContext(null);function aH(e,t){[e,t]=_0(e,t,lH);let{validationBehavior:n}=S2(Co)||{};var r,i;let o=(i=(r=e.validationBehavior)!==null&&r!==void 0?r:n)!==null&&i!==void 0?i:"native",a=m.useRef(null),[u,c]=Ro(),d=aO({...e,validationBehavior:o}),{labelProps:p,inputProps:v,clearButtonProps:h,descriptionProps:y,errorMessageProps:x,...C}=GZ({...Kc(e),label:c,validationBehavior:o},d,a),E=$0({...e,values:{isEmpty:d.value==="",isDisabled:e.isDisabled||!1,isInvalid:C.isInvalid||!1,state:d},defaultClassName:"react-aria-SearchField"}),S=a0(e);return delete S.id,O.createElement("div",{...S,...E,ref:t,slot:e.slot||void 0,"data-empty":d.value===""||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":C.isInvalid||void 0},O.createElement(ht,{values:[[Aa,{...p,ref:u}],[q3,{...v,ref:a}],[Xc,h],[C2,{slots:{description:y,errorMessage:x}}],[X3,{isInvalid:C.isInvalid,isDisabled:e.isDisabled||!1}],[Ma,C]]},E.children))}const sH=m.forwardRef(aH);function uH(e){return e&&e.__esModule?e.default:e}const Jc=m.createContext(null),j$=m.createContext(null);function cH(e,t){[e,t]=_0(e,t,Jc);let{children:n,isDisabled:r=!1,isInvalid:i=!1,isRequired:o=!1}=e,a=m.useMemo(()=>typeof n=="function"?n({isOpen:!1,isDisabled:r,isInvalid:i,isRequired:o,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):n,[n,r,i,o]);return O.createElement(F3,{content:a},u=>O.createElement(dH,{props:e,collection:u,selectRef:t}))}function dH({props:e,selectRef:t,collection:n}){let{validationBehavior:r}=S2(Co)||{};var i,o;let a=(o=(i=e.validationBehavior)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:"native",u=sO({...e,collection:n,children:void 0,validationBehavior:a}),{isFocusVisible:c,focusProps:d}=tr({within:!0}),p=m.useRef(null),[v,h]=Ro(),{labelProps:y,triggerProps:x,valueProps:C,menuProps:E,descriptionProps:S,errorMessageProps:b,...w}=qZ({...Kc(e),label:h,validationBehavior:a},u,p),[M,A]=m.useState(null),D=m.useCallback(()=>{p.current&&A(p.current.offsetWidth+"px")},[p]);ec({ref:p,onResize:D});let V=m.useMemo(()=>({isOpen:u.isOpen,isFocused:u.isFocused,isFocusVisible:c,isDisabled:e.isDisabled||!1,isInvalid:w.isInvalid||!1,isRequired:e.isRequired||!1}),[u.isOpen,u.isFocused,c,e.isDisabled,w.isInvalid,e.isRequired]),_=$0({...e,values:V,defaultClassName:"react-aria-Select"}),H=a0(e);delete H.id;let R=m.useRef(null);return O.createElement(ht,{values:[[Jc,e],[j$,u],[W$,C],[Aa,{...y,ref:v,elementType:"span"}],[Xc,{...x,ref:p,isPressed:u.isOpen}],[_2,u],[_o,{trigger:"Select",triggerRef:p,scrollRef:R,placement:"bottom start",style:{"--trigger-width":M}}],[Y3,{...E,ref:R}],[La,u],[C2,{slots:{description:S,errorMessage:b}}],[Ma,w]]},O.createElement("div",{...H,..._,...d,ref:t,slot:e.slot||void 0,"data-focused":u.isFocused||void 0,"data-focus-visible":c||void 0,"data-open":u.isOpen||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":w.isInvalid||void 0,"data-required":e.isRequired||void 0}),O.createElement(XZ,{state:u,triggerRef:p,label:h,name:e.name,isDisabled:e.isDisabled}))}const fH=m.forwardRef(cH),W$=m.createContext(null);function pH(e,t){var n,r;[e,t]=_0(e,t,W$);let i=m.useContext(j$),{placeholder:o}=S2(Jc),a=i.selectedKey!=null?i.collection.getItem(i.selectedKey):null,u=a==null?void 0:a.props.children;typeof u=="function"&&(u=u({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let c=Vo(uH(A$),"react-aria-components");var d,p;let v=$0({...e,defaultChildren:u||o||c.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(d=(n=i.selectedItem)===null||n===void 0?void 0:n.value)!==null&&d!==void 0?d:null,selectedText:(p=(r=i.selectedItem)===null||r===void 0?void 0:r.textValue)!==null&&p!==void 0?p:null,isPlaceholder:!a}}),h=a0(e);return O.createElement("span",{ref:t,...h,...v,"data-placeholder":!a||void 0},O.createElement(C2.Provider,{value:void 0},v.children))}const vH=m.forwardRef(pH),hH=m.createContext(null);function mH(e,t){let{inputRef:n=null,...r}=e;[e,t]=_0(r,t,hH);let i=er(Fc(n,e.inputRef!==void 0?e.inputRef:null)),o=W3(e),{labelProps:a,inputProps:u,isSelected:c,isDisabled:d,isReadOnly:p,isPressed:v}=QZ({...Kc(e),children:typeof e.children=="function"?!0:e.children},o,i),{isFocused:h,isFocusVisible:y,focusProps:x}=tr(),C=e.isDisabled||e.isReadOnly,{hoverProps:E,isHovered:S}=Ut({...e,isDisabled:C}),b=$0({...e,defaultClassName:"react-aria-Switch",values:{isSelected:c,isPressed:v,isHovered:S,isFocused:h,isFocusVisible:y,isDisabled:d,isReadOnly:p,state:o}}),w=a0(e);return delete w.id,O.createElement("label",{...Ce(w,a,E,b),ref:t,slot:e.slot||void 0,"data-selected":c||void 0,"data-pressed":v||void 0,"data-hovered":S||void 0,"data-focused":h||void 0,"data-focus-visible":y||void 0,"data-disabled":d||void 0,"data-readonly":p||void 0},O.createElement(Yc,{elementType:"span"},O.createElement("input",{...Ce(u,x),ref:i})),b.children)}const gH=m.forwardRef(mH),U$=m.createContext({});let yH=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i};function bH(e,t){[e,t]=_0(e,t,U$);let{hoverProps:n,isHovered:r}=Ut(e),{isFocused:i,isFocusVisible:o,focusProps:a}=tr({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",c=$0({...e,values:{isHovered:r,isFocused:i,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-TextArea"});return O.createElement("textarea",{...Ce(yH(e),a,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":u||void 0})}const xH=m.forwardRef(bH),wH=m.createContext(null);function $H(e,t){[e,t]=_0(e,t,wH);let{validationBehavior:n}=S2(Co)||{};var r,i;let o=(i=(r=e.validationBehavior)!==null&&r!==void 0?r:n)!==null&&i!==void 0?i:"native",a=m.useRef(null),[u,c]=Ro(),[d,p]=m.useState("input"),{labelProps:v,inputProps:h,descriptionProps:y,errorMessageProps:x,...C}=aw({...Kc(e),inputElementType:d,label:c,validationBehavior:o},a),E=m.useCallback(w=>{a.current=w,w&&p(w instanceof HTMLTextAreaElement?"textarea":"input")},[]),S=$0({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:C.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),b=a0(e);return delete b.id,O.createElement("div",{...b,...S,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":C.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},O.createElement(ht,{values:[[Aa,{...v,ref:u}],[q3,{...h,ref:E}],[U$,{...h,ref:E}],[C2,{slots:{description:y,errorMessage:x}}],[Ma,C]]},S.children))}const SH=m.forwardRef($H),CH=m.createContext({}),ep=m.createContext(null),G$=m.createContext(null);function _H(e){let t=qw(e),n=m.useRef(null),{triggerProps:r,tooltipProps:i}=eO(e,t,n);return O.createElement(ht,{values:[[ep,t],[G$,{...i,triggerRef:n}]]},O.createElement(LF,{...r,ref:n},e.children))}function PH({UNSTABLE_portalContainer:e,...t},n){[t,n]=_0(t,n,G$);let r=m.useContext(ep),i=qw(t),o=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,a=tc(n,o.isOpen)||t.isExiting||!1;return!o.isOpen&&!a?null:O.createElement(SZ,{portalContainer:e},O.createElement(kH,{...t,tooltipRef:n,isExiting:a}))}const EH=m.forwardRef(PH);function kH(e){let t=m.useContext(ep),n=m.useRef(null),[r,i]=m.useState(0);We(()=>{n.current&&t.isOpen&&i(n.current.getBoundingClientRect().width)},[t.isOpen,n]);let{overlayProps:o,arrowProps:a,placement:u}=kb({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:r,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip}),c=zc(e.tooltipRef,!!u)||e.isEntering||!1,d=$0({...e,defaultClassName:"react-aria-Tooltip",values:{placement:u,isEntering:c,isExiting:e.isExiting,state:t}});e=Ce(e,o);let{tooltipProps:p}=JZ(e,t);return O.createElement("div",{...p,ref:e.tooltipRef,...d,style:{...o.style,...d.style},"data-placement":u,"data-entering":c||void 0,"data-exiting":e.isExiting||void 0},O.createElement(F$.Provider,{value:{...a,placement:u,ref:n}},d.children))}var q$={};q$={close:"إغلاق",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} إشعار`,other:()=>`${t.number(e.count)} إشعارات`})}.`};var Y$={};Y$={close:"Затвори",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} известие`,other:()=>`${t.number(e.count)} известия`})}.`};var X$={};X$={close:"Zavřít",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámení`,other:()=>`${t.number(e.count)} oznámení`})}.`};var Q$={};Q$={close:"Luk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} besked`,other:()=>`${t.number(e.count)} beskeder`})}.`};var J$={};J$={close:"Schließen",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} Benachrichtigung`,other:()=>`${t.number(e.count)} Benachrichtigungen`})}.`};var eS={};eS={close:"Κλείσιμο",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ειδοποίηση`,other:()=>`${t.number(e.count)} ειδοποιήσεις`})}.`};var tS={};tS={close:"Close",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var nS={};nS={close:"Cerrar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificación`,other:()=>`${t.number(e.count)} notificaciones`})}.`};var rS={};rS={close:"Sule",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} teatis`,other:()=>`${t.number(e.count)} teatist`})}.`};var iS={};iS={close:"Sulje",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ilmoitus`,other:()=>`${t.number(e.count)} ilmoitusta`})}.`};var oS={};oS={close:"Fermer",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var lS={};lS={close:"סגור",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} התראה`,other:()=>`${t.number(e.count)} התראות`})}.`};var aS={};aS={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obavijest`,other:()=>`${t.number(e.count)} obavijesti`})}.`};var sS={};sS={close:"Bezárás",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} értesítés`,other:()=>`${t.number(e.count)} értesítés`})}.`};var uS={};uS={close:"Chiudi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica`,other:()=>`${t.number(e.count)} notifiche`})}.`};var cS={};cS={close:"閉じる",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個の通知`,other:()=>`${t.number(e.count)} 個の通知`})}。`};var dS={};dS={close:"닫기",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}개 알림`,other:()=>`${t.number(e.count)}개 알림`})}.`};var fS={};fS={close:"Uždaryti",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} pranešimas`,other:()=>`${t.number(e.count)} pranešimai`})}.`};var pS={};pS={close:"Aizvērt",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} paziņojums`,other:()=>`${t.number(e.count)} paziņojumi`})}.`};var vS={};vS={close:"Lukk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} varsling`,other:()=>`${t.number(e.count)} varsler`})}.`};var hS={};hS={close:"Sluiten",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} melding`,other:()=>`${t.number(e.count)} meldingen`})}.`};var mS={};mS={close:"Zamknij",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} powiadomienie`,few:()=>`${t.number(e.count)} powiadomienia`,many:()=>`${t.number(e.count)} powiadomień`,other:()=>`${t.number(e.count)} powiadomienia`})}.`};var gS={};gS={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var yS={};yS={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var bS={};bS={close:"Închideţi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificare`,other:()=>`${t.number(e.count)} notificări`})}.`};var xS={};xS={close:"Закрыть",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} уведомление`,other:()=>`${t.number(e.count)} уведомления`})}.`};var wS={};wS={close:"Zatvoriť",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámenie`,few:()=>`${t.number(e.count)} oznámenia`,other:()=>`${t.number(e.count)} oznámení`})}.`};var $S={};$S={close:"Zapri",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obvestilo`,two:()=>`${t.number(e.count)} obvestili`,few:()=>`${t.number(e.count)} obvestila`,other:()=>`${t.number(e.count)} obvestil`})}.`};var SS={};SS={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obaveštenje`,other:()=>`${t.number(e.count)} obaveštenja`})}.`};var CS={};CS={close:"Stäng",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} meddelande`,other:()=>`${t.number(e.count)} meddelanden`})}.`};var _S={};_S={close:"Kapat",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} bildirim`,other:()=>`${t.number(e.count)} bildirim`})}.`};var PS={};PS={close:"Закрити",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} сповіщення`,other:()=>`${t.number(e.count)} сповіщення`})}.`};var ES={};ES={close:"关闭",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 个通知`,other:()=>`${t.number(e.count)} 个通知`})}。`};var kS={};kS={close:"關閉",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個通知`,other:()=>`${t.number(e.count)} 個通知`})}。`};var tp={};tp={"ar-AE":q$,"bg-BG":Y$,"cs-CZ":X$,"da-DK":Q$,"de-DE":J$,"el-GR":eS,"en-US":tS,"es-ES":nS,"et-EE":rS,"fi-FI":iS,"fr-FR":oS,"he-IL":lS,"hr-HR":aS,"hu-HU":sS,"it-IT":uS,"ja-JP":cS,"ko-KR":dS,"lt-LT":fS,"lv-LV":pS,"nb-NO":vS,"nl-NL":hS,"pl-PL":mS,"pt-BR":gS,"pt-PT":yS,"ro-RO":bS,"ru-RU":xS,"sk-SK":wS,"sl-SI":$S,"sr-SP":SS,"sv-SE":CS,"tr-TR":_S,"uk-UA":PS,"zh-CN":ES,"zh-TW":kS};function TH(e){return e&&e.__esModule?e.default:e}function MH(e,t,n){let{key:r,timer:i,timeout:o,animation:a}=e.toast;m.useEffect(()=>{if(i)return i.reset(o),()=>{i.pause()}},[i,o]);let[u,c]=O.useState(!1);m.useEffect(()=>{(a==="entering"||a==="queued")&&c(!0)},[a]);let d=Kt(),p=Kn(),v=Vo(TH(tp),"@react-aria/toast");return{toastProps:{role:"alertdialog","aria-modal":"false","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"]||d,"aria-describedby":e["aria-describedby"]||p,"aria-details":e["aria-details"],"aria-hidden":a==="exiting"?"true":void 0,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true",style:{visibility:u||a===null?"visible":"hidden"}},titleProps:{id:d},descriptionProps:{id:p},closeButtonProps:{"aria-label":v.format("close"),onPress:()=>t.close(r)}}}const TS=1,C5=Symbol.for("react-aria-landmark-manager");function AH(e){return document.addEventListener("react-aria-landmark-manager-change",e),()=>document.removeEventListener("react-aria-landmark-manager-change",e)}function Lm(){if(typeof document>"u")return null;let e=document[C5];return e&&e.version>=TS?e:(document[C5]=new DH,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[C5])}function LH(){return I3.useSyncExternalStore(AH,Lm,Lm)}class DH{setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:!0}),document.addEventListener("focusin",this.focusinHandler,{capture:!0}),document.addEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!0)}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:!0}),document.removeEventListener("focusin",this.focusinHandler,{capture:!0}),document.removeEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!1)}focusLandmark(t,n){var r,i;(i=this.landmarks.find(o=>o.ref.current===t))===null||i===void 0||(r=i.focus)===null||r===void 0||r.call(i,n)}getLandmarksByRole(t){return new Set(this.landmarks.filter(n=>n.role===t))}getLandmarkByRole(t){return this.landmarks.find(n=>n.role===t)}addLandmark(t){if(this.setupIfNeeded(),this.landmarks.find(i=>i.ref===t.ref)||!t.ref.current)return;if(this.landmarks.filter(i=>i.role==="main").length>1&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[t],this.checkLabels(t.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let i=Math.floor((n+r)/2),o=t.ref.current.compareDocumentPosition(this.landmarks[i].ref.current);!!(o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS)?n=i+1:r=i-1}this.landmarks.splice(n,0,t),this.checkLabels(t.role)}updateLandmark(t){let n=this.landmarks.findIndex(r=>r.ref===t.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...t},this.checkLabels(this.landmarks[n].role))}removeLandmark(t){this.landmarks=this.landmarks.filter(n=>n.ref!==t),this.teardownIfNeeded()}checkLabels(t){let n=this.getLandmarksByRole(t);if(n.size>1){let r=[...n].filter(i=>!i.label);if(r.length>0)console.warn(`Page contains more than one landmark with the '${t}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(i=>i.ref.current));else{let i=[...n].map(a=>a.label);i.filter((a,u)=>i.indexOf(a)!==u).forEach(a=>{console.warn(`Page contains more than one landmark with the '${t}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(u=>u.label===a).map(u=>u.ref.current))})}}}closestLandmark(t){let n=new Map(this.landmarks.map(i=>[i.ref.current,i])),r=t;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(t,{backward:n}){var r;let i=this.closestLandmark(t),o=n?this.landmarks.length-1:0;i&&(o=this.landmarks.indexOf(i)+(n?-1:1));let a=()=>{if(o<0){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:!0,cancelable:!0})))return!0;o=this.landmarks.length-1}else if(o>=this.landmarks.length){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:!0,cancelable:!0})))return!0;o=0}return o<0||o>=this.landmarks.length};if(a())return;let u=o;for(;!((r=this.landmarks[o].ref.current)===null||r===void 0)&&r.closest("[aria-hidden=true]");){if(o+=n?-1:1,a())return;if(o===u)break}return this.landmarks[o]}f6Handler(t){t.key==="F6"&&(t.altKey?this.focusMain():this.navigate(t.target,t.shiftKey))&&(t.preventDefault(),t.stopPropagation())}focusMain(){let t=this.getLandmarkByRole("main");return t&&t.ref.current&&document.contains(t.ref.current)?(this.focusLandmark(t.ref.current,"forward"),!0):!1}navigate(t,n){let r=this.getNextLandmark(t,{backward:n});if(!r)return!1;if(r.lastFocused){let i=r.lastFocused;if(document.body.contains(i))return i.focus(),!0}return r.ref.current&&document.contains(r.ref.current)?(this.focusLandmark(r.ref.current,n?"backward":"forward"),!0):!1}focusinHandler(t){let n=this.closestLandmark(t.target);n&&n.ref.current!==t.target&&this.updateLandmark({ref:n.ref,lastFocused:t.target});let r=t.relatedTarget;if(r){let i=this.closestLandmark(r);i&&i.ref.current===r&&i.blur()}}focusoutHandler(t){let n=t.target,r=t.relatedTarget;if(!r||r===document){let i=this.closestLandmark(n);i&&i.ref.current===n&&i.blur()}}createLandmarkController(){let t=this;return t.refCount++,t.setupIfNeeded(),{navigate(n,r){let i=(r==null?void 0:r.from)||document.activeElement;return t.navigate(i,n==="backward")},focusNext(n){let r=(n==null?void 0:n.from)||document.activeElement;return t.navigate(r,!1)},focusPrevious(n){let r=(n==null?void 0:n.from)||document.activeElement;return t.navigate(r,!0)},focusMain(){return t.focusMain()},dispose(){t&&(t.refCount--,t.teardownIfNeeded(),t=null)}}}registerLandmark(t){return this.landmarks.find(n=>n.ref===t.ref)?this.updateLandmark(t):this.addLandmark(t),()=>this.removeLandmark(t.ref)}constructor(){this.landmarks=[],this.isListening=!1,this.refCount=0,this.version=TS,this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this)}}function RH(e,t){const{role:n,"aria-label":r,"aria-labelledby":i,focus:o}=e;let a=LH(),u=r||i,[c,d]=m.useState(!1),p=m.useCallback(()=>{d(!0)},[d]),v=m.useCallback(()=>{d(!1)},[d]);return We(()=>{if(a)return a.registerLandmark({ref:t,label:u,role:n,focus:o||p,blur:v})},[a,u,t,n,o,p,v]),m.useEffect(()=>{var h;c&&((h=t.current)===null||h===void 0||h.focus())},[c,t]),{landmarkProps:{role:n,tabIndex:c?-1:void 0,"aria-label":r,"aria-labelledby":i}}}function BH(e){return e&&e.__esModule?e.default:e}function VH(e,t,n){let r=Vo(BH(tp),"@react-aria/toast"),{landmarkProps:i}=RH({role:"region","aria-label":e["aria-label"]||r.format("notifications",{count:t.visibleToasts.length})},n),{hoverProps:o}=Ut({onHoverStart:t.pauseAll,onHoverEnd:t.resumeAll}),a=m.useRef([]),u=m.useRef(t.visibleToasts),c=m.useRef(null);We(()=>{if(c.current===-1||t.visibleToasts.length===0){a.current=[],u.current=t.visibleToasts;return}if(a.current=[...n.current.querySelectorAll('[role="alertdialog"]')],u.current.length===t.visibleToasts.length&&t.visibleToasts.every((y,x)=>y.key===u.current[x].key)){u.current=t.visibleToasts;return}let v=u.current.map((y,x)=>({...y,i:x,isRemoved:!t.visibleToasts.some(C=>y.key===C.key)})),h=v.findIndex(y=>y.i===c.current);if(h>-1){let y=0,x,C;for(;y<=h;)v[y].isRemoved||(C=Math.max(0,y-1)),y++;for(;y=0&&C=0&&x{t.pauseAll(),d.current=v.relatedTarget},onBlurWithin:()=>{t.resumeAll(),d.current=null}});return m.useEffect(()=>{t.visibleToasts.length===0&&d.current&&document.body.contains(d.current)&&(So()==="pointer"?Ot(d.current):d.current.focus(),d.current=null)},[n,t.visibleToasts.length]),m.useEffect(()=>()=>{d.current&&document.body.contains(d.current)&&(So()==="pointer"?Ot(d.current):d.current.focus(),d.current=null)},[n]),{regionProps:Ce(i,o,p,{tabIndex:-1,"data-react-aria-top-layer":!0,onFocus:v=>{let h=v.target.closest('[role="alertdialog"]');c.current=a.current.findIndex(y=>y===h)},onBlur:()=>{c.current=-1}})}}function IH(e){let t=m.useCallback(i=>e.subscribe(i),[e]),n=m.useCallback(()=>e.visibleToasts,[e]);return{visibleToasts:I3.useSyncExternalStore(t,n,n),add:(i,o)=>e.add(i,o),close:i=>e.close(i),remove:i=>e.remove(i),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}class MS{subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}add(t,n={}){let r=Math.random().toString(36),i={...n,content:t,key:r,timer:n.timeout?new FH(()=>this.close(r),n.timeout):null},o=0,a=this.queue.length;for(;o(this.queue[c].priority||0)?a=c:o=c+1}this.queue.splice(o,0,i),i.animation=oo.key===t);if(n>=0){var r,i;(r=(i=this.queue[n]).onClose)===null||r===void 0||r.call(i),this.queue.splice(n,1)}this.updateVisibleToasts({action:"close",key:t})}remove(t){this.updateVisibleToasts({action:"remove",key:t})}updateVisibleToasts(t){let{action:n,key:r}=t,i=this.queue.slice(0,this.maxVisibleToasts);if(n==="add"&&this.hasExitAnimation){let o=this.visibleToasts.filter(a=>!i.some(u=>a.key===u.key)).map(a=>({...a,animation:"exiting"}));this.visibleToasts=o.concat(i).sort((a,u)=>u.priority-a.priority)}else n==="close"&&this.hasExitAnimation?this.visibleToasts=this.visibleToasts.map(o=>o.key!==r?o:{...o,animation:"exiting"}):this.visibleToasts=i;for(let o of this.subscriptions)o()}pauseAll(){for(let t of this.visibleToasts)t.timer&&t.timer.pause()}resumeAll(){for(let t of this.visibleToasts)t.timer&&t.timer.resume()}constructor(t){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[];var n;this.maxVisibleToasts=(n=t==null?void 0:t.maxVisibleToasts)!==null&&n!==void 0?n:1;var r;this.hasExitAnimation=(r=t==null?void 0:t.hasExitAnimation)!==null&&r!==void 0?r:!1}}class FH{reset(t){this.remaining=t,this.resume()}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}constructor(t,n){this.remaining=n,this.callback=t}}const ZH="DJIQHa_base",OH="DJIQHa_minimal",_5={base:ZH,default:"DJIQHa_default",minimal:OH},e1=Ge(_5.base,{variants:{variant:{default:_5.default,minimal:_5.minimal}},defaultVariants:{variant:"default"}}),HH=({variant:e="default",...t},n)=>k.jsx(_O,{...t,ref:n,className:l0(t.className,(r,i)=>e1({...i,variant:e,className:r}))}),AS=m.forwardRef(HH),NH="C_Feta_base",zH="C_Feta_defaultFlair",KH="C_Feta_destructive",jH="C_Feta_invalid",WH="C_Feta_large",UH="C_Feta_medium",GH="C_Feta_minimal",qH="C_Feta_minimalFlair",YH="C_Feta_primary",XH="C_Feta_primaryFlair",QH="C_Feta_select",JH="C_Feta_small",It={base:NH,default:"C_Feta_default",defaultFlair:zH,destructive:KH,invalid:jH,large:WH,medium:UH,minimal:GH,minimalFlair:qH,primary:YH,primaryFlair:XH,select:QH,small:JH},LS=Ge(It.base,{variants:{size:{small:It.small,medium:It.medium,large:It.large},variant:{default:It.default,primary:It.primary,destructive:It.destructive,minimal:It.minimal,primaryFlair:It.primaryFlair,defaultFlair:It.defaultFlair,minimalFlair:It.minimalFlair}},defaultVariants:{size:"medium",variant:"default"}}),eN=({size:e="medium",variant:t="default",...n},r)=>{const i=S2(Jc);return k.jsx(Kw,{...n,ref:r,className:l0(n.className,(o,a)=>i?bo(e1(),It.select,i.isInvalid&&It.invalid,o):LS({...a,size:e,variant:t,className:o}))})},Pn=m.forwardRef(eN),tN="_4yLvRa_base",nN="_4yLvRa_medium",rN="_4yLvRa_small",P5={base:tN,medium:nN,small:rN},iN=Ge(P5.base,{variants:{size:{small:P5.small,medium:P5.medium}},defaultVariants:{size:"medium"}}),oN=({size:e="medium",variant:t="default",icon:n,...r},i)=>k.jsx(Kw,{...r,ref:i,className:l0(r.className,(o,a)=>bo(LS({...a,size:e,variant:t,className:o}),iN({size:e}))),children:k.jsx(b0,{name:n,size:"small","aria-hidden":!0})}),np=m.forwardRef(oN),lN="kblPOW_base",aN="kblPOW_basic",sN="kblPOW_compact",uN="kblPOW_large",tu={base:lN,basic:aN,compact:sN,large:uN},cN=Ge(tu.base,{variants:{spacing:{basic:tu.basic,compact:tu.compact,large:tu.large}},defaultVariants:{spacing:"basic"}}),dN=({spacing:e="basic",...t},n)=>k.jsx(I$,{...t,ref:n,className:l0(t.className,(r,i)=>cN({...i,spacing:e,className:r})),children:l0(t.children,(r,{isDisabled:i})=>k.jsx(ht,{values:[[Xc,{isDisabled:i}],[CH,{isDisabled:i}]],children:r}))}),DS=m.forwardRef(dN),fN="_4zkhoG_box",pN="_4zkhoG_checkbox",vN="_4zkhoG_container",hN="_4zkhoG_icon",pa={box:fN,checkbox:pN,container:vN,icon:hN},RS=Ge(pa.checkbox),mN=Ge(pa.box),BS=({isSelected:e,isIndeterminate:t})=>k.jsx("div",{className:mN(),children:t?k.jsx(b0,{name:"minus",size:"small",className:pa.icon}):e?k.jsx(b0,{name:"check",size:"small",className:pa.icon}):null}),gN=(e,t)=>k.jsx($O,{...e,ref:t,className:l0(e.className,(n,r)=>RS({...r,className:n})),children:l0(e.children,(n,{isSelected:r,isIndeterminate:i})=>k.jsxs(k.Fragment,{children:[k.jsx("div",{className:pa.container,children:k.jsx(BS,{isSelected:r,isIndeterminate:i})}),n]}))}),yN=m.forwardRef(gN),bN=m.createContext({}),xN="mO5CFq_dialog",wN={dialog:xN},$N=Ge(wN.dialog),SN=({className:e,...t},n)=>{const r=Kn();return k.jsx(NO,{...t,ref:n,className:$N({className:e}),"aria-describedby":t["aria-describedby"]||r,children:l0(t.children,i=>k.jsx(ht,{values:[[C2,{slots:{subtitle:{id:r,elementType:"h3"}}}]],children:i}))})},VS=m.forwardRef(SN),CN="NTUORW_error",_N={error:CN},PN=Ge(_N.error),EN=(e,t)=>k.jsx(hO,{...e,ref:t,className:l0(e.className,(n,r)=>PN({...r,className:n}))}),IS=m.forwardRef(EN),kN="XLBffq_group",TN={group:kN},MN=Ge(TN.group),AN=({variant:e="default",...t},n)=>k.jsx(I$,{...t,ref:n,className:l0(t.className,(r,i)=>bo(e1({variant:e}),MN({...i,className:r})))}),LN=m.forwardRef(AN),DN="hZ0aYW_label",RN={label:DN},BN=Ge(RN.label),VN=({className:e,...t},n)=>k.jsx(bO,{...t,ref:n,className:BN({className:e})}),Da=m.forwardRef(VN),IN="_6iLpCG_box lH5Eaq_menu",FN="_6iLpCG_content lH5Eaq_content",ZN="_6iLpCG_item lH5Eaq_item",rp={box:IN,content:FN,item:ZN},ON=Ge(rp.box),HN=Ge(rp.item),NN=(e,t)=>k.jsx(AO,{...e,ref:t,className:l0(e.className,(n,r)=>ON({...r,className:n}))}),FS=m.forwardRef(NN),zN=(e,t)=>{const n=e.textValue||(typeof e.children=="string"?e.children:void 0);return k.jsx(DO,{textValue:n,...e,ref:t,className:l0(e.className,(r,i)=>HN({...i,className:r})),children:l0(e.children,(r,{isSelected:i})=>k.jsxs(k.Fragment,{children:[k.jsx("span",{className:rp.content,children:r}),i&&k.jsx(b0,{name:"check",size:"medium"})]}))})},ZS=m.forwardRef(zN),KN="qZpqmq_circle",jN="qZpqmq_icon",WN="qZpqmq_radio",ip={circle:KN,icon:jN,radio:WN},UN=Ge(ip.radio),GN=Ge(ip.circle),qN=({isSelected:e})=>k.jsx("div",{className:GN(),children:e?k.jsx(b0,{name:"circle",className:ip.icon}):null}),YN="C73R2W_content",XN="C73R2W_desc",QN="C73R2W_destructive",JN="C73R2W_item",ez="C73R2W_kbd",tz="C73R2W_label",nz="C73R2W_menu",Vl={content:YN,desc:XN,destructive:QN,item:JN,kbd:ez,label:tz,menu:nz},rz=Ge(Vl.menu),iz=Ge(Vl.item,{variants:{variant:{default:Vl.default,destructive:Vl.destructive}},defaultVariants:{variant:"default"}}),oz=({className:e,...t},n)=>k.jsx(qO,{...t,ref:n,className:rz({className:e})}),lz=m.forwardRef(oz),az=({variant:e="default",...t},n)=>k.jsx(XO,{...t,ref:n,className:l0(t.className,(r,i)=>iz({...i,variant:e,className:r})),children:l0(t.children,(r,{selectionMode:i,isSelected:o,hasSubmenu:a,isDisabled:u})=>k.jsxs(k.Fragment,{children:[i==="multiple"&&k.jsx("div",{className:RS(),"data-selected":o||void 0,"data-disabled":u||void 0,children:k.jsx(BS,{isSelected:o})}),i==="single"&&k.jsx("div",{className:UN(),"data-disabled":u||void 0,children:k.jsx(qN,{isSelected:o})}),k.jsx("span",{className:Vl.content,children:r}),a&&k.jsx(b0,{name:"chevron-right",size:"small"})]}))}),sz=m.forwardRef(az),uz="bYbWKG_base",cz="bYbWKG_drawer",dz="bYbWKG_fade",fz="bYbWKG_large",pz="bYbWKG_medium",vz="bYbWKG_overlay",hz="bYbWKG_sheet",mz="bYbWKG_slide",gz="bYbWKG_small",yz="bYbWKG_zoom",z2={base:uz,default:"bYbWKG_default",drawer:cz,fade:dz,large:fz,medium:pz,overlay:vz,sheet:hz,slide:mz,small:gz,zoom:yz},bz=Ge(z2.base,{variants:{size:{small:z2.small,medium:z2.medium,large:z2.large},variant:{default:z2.default,drawer:z2.drawer}},defaultVariants:{size:"medium",variant:"default"}}),xz=Ge(z2.overlay),wz=({size:e="medium",variant:t="default",...n},r)=>k.jsx(eH,{...n,ref:r,className:l0(n.className,(i,o)=>bz({...o,size:e,variant:t,className:i}))}),OS=m.forwardRef(wz),$z=({isDismissable:e=!0,...t},n)=>k.jsx(K$,{isDismissable:e,...t,ref:n,className:l0(t.className,(r,i)=>xz({...i,className:r}))}),HS=m.forwardRef($z),Sz="lKzIqa_arrow",Cz="lKzIqa_popover",_z="lKzIqa_slide",NS={arrow:Sz,popover:Cz,slide:_z},Pz=Ge(NS.popover),Ez=(e,t)=>{const n=m.useContext(bN);return k.jsx(ZO,{...n,...e,offset:4,crossOffset:0,ref:t,className:l0(e.className,(r,i)=>Pz({...i,className:r}))})},zS=m.forwardRef(Ez),kz="wytVOa_base",Tz="wytVOa_indeterminate",Mz="wytVOa_innerCircle",Az="wytVOa_large",Lz="wytVOa_medium",Dz="wytVOa_outerCircle",Rz="wytVOa_progress",Bz="wytVOa_small",Vz="wytVOa_spin",e2={base:kz,indeterminate:Tz,innerCircle:Mz,large:Az,medium:Lz,outerCircle:Dz,progress:Rz,small:Bz,spin:Vz},Iz=Ge(e2.progress),Fz=Ge(e2.base,{variants:{size:{small:e2.small,medium:e2.medium,large:e2.large}},defaultVariants:{size:"small"}}),Zz=({size:e="small",...t},n)=>{const a=24*Math.PI;return k.jsx(oH,{...t,ref:n,className:l0(t.className,(u,c)=>Iz({...c,className:u})),children:({percentage:u,isIndeterminate:c})=>k.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",strokeWidth:4,className:bo(Fz({size:e}),c&&e2.indeterminate),children:[k.jsx("circle",{cx:16,cy:16,r:12,strokeWidth:4,className:e2.outerCircle}),k.jsx("circle",{cx:16,cy:16,r:12,strokeDasharray:`${a} ${a}`,strokeDashoffset:a-(c?.34:u||0/100)*a,transform:"rotate(-90 16 16)",className:e2.innerCircle})]})})},Ra=m.forwardRef(Zz),Oz="adZH_q_search",Hz={search:Oz},Nz=Ge(Hz.search),zz=(e,t)=>k.jsx(sH,{...e,ref:t,className:l0(e.className,(n,r)=>Nz({...r,className:n}))}),Kz=m.forwardRef(zz),jz="VIpzwq_select",Wz="VIpzwq_value",KS={select:jz,value:Wz},Uz=Ge(KS.select),Gz=Ge(KS.value),qz=(e,t)=>k.jsx(fH,{...e,ref:t,className:l0(e.className,(n,r)=>Uz({...r,className:n}))}),Yz=m.forwardRef(qz),Xz=(e,t)=>k.jsx(vH,{...e,ref:t,className:l0(e.className,(n,r)=>Gz({...r,className:n}))}),Dm=m.forwardRef(Xz),Qz="K81Z_G_text",Jz={text:Qz},eK=Ge(Jz.text),tK=({className:e,...t},n)=>k.jsx(jw,{...t,ref:n,className:eK({className:e})}),t1=m.forwardRef(tK),nK=({variant:e="default",...t},n)=>k.jsx(xH,{...t,ref:n,className:l0(t.className,(r,i)=>e1({...i,variant:e,className:r}))}),jS=m.forwardRef(nK),rK="dvJ4qG_field",iK={field:rK},oK=Ge(iK.field),lK=(e,t)=>k.jsx(SH,{...e,ref:t,className:l0(e.className,(n,r)=>oK({...r,className:n})),children:l0(e.children,(n,{isInvalid:r,isDisabled:i})=>k.jsx(ht,{values:[[X3,{isInvalid:r,isDisabled:i}]],children:n}))}),WS=m.forwardRef(lK),aK="iPUTXW_bottom",sK="iPUTXW_content",uK="iPUTXW_description",cK="iPUTXW_error",dK="iPUTXW_icon",fK="iPUTXW_info",pK="iPUTXW_region",vK="iPUTXW_right",hK="iPUTXW_snackbar",mK="iPUTXW_success",gK="iPUTXW_title",yK="iPUTXW_toast",bK="iPUTXW_warning",St={bottom:aK,content:sK,default:"iPUTXW_default",description:uK,error:cK,"fade-in":"iPUTXW_fade-in","fade-out":"iPUTXW_fade-out",icon:dK,info:fK,region:pK,right:vK,"slide-in":"iPUTXW_slide-in",snackbar:hK,success:mK,title:gK,toast:yK,warning:bK},xK=e=>{const[t,n]=m.useState(!1);return m.useEffect(()=>{if(typeof window<"u"){const r=window.matchMedia(e);n(r.matches);const i=o=>{n(o.matches)};return r.addEventListener("change",i),()=>{r.removeEventListener("change",i)}}},[e]),t},wK=Ge(St.region,{variants:{placement:{bottom:St.bottom,right:St.right}},defaultVariants:{placement:"bottom"}}),$K=Ge(St.icon,{variants:{status:{error:St.error,info:St.info,success:St.success,warning:St.warning}},defaultVariants:{status:"info"}}),SK=Ge(St.toast,{variants:{variant:{default:St.default,snackbar:St.snackbar}},defaultVariants:{variant:"default"}}),CK=({state:e,placement:t="bottom",...n})=>{const r=m.useRef(null),{regionProps:i}=VH(n,e,r);return k.jsx("div",{...i,ref:r,className:wK({placement:t}),children:e.visibleToasts.map(o=>k.jsx(_K,{toast:o,state:e,variant:t==="bottom"?"default":"snackbar"},o.key))})},_K=({state:e,variant:t="default",...n})=>{const r=m.useRef(null),{toastProps:i,contentProps:o,titleProps:a,descriptionProps:u,closeButtonProps:c}=MH(n,e),d=xK("(prefers-reduced-motion: no-preference)"),{isFocusVisible:p,focusProps:v}=tr(),h=n.toast.content,{children:y,status:x,title:C,description:E,action:S}=h,b=S&&m.cloneElement(S,Ce(S.props,{onPress:()=>e.close(n.toast.key)}));return m.useEffect(()=>{d===!1&&n.toast.animation==="exiting"&&e.remove(n.toast.key)},[d,n.toast,e]),k.jsxs("div",{"data-theme":"dark",...Ce(i,v),ref:r,className:SK({variant:t}),"data-animation":n.toast.animation,"data-focus-visible":p||void 0,onAnimationEnd:()=>{n.toast.animation==="exiting"&&e.remove(n.toast.key)},children:[k.jsx(D9,{kind:x||"info",className:$K({status:x})}),k.jsx("div",{...o,className:St.content,children:t==="default"?k.jsx("div",{...a,children:y}):k.jsxs(k.Fragment,{children:[k.jsx("div",{...a,className:St.title,children:C}),k.jsxs("div",{...u,className:St.description,children:[E,b&&" ",b]})]})}),k.jsx(np,{"aria-label":"Close",...c,children:void 0,icon:"cancel",variant:"minimal",size:"small"})]})},xu=new MS({maxVisibleToasts:5,hasExitAnimation:!0});new MS({maxVisibleToasts:5,hasExitAnimation:!0});const E5=6e3,Rm={info:(e,t)=>xu.add({children:e,status:"info"},{...t,timeout:E5}),success:(e,t)=>xu.add({children:e,status:"success"},{...t,timeout:E5}),warning:(e,t)=>xu.add({children:e,status:"warning"},{...t,timeout:E5})},PK=e=>{const t=IH(xu);return t.visibleToasts.length>0?pi.createPortal(k.jsx(CK,{...e,state:t,placement:"bottom"}),document.body):null},EK="gdNzta_slide",kK="gdNzta_tooltip",Bm={slide:EK,tooltip:kK},TK=Ge(Bm.base,{variants:{variant:{default:Bm.tooltip,popover:NS.popover}},defaultVariants:{variant:"default"}}),MK=({variant:e="default",...t},n)=>k.jsx(EH,{...t,offset:4,crossOffset:0,ref:n,className:l0(t.className,(r,i)=>TK({...i,variant:e,className:r})),"data-trigger":e==="popover"?"DialogTrigger":void 0}),va=m.forwardRef(MK),ha=e=>k.jsx(_H,{delay:500,...e,closeDelay:250});function AK(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function LK(...e){return t=>e.forEach(n=>AK(n,t))}var Ba=m.forwardRef((e,t)=>{const{children:n,...r}=e,i=m.Children.toArray(n),o=i.find(RK);if(o){const a=o.props.children,u=i.map(c=>c===o?m.Children.count(a)>1?m.Children.only(null):m.isValidElement(a)?a.props.children:null:c);return k.jsx(a7,{...r,ref:t,children:m.isValidElement(a)?m.cloneElement(a,void 0,u):null})}return k.jsx(a7,{...r,ref:t,children:n})});Ba.displayName="Slot";var a7=m.forwardRef((e,t)=>{const{children:n,...r}=e;if(m.isValidElement(n)){const i=VK(n);return m.cloneElement(n,{...BK(r,n.props),ref:t?LK(t,i):i})}return m.Children.count(n)>1?m.Children.only(null):null});a7.displayName="SlotClone";var DK=({children:e})=>k.jsx(k.Fragment,{children:e});function RK(e){return m.isValidElement(e)&&e.type===DK}function BK(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function VK(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const IK="C_Feta_Button",FK="C_Feta_ButtonGroup",cn={Button:IK,"Button--big":"C_Feta_Button--big","Button--close":"C_Feta_Button--close","Button--default":"C_Feta_Button--default","Button--defaultFlair":"C_Feta_Button--defaultFlair","Button--destructive":"C_Feta_Button--destructive","Button--fit":"C_Feta_Button--fit","Button--icon":"C_Feta_Button--icon","Button--link":"C_Feta_Button--link","Button--minimal":"C_Feta_Button--minimal","Button--minimalFlair":"C_Feta_Button--minimalFlair","Button--primary":"C_Feta_Button--primary","Button--primaryFlair":"C_Feta_Button--primaryFlair","Button--small":"C_Feta_Button--small","Button--tiny":"C_Feta_Button--tiny","Button-icon":"C_Feta_Button-icon",ButtonGroup:FK,"ButtonGroup--compact":"C_Feta_ButtonGroup--compact","ButtonGroup--large":"C_Feta_ButtonGroup--large","ButtonGroup--normal":"C_Feta_ButtonGroup--normal"},US=m.forwardRef((e,t)=>{const{icon:n,children:r,className:i,size:o,fit:a,kind:u="default",isLoading:c=!1,loadingText:d,renderIconFirst:p=!1,disabled:v=!1,asChild:h=!1,onKeyDown:y,onClick:x,type:C="button","data-test-id":E="button",...S}=e,b=h?Ba:"button",w=M0(cn.Button,cn[`Button--${u}`],o&&cn[`Button--${o}`],a&&cn["Button--fit"],i),M=()=>{let F="small";return o==="big"&&(F="medium"),F},A=n&&m.cloneElement(n,{key:"icon",size:M(),"aria-hidden":!0,className:M0(n.props.className,cn["Button-icon"])}),D=F=>[p&&A,c&&k.jsx("span",{children:d||F},"text"),!c&&F&&k.jsx("span",{children:F},"text"),!p&&A,c&&k.jsx("span",{children:"…"},"spinner")],V=()=>h&&m.isValidElement(r)?m.cloneElement(r,void 0,D(r.props.children)):D(r),_=v||c,H=F=>{if(v)return F.preventDefault();x==null||x(F)},R=F=>{F.target instanceof HTMLAnchorElement&&["Spacebar"," "].includes(F.key)&&(F.preventDefault(),F.target.click())};return k.jsx(b,{className:w,ref:t,onClick:H,onKeyDown:y||R,disabled:_,type:h?void 0:C,"data-test-id":E,...S,children:V()})});US.displayName="Button";const Vm=m.memo(US),ZK=({spacing:e="normal",className:t,children:n,"data-test-id":r="button-group",...i})=>{const o=M0(cn.ButtonGroup,cn[`ButtonGroup--${e}`],t);return k.jsx("div",{className:o,"data-test-id":r,...i,children:n})},GS=m.forwardRef((e,t)=>{const{icon:n,children:r,className:i,size:o="medium",kind:a="minimal",disabled:u=!1,asChild:c=!1,onKeyDown:d,onClick:p,type:v="button","data-test-id":h="icon-button",...y}=e,x=c?Ba:"button",C=M0(cn.IconButton,cn.Button,cn["Button--icon"],cn[`Button--${a}`],o&&cn[`Button--${o}`],i),E=()=>e.size==="small"?"small":"medium",S=m.cloneElement(n,{key:"icon",size:E(),"aria-hidden":!0,className:M0(n.props.className,"Button-icon")}),b=()=>c&&m.isValidElement(r)?m.cloneElement(r,void 0,S):S,w=A=>{if(u)return A.preventDefault();p==null||p(A)},M=A=>{A.target instanceof HTMLAnchorElement&&["Spacebar"," "].includes(A.key)&&(A.preventDefault(),A.target.click())};return k.jsx(x,{className:C,ref:t,onClick:w,disabled:u,onKeyDown:d||M,type:v,"data-test-id":h,...y,children:b()})});GS.displayName="IconButton";const qS=m.memo(GS),OK="BwAiTW_Alert",HK="BwAiTW_LinkButton",NK="BwAiTW_PrimaryButton",wt={Alert:OK,"Alert--bordered":"BwAiTW_Alert--bordered","Alert--compact":"BwAiTW_Alert--compact","Alert--error":"BwAiTW_Alert--error","Alert--flair-default":"BwAiTW_Alert--flair-default","Alert--flair-strong":"BwAiTW_Alert--flair-strong","Alert--info":"BwAiTW_Alert--info","Alert--inline":"BwAiTW_Alert--inline","Alert--notification":"BwAiTW_Alert--notification","Alert--small":"BwAiTW_Alert--small","Alert--success":"BwAiTW_Alert--success","Alert--warning":"BwAiTW_Alert--warning","Alert--wide":"BwAiTW_Alert--wide","Alert-close":"BwAiTW_Alert-close","Alert-content":"BwAiTW_Alert-content","Alert-heading":"BwAiTW_Alert-heading","Alert-icon":"BwAiTW_Alert-icon",LinkButton:HK,PrimaryButton:NK},YS=({children:e,className:t,compact:n,isInline:r,kind:i="info",flairLevel:o="default",size:a="medium",wide:u,dismissible:c,onDismiss:d,noIcon:p,header:v,dismissed:h,"data-test-id":y="alert",primaryButton:x,link:C,...E})=>{const[S,b]=$2(h,!1,V=>V&&d?d():null),w=`${wt.Alert} ${wt[`Alert--${i}`]}`,M=a==="small"&&wt[`Alert--${a}`],A=i==="notification"&&wt[`Alert--flair-${o}`],D=M0(w,t,r?wt["Alert--inline"]:wt["Alert--bordered"],M,n&&wt["Alert--compact"],u&&wt["Alert--wide"],A);return S?null:k.jsxs("div",{...E,className:D,"data-test-id":y,role:["info","success","notification"].includes(i)?"status":"alert",children:[!p&&k.jsx(D9,{kind:i,className:wt["Alert-icon"],size:a,"data-test-id":`${y}-status-icon`}),k.jsxs("div",{className:wt["Alert-content"],children:[v&&k.jsx("h4",{className:wt["Alert-heading"],"data-test-id":`${y}-header`,children:v}),k.jsxs("div",{children:[k.jsx("div",{children:e}),(x||C)&&k.jsxs(ZK,{children:[x&&k.jsx(Vm,{...x,kind:x.kind||(o==="strong"||i!=="notification"?"default":"defaultFlair"),className:M0(x.className,wt.PrimaryButton)}),C&&k.jsx(Vm,{kind:"link",asChild:!0,onClick:C==null?void 0:C.onClick,className:wt.LinkButton,icon:k.jsx(b0,{name:"link-external",size:"small"}),children:k.jsx("a",{href:C.href,children:C.text})})]})]})]}),c&&k.jsx(qS,{"aria-label":"Close this alert.",size:"small",className:wt["Alert-close"],icon:k.jsx(b0,{name:"cancel",size:"small"}),kind:"close",onClick:()=>b(!0),"data-test-id":`${y}-dismiss-button`})]})};function zK(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function KK(e,t){var n={};{var r=e;for(var i in r){var o=r[i];o!=null&&(n[zK(i)]=o)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(u=>"".concat(u,":").concat(this[u])).join(";")},writable:!1}),n}function s7(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1)return!1;var r=!1,i=e.replace(JS,function(o){for(var a=arguments.length,u=new Array(a>1?a-1:0),c=1;c=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw u}}}}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function k5(e){for(var t=1;t{const i=e?Ba:"div",{className:o,style:a,otherProps:u}=tj(r);return k.jsx(i,{className:o,style:a,"data-test-id":n,...u,children:t})},nj="modulepreload",rj=function(e,t){return new URL(e,t).href},Hm={},ij=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.all(n.map(c=>{if(c=rj(c,r),c in Hm)return;Hm[c]=!0;const d=c.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!r)for(let y=o.length-1;y>=0;y--){const x=o[y];if(x.href===c&&(!d||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${p}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":nj,d||(h.as="script",h.crossOrigin=""),h.href=c,u&&h.setAttribute("nonce",u),document.head.appendChild(h),d)return new Promise((y,x)=>{h.addEventListener("load",y),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},ma=Math.min,uo=Math.max,uc=Math.round,v2=e=>({x:e,y:e}),oj={left:"right",right:"left",bottom:"top",top:"bottom"},lj={start:"end",end:"start"};function u7(e,t,n){return uo(e,ma(t,n))}function Va(e,t){return typeof e=="function"?e(t):e}function ci(e){return e.split("-")[0]}function Ia(e){return e.split("-")[1]}function eC(e){return e==="x"?"y":"x"}function op(e){return e==="y"?"height":"width"}function n1(e){return["top","bottom"].includes(ci(e))?"y":"x"}function lp(e){return eC(n1(e))}function aj(e,t,n){n===void 0&&(n=!1);const r=Ia(e),i=lp(e),o=op(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=cc(a)),[a,cc(a)]}function sj(e){const t=cc(e);return[c7(e),t,c7(t)]}function c7(e){return e.replace(/start|end/g,t=>lj[t])}function uj(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function cj(e,t,n,r){const i=Ia(e);let o=uj(ci(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(c7)))),o}function cc(e){return e.replace(/left|right|bottom|top/g,t=>oj[t])}function dj(e){return{top:0,right:0,bottom:0,left:0,...e}}function tC(e){return typeof e!="number"?dj(e):{top:e,right:e,bottom:e,left:e}}function dc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Nm(e,t,n){let{reference:r,floating:i}=e;const o=n1(t),a=lp(t),u=op(a),c=ci(t),d=o==="y",p=r.x+r.width/2-i.width/2,v=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:p,y:r.y-i.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:v};break;case"left":y={x:r.x-i.width,y:v};break;default:y={x:r.x,y:r.y}}switch(Ia(t)){case"start":y[a]-=h*(n&&d?-1:1);break;case"end":y[a]+=h*(n&&d?-1:1);break}return y}const fj=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:v}=Nm(d,r,c),h=r,y={},x=0;for(let C=0;C({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=Va(e,t)||{};if(d==null)return{};const v=tC(p),h={x:n,y:r},y=lp(i),x=op(y),C=await a.getDimensions(d),E=y==="y",S=E?"top":"left",b=E?"bottom":"right",w=E?"clientHeight":"clientWidth",M=o.reference[x]+o.reference[y]-h[y]-o.floating[x],A=h[y]-o.reference[y],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let V=D?D[w]:0;(!V||!await(a.isElement==null?void 0:a.isElement(D)))&&(V=u.floating[w]||o.floating[x]);const _=M/2-A/2,H=V/2-C[x]/2-1,R=ma(v[S],H),F=ma(v[b],H),re=R,z=V-C[x]-F,N=V/2-C[x]/2+_,te=u7(re,N,z),ae=!c.arrow&&Ia(i)!=null&&N!==te&&o.reference[x]/2-(Nre<=0)){var H,R;const re=(((H=o.flip)==null?void 0:H.index)||0)+1,z=A[re];if(z)return{data:{index:re,overflows:_},reset:{placement:z}};let N=(R=_.filter(te=>te.overflows[0]<=0).sort((te,ae)=>te.overflows[1]-ae.overflows[1])[0])==null?void 0:R.placement;if(!N)switch(y){case"bestFit":{var F;const te=(F=_.map(ae=>[ae.placement,ae.overflows.filter(q=>q>0).reduce((q,U)=>q+U,0)]).sort((ae,q)=>ae[1]-q[1])[0])==null?void 0:F[0];te&&(N=te);break}case"initialPlacement":N=u;break}if(i!==N)return{reset:{placement:N}}}return{}}}};async function hj(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ci(n),u=Ia(n),c=n1(n)==="y",d=["left","top"].includes(a)?-1:1,p=o&&c?-1:1,v=Va(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:x}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return u&&typeof x=="number"&&(y=u==="end"?x*-1:x),c?{x:y*p,y:h*d}:{x:h*d,y:y*p}}const mj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await hj(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},gj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:E=>{let{x:S,y:b}=E;return{x:S,y:b}}},...c}=Va(e,t),d={x:n,y:r},p=await nC(t,c),v=n1(ci(i)),h=eC(v);let y=d[h],x=d[v];if(o){const E=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=y+p[E],w=y-p[S];y=u7(b,y,w)}if(a){const E=v==="y"?"top":"left",S=v==="y"?"bottom":"right",b=x+p[E],w=x-p[S];x=u7(b,x,w)}const C=u.fn({...t,[h]:y,[v]:x});return{...C,data:{x:C.x-n,y:C.y-r}}}}};function h2(e){return rC(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function P2(e){var t;return(t=(rC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rC(e){return e instanceof Node||e instanceof Nt(e).Node}function Yn(e){return e instanceof Element||e instanceof Nt(e).Element}function Xn(e){return e instanceof HTMLElement||e instanceof Nt(e).HTMLElement}function zm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Fa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function yj(e){return["table","td","th"].includes(h2(e))}function bj(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ap(e){const t=sp(),n=Yn(e)?mn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iC(e){let t=Po(e);for(;Xn(t)&&!r1(t);){if(ap(t))return t;if(bj(t))return null;t=Po(t)}return null}function sp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function r1(e){return["html","body","#document"].includes(h2(e))}function mn(e){return Nt(e).getComputedStyle(e)}function i1(e){return Yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(h2(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zm(e)&&e.host||P2(e);return zm(t)?t.host:t}function oC(e){const t=Po(e);return r1(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xn(t)&&Fa(t)?t:oC(t)}function d7(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=oC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nt(i);if(o){const u=xj(a);return t.concat(a,a.visualViewport||[],Fa(i)?i:[],u&&n?d7(u):[])}return t.concat(i,d7(i,[],n))}function xj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lC(e){const t=mn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Xn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=uc(n)!==o||uc(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function aC(e){return Yn(e)?e:e.contextElement}function co(e){const t=aC(e);if(!Xn(t))return v2(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=lC(t);let a=(o?uc(n.width):n.width)/r,u=(o?uc(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const wj=v2(0);function sC(e){const t=Nt(e);return!sp()||!t.visualViewport?wj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $j(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nt(e)?!1:t}function ga(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=aC(e);let a=v2(1);t&&(r?Yn(r)&&(a=co(r)):a=co(e));const u=$j(o,n,r)?sC(o):v2(0);let c=(i.left+u.x)/a.x,d=(i.top+u.y)/a.y,p=i.width/a.x,v=i.height/a.y;if(o){const h=Nt(o),y=r&&Yn(r)?Nt(r):r;let x=h.frameElement;for(;x&&r&&y!==h;){const C=co(x),E=x.getBoundingClientRect(),S=mn(x),b=E.left+(x.clientLeft+parseFloat(S.paddingLeft))*C.x,w=E.top+(x.clientTop+parseFloat(S.paddingTop))*C.y;c*=C.x,d*=C.y,p*=C.x,v*=C.y,c+=b,d+=w,x=Nt(x).frameElement}}return dc({width:p,height:v,x:c,y:d})}const Sj=[":popover-open",":modal"];function uC(e){let t=!1,n=0,r=0;function i(o){try{t=t||e.matches(o)}catch{}}if(Sj.forEach(o=>{i(o)}),t){const o=iC(e);if(o){const a=o.getBoundingClientRect();n=a.x,r=a.y}}return[t,n,r]}function Cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=P2(r),[a]=t?uC(t.floating):[!1];if(r===o||a)return n;let u={scrollLeft:0,scrollTop:0},c=v2(1);const d=v2(0),p=Xn(r);if((p||!p&&i!=="fixed")&&((h2(r)!=="body"||Fa(o))&&(u=i1(r)),Xn(r))){const v=ga(r);c=co(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x,y:n.y*c.y-u.scrollTop*c.y+d.y}}function _j(e){return Array.from(e.getClientRects())}function cC(e){return ga(P2(e)).left+i1(e).scrollLeft}function Pj(e){const t=P2(e),n=i1(e),r=e.ownerDocument.body,i=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cC(e);const u=-n.scrollTop;return mn(r).direction==="rtl"&&(a+=uo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function Ej(e,t){const n=Nt(e),r=P2(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const d=sp();(!d||d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u,y:c}}function kj(e,t){const n=ga(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Xn(e)?co(e):v2(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:a,height:u,x:c,y:d}}function Km(e,t,n){let r;if(t==="viewport")r=Ej(e,n);else if(t==="document")r=Pj(P2(e));else if(Yn(t))r=kj(t,n);else{const i=sC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return dc(r)}function dC(e,t){const n=Po(e);return n===t||!Yn(n)||r1(n)?!1:mn(n).position==="fixed"||dC(n,t)}function Tj(e,t){const n=t.get(e);if(n)return n;let r=d7(e,[],!1).filter(u=>Yn(u)&&h2(u)!=="body"),i=null;const o=mn(e).position==="fixed";let a=o?Po(e):e;for(;Yn(a)&&!r1(a);){const u=mn(a),c=ap(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Fa(a)&&!c&&dC(e,a))?r=r.filter(p=>p!==a):i=u,a=Po(a)}return t.set(e,r),r}function Mj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Tj(t,this._c):[].concat(n),r],u=a[0],c=a.reduce((d,p)=>{const v=Km(t,p,i);return d.top=uo(v.top,d.top),d.right=ma(v.right,d.right),d.bottom=ma(v.bottom,d.bottom),d.left=uo(v.left,d.left),d},Km(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Aj(e){const{width:t,height:n}=lC(e);return{width:t,height:n}}function Lj(e,t,n,r){const i=Xn(t),o=P2(t),a=n==="fixed",u=ga(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=v2(0);if(i||!i&&!a)if((h2(t)!=="body"||Fa(o))&&(c=i1(t)),i){const C=ga(t,!0,a,t);d.x=C.x+t.clientLeft,d.y=C.y+t.clientTop}else o&&(d.x=cC(o));let p=u.left+c.scrollLeft-d.x,v=u.top+c.scrollTop-d.y;const[h,y,x]=uC(r);return h&&(p+=y,v+=x,i&&(p+=t.clientLeft,v+=t.clientTop)),{x:p,y:v,width:u.width,height:u.height}}function jm(e,t){return!Xn(e)||mn(e).position==="fixed"?null:t?t(e):e.offsetParent}function fC(e,t){const n=Nt(e);if(!Xn(e))return n;let r=jm(e,t);for(;r&&yj(r)&&mn(r).position==="static";)r=jm(r,t);return r&&(h2(r)==="html"||h2(r)==="body"&&mn(r).position==="static"&&!ap(r))?n:r||iC(e)||n}const Dj=async function(e){const t=this.getOffsetParent||fC,n=this.getDimensions;return{reference:Lj(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Rj(e){return mn(e).direction==="rtl"}const Bj={convertOffsetParentRelativeRectToViewportRelativeRect:Cj,getDocumentElement:P2,getClippingRect:Mj,getOffsetParent:fC,getElementRects:Dj,getClientRects:_j,getDimensions:Aj,getScale:co,isElement:Yn,isRTL:Rj},Vj=gj,Ij=vj,Fj=pj,Zj=(e,t,n)=>{const r=new Map,i={platform:Bj,...n},o={...i.platform,_c:r};return fj(e,t,{...i,platform:o})},Oj=m.createContext({contain:!0}),Hj=()=>m.useContext(Oj),Nj=e=>{const{contain:t}=Hj();return k.jsx(Wc,{contain:t,...e})},pC=m.forwardRef(({container:e=(i=>(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body)(),"data-test-id":t="portal",...n},r)=>{const[i,o]=m.useState(!1);return m.useEffect(()=>{o(!0)},[]),i&&e?pi.createPortal(k.jsx("div",{...n,ref:r,"data-test-id":t}),e):null});pC.displayName="Portal";const zj=({isOpen:e,lazy:t=!0,enforceFocus:n=!0,isModal:r=!1,canOutsideClickClose:i=!0,canEscapeKeyClose:o=!0,onClose:a,children:u})=>{const[c,d]=m.useState(e),p=m.useRef(null),v=m.useCallback(S=>{var b;const w=S.target,M=(b=p.current)==null?void 0:b.contains(w),A=!!w.closest("body");e&&i&&!M&&A&&typeof a=="function"&&a(S)},[i,e,a]),h=m.useCallback(()=>{requestAnimationFrame(()=>{if(!(!e||p.current===null||document.activeElement===null)&&!p.current.contains(document.activeElement)){const S=p.current.querySelector("[autofocus]"),b=p.current.querySelector("[tabindex]");S?S.focus():b&&b.focus()}})},[e]),y=m.useCallback(S=>{const b=S.target;n&&p.current&&!p.current.contains(b)&&(S.stopImmediatePropagation(),h())},[n,h]),x=m.useCallback(()=>{i&&document.addEventListener("mousedown",v),n&&document.addEventListener("focus",y,!0),r&&document.body.classList.add("has-overlay")},[v,y,i,n,r]),C=m.useCallback(()=>{document.removeEventListener("mousedown",v),document.removeEventListener("focus",y,!0),r&&document.body.classList.remove("has-overlay")},[v,y,r]);m.useEffect(()=>(e?x():C(),d(c||e),()=>{C()}),[e,x,C,c]);const E=S=>{o&&S.key==="Escape"&&(typeof a=="function"&&a(S),S.preventDefault())};return t&&!c?null:k.jsx(pC,{onKeyDown:E,ref:p,children:e?u:null})},Qn=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Fo=m.createContext({}),Zo=m.createContext(null),o1=typeof document<"u",E2=o1?m.useLayoutEffect:m.useEffect,up=m.createContext({strict:!1}),l1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vC="framerAppearId",cp="data-"+l1(vC),a1={skipAnimations:!1,useManualTiming:!1};class Wm{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Kj(e){let t=new Wm,n=new Wm,r=0,i=!1,o=!1;const a=new WeakSet,u={schedule:(c,d=!1,p=!1)=>{const v=p&&i,h=v?t:n;return d&&a.add(c),h.add(c)&&v&&i&&(r=t.order.length),c},cancel:c=>{n.remove(c),a.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let d=0;dn=!0,a=Cl.reduce((S,b)=>(S[b]=Kj(o),S),{}),{read:u,resolveKeyframes:c,update:d,preRender:p,render:v,postRender:h}=a,y=()=>{const S=a1.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,jj),1),i.timestamp=S,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),p.process(i),v.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Cl.reduce((S,b)=>{const w=a[b];return S[b]=(M,A=!1,D=!1)=>(n||x(),w.schedule(M,A,D)),S},{}),cancel:S=>{for(let b=0;b{p&&p.update(n,u)});const h=m.useRef(!!(n[cp]&&!window.HandoffComplete));return E2(()=>{p&&(p.updateFeatures(),dp.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),m.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(h.current=!1,Um||(Um=!0,queueMicrotask(Uj))))}),p}function Uj(){window.HandoffComplete=!0}function Gj(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mC(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||u&&Xi(u),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:d})}function mC(e){if(e)return e.options.allowProjection!==!1?e.projection:mC(e.parent)}function qj(e,t,n){return m.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Xi(n)&&(n.current=r))},[t])}function ya(e){return typeof e=="string"||Array.isArray(e)}function ba(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const pp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vp=["initial",...pp];function s1(e){return ba(e.animate)||vp.some(t=>ya(e[t]))}function gC(e){return!!(s1(e)||e.variants)}function Yj(e,t){if(s1(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ya(n)?n:void 0,animate:ya(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xj(e){const{initial:t,animate:n}=Yj(e,m.useContext(Fo));return m.useMemo(()=>({initial:t,animate:n}),[Gm(t),Gm(n)])}function Gm(e){return Array.isArray(e)?e.join(" "):e}const qm={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"]},Eo={};for(const e in qm)Eo[e]={isEnabled:t=>qm[e].some(n=>!!t[n])};function f7(e){for(const t in e)Eo[t]={...Eo[t],...e[t]}}const ko=m.createContext({}),hp=Symbol.for("motionComponentSymbol"),z0=e=>e;let yC=z0,xa=z0;function mp({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&f7(e);function o(u,c){let d;const p={...m.useContext(Qn),...u,layoutId:Qj(u)},{isStatic:v}=p,h=Xj(u),y=r(u,v);if(!v&&o1){Jj();const x=eW(p);d=x.MeasureLayout,h.visualElement=Wj(i,y,p,t,x.ProjectionNode)}return k.jsxs(Fo.Provider,{value:h,children:[d&&h.visualElement?k.jsx(d,{visualElement:h.visualElement,...p}):null,n(i,u,qj(y,h.visualElement,c),y,v,h.visualElement)]})}const a=m.forwardRef(o);return a[hp]=i,a}function Qj({layoutId:e}){const t=m.useContext(ko).id;return t&&e!==void 0?t+"-"+e:e}function Jj(e,t){m.useContext(up).strict}function eW(e){const{drag:t,layout:n}=Eo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function bC(e){function t(r,i={}){return mp(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const tW=["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 gp(e){return typeof e!="string"||e.includes("-")?!1:!!(tW.indexOf(e)>-1||/[A-Z]/u.test(e))}const fc={};function xC(e){Object.assign(fc,e)}const Za=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lr=new Set(Za);function wC(e,{layout:t,layoutId:n}){return Lr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!fc[e]||e==="opacity")}const h0=e=>!!(e&&e.getVelocity),nW={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rW=Za.length;function $C(e,t,n){let r="";for(let i=0;it=>typeof t=="string"&&t.startsWith(e),CC=SC("--"),iW=SC("var(--"),yp=e=>iW(e)?oW.test(e.split("/*")[0].trim()):!1,oW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,lW=(e,t)=>t&&typeof e=="number"?t.transform(e):e,kr=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Il={...Oo,transform:e=>kr(0,1,e)},nu={...Oo,default:1},Fl=e=>Math.round(e*1e5)/1e5,bp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,aW=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,sW=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Oa(e){return typeof e=="string"}function uW(e){return e==null}const Ha=e=>({test:t=>Oa(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jr=Ha("deg"),jn=Ha("%"),xe=Ha("px"),cW=Ha("vh"),dW=Ha("vw"),Ym={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},Xm={...Oo,transform:Math.round},_C={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,size:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,rotate:jr,rotateX:jr,rotateY:jr,rotateZ:jr,scale:nu,scaleX:nu,scaleY:nu,scaleZ:nu,skew:jr,skewX:jr,skewY:jr,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:Il,originX:Ym,originY:Ym,originZ:xe,zIndex:Xm,backgroundPositionX:xe,backgroundPositionY:xe,fillOpacity:Il,strokeOpacity:Il,numOctaves:Xm};function xp(e,t,n){const{style:r,vars:i,transform:o,transformOrigin:a}=e;let u=!1,c=!1,d=!0;for(const p in t){const v=t[p];if(CC(p)){i[p]=v;continue}const h=_C[p],y=lW(v,h);if(Lr.has(p)){if(u=!0,o[p]=y,!d)continue;v!==(h.default||0)&&(d=!1)}else p.startsWith("origin")?(c=!0,a[p]=y):r[p]=y}if(t.transform||(u||n?r.transform=$C(e.transform,d,n):r.transform&&(r.transform="none")),c){const{originX:p="50%",originY:v="50%",originZ:h=0}=a;r.transformOrigin=`${p} ${v} ${h}`}}const wp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function PC(e,t,n){for(const r in t)!h0(t[r])&&!wC(r,n)&&(e[r]=t[r])}function fW({transformTemplate:e},t){return m.useMemo(()=>{const n=wp();return xp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function pW(e,t){const n=e.style||{},r={};return PC(r,n,e),Object.assign(r,fW(e,t)),r}function vW(e,t){const n={},r=pW(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 hW=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 wa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||hW.has(e)}let EC=e=>!wa(e);function kC(e){e&&(EC=t=>t.startsWith("on")?!wa(t):e(t))}try{kC(require("@emotion/is-prop-valid").default)}catch{}function TC(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(EC(i)||n===!0&&wa(i)||!t&&!wa(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Qm(e,t,n){return typeof e=="string"?e:xe.transform(t+n*e)}function mW(e,t,n){const r=Qm(t,e.x,e.width),i=Qm(n,e.y,e.height);return`${r} ${i}`}const gW={offset:"stroke-dashoffset",array:"stroke-dasharray"},yW={offset:"strokeDashoffset",array:"strokeDasharray"};function bW(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?gW:yW;e[o.offset]=xe.transform(-r);const a=xe.transform(t),u=xe.transform(n);e[o.array]=`${a} ${u}`}function $p(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:u=1,pathOffset:c=0,...d},p,v){if(xp(e,d,v),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:x}=e;h.transform&&(x&&(y.transform=h.transform),delete h.transform),x&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=mW(x,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&bW(h,a,u,c,!1)}const MC=()=>({...wp(),attrs:{}}),Sp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xW(e,t,n,r){const i=m.useMemo(()=>{const o=MC();return $p(o,t,Sp(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};PC(o,e.style,e),i.style={...o,...i.style}}return i}function wW(e=!1){return(n,r,i,{latestValues:o},a)=>{const c=(gp(n)?xW:vW)(r,o,a,n),d=TC(r,typeof n=="string",e),p=n!==m.Fragment?{...d,...c,ref:i}:{},{children:v}=r,h=m.useMemo(()=>h0(v)?v.get():v,[v]);return m.createElement(n,{...p,children:h})}}function AC(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const LC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function DC(e,t,n,r){AC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(LC.has(i)?i:l1(i),t.attrs[i])}function Cp(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(h0(i[a])||t.style&&h0(t.style[a])||wC(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function RC(e,t,n){const r=Cp(e,t,n);for(const i in e)if(h0(e[i])||h0(t[i])){const o=Za.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function Jm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _p(e,t,n,r){if(typeof t=="function"){const[i,o]=Jm(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Jm(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function it(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const p7=e=>Array.isArray(e),$W=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),SW=e=>p7(e)?e[e.length-1]||0:e;function Zl(e){const t=h0(e)?e.get():e;return $W(t)?t.toValue():t}const BC=new Set(["opacity","clipPath","filter","transform"]);function VC(e){if(Lr.has(e))return"transform";if(BC.has(e)||e==="backgroundColor")return l1(e)}function u1(e,t){e.indexOf(t)===-1&&e.push(t)}function Na(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function CW([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&rr(i,d,c)),c}const c1=e=>(t,n)=>{const r=m.useContext(Fo),i=m.useContext(Zo),o=()=>_W(e,t,r,i,n);return n?o():it(o)};function e8(e,t){const n=VC(t);n&&u1(e,n)}function t8(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const b in E){let w=E[b];if(Array.isArray(w)){const M=x?w.length-1:0;w=w[M]}w!==null&&(a[b]=w)}for(const b in S)a[b]=S[b]}),c&&(v&&p!==!1&&!ba(v)&&t8(e,v,E=>{for(const S in E)e8(u,S)}),u.length&&(a.willChange=u.join(","))),a}const{schedule:ke,cancel:kt,state:L0,steps:wu}=hC(typeof requestAnimationFrame<"u"?requestAnimationFrame:z0,!0),EW={useVisualState:c1({scrapeMotionValuesFromProps:RC,createRenderState:MC,onMount:(e,t,{renderState:n,latestValues:r})=>{ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ke.render(()=>{$p(n,r,Sp(t.tagName),e.transformTemplate),DC(t,n)})}})},kW={useVisualState:c1({applyWillChange:!0,scrapeMotionValuesFromProps:Cp,createRenderState:wp})};function Pp(e,{forwardMotionProps:t=!1},n,r){return{...gp(e)?EW:kW,preloadedFeatures:n,useRender:wW(t),createVisualElement:r,Component:e}}function Hn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const IC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function d1(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const FC=e=>t=>IC(t)&&e(t,d1(t));function Wn(e,t,n,r){return Hn(e,t,FC(n),r)}const TW=(e,t)=>n=>t(e(n)),Un=(...e)=>e.reduce(TW);function ZC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const n8=ZC("dragHorizontal"),r8=ZC("dragVertical");function OC(e){let t=!1;if(e==="y")t=r8();else if(e==="x")t=n8();else{const n=n8(),r=r8();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ep(){const e=OC(!0);return e?(e(),!1):!0}class k2{constructor(t){this.isMounted=!1,this.node=t}update(){}}function i8(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||Ep())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t);const c=u[r];c&&ke.postRender(()=>c(o,a))};return Wn(e.current,n,i,{passive:!e.getProps()[r]})}class MW extends k2{mount(){this.unmount=Un(i8(this.node,!0),i8(this.node,!1))}unmount(){}}class AW extends k2{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=Un(Hn(this.node.current,"focus",()=>this.onFocus()),Hn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const HC=(e,t)=>t?e===t?!0:HC(e,t.parentElement):!1;function T5(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,d1(n))}class LW extends k2{constructor(){super(...arguments),this.removeStartListeners=z0,this.removeEndListeners=z0,this.removeAccessibleListeners=z0,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=Wn(window,"pointerup",(u,c)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:p,globalTapTarget:v}=this.node.getProps(),h=!v&&!HC(this.node.current,u.target)?p:d;h&&ke.update(()=>h(u,c))},{passive:!(r.onTap||r.onPointerUp)}),a=Wn(window,"pointercancel",(u,c)=>this.cancelPress(u,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Un(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=u=>{u.key!=="Enter"||!this.checkPressEnd()||T5("up",(c,d)=>{const{onTap:p}=this.node.getProps();p&&ke.postRender(()=>p(c,d))})};this.removeEndListeners(),this.removeEndListeners=Hn(this.node.current,"keyup",a),T5("down",(u,c)=>{this.startPress(u,c)})},n=Hn(this.node.current,"keydown",t),r=()=>{this.isPressing&&T5("cancel",(o,a)=>this.cancelPress(o,a))},i=Hn(this.node.current,"blur",r);this.removeAccessibleListeners=Un(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ke.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ep()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ke.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Wn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Un(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const v7=new WeakMap,M5=new WeakMap,DW=e=>{const t=v7.get(e.target);t&&t(e)},RW=e=>{e.forEach(DW)};function BW({root:e,...t}){const n=e||document;M5.has(n)||M5.set(n,{});const r=M5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(RW,{root:e,...t})),r[i]}function VW(e,t,n){const r=BW(t);return v7.set(e,n),r.observe(e),()=>{v7.delete(e),r.unobserve(e)}}const IW={some:0,all:1};class FW extends k2{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:IW[i]},u=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:v}=this.node.getProps(),h=d?p:v;h&&h(c)};return VW(this.node.current,a,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ZW(t,n))&&this.startObserver()}unmount(){}}function ZW({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NC={inView:{Feature:FW},tap:{Feature:LW},focus:{Feature:AW},hover:{Feature:MW}};function zC(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gn=e=>e/1e3,OW={type:"spring",stiffness:500,damping:25,restSpeed:10},HW=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NW={type:"keyframes",duration:.8},zW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KW=(e,{keyframes:t})=>t.length>2?NW:Lr.has(e)?e.startsWith("scale")?HW(t[1]):OW:zW;function jW({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:u,from:c,elapsed:d,...p}){return!!Object.keys(p).length}function kp(e,t){return e[t]||e.default||e}const $a={current:!1},WW=e=>e!==null;function p1(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(WW),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}let $u;function UW(){$u=void 0}const u2={now:()=>($u===void 0&&u2.set(L0.isProcessing||a1.useManualTiming?L0.timestamp:performance.now()),$u),set:e=>{$u=e,queueMicrotask(UW)}},KC=e=>/^0[^.\s]+$/u.test(e);function GW(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||KC(e):!0}const jC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YW(e){const t=qW.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function WC(e,t,n=1){const[r,i]=YW(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return jC(a)?parseFloat(a):a}return yp(i)?WC(i,t,n+1):i}const XW=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),o8=e=>e===Oo||e===xe,l8=(e,t)=>parseFloat(e.split(", ")[t]),a8=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return l8(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?l8(o[1],e):0}},QW=new Set(["x","y","z"]),JW=Za.filter(e=>!QW.has(e));function eU(e){const t=[];return JW.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const To={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:a8(4,13),y:a8(5,14)};To.translateX=To.x;To.translateY=To.y;const UC=e=>t=>t.test(e),tU={test:e=>e==="auto",parse:e=>e},GC=[Oo,xe,jn,jr,dW,cW,tU],s8=e=>GC.find(UC(e)),ei=new Set;let h7=!1,m7=!1;function qC(){if(m7){const e=Array.from(ei).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=eU(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var u;(u=r.getValue(o))===null||u===void 0||u.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}m7=!1,h7=!1,ei.forEach(e=>e.complete()),ei.clear()}function YC(){ei.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(m7=!0)})}function nU(){YC(),qC()}class Tp{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ei.add(this),h7||(h7=!0,ke.read(YC),ke.resolveKeyframes(qC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;on=>!!(Oa(n)&&sW.test(n)&&n.startsWith(e)||t&&!uW(n)&&Object.prototype.hasOwnProperty.call(n,t)),XC=(e,t,n)=>r=>{if(!Oa(r))return r;const[i,o,a,u]=r.match(bp);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},rU=e=>kr(0,255,e),A5={...Oo,transform:e=>Math.round(rU(e))},X2={test:Mp("rgb","red"),parse:XC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+A5.transform(e)+", "+A5.transform(t)+", "+A5.transform(n)+", "+Fl(Il.transform(r))+")"};function iU(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const g7={test:Mp("#"),parse:iU,transform:X2.transform},Qi={test:Mp("hsl","hue"),parse:XC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Fl(t))+", "+jn.transform(Fl(n))+", "+Fl(Il.transform(r))+")"},U0={test:e=>X2.test(e)||g7.test(e)||Qi.test(e),parse:e=>X2.test(e)?X2.parse(e):Qi.test(e)?Qi.parse(e):g7.parse(e),transform:e=>Oa(e)?e:e.hasOwnProperty("red")?X2.transform(e):Qi.transform(e)};function oU(e){var t,n;return isNaN(e)&&Oa(e)&&(((t=e.match(bp))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(aW))===null||n===void 0?void 0:n.length)||0)>0}const QC="number",JC="color",lU="var",aU="var(",u8="${}",sU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(sU,c=>(U0.test(c)?(r.color.push(o),i.push(JC),n.push(U0.parse(c))):c.startsWith(aU)?(r.var.push(o),i.push(lU),n.push(c)):(r.number.push(o),i.push(QC),n.push(parseFloat(c))),++o,u8)).split(u8);return{values:n,split:u,indexes:r,types:i}}function e_(e){return Sa(e).values}function t_(e){const{split:t,types:n}=Sa(e),r=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function cU(e){const t=e_(e);return t_(e)(t.map(uU))}const Tr={test:oU,parse:e_,createTransformer:t_,getAnimatableNone:cU},dU=new Set(["brightness","contrast","saturate","opacity"]);function fU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bp)||[];if(!r)return e;const i=n.replace(r,"");let o=dU.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const pU=/\b([a-z-]*)\(.*?\)/gu,y7={...Tr,getAnimatableNone:e=>{const t=e.match(pU);return t?t.map(fU).join(" "):e}},vU={..._C,color:U0,backgroundColor:U0,outlineColor:U0,fill:U0,stroke:U0,borderColor:U0,borderTopColor:U0,borderRightColor:U0,borderBottomColor:U0,borderLeftColor:U0,filter:y7,WebkitFilter:y7},Ap=e=>vU[e];function n_(e,t){let n=Ap(e);return n!==y7&&(n=Tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const hU=new Set(["auto","none","0"]);function mU(e,t,n){let r=0,i;for(;r{n.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function i_(e){let t;return()=>(t===void 0&&(t=e()),t)}const c8=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tr.test(e)||e==="0")&&!e.startsWith("url("));function gU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=t})}}function Lp(e,t){return t?e*(1e3/t):0}const bU=5;function l_(e,t,n){const r=Math.max(t-bU,0);return Lp(n-e(r),t-r)}const L5=.001,xU=.01,wU=10,$U=.05,SU=1;function CU({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=kr($U,SU,a),e=kr(xU,wU,Gn(e)),a<1?(i=d=>{const p=d*a,v=p*e,h=p-n,y=b7(d,a),x=Math.exp(-v);return L5-h/y*x},o=d=>{const v=d*a*e,h=v*n+n,y=Math.pow(a,2)*Math.pow(d,2)*e,x=Math.exp(-v),C=b7(Math.pow(d,2),a);return(-i(d)+L5>0?-1:1)*((h-y)*x)/C}):(i=d=>{const p=Math.exp(-d*e),v=(d-n)*e+1;return-L5+p*v},o=d=>{const p=Math.exp(-d*e),v=(n-d)*(e*e);return p*v});const u=5/e,c=PU(i,o,u);if(e=$r(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const _U=12;function PU(e,t,n){let r=n;for(let i=1;i<_U;i++)r=r-e(r)/t(r);return r}function b7(e,t){return e*Math.sqrt(1-t*t)}const EU=["duration","bounce"],kU=["stiffness","damping","mass"];function d8(e,t){return t.some(n=>e[n]!==void 0)}function TU(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!d8(e,kU)&&d8(e,EU)){const n=CU(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function v1({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:p,velocity:v,isResolvedFromDuration:h}=TU({...r,velocity:-Gn(r.velocity||0)}),y=v||0,x=c/(2*Math.sqrt(u*d)),C=o-i,E=Gn(Math.sqrt(u/d)),S=Math.abs(C)<5;n||(n=S?.01:2),t||(t=S?.005:.5);let b;if(x<1){const w=b7(E,x);b=M=>{const A=Math.exp(-x*E*M);return o-A*((y+x*E*C)/w*Math.sin(w*M)+C*Math.cos(w*M))}}else if(x===1)b=w=>o-Math.exp(-E*w)*(C+(y+E*C)*w);else{const w=E*Math.sqrt(x*x-1);b=M=>{const A=Math.exp(-x*E*M),D=Math.min(w*M,300);return o-A*((y+x*E*C)*Math.sinh(D)+w*C*Math.cosh(D))/w}}return{calculatedDuration:h&&p||null,next:w=>{const M=b(w);if(h)a.done=w>=p;else{let A=y;w!==0&&(x<1?A=l_(b,w,M):A=0);const D=Math.abs(A)<=n,V=Math.abs(o-M)<=t;a.done=D&&V}return a.value=a.done?o:M,a}}}function f8({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:u,max:c,restDelta:d=.5,restSpeed:p}){const v=e[0],h={done:!1,value:v},y=_=>u!==void 0&&_c,x=_=>u===void 0?c:c===void 0||Math.abs(u-_)-C*Math.exp(-_/r),w=_=>S+b(_),M=_=>{const H=b(_),R=w(_);h.done=Math.abs(H)<=d,h.value=h.done?S:R};let A,D;const V=_=>{y(h.value)&&(A=_,D=v1({keyframes:[h.value,x(h.value)],velocity:l_(w,_,h.value),damping:i,stiffness:o,restDelta:d,restSpeed:p}))};return V(0),{calculatedDuration:null,next:_=>{let H=!1;return!D&&A===void 0&&(H=!0,M(_),V(_)),A!==void 0&&_>=A?D.next(_-A):(!H&&M(_),h)}}}const a_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,MU=1e-7,AU=12;function LU(e,t,n,r,i){let o,a,u=0;do a=t+(n-t)/2,o=a_(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>MU&&++uLU(o,0,1,e,n);return o=>o===0||o===1?o:a_(i(o),t,r)}const s_=Ho(.42,0,1,1),u_=Ho(0,0,.58,1),Dp=Ho(.42,0,.58,1),c_=e=>Array.isArray(e)&&typeof e[0]!="number",Rp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bp=e=>t=>1-e(1-t),h1=e=>1-Math.sin(Math.acos(e)),Vp=Bp(h1),d_=Rp(h1),Ip=Ho(.33,1.53,.69,.99),m1=Bp(Ip),f_=Rp(m1),p_=e=>(e*=2)<1?.5*m1(e):.5*(2-Math.pow(2,-10*(e-1))),p8={linear:z0,easeIn:s_,easeInOut:Dp,easeOut:u_,circIn:h1,circInOut:d_,circOut:Vp,backIn:m1,backInOut:f_,backOut:Ip,anticipate:p_},x7=e=>{if(Array.isArray(e)){xa(e.length===4);const[t,n,r,i]=e;return Ho(t,n,r,i)}else if(typeof e=="string")return xa(p8[e]!==void 0),p8[e];return e},m2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},d0=(e,t,n)=>e+(t-e)*n;function D5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function DU({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;i=D5(c,u,e+1/3),o=D5(c,u,e),a=D5(c,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function pc(e,t){return n=>n>0?t:e}const R5=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},RU=[g7,X2,Qi],BU=e=>RU.find(t=>t.test(e));function v8(e){const t=BU(e);if(!t)return!1;let n=t.parse(e);return t===Qi&&(n=DU(n)),n}const h8=(e,t)=>{const n=v8(e),r=v8(t);if(!n||!r)return pc(e,t);const i={...n};return o=>(i.red=R5(n.red,r.red,o),i.green=R5(n.green,r.green,o),i.blue=R5(n.blue,r.blue,o),i.alpha=d0(n.alpha,r.alpha,o),X2.transform(i))},w7=new Set(["none","hidden"]);function VU(e,t){return w7.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function IU(e,t){return n=>d0(e,t,n)}function Fp(e){return typeof e=="number"?IU:typeof e=="string"?yp(e)?pc:U0.test(e)?h8:OU:Array.isArray(e)?v_:typeof e=="object"?U0.test(e)?h8:FU:pc}function v_(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Fp(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in r)n[o]=r[o](i);return n}}function ZU(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=Tr.createTransformer(t),r=Sa(e),i=Sa(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?w7.has(e)&&!i.values.length||w7.has(t)&&!r.values.length?VU(e,t):Un(v_(ZU(r,i),i.values),n):pc(e,t)};function Zp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?d0(e,t,n):Fp(e)(e,t)}function HU(e,t,n){const r=[],i=n||Zp,o=e.length-1;for(let a=0;at[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=HU(t,r,i),u=a.length,c=d=>{let p=0;if(u>1)for(;pc(kr(e[0],e[o-1],d)):c}function h_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=m2(0,t,r);e.push(d0(n,1,i))}}function Op(e){const t=[0];return h_(t,e.length-1),t}function NU(e,t){return e.map(n=>n*t)}function zU(e,t){return e.map(()=>t||Dp).splice(0,e.length-1)}function vc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=c_(r)?r.map(x7):x7(r),o={done:!1,value:t[0]},a=NU(n&&n.length===t.length?n:Op(t),e),u=g1(a,t,{ease:Array.isArray(i)?i:zU(t,i)});return{calculatedDuration:e,next:c=>(o.value=u(c),o.done=c>=e,o)}}const $7=2e4;function m_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$7;)t+=n,r=e.next(t);return t>=$7?1/0:t}const KU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>kt(t),now:()=>L0.isProcessing?L0.timestamp:u2.now()}},jU={decay:f8,inertia:f8,tween:vc,keyframes:vc,spring:v1},WU=e=>e/100;class y1 extends o_{constructor({KeyframeResolver:t=Tp,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:r,motionValue:i,keyframes:o}=this.options,a=(u,c)=>this.onKeyframesResolved(u,c);r&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,a,r,i):this.resolver=new t(o,a,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,u=jU[n]||vc;let c,d;u!==vc&&typeof t[0]!="number"&&(c=Un(WU,Zp(t[0],t[1])),t=[0,100]);const p=u({...this.options,keyframes:t});o==="mirror"&&(d=u({...this.options,keyframes:[...t].reverse(),velocity:-a})),p.calculatedDuration===null&&(p.calculatedDuration=m_(p));const{calculatedDuration:v}=p,h=v+i,y=h*(r+1)-i;return{generator:p,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:v,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:_}=this.options;return{done:!0,value:_[_.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:u,keyframes:c,calculatedDuration:d,totalDuration:p,resolvedDuration:v}=r;if(this.startTime===null)return o.next(0);const{delay:h,repeat:y,repeatType:x,repeatDelay:C,onUpdate:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-p/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const S=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?S<0:S>p;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=p);let w=this.currentTime,M=o;if(y){const _=Math.min(this.currentTime,p)/v;let H=Math.floor(_),R=_%1;!R&&_>=1&&(R=1),R===1&&H--,H=Math.min(H,y+1),!!(H%2)&&(x==="reverse"?(R=1-R,C&&(R-=C/v)):x==="mirror"&&(M=a)),w=kr(0,1,R)*v}const A=b?{done:!1,value:c[0]}:M.next(w);u&&(A.value=u(A.value));let{done:D}=A;!b&&d!==null&&(D=this.speed>=0?this.currentTime>=p:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&i!==void 0&&(A.value=p1(c,this.options,i)),E&&E(A.value),V&&this.finish(),A}get duration(){const{resolved:t}=this;return t?Gn(t.calculatedDuration):0}get time(){return Gn(this.currentTime)}set time(t){t=$r(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=KU,onPlay:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function g_(e){return new y1(e)}const y_=e=>Array.isArray(e)&&typeof e[0]=="number";function b_(e){return!!(!e||typeof e=="string"&&e in Hp||y_(e)||Array.isArray(e)&&e.every(b_))}const _l=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_l([0,.65,.55,1]),circOut:_l([.55,0,1,.45]),backIn:_l([.31,.01,.66,-.59]),backOut:_l([.33,1.53,.69,.99])};function UU(e){return x_(e)||Hp.easeOut}function x_(e){if(e)return y_(e)?_l(e):Array.isArray(e)?e.map(UU):Hp[e]}function S7(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:u,times:c}={}){const d={[t]:n};c&&(d.offset=c);const p=x_(u);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const GU=i_(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hc=10,qU=2e4;function YU(e){return e.type==="spring"||e.name==="backgroundColor"||!b_(e.ease)}function XU(e,t){const n=new y1({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(o,a),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:u,motionValue:c,name:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(YU(this.options)){const{onComplete:v,onUpdate:h,motionValue:y,...x}=this.options,C=XU(t,x);t=C.keyframes,t.length===1&&(t[1]=t[0]),i=C.duration,o=C.times,a=C.ease,u="keyframes"}const p=S7(c.owner.current,d,t,{...this.options,duration:i,times:o,ease:a});return p.startTime=u2.now(),this.pendingTimeline?(p.timeline=this.pendingTimeline,this.pendingTimeline=void 0):p.onfinish=()=>{const{onComplete:v}=this.options;c.set(p1(t,this.options,n)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:p,duration:i,times:o,type:u,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=$r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return z0;const{animation:r}=n;r.timeline=t,r.onfinish=null}return z0}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:p,onComplete:v,...h}=this.options,y=new y1({...h,keyframes:r,duration:i,type:o,ease:a,times:u,isGenerator:!0}),x=$r(this.time);d.setWithVelocity(y.sample(x-hc).value,y.sample(x).value,hc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:u}=t;return GU()&&r&&BC.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&u!=="inertia"}}function w_(e,t){let n;const r=()=>{const{currentTime:i}=t,a=(i===null?0:i.value)/100;n!==a&&e(a),n=a};return ke.update(r,!0),()=>kt(r)}const $_=i_(()=>window.ScrollTimeline!==void 0);class Np{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if($_()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),w_(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const zp=(e,t,n,r={},i,o,a)=>u=>{const c=kp(r,e)||{},d=c.delay||r.delay||0;let{elapsed:p=0}=r;p=p-$r(d);let v={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-p,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{u(),c.onComplete&&c.onComplete(),a&&a()},onStop:a,name:e,motionValue:t,element:o?void 0:i};jW(c)||(v={...v,...KW(e,v)}),v.duration&&(v.duration=$r(v.duration)),v.repeatDelay&&(v.repeatDelay=$r(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let h=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(h=!0)),($a.current||a1.skipAnimations)&&(h=!0,v.duration=0,v.delay=0),h&&!o&&t.get()!==void 0){const y=p1(v.keyframes,c);if(y!==void 0)return ke.update(()=>{v.onUpdate(y),v.onComplete()}),new Np([])}return!o&&C7.supports(v)?new C7(v):new y1(v)};class Kp{constructor(){this.subscriptions=[]}add(t){return u1(this.subscriptions,t),()=>Na(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e)),Ol={current:void 0};class jp{constructor(t,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=u2.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=u2.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=QU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kp);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ol.current&&Ol.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=u2.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>m8)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,m8);return Lp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function En(e,t){return new jp(e,t)}function JU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,En(n))}function Wp(e,t){const n=f1(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const u=SW(o[a]);JU(e,a,u)}}function S_(e){return e.getProps()[cp]}class C_ extends jp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=VC(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const o=this.counts.get(n)-1;this.counts.set(n,o),o===0&&(Na(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function eG(){return it(()=>new C_("auto"))}function tG(e){return!!(h0(e)&&e.add)}function _7(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new C_("auto"),e.addValue("willChange",r)),tG(r))return r.add(t)}function nG({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Up(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:u,...c}=t;r&&(a=r);const d=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const v in c){const h=e.getValue(v,(o=e.latestValues[v])!==null&&o!==void 0?o:null),y=c[v];if(y===void 0||p&&nG(p,v))continue;const x={delay:n,elapsed:0,...kp(a||{},v)};let C=!1;if(window.HandoffAppearAnimations){const S=S_(e);if(S){const b=window.HandoffAppearAnimations(S,v,h,ke);b!==null&&(x.elapsed=b,C=!0)}}h.start(zp(v,h,y,e.shouldReduceMotion&&Lr.has(v)?{type:!1}:x,e,C,_7(e,v)));const E=h.animation;E&&d.push(E)}return u&&Promise.all(d).then(()=>{ke.update(()=>{u&&Wp(e,u)})}),d}function P7(e,t,n={}){var r;const i=f1(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(Up(e,i,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:p=0,staggerChildren:v,staggerDirection:h}=o;return rG(e,t,p+d,v,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[d,p]=c==="beforeChildren"?[a,u]:[u,a];return d().then(()=>p())}else return Promise.all([a(),u(n.delay)])}function rG(e,t,n=0,r=0,i=1,o){const a=[],u=(e.variantChildren.size-1)*r,c=i===1?(d=0)=>d*r:(d=0)=>u-d*r;return Array.from(e.variantChildren).sort(iG).forEach((d,p)=>{d.notify("AnimationStart",t),a.push(P7(d,t,{...o,delay:n+c(p)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function iG(e,t){return e.sortNodePosition(t)}function b1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>P7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=P7(e,t,n);else{const i=typeof t=="function"?f1(e,t,n.custom):t;r=Promise.all(Up(e,i,n))}return r.then(()=>{ke.postRender(()=>{e.notify("AnimationComplete",t)})})}const oG=[...pp].reverse(),lG=pp.length;function aG(e){return t=>Promise.all(t.map(({animation:n,options:r})=>b1(e,n,r)))}function sG(e){let t=aG(e),n=g8(),r=!0;const i=c=>(d,p)=>{var v;const h=f1(e,p,c==="exit"?(v=e.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(h){const{transition:y,transitionEnd:x,...C}=h;d={...d,...C,...x}}return d};function o(c){t=c(e)}function a(c){const d=e.getProps(),p=e.getVariantContext(!0)||{},v=[],h=new Set;let y={},x=1/0;for(let E=0;Ex&&M,H=!1;const R=Array.isArray(w)?w:[w];let F=R.reduce(i(S),{});A===!1&&(F={});const{prevResolvedValues:re={}}=b,z={...re,...F},N=te=>{_=!0,h.has(te)&&(H=!0,h.delete(te)),b.needsAnimating[te]=!0;const ae=e.getValue(te);ae&&(ae.liveStyle=!1)};for(const te in z){const ae=F[te],q=re[te];if(y.hasOwnProperty(te))continue;let U=!1;p7(ae)&&p7(q)?U=!zC(ae,q):U=ae!==q,U?ae!=null?N(te):h.add(te):ae!==void 0&&h.has(te)?N(te):b.protectedKeys[te]=!0}b.prevProp=w,b.prevResolvedValues=F,b.isActive&&(y={...y,...F}),r&&e.blockInitialAnimation&&(_=!1),_&&(!D||H)&&v.push(...R.map(te=>({animation:te,options:{type:S}})))}if(h.size){const E={};h.forEach(S=>{const b=e.getBaseTarget(S),w=e.getValue(S);w&&(w.liveStyle=!0),E[S]=b??null}),v.push({animation:E})}let C=!!v.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,C?t(v):Promise.resolve()}function u(c,d){var p;if(n[c].isActive===d)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,d)}),n[c].isActive=d;const v=a(c);for(const h in n)n[h].protectedKeys={};return v}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=g8(),r=!0}}}function uG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zC(t,e):!1}function O2(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function g8(){return{animate:O2(!0),whileInView:O2(),whileHover:O2(),whileTap:O2(),whileDrag:O2(),whileFocus:O2(),exit:O2()}}class cG extends k2{constructor(t){super(t),t.animationState||(t.animationState=sG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ba(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let dG=0;class fG extends k2{constructor(){super(...arguments),this.id=dG++}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 i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Gp={animation:{Feature:cG},exit:{Feature:fG}},E7=(e,t)=>Math.abs(e-t);function __(e,t){const n=E7(e.x,t.x),r=E7(e.y,t.y);return Math.sqrt(n**2+r**2)}class P_{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=V5(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=__(v.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:x}=v,{timestamp:C}=L0;this.history.push({...x,timestamp:C});const{onStart:E,onMove:S}=this.handlers;h||(E&&E(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,h)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=B5(h,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(v,h)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:C}=this.handlers;if(this.dragSnapToOrigin&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=V5(v.type==="pointercancel"?this.lastMoveEventInfo:B5(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(v,E),x&&x(v,E)},!IC(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=d1(t),u=B5(a,this.transformPagePoint),{point:c}=u,{timestamp:d}=L0;this.history=[{...c,timestamp:d}];const{onSessionStart:p}=n;p&&p(t,V5(u,this.history)),this.removeListeners=Un(Wn(this.contextWindow,"pointermove",this.handlePointerMove),Wn(this.contextWindow,"pointerup",this.handlePointerUp),Wn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kt(this.updatePoint)}}function B5(e,t){return t?{point:t(e.point)}:e}function y8(e,t){return{x:e.x-t.x,y:e.y-t.y}}function V5({point:e},t){return{point:e,delta:y8(e,E_(t)),offset:y8(e,pG(t)),velocity:vG(t,.1)}}function pG(e){return e[0]}function E_(e){return e[e.length-1]}function vG(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=E_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>$r(t)));)n--;if(!r)return{x:0,y:0};const o=Gn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Tt(e){return e.max-e.min}function k7(e,t=0,n=.01){return Math.abs(e-t)<=n}function b8(e,t,n,r=.5){e.origin=r,e.originPoint=d0(t.min,t.max,e.origin),e.scale=Tt(n)/Tt(t),(k7(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=d0(n.min,n.max,e.origin)-e.originPoint,(k7(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Hl(e,t,n,r){b8(e.x,t.x,n.x,r?r.originX:void 0),b8(e.y,t.y,n.y,r?r.originY:void 0)}function x8(e,t,n){e.min=n.min+t.min,e.max=e.min+Tt(t)}function hG(e,t,n){x8(e.x,t.x,n.x),x8(e.y,t.y,n.y)}function w8(e,t,n){e.min=t.min-n.min,e.max=e.min+Tt(t)}function Nl(e,t,n){w8(e.x,t.x,n.x),w8(e.y,t.y,n.y)}function mG(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?d0(n,e,r.max):Math.min(e,n)),e}function $8(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 gG(e,{top:t,left:n,bottom:r,right:i}){return{x:$8(e.x,n,i),y:$8(e.y,t,r)}}function S8(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=m2(t.min,t.max-r,e.min):r>i&&(n=m2(e.min,e.max-i,t.min)),kr(0,1,n)}function xG(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 T7=.35;function wG(e=T7){return e===!1?e=0:e===!0&&(e=T7),{x:C8(e,"left","right"),y:C8(e,"top","bottom")}}function C8(e,t,n){return{min:_8(e,t),max:_8(e,n)}}function _8(e,t){return typeof e=="number"?e:e[t]||0}const P8=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ji=()=>({x:P8(),y:P8()}),E8=()=>({min:0,max:0}),g0=()=>({x:E8(),y:E8()});function on(e){return[e("x"),e("y")]}function k_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $G({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SG(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function I5(e){return e===void 0||e===1}function M7({scale:e,scaleX:t,scaleY:n}){return!I5(e)||!I5(t)||!I5(n)}function K2(e){return M7(e)||T_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T_(e){return k8(e.x)||k8(e.y)}function k8(e){return e&&e!=="0%"}function mc(e,t,n){const r=e-n,i=t*r;return n+i}function T8(e,t,n,r,i){return i!==void 0&&(e=mc(e,i,r)),mc(e,n,r)+t}function A7(e,t=0,n=1,r,i){e.min=T8(e.min,t,n,r,i),e.max=T8(e.max,t,n,r,i)}function M_(e,{x:t,y:n}){A7(e.x,t.translate,t.scale,t.originPoint),A7(e.y,n.translate,n.scale,n.originPoint)}function CG(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let u=0;u1.0000000000001||e<.999999999999?e:1}function qr(e,t){e.min=e.min+t,e.max=e.max+t}function A8(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=d0(e.min,e.max,o);A7(e,t[n],t[r],a,t.scale)}const _G=["x","scaleX","originX"],PG=["y","scaleY","originY"];function eo(e,t){A8(e.x,t,_G),A8(e.y,t,PG)}function A_(e,t){return k_(SG(e.getBoundingClientRect(),t))}function EG(e,t,n){const r=A_(e,n),{scroll:i}=t;return i&&(qr(r.x,i.offset.x),qr(r.y,i.offset.y)),r}const L_=({current:e})=>e?e.ownerDocument.defaultView:null,kG=new WeakMap;class TG{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=g0(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=p=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(d1(p,"page").point)},o=(p,v)=>{var h;const{drag:y,dragPropagation:x,onDragStart:C}=this.getProps();if(y&&!x&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=OC(y),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(S=>{let b=this.getAxisMotionValue(S).get()||0;if(jn.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[S];M&&(b=Tt(M)*(parseFloat(b)/100))}}this.originPoint[S]=b}),C&&ke.postRender(()=>C(p,v)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=_7(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},a=(p,v)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:x,onDrag:C}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:E}=v;if(y&&this.currentDirection===null){this.currentDirection=MG(E),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),C&&C(p,v)},u=(p,v)=>this.stop(p,v),c=()=>on(p=>{var v;return this.getAnimationState(p)==="paused"&&((v=this.getAxisMotionValue(p).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new P_(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:L_(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ru(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=mG(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Xi(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=gG(i.layoutBox,n):this.constraints=!1,this.elastic=wG(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&on(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=xG(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=EG(r,i.root,this.visualElement.getTransformPagePoint());let a=yG(i.layout.layoutBox,o);if(n){const u=n($G(a));this.hasMutatedConstraints=!!u,u&&(a=k_(u))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=on(p=>{if(!ru(p,n,this.currentDirection))return;let v=c&&c[p]||{};a&&(v={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,x={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...v};return this.startAxisValueAnimation(p,x)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(zp(t,r,0,n,this.visualElement,!1,_7(this.visualElement,t)))}stopAnimation(){on(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){on(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){on(n=>{const{drag:r}=this.getProps();if(!ru(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:u}=i.layout.layoutBox[n];o.set(t[n]-d0(a,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};on(a=>{const u=this.getAxisMotionValue(a);if(u&&this.constraints!==!1){const c=u.get();i[a]=bG({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),on(a=>{if(!ru(a,t,null))return;const u=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];u.set(d0(c,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;kG.set(this.visualElement,this);const t=this.visualElement.current,n=Wn(t,"pointerdown",c=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Xi(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const a=Hn(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(on(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=c[p].translate,v.set(v.get()+c[p].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=T7,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:u}}}function ru(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function MG(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AG extends k2{constructor(t){super(t),this.removeGroupControls=z0,this.removeListeners=z0,this.controls=new TG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z0}unmount(){this.removeGroupControls(),this.removeListeners()}}const L8=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class LG extends k2{constructor(){super(...arguments),this.removePointerDownListener=z0}onPointerDown(t){this.session=new P_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:L_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:L8(t),onStart:L8(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Wn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function D_(){const e=m.useContext(Zo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=m.useId();return m.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function DG(){return RG(m.useContext(Zo))}function RG(e){return e===null?!0:e.isPresent}const Su={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function D8(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=D8(e,t.target.x),r=D8(e,t.target.y);return`${n}% ${r}%`}},BG={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Tr.parse(e);if(i.length>5)return r;const o=Tr.createTransformer(e),a=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=u,i[1+a]/=c;const d=d0(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),o(i)}};class VG extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;xC(IG),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Su.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ke.postRender(()=>{const u=a.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dp.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function R_(e){const[t,n]=D_(),r=m.useContext(ko);return k.jsx(VG,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(fp),isPresent:t,safeToRemove:n})}const IG={borderRadius:{...vl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vl,borderTopRightRadius:vl,borderBottomLeftRadius:vl,borderBottomRightRadius:vl,boxShadow:BG},B_=["TopLeft","TopRight","BottomLeft","BottomRight"],FG=B_.length,R8=e=>typeof e=="string"?parseFloat(e):e,B8=e=>typeof e=="number"||xe.test(e);function ZG(e,t,n,r,i,o){i?(e.opacity=d0(0,n.opacity!==void 0?n.opacity:1,OG(r)),e.opacityExit=d0(t.opacity!==void 0?t.opacity:1,0,HG(r))):o&&(e.opacity=d0(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(m2(e,t,r))}function I8(e,t){e.min=t.min,e.max=t.max}function rn(e,t){I8(e.x,t.x),I8(e.y,t.y)}function F8(e,t,n,r,i){return e-=t,e=mc(e,1/n,r),i!==void 0&&(e=mc(e,1/i,r)),e}function NG(e,t=0,n=1,r=.5,i,o=e,a=e){if(jn.test(t)&&(t=parseFloat(t),t=d0(a.min,a.max,t/100)-a.min),typeof t!="number")return;let u=d0(o.min,o.max,r);e===o&&(u-=t),e.min=F8(e.min,t,n,u,i),e.max=F8(e.max,t,n,u,i)}function Z8(e,t,[n,r,i],o,a){NG(e,t[n],t[r],t[i],t.scale,o,a)}const zG=["x","scaleX","originX"],KG=["y","scaleY","originY"];function O8(e,t,n,r){Z8(e.x,t,zG,n?n.x:void 0,r?r.x:void 0),Z8(e.y,t,KG,n?n.y:void 0,r?r.y:void 0)}function H8(e){return e.translate===0&&e.scale===1}function I_(e){return H8(e.x)&&H8(e.y)}function jG(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function F_(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function N8(e){return Tt(e.x)/Tt(e.y)}class WG{constructor(){this.members=[]}add(t){u1(this.members,t),t.scheduleRender()}remove(t){if(Na(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function z8(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:p,rotateX:v,rotateY:h,skewX:y,skewY:x}=n;d&&(r=`perspective(${d}px) ${r}`),p&&(r+=`rotate(${p}deg) `),v&&(r+=`rotateX(${v}deg) `),h&&(r+=`rotateY(${h}deg) `),y&&(r+=`skewX(${y}deg) `),x&&(r+=`skewY(${x}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const UG=(e,t)=>e.depth-t.depth;class Z_{constructor(){this.children=[],this.isDirty=!1}add(t){u1(this.children,t),this.isDirty=!0}remove(t){Na(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UG),this.isDirty=!1,this.children.forEach(t)}}function O_(e,t){const n=u2.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(kt(r),e(o-t))};return ke.read(r,!0),()=>kt(r)}function GG(e){window.MotionDebug&&window.MotionDebug.record(e)}function H_(e){return e instanceof SVGElement&&e.tagName!=="svg"}function qp(e,t,n){const r=h0(e)?e:En(e);return r.start(zp("",r,t,n)),r.animation}const F5=["","X","Y","Z"],qG={visibility:"hidden"},K8=1e3;let YG=0;const j2={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Z5(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function N_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?S_(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?N_(e.parent):!1:!1}function z_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},u=t==null?void 0:t()){this.id=YG++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,j2.totalNodes=j2.resolvedTargetDeltas=j2.recalculatedProjection=0,this.nodes.forEach(JG),this.nodes.forEach(iq),this.nodes.forEach(oq),this.nodes.forEach(eq),GG(j2)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=O_(h,250),Su.hasAnimatedSinceResize&&(Su.hasAnimatedSinceResize=!1,this.nodes.forEach(W8))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&p&&(c||d)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:h,hasRelativeTargetChanged:y,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||p.getDefaultTransition()||cq,{onLayoutAnimationStart:E,onLayoutAnimationComplete:S}=p.getProps(),b=!this.targetLayout||!F_(this.targetLayout,x)||y,w=!h&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,w);const M={...kp(C,"layout"),onPlay:E,onComplete:S};(p.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else h||W8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,kt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(lq),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&N_(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=M/1e3;U8(v.x,a.x,A),U8(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nl(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sq(this.relativeTarget,this.relativeTargetOrigin,h,A),w&&jG(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=g0()),rn(w,this.relativeTarget)),C&&(this.animationValues=p,ZG(p,d,this.latestValues,A,b,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(kt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Su.hasAnimatedSinceResize=!0,this.currentAnimation=qp(0,K8,{...a,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(K8),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:p}=a;if(!(!u||!c||!d)){if(this!==a&&this.layout&&d&&K_(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||g0();const v=Tt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+v;const h=Tt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}rn(u,c),eo(u,p),Hl(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(a,u){this.sharedNodes.has(a)||this.sharedNodes.set(a,new WG),this.sharedNodes.get(a).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:u}=this.options;return u?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:u}=this.options;return u?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let u=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&Z5("z",a,d,this.animationValues);for(let p=0;p{var u;return(u=a.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(j8),this.root.sharedNodes.clear()}}}function XG(e){e.updateLayout()}function QG(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?on(v=>{const h=a?n.measuredBox[v]:n.layoutBox[v],y=Tt(h);h.min=r[v].min,h.max=h.min+y}):K_(o,n.layoutBox,r)&&on(v=>{const h=a?n.measuredBox[v]:n.layoutBox[v],y=Tt(r[v]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+y)});const u=Ji();Hl(u,r,n.layoutBox);const c=Ji();a?Hl(c,e.applyTransform(i,!0),n.measuredBox):Hl(c,r,n.layoutBox);const d=!I_(u);let p=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:h,layout:y}=v;if(h&&y){const x=g0();Nl(x,n.layoutBox,h.layoutBox);const C=g0();Nl(C,r,y.layoutBox),F_(x,C)||(p=!0),v.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=x,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function JG(e){j2.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tq(e){e.clearSnapshot()}function j8(e){e.clearMeasurements()}function nq(e){e.isLayoutDirty=!1}function rq(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function W8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iq(e){e.resolveTargetDelta()}function oq(e){e.calcProjection()}function lq(e){e.resetSkewAndRotation()}function aq(e){e.removeLeadSnapshot()}function U8(e,t,n){e.translate=d0(t.translate,0,n),e.scale=d0(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function G8(e,t,n,r){e.min=d0(t.min,n.min,r),e.max=d0(t.max,n.max,r)}function sq(e,t,n,r){G8(e.x,t.x,n.x,r),G8(e.y,t.y,n.y,r)}function uq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cq={duration:.45,ease:[.4,0,.1,1]},q8=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y8=q8("applewebkit/")&&!q8("chrome/")?Math.round:z0;function X8(e){e.min=Y8(e.min),e.max=Y8(e.max)}function dq(e){X8(e.x),X8(e.y)}function K_(e,t,n){return e==="position"||e==="preserve-aspect"&&!k7(N8(t),N8(n),.2)}const fq=z_({attachResizeListener:(e,t)=>Hn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ti={current:void 0},j_=z_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ti.current){const e=new fq({});e.mount(window),e.setOptions({layoutScroll:!0}),ti.current=e}return ti.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),W_={pan:{Feature:LG},drag:{Feature:AG,ProjectionNode:j_,MeasureLayout:R_}},gc={current:null},Yp={current:!1};function U_(){if(Yp.current=!0,!!o1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gc.current=e.matches;e.addListener(t),t()}else gc.current=!1}function pq(e,t,n){for(const r in t){const i=t[r],o=n[r];if(h0(i))e.addValue(r,i);else if(h0(o))e.addValue(r,En(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,En(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mo=new WeakMap,vq=[...GC,U0,Tr],hq=e=>vq.find(UC(e)),Q8=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mq=vp.length;class Xp{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},u={}){this.applyWillChange=!1,this.resolveKeyframes=(h,y,x,C)=>new this.KeyframeResolver(h,y,x,C,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ke.render(this.render,!1,!0);const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=s1(n),this.isVariantNode=gC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in v){const y=v[h];c[h]!==void 0&&h0(y)&&y.set(c[h],!1)}}mount(t){this.current=t,Mo.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Yp.current||U_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mo.delete(this.current),this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Lr.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Eo){const n=Eo[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):g0()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=En(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(jC(i)||KC(i))?i=parseFloat(i):!hq(i)&&Tr.test(n)&&(i=n_(t,n)),this.setBaseTarget(t,h0(i)?i.get():i)),h0(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=_p(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!h0(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class G_ extends Xp{constructor(){super(...arguments),this.KeyframeResolver=r_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function gq(e){return window.getComputedStyle(e)}class q_ extends G_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(t,n){if(Lr.has(n)){const r=Ap(n);return r&&r.default||0}else{const r=gq(t),i=(CC(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return A_(t,n)}build(t,n,r){xp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Cp(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;h0(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){AC(t,n,r,i)}}class Y_ extends G_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lr.has(n)){const r=Ap(n);return r&&r.default||0}return n=LC.has(n)?n:l1(n),t.getAttribute(n)}measureInstanceViewportBox(){return g0()}scrapeMotionValuesFromProps(t,n,r){return RC(t,n,r)}build(t,n,r){$p(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){DC(t,n,r,i)}mount(t){this.isSVGTag=Sp(t.tagName),super.mount(t)}}const Qp=(e,t)=>gp(e)?new Y_(t):new q_(t,{allowProjection:e!==m.Fragment}),X_={layout:{ProjectionNode:j_,MeasureLayout:R_}},Q_={...Gp,...NC,...W_,...X_},Jp=bC((e,t)=>Pp(e,t,Q_,Qp));function yq(e){return mp(Pp(e,{forwardMotionProps:!1},Q_,Qp))}const J_=bC(Pp);function eP(){const e=m.useRef(!1);return E2(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function x1(){const e=eP(),[t,n]=m.useState(0),r=m.useCallback(()=>{e.current&&n(t+1)},[t]);return[m.useCallback(()=>ke.postRender(r),[r]),t]}class bq extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xq({children:e,isPresent:t}){const n=m.useId(),r=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=m.useContext(Qn);return m.useInsertionEffect(()=>{const{width:a,height:u,top:c,left:d}=i.current;if(t||!r.current||!a||!u)return;r.current.dataset.motionPopId=n;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw u}}}}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function k5(e){for(var t=1;t{const i=e?Ba:"div",{className:o,style:a,otherProps:u}=tj(r);return k.jsx(i,{className:o,style:a,"data-test-id":n,...u,children:t})},nj="modulepreload",rj=function(e,t){return new URL(e,t).href},Hm={},ij=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=Promise.allSettled(n.map(d=>{if(d=rj(d,r),d in Hm)return;Hm[d]=!0;const p=d.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(!!r)for(let x=a.length-1;x>=0;x--){const C=a[x];if(C.href===d&&(!p||C.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${v}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":nj,p||(y.as="script"),y.crossOrigin="",y.href=d,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((x,C)=>{y.addEventListener("load",x),y.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},ma=Math.min,uo=Math.max,uc=Math.round,v2=e=>({x:e,y:e}),oj={left:"right",right:"left",bottom:"top",top:"bottom"},lj={start:"end",end:"start"};function u7(e,t,n){return uo(e,ma(t,n))}function Va(e,t){return typeof e=="function"?e(t):e}function ci(e){return e.split("-")[0]}function Ia(e){return e.split("-")[1]}function eC(e){return e==="x"?"y":"x"}function op(e){return e==="y"?"height":"width"}function n1(e){return["top","bottom"].includes(ci(e))?"y":"x"}function lp(e){return eC(n1(e))}function aj(e,t,n){n===void 0&&(n=!1);const r=Ia(e),i=lp(e),o=op(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=cc(a)),[a,cc(a)]}function sj(e){const t=cc(e);return[c7(e),t,c7(t)]}function c7(e){return e.replace(/start|end/g,t=>lj[t])}function uj(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function cj(e,t,n,r){const i=Ia(e);let o=uj(ci(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(c7)))),o}function cc(e){return e.replace(/left|right|bottom|top/g,t=>oj[t])}function dj(e){return{top:0,right:0,bottom:0,left:0,...e}}function tC(e){return typeof e!="number"?dj(e):{top:e,right:e,bottom:e,left:e}}function dc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Nm(e,t,n){let{reference:r,floating:i}=e;const o=n1(t),a=lp(t),u=op(a),c=ci(t),d=o==="y",p=r.x+r.width/2-i.width/2,v=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:p,y:r.y-i.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:v};break;case"left":y={x:r.x-i.width,y:v};break;default:y={x:r.x,y:r.y}}switch(Ia(t)){case"start":y[a]-=h*(n&&d?-1:1);break;case"end":y[a]+=h*(n&&d?-1:1);break}return y}const fj=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:v}=Nm(d,r,c),h=r,y={},x=0;for(let C=0;C({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=Va(e,t)||{};if(d==null)return{};const v=tC(p),h={x:n,y:r},y=lp(i),x=op(y),C=await a.getDimensions(d),E=y==="y",S=E?"top":"left",b=E?"bottom":"right",w=E?"clientHeight":"clientWidth",M=o.reference[x]+o.reference[y]-h[y]-o.floating[x],A=h[y]-o.reference[y],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let V=D?D[w]:0;(!V||!await(a.isElement==null?void 0:a.isElement(D)))&&(V=u.floating[w]||o.floating[x]);const _=M/2-A/2,H=V/2-C[x]/2-1,R=ma(v[S],H),F=ma(v[b],H),re=R,z=V-C[x]-F,N=V/2-C[x]/2+_,te=u7(re,N,z),ae=!c.arrow&&Ia(i)!=null&&N!==te&&o.reference[x]/2-(Nre<=0)){var H,R;const re=(((H=o.flip)==null?void 0:H.index)||0)+1,z=A[re];if(z)return{data:{index:re,overflows:_},reset:{placement:z}};let N=(R=_.filter(te=>te.overflows[0]<=0).sort((te,ae)=>te.overflows[1]-ae.overflows[1])[0])==null?void 0:R.placement;if(!N)switch(y){case"bestFit":{var F;const te=(F=_.map(ae=>[ae.placement,ae.overflows.filter(q=>q>0).reduce((q,U)=>q+U,0)]).sort((ae,q)=>ae[1]-q[1])[0])==null?void 0:F[0];te&&(N=te);break}case"initialPlacement":N=u;break}if(i!==N)return{reset:{placement:N}}}return{}}}};async function hj(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ci(n),u=Ia(n),c=n1(n)==="y",d=["left","top"].includes(a)?-1:1,p=o&&c?-1:1,v=Va(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:x}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return u&&typeof x=="number"&&(y=u==="end"?x*-1:x),c?{x:y*p,y:h*d}:{x:h*d,y:y*p}}const mj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await hj(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},gj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:E=>{let{x:S,y:b}=E;return{x:S,y:b}}},...c}=Va(e,t),d={x:n,y:r},p=await nC(t,c),v=n1(ci(i)),h=eC(v);let y=d[h],x=d[v];if(o){const E=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=y+p[E],w=y-p[S];y=u7(b,y,w)}if(a){const E=v==="y"?"top":"left",S=v==="y"?"bottom":"right",b=x+p[E],w=x-p[S];x=u7(b,x,w)}const C=u.fn({...t,[h]:y,[v]:x});return{...C,data:{x:C.x-n,y:C.y-r}}}}};function h2(e){return rC(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function P2(e){var t;return(t=(rC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rC(e){return e instanceof Node||e instanceof Nt(e).Node}function Yn(e){return e instanceof Element||e instanceof Nt(e).Element}function Xn(e){return e instanceof HTMLElement||e instanceof Nt(e).HTMLElement}function zm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Fa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function yj(e){return["table","td","th"].includes(h2(e))}function bj(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ap(e){const t=sp(),n=Yn(e)?mn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iC(e){let t=Po(e);for(;Xn(t)&&!r1(t);){if(ap(t))return t;if(bj(t))return null;t=Po(t)}return null}function sp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function r1(e){return["html","body","#document"].includes(h2(e))}function mn(e){return Nt(e).getComputedStyle(e)}function i1(e){return Yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Po(e){if(h2(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zm(e)&&e.host||P2(e);return zm(t)?t.host:t}function oC(e){const t=Po(e);return r1(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xn(t)&&Fa(t)?t:oC(t)}function d7(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=oC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nt(i);if(o){const u=xj(a);return t.concat(a,a.visualViewport||[],Fa(i)?i:[],u&&n?d7(u):[])}return t.concat(i,d7(i,[],n))}function xj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lC(e){const t=mn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Xn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=uc(n)!==o||uc(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function aC(e){return Yn(e)?e:e.contextElement}function co(e){const t=aC(e);if(!Xn(t))return v2(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=lC(t);let a=(o?uc(n.width):n.width)/r,u=(o?uc(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const wj=v2(0);function sC(e){const t=Nt(e);return!sp()||!t.visualViewport?wj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $j(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nt(e)?!1:t}function ga(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=aC(e);let a=v2(1);t&&(r?Yn(r)&&(a=co(r)):a=co(e));const u=$j(o,n,r)?sC(o):v2(0);let c=(i.left+u.x)/a.x,d=(i.top+u.y)/a.y,p=i.width/a.x,v=i.height/a.y;if(o){const h=Nt(o),y=r&&Yn(r)?Nt(r):r;let x=h.frameElement;for(;x&&r&&y!==h;){const C=co(x),E=x.getBoundingClientRect(),S=mn(x),b=E.left+(x.clientLeft+parseFloat(S.paddingLeft))*C.x,w=E.top+(x.clientTop+parseFloat(S.paddingTop))*C.y;c*=C.x,d*=C.y,p*=C.x,v*=C.y,c+=b,d+=w,x=Nt(x).frameElement}}return dc({width:p,height:v,x:c,y:d})}const Sj=[":popover-open",":modal"];function uC(e){let t=!1,n=0,r=0;function i(o){try{t=t||e.matches(o)}catch{}}if(Sj.forEach(o=>{i(o)}),t){const o=iC(e);if(o){const a=o.getBoundingClientRect();n=a.x,r=a.y}}return[t,n,r]}function Cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=P2(r),[a]=t?uC(t.floating):[!1];if(r===o||a)return n;let u={scrollLeft:0,scrollTop:0},c=v2(1);const d=v2(0),p=Xn(r);if((p||!p&&i!=="fixed")&&((h2(r)!=="body"||Fa(o))&&(u=i1(r)),Xn(r))){const v=ga(r);c=co(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x,y:n.y*c.y-u.scrollTop*c.y+d.y}}function _j(e){return Array.from(e.getClientRects())}function cC(e){return ga(P2(e)).left+i1(e).scrollLeft}function Pj(e){const t=P2(e),n=i1(e),r=e.ownerDocument.body,i=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+cC(e);const u=-n.scrollTop;return mn(r).direction==="rtl"&&(a+=uo(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function Ej(e,t){const n=Nt(e),r=P2(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const d=sp();(!d||d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:u,y:c}}function kj(e,t){const n=ga(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Xn(e)?co(e):v2(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:a,height:u,x:c,y:d}}function Km(e,t,n){let r;if(t==="viewport")r=Ej(e,n);else if(t==="document")r=Pj(P2(e));else if(Yn(t))r=kj(t,n);else{const i=sC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return dc(r)}function dC(e,t){const n=Po(e);return n===t||!Yn(n)||r1(n)?!1:mn(n).position==="fixed"||dC(n,t)}function Tj(e,t){const n=t.get(e);if(n)return n;let r=d7(e,[],!1).filter(u=>Yn(u)&&h2(u)!=="body"),i=null;const o=mn(e).position==="fixed";let a=o?Po(e):e;for(;Yn(a)&&!r1(a);){const u=mn(a),c=ap(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Fa(a)&&!c&&dC(e,a))?r=r.filter(p=>p!==a):i=u,a=Po(a)}return t.set(e,r),r}function Mj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Tj(t,this._c):[].concat(n),r],u=a[0],c=a.reduce((d,p)=>{const v=Km(t,p,i);return d.top=uo(v.top,d.top),d.right=ma(v.right,d.right),d.bottom=ma(v.bottom,d.bottom),d.left=uo(v.left,d.left),d},Km(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Aj(e){const{width:t,height:n}=lC(e);return{width:t,height:n}}function Lj(e,t,n,r){const i=Xn(t),o=P2(t),a=n==="fixed",u=ga(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=v2(0);if(i||!i&&!a)if((h2(t)!=="body"||Fa(o))&&(c=i1(t)),i){const C=ga(t,!0,a,t);d.x=C.x+t.clientLeft,d.y=C.y+t.clientTop}else o&&(d.x=cC(o));let p=u.left+c.scrollLeft-d.x,v=u.top+c.scrollTop-d.y;const[h,y,x]=uC(r);return h&&(p+=y,v+=x,i&&(p+=t.clientLeft,v+=t.clientTop)),{x:p,y:v,width:u.width,height:u.height}}function jm(e,t){return!Xn(e)||mn(e).position==="fixed"?null:t?t(e):e.offsetParent}function fC(e,t){const n=Nt(e);if(!Xn(e))return n;let r=jm(e,t);for(;r&&yj(r)&&mn(r).position==="static";)r=jm(r,t);return r&&(h2(r)==="html"||h2(r)==="body"&&mn(r).position==="static"&&!ap(r))?n:r||iC(e)||n}const Dj=async function(e){const t=this.getOffsetParent||fC,n=this.getDimensions;return{reference:Lj(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Rj(e){return mn(e).direction==="rtl"}const Bj={convertOffsetParentRelativeRectToViewportRelativeRect:Cj,getDocumentElement:P2,getClippingRect:Mj,getOffsetParent:fC,getElementRects:Dj,getClientRects:_j,getDimensions:Aj,getScale:co,isElement:Yn,isRTL:Rj},Vj=gj,Ij=vj,Fj=pj,Zj=(e,t,n)=>{const r=new Map,i={platform:Bj,...n},o={...i.platform,_c:r};return fj(e,t,{...i,platform:o})},Oj=m.createContext({contain:!0}),Hj=()=>m.useContext(Oj),Nj=e=>{const{contain:t}=Hj();return k.jsx(Wc,{contain:t,...e})},pC=m.forwardRef(({container:e=(i=>(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body)(),"data-test-id":t="portal",...n},r)=>{const[i,o]=m.useState(!1);return m.useEffect(()=>{o(!0)},[]),i&&e?pi.createPortal(k.jsx("div",{...n,ref:r,"data-test-id":t}),e):null});pC.displayName="Portal";const zj=({isOpen:e,lazy:t=!0,enforceFocus:n=!0,isModal:r=!1,canOutsideClickClose:i=!0,canEscapeKeyClose:o=!0,onClose:a,children:u})=>{const[c,d]=m.useState(e),p=m.useRef(null),v=m.useCallback(S=>{var b;const w=S.target,M=(b=p.current)==null?void 0:b.contains(w),A=!!w.closest("body");e&&i&&!M&&A&&typeof a=="function"&&a(S)},[i,e,a]),h=m.useCallback(()=>{requestAnimationFrame(()=>{if(!(!e||p.current===null||document.activeElement===null)&&!p.current.contains(document.activeElement)){const S=p.current.querySelector("[autofocus]"),b=p.current.querySelector("[tabindex]");S?S.focus():b&&b.focus()}})},[e]),y=m.useCallback(S=>{const b=S.target;n&&p.current&&!p.current.contains(b)&&(S.stopImmediatePropagation(),h())},[n,h]),x=m.useCallback(()=>{i&&document.addEventListener("mousedown",v),n&&document.addEventListener("focus",y,!0),r&&document.body.classList.add("has-overlay")},[v,y,i,n,r]),C=m.useCallback(()=>{document.removeEventListener("mousedown",v),document.removeEventListener("focus",y,!0),r&&document.body.classList.remove("has-overlay")},[v,y,r]);m.useEffect(()=>(e?x():C(),d(c||e),()=>{C()}),[e,x,C,c]);const E=S=>{o&&S.key==="Escape"&&(typeof a=="function"&&a(S),S.preventDefault())};return t&&!c?null:k.jsx(pC,{onKeyDown:E,ref:p,children:e?u:null})},Qn=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Fo=m.createContext({}),Zo=m.createContext(null),o1=typeof document<"u",E2=o1?m.useLayoutEffect:m.useEffect,up=m.createContext({strict:!1}),l1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vC="framerAppearId",cp="data-"+l1(vC),a1={skipAnimations:!1,useManualTiming:!1};class Wm{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Kj(e){let t=new Wm,n=new Wm,r=0,i=!1,o=!1;const a=new WeakSet,u={schedule:(c,d=!1,p=!1)=>{const v=p&&i,h=v?t:n;return d&&a.add(c),h.add(c)&&v&&i&&(r=t.order.length),c},cancel:c=>{n.remove(c),a.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let d=0;dn=!0,a=Cl.reduce((S,b)=>(S[b]=Kj(o),S),{}),{read:u,resolveKeyframes:c,update:d,preRender:p,render:v,postRender:h}=a,y=()=>{const S=a1.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,jj),1),i.timestamp=S,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),p.process(i),v.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Cl.reduce((S,b)=>{const w=a[b];return S[b]=(M,A=!1,D=!1)=>(n||x(),w.schedule(M,A,D)),S},{}),cancel:S=>{for(let b=0;b{p&&p.update(n,u)});const h=m.useRef(!!(n[cp]&&!window.HandoffComplete));return E2(()=>{p&&(p.updateFeatures(),dp.render(p.render),h.current&&p.animationState&&p.animationState.animateChanges())}),m.useEffect(()=>{p&&(!h.current&&p.animationState&&p.animationState.animateChanges(),h.current&&(h.current=!1,Um||(Um=!0,queueMicrotask(Uj))))}),p}function Uj(){window.HandoffComplete=!0}function Gj(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mC(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||u&&Xi(u),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:d})}function mC(e){if(e)return e.options.allowProjection!==!1?e.projection:mC(e.parent)}function qj(e,t,n){return m.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Xi(n)&&(n.current=r))},[t])}function ya(e){return typeof e=="string"||Array.isArray(e)}function ba(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const pp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vp=["initial",...pp];function s1(e){return ba(e.animate)||vp.some(t=>ya(e[t]))}function gC(e){return!!(s1(e)||e.variants)}function Yj(e,t){if(s1(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ya(n)?n:void 0,animate:ya(r)?r:void 0}}return e.inherit!==!1?t:{}}function Xj(e){const{initial:t,animate:n}=Yj(e,m.useContext(Fo));return m.useMemo(()=>({initial:t,animate:n}),[Gm(t),Gm(n)])}function Gm(e){return Array.isArray(e)?e.join(" "):e}const qm={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"]},Eo={};for(const e in qm)Eo[e]={isEnabled:t=>qm[e].some(n=>!!t[n])};function f7(e){for(const t in e)Eo[t]={...Eo[t],...e[t]}}const ko=m.createContext({}),hp=Symbol.for("motionComponentSymbol"),z0=e=>e;let yC=z0,xa=z0;function mp({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&f7(e);function o(u,c){let d;const p={...m.useContext(Qn),...u,layoutId:Qj(u)},{isStatic:v}=p,h=Xj(u),y=r(u,v);if(!v&&o1){Jj();const x=eW(p);d=x.MeasureLayout,h.visualElement=Wj(i,y,p,t,x.ProjectionNode)}return k.jsxs(Fo.Provider,{value:h,children:[d&&h.visualElement?k.jsx(d,{visualElement:h.visualElement,...p}):null,n(i,u,qj(y,h.visualElement,c),y,v,h.visualElement)]})}const a=m.forwardRef(o);return a[hp]=i,a}function Qj({layoutId:e}){const t=m.useContext(ko).id;return t&&e!==void 0?t+"-"+e:e}function Jj(e,t){m.useContext(up).strict}function eW(e){const{drag:t,layout:n}=Eo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function bC(e){function t(r,i={}){return mp(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const tW=["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 gp(e){return typeof e!="string"||e.includes("-")?!1:!!(tW.indexOf(e)>-1||/[A-Z]/u.test(e))}const fc={};function xC(e){Object.assign(fc,e)}const Za=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lr=new Set(Za);function wC(e,{layout:t,layoutId:n}){return Lr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!fc[e]||e==="opacity")}const h0=e=>!!(e&&e.getVelocity),nW={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rW=Za.length;function $C(e,t,n){let r="";for(let i=0;it=>typeof t=="string"&&t.startsWith(e),CC=SC("--"),iW=SC("var(--"),yp=e=>iW(e)?oW.test(e.split("/*")[0].trim()):!1,oW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,lW=(e,t)=>t&&typeof e=="number"?t.transform(e):e,kr=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Il={...Oo,transform:e=>kr(0,1,e)},nu={...Oo,default:1},Fl=e=>Math.round(e*1e5)/1e5,bp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,aW=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,sW=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Oa(e){return typeof e=="string"}function uW(e){return e==null}const Ha=e=>({test:t=>Oa(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jr=Ha("deg"),jn=Ha("%"),xe=Ha("px"),cW=Ha("vh"),dW=Ha("vw"),Ym={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},Xm={...Oo,transform:Math.round},_C={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,size:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,rotate:jr,rotateX:jr,rotateY:jr,rotateZ:jr,scale:nu,scaleX:nu,scaleY:nu,scaleZ:nu,skew:jr,skewX:jr,skewY:jr,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:Il,originX:Ym,originY:Ym,originZ:xe,zIndex:Xm,backgroundPositionX:xe,backgroundPositionY:xe,fillOpacity:Il,strokeOpacity:Il,numOctaves:Xm};function xp(e,t,n){const{style:r,vars:i,transform:o,transformOrigin:a}=e;let u=!1,c=!1,d=!0;for(const p in t){const v=t[p];if(CC(p)){i[p]=v;continue}const h=_C[p],y=lW(v,h);if(Lr.has(p)){if(u=!0,o[p]=y,!d)continue;v!==(h.default||0)&&(d=!1)}else p.startsWith("origin")?(c=!0,a[p]=y):r[p]=y}if(t.transform||(u||n?r.transform=$C(e.transform,d,n):r.transform&&(r.transform="none")),c){const{originX:p="50%",originY:v="50%",originZ:h=0}=a;r.transformOrigin=`${p} ${v} ${h}`}}const wp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function PC(e,t,n){for(const r in t)!h0(t[r])&&!wC(r,n)&&(e[r]=t[r])}function fW({transformTemplate:e},t){return m.useMemo(()=>{const n=wp();return xp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function pW(e,t){const n=e.style||{},r={};return PC(r,n,e),Object.assign(r,fW(e,t)),r}function vW(e,t){const n={},r=pW(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 hW=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 wa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||hW.has(e)}let EC=e=>!wa(e);function kC(e){e&&(EC=t=>t.startsWith("on")?!wa(t):e(t))}try{kC(require("@emotion/is-prop-valid").default)}catch{}function TC(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(EC(i)||n===!0&&wa(i)||!t&&!wa(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Qm(e,t,n){return typeof e=="string"?e:xe.transform(t+n*e)}function mW(e,t,n){const r=Qm(t,e.x,e.width),i=Qm(n,e.y,e.height);return`${r} ${i}`}const gW={offset:"stroke-dashoffset",array:"stroke-dasharray"},yW={offset:"strokeDashoffset",array:"strokeDasharray"};function bW(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?gW:yW;e[o.offset]=xe.transform(-r);const a=xe.transform(t),u=xe.transform(n);e[o.array]=`${a} ${u}`}function $p(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:u=1,pathOffset:c=0,...d},p,v){if(xp(e,d,v),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:x}=e;h.transform&&(x&&(y.transform=h.transform),delete h.transform),x&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=mW(x,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),a!==void 0&&bW(h,a,u,c,!1)}const MC=()=>({...wp(),attrs:{}}),Sp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xW(e,t,n,r){const i=m.useMemo(()=>{const o=MC();return $p(o,t,Sp(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};PC(o,e.style,e),i.style={...o,...i.style}}return i}function wW(e=!1){return(n,r,i,{latestValues:o},a)=>{const c=(gp(n)?xW:vW)(r,o,a,n),d=TC(r,typeof n=="string",e),p=n!==m.Fragment?{...d,...c,ref:i}:{},{children:v}=r,h=m.useMemo(()=>h0(v)?v.get():v,[v]);return m.createElement(n,{...p,children:h})}}function AC(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const LC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function DC(e,t,n,r){AC(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(LC.has(i)?i:l1(i),t.attrs[i])}function Cp(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(h0(i[a])||t.style&&h0(t.style[a])||wC(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function RC(e,t,n){const r=Cp(e,t,n);for(const i in e)if(h0(e[i])||h0(t[i])){const o=Za.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function Jm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _p(e,t,n,r){if(typeof t=="function"){const[i,o]=Jm(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Jm(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function it(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const p7=e=>Array.isArray(e),$W=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),SW=e=>p7(e)?e[e.length-1]||0:e;function Zl(e){const t=h0(e)?e.get():e;return $W(t)?t.toValue():t}const BC=new Set(["opacity","clipPath","filter","transform"]);function VC(e){if(Lr.has(e))return"transform";if(BC.has(e)||e==="backgroundColor")return l1(e)}function u1(e,t){e.indexOf(t)===-1&&e.push(t)}function Na(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function CW([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&rr(i,d,c)),c}const c1=e=>(t,n)=>{const r=m.useContext(Fo),i=m.useContext(Zo),o=()=>_W(e,t,r,i,n);return n?o():it(o)};function e8(e,t){const n=VC(t);n&&u1(e,n)}function t8(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const b in E){let w=E[b];if(Array.isArray(w)){const M=x?w.length-1:0;w=w[M]}w!==null&&(a[b]=w)}for(const b in S)a[b]=S[b]}),c&&(v&&p!==!1&&!ba(v)&&t8(e,v,E=>{for(const S in E)e8(u,S)}),u.length&&(a.willChange=u.join(","))),a}const{schedule:ke,cancel:kt,state:L0,steps:wu}=hC(typeof requestAnimationFrame<"u"?requestAnimationFrame:z0,!0),EW={useVisualState:c1({scrapeMotionValuesFromProps:RC,createRenderState:MC,onMount:(e,t,{renderState:n,latestValues:r})=>{ke.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ke.render(()=>{$p(n,r,Sp(t.tagName),e.transformTemplate),DC(t,n)})}})},kW={useVisualState:c1({applyWillChange:!0,scrapeMotionValuesFromProps:Cp,createRenderState:wp})};function Pp(e,{forwardMotionProps:t=!1},n,r){return{...gp(e)?EW:kW,preloadedFeatures:n,useRender:wW(t),createVisualElement:r,Component:e}}function Hn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const IC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function d1(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const FC=e=>t=>IC(t)&&e(t,d1(t));function Wn(e,t,n,r){return Hn(e,t,FC(n),r)}const TW=(e,t)=>n=>t(e(n)),Un=(...e)=>e.reduce(TW);function ZC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const n8=ZC("dragHorizontal"),r8=ZC("dragVertical");function OC(e){let t=!1;if(e==="y")t=r8();else if(e==="x")t=n8();else{const n=n8(),r=r8();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ep(){const e=OC(!0);return e?(e(),!1):!0}class k2{constructor(t){this.isMounted=!1,this.node=t}update(){}}function i8(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||Ep())return;const u=e.getProps();e.animationState&&u.whileHover&&e.animationState.setActive("whileHover",t);const c=u[r];c&&ke.postRender(()=>c(o,a))};return Wn(e.current,n,i,{passive:!e.getProps()[r]})}class MW extends k2{mount(){this.unmount=Un(i8(this.node,!0),i8(this.node,!1))}unmount(){}}class AW extends k2{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=Un(Hn(this.node.current,"focus",()=>this.onFocus()),Hn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const HC=(e,t)=>t?e===t?!0:HC(e,t.parentElement):!1;function T5(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,d1(n))}class LW extends k2{constructor(){super(...arguments),this.removeStartListeners=z0,this.removeEndListeners=z0,this.removeAccessibleListeners=z0,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=Wn(window,"pointerup",(u,c)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:p,globalTapTarget:v}=this.node.getProps(),h=!v&&!HC(this.node.current,u.target)?p:d;h&&ke.update(()=>h(u,c))},{passive:!(r.onTap||r.onPointerUp)}),a=Wn(window,"pointercancel",(u,c)=>this.cancelPress(u,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Un(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=u=>{u.key!=="Enter"||!this.checkPressEnd()||T5("up",(c,d)=>{const{onTap:p}=this.node.getProps();p&&ke.postRender(()=>p(c,d))})};this.removeEndListeners(),this.removeEndListeners=Hn(this.node.current,"keyup",a),T5("down",(u,c)=>{this.startPress(u,c)})},n=Hn(this.node.current,"keydown",t),r=()=>{this.isPressing&&T5("cancel",(o,a)=>this.cancelPress(o,a))},i=Hn(this.node.current,"blur",r);this.removeAccessibleListeners=Un(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ke.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ep()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ke.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Wn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Un(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const v7=new WeakMap,M5=new WeakMap,DW=e=>{const t=v7.get(e.target);t&&t(e)},RW=e=>{e.forEach(DW)};function BW({root:e,...t}){const n=e||document;M5.has(n)||M5.set(n,{});const r=M5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(RW,{root:e,...t})),r[i]}function VW(e,t,n){const r=BW(t);return v7.set(e,n),r.observe(e),()=>{v7.delete(e),r.unobserve(e)}}const IW={some:0,all:1};class FW extends k2{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:IW[i]},u=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:v}=this.node.getProps(),h=d?p:v;h&&h(c)};return VW(this.node.current,a,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ZW(t,n))&&this.startObserver()}unmount(){}}function ZW({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NC={inView:{Feature:FW},tap:{Feature:LW},focus:{Feature:AW},hover:{Feature:MW}};function zC(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Gn=e=>e/1e3,OW={type:"spring",stiffness:500,damping:25,restSpeed:10},HW=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NW={type:"keyframes",duration:.8},zW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KW=(e,{keyframes:t})=>t.length>2?NW:Lr.has(e)?e.startsWith("scale")?HW(t[1]):OW:zW;function jW({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:u,from:c,elapsed:d,...p}){return!!Object.keys(p).length}function kp(e,t){return e[t]||e.default||e}const $a={current:!1},WW=e=>e!==null;function p1(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(WW),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}let $u;function UW(){$u=void 0}const u2={now:()=>($u===void 0&&u2.set(L0.isProcessing||a1.useManualTiming?L0.timestamp:performance.now()),$u),set:e=>{$u=e,queueMicrotask(UW)}},KC=e=>/^0[^.\s]+$/u.test(e);function GW(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||KC(e):!0}const jC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YW(e){const t=qW.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function WC(e,t,n=1){const[r,i]=YW(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return jC(a)?parseFloat(a):a}return yp(i)?WC(i,t,n+1):i}const XW=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),o8=e=>e===Oo||e===xe,l8=(e,t)=>parseFloat(e.split(", ")[t]),a8=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return l8(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?l8(o[1],e):0}},QW=new Set(["x","y","z"]),JW=Za.filter(e=>!QW.has(e));function eU(e){const t=[];return JW.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const To={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:a8(4,13),y:a8(5,14)};To.translateX=To.x;To.translateY=To.y;const UC=e=>t=>t.test(e),tU={test:e=>e==="auto",parse:e=>e},GC=[Oo,xe,jn,jr,dW,cW,tU],s8=e=>GC.find(UC(e)),ei=new Set;let h7=!1,m7=!1;function qC(){if(m7){const e=Array.from(ei).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=eU(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var u;(u=r.getValue(o))===null||u===void 0||u.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}m7=!1,h7=!1,ei.forEach(e=>e.complete()),ei.clear()}function YC(){ei.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(m7=!0)})}function nU(){YC(),qC()}class Tp{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ei.add(this),h7||(h7=!0,ke.read(YC),ke.resolveKeyframes(qC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;on=>!!(Oa(n)&&sW.test(n)&&n.startsWith(e)||t&&!uW(n)&&Object.prototype.hasOwnProperty.call(n,t)),XC=(e,t,n)=>r=>{if(!Oa(r))return r;const[i,o,a,u]=r.match(bp);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},rU=e=>kr(0,255,e),A5={...Oo,transform:e=>Math.round(rU(e))},X2={test:Mp("rgb","red"),parse:XC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+A5.transform(e)+", "+A5.transform(t)+", "+A5.transform(n)+", "+Fl(Il.transform(r))+")"};function iU(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const g7={test:Mp("#"),parse:iU,transform:X2.transform},Qi={test:Mp("hsl","hue"),parse:XC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Fl(t))+", "+jn.transform(Fl(n))+", "+Fl(Il.transform(r))+")"},U0={test:e=>X2.test(e)||g7.test(e)||Qi.test(e),parse:e=>X2.test(e)?X2.parse(e):Qi.test(e)?Qi.parse(e):g7.parse(e),transform:e=>Oa(e)?e:e.hasOwnProperty("red")?X2.transform(e):Qi.transform(e)};function oU(e){var t,n;return isNaN(e)&&Oa(e)&&(((t=e.match(bp))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(aW))===null||n===void 0?void 0:n.length)||0)>0}const QC="number",JC="color",lU="var",aU="var(",u8="${}",sU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(sU,c=>(U0.test(c)?(r.color.push(o),i.push(JC),n.push(U0.parse(c))):c.startsWith(aU)?(r.var.push(o),i.push(lU),n.push(c)):(r.number.push(o),i.push(QC),n.push(parseFloat(c))),++o,u8)).split(u8);return{values:n,split:u,indexes:r,types:i}}function e_(e){return Sa(e).values}function t_(e){const{split:t,types:n}=Sa(e),r=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function cU(e){const t=e_(e);return t_(e)(t.map(uU))}const Tr={test:oU,parse:e_,createTransformer:t_,getAnimatableNone:cU},dU=new Set(["brightness","contrast","saturate","opacity"]);function fU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bp)||[];if(!r)return e;const i=n.replace(r,"");let o=dU.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const pU=/\b([a-z-]*)\(.*?\)/gu,y7={...Tr,getAnimatableNone:e=>{const t=e.match(pU);return t?t.map(fU).join(" "):e}},vU={..._C,color:U0,backgroundColor:U0,outlineColor:U0,fill:U0,stroke:U0,borderColor:U0,borderTopColor:U0,borderRightColor:U0,borderBottomColor:U0,borderLeftColor:U0,filter:y7,WebkitFilter:y7},Ap=e=>vU[e];function n_(e,t){let n=Ap(e);return n!==y7&&(n=Tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const hU=new Set(["auto","none","0"]);function mU(e,t,n){let r=0,i;for(;r{n.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function i_(e){let t;return()=>(t===void 0&&(t=e()),t)}const c8=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tr.test(e)||e==="0")&&!e.startsWith("url("));function gU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=t})}}function Lp(e,t){return t?e*(1e3/t):0}const bU=5;function l_(e,t,n){const r=Math.max(t-bU,0);return Lp(n-e(r),t-r)}const L5=.001,xU=.01,wU=10,$U=.05,SU=1;function CU({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=kr($U,SU,a),e=kr(xU,wU,Gn(e)),a<1?(i=d=>{const p=d*a,v=p*e,h=p-n,y=b7(d,a),x=Math.exp(-v);return L5-h/y*x},o=d=>{const v=d*a*e,h=v*n+n,y=Math.pow(a,2)*Math.pow(d,2)*e,x=Math.exp(-v),C=b7(Math.pow(d,2),a);return(-i(d)+L5>0?-1:1)*((h-y)*x)/C}):(i=d=>{const p=Math.exp(-d*e),v=(d-n)*e+1;return-L5+p*v},o=d=>{const p=Math.exp(-d*e),v=(n-d)*(e*e);return p*v});const u=5/e,c=PU(i,o,u);if(e=$r(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const _U=12;function PU(e,t,n){let r=n;for(let i=1;i<_U;i++)r=r-e(r)/t(r);return r}function b7(e,t){return e*Math.sqrt(1-t*t)}const EU=["duration","bounce"],kU=["stiffness","damping","mass"];function d8(e,t){return t.some(n=>e[n]!==void 0)}function TU(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!d8(e,kU)&&d8(e,EU)){const n=CU(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function v1({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:p,velocity:v,isResolvedFromDuration:h}=TU({...r,velocity:-Gn(r.velocity||0)}),y=v||0,x=c/(2*Math.sqrt(u*d)),C=o-i,E=Gn(Math.sqrt(u/d)),S=Math.abs(C)<5;n||(n=S?.01:2),t||(t=S?.005:.5);let b;if(x<1){const w=b7(E,x);b=M=>{const A=Math.exp(-x*E*M);return o-A*((y+x*E*C)/w*Math.sin(w*M)+C*Math.cos(w*M))}}else if(x===1)b=w=>o-Math.exp(-E*w)*(C+(y+E*C)*w);else{const w=E*Math.sqrt(x*x-1);b=M=>{const A=Math.exp(-x*E*M),D=Math.min(w*M,300);return o-A*((y+x*E*C)*Math.sinh(D)+w*C*Math.cosh(D))/w}}return{calculatedDuration:h&&p||null,next:w=>{const M=b(w);if(h)a.done=w>=p;else{let A=y;w!==0&&(x<1?A=l_(b,w,M):A=0);const D=Math.abs(A)<=n,V=Math.abs(o-M)<=t;a.done=D&&V}return a.value=a.done?o:M,a}}}function f8({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:u,max:c,restDelta:d=.5,restSpeed:p}){const v=e[0],h={done:!1,value:v},y=_=>u!==void 0&&_c,x=_=>u===void 0?c:c===void 0||Math.abs(u-_)-C*Math.exp(-_/r),w=_=>S+b(_),M=_=>{const H=b(_),R=w(_);h.done=Math.abs(H)<=d,h.value=h.done?S:R};let A,D;const V=_=>{y(h.value)&&(A=_,D=v1({keyframes:[h.value,x(h.value)],velocity:l_(w,_,h.value),damping:i,stiffness:o,restDelta:d,restSpeed:p}))};return V(0),{calculatedDuration:null,next:_=>{let H=!1;return!D&&A===void 0&&(H=!0,M(_),V(_)),A!==void 0&&_>=A?D.next(_-A):(!H&&M(_),h)}}}const a_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,MU=1e-7,AU=12;function LU(e,t,n,r,i){let o,a,u=0;do a=t+(n-t)/2,o=a_(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>MU&&++uLU(o,0,1,e,n);return o=>o===0||o===1?o:a_(i(o),t,r)}const s_=Ho(.42,0,1,1),u_=Ho(0,0,.58,1),Dp=Ho(.42,0,.58,1),c_=e=>Array.isArray(e)&&typeof e[0]!="number",Rp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bp=e=>t=>1-e(1-t),h1=e=>1-Math.sin(Math.acos(e)),Vp=Bp(h1),d_=Rp(h1),Ip=Ho(.33,1.53,.69,.99),m1=Bp(Ip),f_=Rp(m1),p_=e=>(e*=2)<1?.5*m1(e):.5*(2-Math.pow(2,-10*(e-1))),p8={linear:z0,easeIn:s_,easeInOut:Dp,easeOut:u_,circIn:h1,circInOut:d_,circOut:Vp,backIn:m1,backInOut:f_,backOut:Ip,anticipate:p_},x7=e=>{if(Array.isArray(e)){xa(e.length===4);const[t,n,r,i]=e;return Ho(t,n,r,i)}else if(typeof e=="string")return xa(p8[e]!==void 0),p8[e];return e},m2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},d0=(e,t,n)=>e+(t-e)*n;function D5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function DU({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;i=D5(c,u,e+1/3),o=D5(c,u,e),a=D5(c,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function pc(e,t){return n=>n>0?t:e}const R5=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},RU=[g7,X2,Qi],BU=e=>RU.find(t=>t.test(e));function v8(e){const t=BU(e);if(!t)return!1;let n=t.parse(e);return t===Qi&&(n=DU(n)),n}const h8=(e,t)=>{const n=v8(e),r=v8(t);if(!n||!r)return pc(e,t);const i={...n};return o=>(i.red=R5(n.red,r.red,o),i.green=R5(n.green,r.green,o),i.blue=R5(n.blue,r.blue,o),i.alpha=d0(n.alpha,r.alpha,o),X2.transform(i))},w7=new Set(["none","hidden"]);function VU(e,t){return w7.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function IU(e,t){return n=>d0(e,t,n)}function Fp(e){return typeof e=="number"?IU:typeof e=="string"?yp(e)?pc:U0.test(e)?h8:OU:Array.isArray(e)?v_:typeof e=="object"?U0.test(e)?h8:FU:pc}function v_(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Fp(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in r)n[o]=r[o](i);return n}}function ZU(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=Tr.createTransformer(t),r=Sa(e),i=Sa(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?w7.has(e)&&!i.values.length||w7.has(t)&&!r.values.length?VU(e,t):Un(v_(ZU(r,i),i.values),n):pc(e,t)};function Zp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?d0(e,t,n):Fp(e)(e,t)}function HU(e,t,n){const r=[],i=n||Zp,o=e.length-1;for(let a=0;at[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=HU(t,r,i),u=a.length,c=d=>{let p=0;if(u>1)for(;pc(kr(e[0],e[o-1],d)):c}function h_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=m2(0,t,r);e.push(d0(n,1,i))}}function Op(e){const t=[0];return h_(t,e.length-1),t}function NU(e,t){return e.map(n=>n*t)}function zU(e,t){return e.map(()=>t||Dp).splice(0,e.length-1)}function vc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=c_(r)?r.map(x7):x7(r),o={done:!1,value:t[0]},a=NU(n&&n.length===t.length?n:Op(t),e),u=g1(a,t,{ease:Array.isArray(i)?i:zU(t,i)});return{calculatedDuration:e,next:c=>(o.value=u(c),o.done=c>=e,o)}}const $7=2e4;function m_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$7;)t+=n,r=e.next(t);return t>=$7?1/0:t}const KU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ke.update(t,!0),stop:()=>kt(t),now:()=>L0.isProcessing?L0.timestamp:u2.now()}},jU={decay:f8,inertia:f8,tween:vc,keyframes:vc,spring:v1},WU=e=>e/100;class y1 extends o_{constructor({KeyframeResolver:t=Tp,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:u}=this.options;u&&u()};const{name:r,motionValue:i,keyframes:o}=this.options,a=(u,c)=>this.onKeyframesResolved(u,c);r&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,a,r,i):this.resolver=new t(o,a,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,u=jU[n]||vc;let c,d;u!==vc&&typeof t[0]!="number"&&(c=Un(WU,Zp(t[0],t[1])),t=[0,100]);const p=u({...this.options,keyframes:t});o==="mirror"&&(d=u({...this.options,keyframes:[...t].reverse(),velocity:-a})),p.calculatedDuration===null&&(p.calculatedDuration=m_(p));const{calculatedDuration:v}=p,h=v+i,y=h*(r+1)-i;return{generator:p,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:v,resolvedDuration:h,totalDuration:y}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:_}=this.options;return{done:!0,value:_[_.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:u,keyframes:c,calculatedDuration:d,totalDuration:p,resolvedDuration:v}=r;if(this.startTime===null)return o.next(0);const{delay:h,repeat:y,repeatType:x,repeatDelay:C,onUpdate:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-p/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const S=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?S<0:S>p;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=p);let w=this.currentTime,M=o;if(y){const _=Math.min(this.currentTime,p)/v;let H=Math.floor(_),R=_%1;!R&&_>=1&&(R=1),R===1&&H--,H=Math.min(H,y+1),!!(H%2)&&(x==="reverse"?(R=1-R,C&&(R-=C/v)):x==="mirror"&&(M=a)),w=kr(0,1,R)*v}const A=b?{done:!1,value:c[0]}:M.next(w);u&&(A.value=u(A.value));let{done:D}=A;!b&&d!==null&&(D=this.speed>=0?this.currentTime>=p:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&i!==void 0&&(A.value=p1(c,this.options,i)),E&&E(A.value),V&&this.finish(),A}get duration(){const{resolved:t}=this;return t?Gn(t.calculatedDuration):0}get time(){return Gn(this.currentTime)}set time(t){t=$r(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=KU,onPlay:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function g_(e){return new y1(e)}const y_=e=>Array.isArray(e)&&typeof e[0]=="number";function b_(e){return!!(!e||typeof e=="string"&&e in Hp||y_(e)||Array.isArray(e)&&e.every(b_))}const _l=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_l([0,.65,.55,1]),circOut:_l([.55,0,1,.45]),backIn:_l([.31,.01,.66,-.59]),backOut:_l([.33,1.53,.69,.99])};function UU(e){return x_(e)||Hp.easeOut}function x_(e){if(e)return y_(e)?_l(e):Array.isArray(e)?e.map(UU):Hp[e]}function S7(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:u,times:c}={}){const d={[t]:n};c&&(d.offset=c);const p=x_(u);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const GU=i_(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hc=10,qU=2e4;function YU(e){return e.type==="spring"||e.name==="backgroundColor"||!b_(e.ease)}function XU(e,t){const n=new y1({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(o,a),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:u,motionValue:c,name:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(YU(this.options)){const{onComplete:v,onUpdate:h,motionValue:y,...x}=this.options,C=XU(t,x);t=C.keyframes,t.length===1&&(t[1]=t[0]),i=C.duration,o=C.times,a=C.ease,u="keyframes"}const p=S7(c.owner.current,d,t,{...this.options,duration:i,times:o,ease:a});return p.startTime=u2.now(),this.pendingTimeline?(p.timeline=this.pendingTimeline,this.pendingTimeline=void 0):p.onfinish=()=>{const{onComplete:v}=this.options;c.set(p1(t,this.options,n)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:p,duration:i,times:o,type:u,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=$r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return z0;const{animation:r}=n;r.timeline=t,r.onfinish=null}return z0}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:p,onComplete:v,...h}=this.options,y=new y1({...h,keyframes:r,duration:i,type:o,ease:a,times:u,isGenerator:!0}),x=$r(this.time);d.setWithVelocity(y.sample(x-hc).value,y.sample(x).value,hc)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:u}=t;return GU()&&r&&BC.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&u!=="inertia"}}function w_(e,t){let n;const r=()=>{const{currentTime:i}=t,a=(i===null?0:i.value)/100;n!==a&&e(a),n=a};return ke.update(r,!0),()=>kt(r)}const $_=i_(()=>window.ScrollTimeline!==void 0);class Np{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if($_()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),w_(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const zp=(e,t,n,r={},i,o,a)=>u=>{const c=kp(r,e)||{},d=c.delay||r.delay||0;let{elapsed:p=0}=r;p=p-$r(d);let v={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-p,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{u(),c.onComplete&&c.onComplete(),a&&a()},onStop:a,name:e,motionValue:t,element:o?void 0:i};jW(c)||(v={...v,...KW(e,v)}),v.duration&&(v.duration=$r(v.duration)),v.repeatDelay&&(v.repeatDelay=$r(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let h=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(h=!0)),($a.current||a1.skipAnimations)&&(h=!0,v.duration=0,v.delay=0),h&&!o&&t.get()!==void 0){const y=p1(v.keyframes,c);if(y!==void 0)return ke.update(()=>{v.onUpdate(y),v.onComplete()}),new Np([])}return!o&&C7.supports(v)?new C7(v):new y1(v)};class Kp{constructor(){this.subscriptions=[]}add(t){return u1(this.subscriptions,t),()=>Na(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e)),Ol={current:void 0};class jp{constructor(t,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=u2.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=u2.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=QU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kp);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ol.current&&Ol.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=u2.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>m8)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,m8);return Lp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function En(e,t){return new jp(e,t)}function JU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,En(n))}function Wp(e,t){const n=f1(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const u=SW(o[a]);JU(e,a,u)}}function S_(e){return e.getProps()[cp]}class C_ extends jp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=VC(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const o=this.counts.get(n)-1;this.counts.set(n,o),o===0&&(Na(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function eG(){return it(()=>new C_("auto"))}function tG(e){return!!(h0(e)&&e.add)}function _7(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new C_("auto"),e.addValue("willChange",r)),tG(r))return r.add(t)}function nG({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Up(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:u,...c}=t;r&&(a=r);const d=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const v in c){const h=e.getValue(v,(o=e.latestValues[v])!==null&&o!==void 0?o:null),y=c[v];if(y===void 0||p&&nG(p,v))continue;const x={delay:n,elapsed:0,...kp(a||{},v)};let C=!1;if(window.HandoffAppearAnimations){const S=S_(e);if(S){const b=window.HandoffAppearAnimations(S,v,h,ke);b!==null&&(x.elapsed=b,C=!0)}}h.start(zp(v,h,y,e.shouldReduceMotion&&Lr.has(v)?{type:!1}:x,e,C,_7(e,v)));const E=h.animation;E&&d.push(E)}return u&&Promise.all(d).then(()=>{ke.update(()=>{u&&Wp(e,u)})}),d}function P7(e,t,n={}){var r;const i=f1(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(Up(e,i,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:p=0,staggerChildren:v,staggerDirection:h}=o;return rG(e,t,p+d,v,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[d,p]=c==="beforeChildren"?[a,u]:[u,a];return d().then(()=>p())}else return Promise.all([a(),u(n.delay)])}function rG(e,t,n=0,r=0,i=1,o){const a=[],u=(e.variantChildren.size-1)*r,c=i===1?(d=0)=>d*r:(d=0)=>u-d*r;return Array.from(e.variantChildren).sort(iG).forEach((d,p)=>{d.notify("AnimationStart",t),a.push(P7(d,t,{...o,delay:n+c(p)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function iG(e,t){return e.sortNodePosition(t)}function b1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>P7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=P7(e,t,n);else{const i=typeof t=="function"?f1(e,t,n.custom):t;r=Promise.all(Up(e,i,n))}return r.then(()=>{ke.postRender(()=>{e.notify("AnimationComplete",t)})})}const oG=[...pp].reverse(),lG=pp.length;function aG(e){return t=>Promise.all(t.map(({animation:n,options:r})=>b1(e,n,r)))}function sG(e){let t=aG(e),n=g8(),r=!0;const i=c=>(d,p)=>{var v;const h=f1(e,p,c==="exit"?(v=e.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(h){const{transition:y,transitionEnd:x,...C}=h;d={...d,...C,...x}}return d};function o(c){t=c(e)}function a(c){const d=e.getProps(),p=e.getVariantContext(!0)||{},v=[],h=new Set;let y={},x=1/0;for(let E=0;Ex&&M,H=!1;const R=Array.isArray(w)?w:[w];let F=R.reduce(i(S),{});A===!1&&(F={});const{prevResolvedValues:re={}}=b,z={...re,...F},N=te=>{_=!0,h.has(te)&&(H=!0,h.delete(te)),b.needsAnimating[te]=!0;const ae=e.getValue(te);ae&&(ae.liveStyle=!1)};for(const te in z){const ae=F[te],q=re[te];if(y.hasOwnProperty(te))continue;let U=!1;p7(ae)&&p7(q)?U=!zC(ae,q):U=ae!==q,U?ae!=null?N(te):h.add(te):ae!==void 0&&h.has(te)?N(te):b.protectedKeys[te]=!0}b.prevProp=w,b.prevResolvedValues=F,b.isActive&&(y={...y,...F}),r&&e.blockInitialAnimation&&(_=!1),_&&(!D||H)&&v.push(...R.map(te=>({animation:te,options:{type:S}})))}if(h.size){const E={};h.forEach(S=>{const b=e.getBaseTarget(S),w=e.getValue(S);w&&(w.liveStyle=!0),E[S]=b??null}),v.push({animation:E})}let C=!!v.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,C?t(v):Promise.resolve()}function u(c,d){var p;if(n[c].isActive===d)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,d)}),n[c].isActive=d;const v=a(c);for(const h in n)n[h].protectedKeys={};return v}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=g8(),r=!0}}}function uG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zC(t,e):!1}function O2(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function g8(){return{animate:O2(!0),whileInView:O2(),whileHover:O2(),whileTap:O2(),whileDrag:O2(),whileFocus:O2(),exit:O2()}}class cG extends k2{constructor(t){super(t),t.animationState||(t.animationState=sG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ba(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let dG=0;class fG extends k2{constructor(){super(...arguments),this.id=dG++}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 i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Gp={animation:{Feature:cG},exit:{Feature:fG}},E7=(e,t)=>Math.abs(e-t);function __(e,t){const n=E7(e.x,t.x),r=E7(e.y,t.y);return Math.sqrt(n**2+r**2)}class P_{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=V5(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=__(v.offset,{x:0,y:0})>=3;if(!h&&!y)return;const{point:x}=v,{timestamp:C}=L0;this.history.push({...x,timestamp:C});const{onStart:E,onMove:S}=this.handlers;h||(E&&E(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,h)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=B5(h,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(v,h)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:C}=this.handlers;if(this.dragSnapToOrigin&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=V5(v.type==="pointercancel"?this.lastMoveEventInfo:B5(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(v,E),x&&x(v,E)},!IC(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=d1(t),u=B5(a,this.transformPagePoint),{point:c}=u,{timestamp:d}=L0;this.history=[{...c,timestamp:d}];const{onSessionStart:p}=n;p&&p(t,V5(u,this.history)),this.removeListeners=Un(Wn(this.contextWindow,"pointermove",this.handlePointerMove),Wn(this.contextWindow,"pointerup",this.handlePointerUp),Wn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kt(this.updatePoint)}}function B5(e,t){return t?{point:t(e.point)}:e}function y8(e,t){return{x:e.x-t.x,y:e.y-t.y}}function V5({point:e},t){return{point:e,delta:y8(e,E_(t)),offset:y8(e,pG(t)),velocity:vG(t,.1)}}function pG(e){return e[0]}function E_(e){return e[e.length-1]}function vG(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=E_(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>$r(t)));)n--;if(!r)return{x:0,y:0};const o=Gn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Tt(e){return e.max-e.min}function k7(e,t=0,n=.01){return Math.abs(e-t)<=n}function b8(e,t,n,r=.5){e.origin=r,e.originPoint=d0(t.min,t.max,e.origin),e.scale=Tt(n)/Tt(t),(k7(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=d0(n.min,n.max,e.origin)-e.originPoint,(k7(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Hl(e,t,n,r){b8(e.x,t.x,n.x,r?r.originX:void 0),b8(e.y,t.y,n.y,r?r.originY:void 0)}function x8(e,t,n){e.min=n.min+t.min,e.max=e.min+Tt(t)}function hG(e,t,n){x8(e.x,t.x,n.x),x8(e.y,t.y,n.y)}function w8(e,t,n){e.min=t.min-n.min,e.max=e.min+Tt(t)}function Nl(e,t,n){w8(e.x,t.x,n.x),w8(e.y,t.y,n.y)}function mG(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?d0(n,e,r.max):Math.min(e,n)),e}function $8(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 gG(e,{top:t,left:n,bottom:r,right:i}){return{x:$8(e.x,n,i),y:$8(e.y,t,r)}}function S8(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=m2(t.min,t.max-r,e.min):r>i&&(n=m2(e.min,e.max-i,t.min)),kr(0,1,n)}function xG(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 T7=.35;function wG(e=T7){return e===!1?e=0:e===!0&&(e=T7),{x:C8(e,"left","right"),y:C8(e,"top","bottom")}}function C8(e,t,n){return{min:_8(e,t),max:_8(e,n)}}function _8(e,t){return typeof e=="number"?e:e[t]||0}const P8=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ji=()=>({x:P8(),y:P8()}),E8=()=>({min:0,max:0}),g0=()=>({x:E8(),y:E8()});function on(e){return[e("x"),e("y")]}function k_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $G({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SG(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function I5(e){return e===void 0||e===1}function M7({scale:e,scaleX:t,scaleY:n}){return!I5(e)||!I5(t)||!I5(n)}function K2(e){return M7(e)||T_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T_(e){return k8(e.x)||k8(e.y)}function k8(e){return e&&e!=="0%"}function mc(e,t,n){const r=e-n,i=t*r;return n+i}function T8(e,t,n,r,i){return i!==void 0&&(e=mc(e,i,r)),mc(e,n,r)+t}function A7(e,t=0,n=1,r,i){e.min=T8(e.min,t,n,r,i),e.max=T8(e.max,t,n,r,i)}function M_(e,{x:t,y:n}){A7(e.x,t.translate,t.scale,t.originPoint),A7(e.y,n.translate,n.scale,n.originPoint)}function CG(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let u=0;u1.0000000000001||e<.999999999999?e:1}function qr(e,t){e.min=e.min+t,e.max=e.max+t}function A8(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=d0(e.min,e.max,o);A7(e,t[n],t[r],a,t.scale)}const _G=["x","scaleX","originX"],PG=["y","scaleY","originY"];function eo(e,t){A8(e.x,t,_G),A8(e.y,t,PG)}function A_(e,t){return k_(SG(e.getBoundingClientRect(),t))}function EG(e,t,n){const r=A_(e,n),{scroll:i}=t;return i&&(qr(r.x,i.offset.x),qr(r.y,i.offset.y)),r}const L_=({current:e})=>e?e.ownerDocument.defaultView:null,kG=new WeakMap;class TG{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=g0(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=p=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(d1(p,"page").point)},o=(p,v)=>{var h;const{drag:y,dragPropagation:x,onDragStart:C}=this.getProps();if(y&&!x&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=OC(y),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(S=>{let b=this.getAxisMotionValue(S).get()||0;if(jn.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[S];M&&(b=Tt(M)*(parseFloat(b)/100))}}this.originPoint[S]=b}),C&&ke.postRender(()=>C(p,v)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=_7(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},a=(p,v)=>{const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:x,onDrag:C}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:E}=v;if(y&&this.currentDirection===null){this.currentDirection=MG(E),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),C&&C(p,v)},u=(p,v)=>this.stop(p,v),c=()=>on(p=>{var v;return this.getAnimationState(p)==="paused"&&((v=this.getAxisMotionValue(p).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new P_(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:L_(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ru(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=mG(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Xi(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=gG(i.layoutBox,n):this.constraints=!1,this.elastic=wG(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&on(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=xG(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=EG(r,i.root,this.visualElement.getTransformPagePoint());let a=yG(i.layout.layoutBox,o);if(n){const u=n($G(a));this.hasMutatedConstraints=!!u,u&&(a=k_(u))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=on(p=>{if(!ru(p,n,this.currentDirection))return;let v=c&&c[p]||{};a&&(v={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,x={type:"inertia",velocity:r?t[p]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...v};return this.startAxisValueAnimation(p,x)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(zp(t,r,0,n,this.visualElement,!1,_7(this.visualElement,t)))}stopAnimation(){on(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){on(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){on(n=>{const{drag:r}=this.getProps();if(!ru(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:u}=i.layout.layoutBox[n];o.set(t[n]-d0(a,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};on(a=>{const u=this.getAxisMotionValue(a);if(u&&this.constraints!==!1){const c=u.get();i[a]=bG({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),on(a=>{if(!ru(a,t,null))return;const u=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];u.set(d0(c,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;kG.set(this.visualElement,this);const t=this.visualElement.current,n=Wn(t,"pointerdown",c=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Xi(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const a=Hn(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(on(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=c[p].translate,v.set(v.get()+c[p].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=T7,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:u}}}function ru(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function MG(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AG extends k2{constructor(t){super(t),this.removeGroupControls=z0,this.removeListeners=z0,this.controls=new TG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z0}unmount(){this.removeGroupControls(),this.removeListeners()}}const L8=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class LG extends k2{constructor(){super(...arguments),this.removePointerDownListener=z0}onPointerDown(t){this.session=new P_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:L_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:L8(t),onStart:L8(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Wn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function D_(){const e=m.useContext(Zo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=m.useId();return m.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function DG(){return RG(m.useContext(Zo))}function RG(e){return e===null?!0:e.isPresent}const Su={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function D8(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const n=D8(e,t.target.x),r=D8(e,t.target.y);return`${n}% ${r}%`}},BG={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Tr.parse(e);if(i.length>5)return r;const o=Tr.createTransformer(e),a=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=u,i[1+a]/=c;const d=d0(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),o(i)}};class VG extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;xC(IG),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Su.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ke.postRender(()=>{const u=a.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dp.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function R_(e){const[t,n]=D_(),r=m.useContext(ko);return k.jsx(VG,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(fp),isPresent:t,safeToRemove:n})}const IG={borderRadius:{...vl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vl,borderTopRightRadius:vl,borderBottomLeftRadius:vl,borderBottomRightRadius:vl,boxShadow:BG},B_=["TopLeft","TopRight","BottomLeft","BottomRight"],FG=B_.length,R8=e=>typeof e=="string"?parseFloat(e):e,B8=e=>typeof e=="number"||xe.test(e);function ZG(e,t,n,r,i,o){i?(e.opacity=d0(0,n.opacity!==void 0?n.opacity:1,OG(r)),e.opacityExit=d0(t.opacity!==void 0?t.opacity:1,0,HG(r))):o&&(e.opacity=d0(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(m2(e,t,r))}function I8(e,t){e.min=t.min,e.max=t.max}function rn(e,t){I8(e.x,t.x),I8(e.y,t.y)}function F8(e,t,n,r,i){return e-=t,e=mc(e,1/n,r),i!==void 0&&(e=mc(e,1/i,r)),e}function NG(e,t=0,n=1,r=.5,i,o=e,a=e){if(jn.test(t)&&(t=parseFloat(t),t=d0(a.min,a.max,t/100)-a.min),typeof t!="number")return;let u=d0(o.min,o.max,r);e===o&&(u-=t),e.min=F8(e.min,t,n,u,i),e.max=F8(e.max,t,n,u,i)}function Z8(e,t,[n,r,i],o,a){NG(e,t[n],t[r],t[i],t.scale,o,a)}const zG=["x","scaleX","originX"],KG=["y","scaleY","originY"];function O8(e,t,n,r){Z8(e.x,t,zG,n?n.x:void 0,r?r.x:void 0),Z8(e.y,t,KG,n?n.y:void 0,r?r.y:void 0)}function H8(e){return e.translate===0&&e.scale===1}function I_(e){return H8(e.x)&&H8(e.y)}function jG(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function F_(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function N8(e){return Tt(e.x)/Tt(e.y)}class WG{constructor(){this.members=[]}add(t){u1(this.members,t),t.scheduleRender()}remove(t){if(Na(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function z8(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:p,rotateX:v,rotateY:h,skewX:y,skewY:x}=n;d&&(r=`perspective(${d}px) ${r}`),p&&(r+=`rotate(${p}deg) `),v&&(r+=`rotateX(${v}deg) `),h&&(r+=`rotateY(${h}deg) `),y&&(r+=`skewX(${y}deg) `),x&&(r+=`skewY(${x}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const UG=(e,t)=>e.depth-t.depth;class Z_{constructor(){this.children=[],this.isDirty=!1}add(t){u1(this.children,t),this.isDirty=!0}remove(t){Na(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UG),this.isDirty=!1,this.children.forEach(t)}}function O_(e,t){const n=u2.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(kt(r),e(o-t))};return ke.read(r,!0),()=>kt(r)}function GG(e){window.MotionDebug&&window.MotionDebug.record(e)}function H_(e){return e instanceof SVGElement&&e.tagName!=="svg"}function qp(e,t,n){const r=h0(e)?e:En(e);return r.start(zp("",r,t,n)),r.animation}const F5=["","X","Y","Z"],qG={visibility:"hidden"},K8=1e3;let YG=0;const j2={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Z5(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function N_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?S_(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?N_(e.parent):!1:!1}function z_({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},u=t==null?void 0:t()){this.id=YG++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,j2.totalNodes=j2.resolvedTargetDeltas=j2.recalculatedProjection=0,this.nodes.forEach(JG),this.nodes.forEach(iq),this.nodes.forEach(oq),this.nodes.forEach(eq),GG(j2)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=O_(h,250),Su.hasAnimatedSinceResize&&(Su.hasAnimatedSinceResize=!1,this.nodes.forEach(W8))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&p&&(c||d)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:h,hasRelativeTargetChanged:y,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||p.getDefaultTransition()||cq,{onLayoutAnimationStart:E,onLayoutAnimationComplete:S}=p.getProps(),b=!this.targetLayout||!F_(this.targetLayout,x)||y,w=!h&&y;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,w);const M={...kp(C,"layout"),onPlay:E,onComplete:S};(p.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else h||W8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,kt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(lq),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&N_(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=M/1e3;U8(v.x,a.x,A),U8(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nl(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sq(this.relativeTarget,this.relativeTargetOrigin,h,A),w&&jG(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=g0()),rn(w,this.relativeTarget)),C&&(this.animationValues=p,ZG(p,d,this.latestValues,A,b,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(kt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Su.hasAnimatedSinceResize=!0,this.currentAnimation=qp(0,K8,{...a,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(K8),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:p}=a;if(!(!u||!c||!d)){if(this!==a&&this.layout&&d&&K_(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||g0();const v=Tt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+v;const h=Tt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}rn(u,c),eo(u,p),Hl(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(a,u){this.sharedNodes.has(a)||this.sharedNodes.set(a,new WG),this.sharedNodes.get(a).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:u}=this.options;return u?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:u}=this.options;return u?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let u=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&Z5("z",a,d,this.animationValues);for(let p=0;p{var u;return(u=a.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(j8),this.root.sharedNodes.clear()}}}function XG(e){e.updateLayout()}function QG(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?on(v=>{const h=a?n.measuredBox[v]:n.layoutBox[v],y=Tt(h);h.min=r[v].min,h.max=h.min+y}):K_(o,n.layoutBox,r)&&on(v=>{const h=a?n.measuredBox[v]:n.layoutBox[v],y=Tt(r[v]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+y)});const u=Ji();Hl(u,r,n.layoutBox);const c=Ji();a?Hl(c,e.applyTransform(i,!0),n.measuredBox):Hl(c,r,n.layoutBox);const d=!I_(u);let p=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:h,layout:y}=v;if(h&&y){const x=g0();Nl(x,n.layoutBox,h.layoutBox);const C=g0();Nl(C,r,y.layoutBox),F_(x,C)||(p=!0),v.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=x,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function JG(e){j2.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tq(e){e.clearSnapshot()}function j8(e){e.clearMeasurements()}function nq(e){e.isLayoutDirty=!1}function rq(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function W8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iq(e){e.resolveTargetDelta()}function oq(e){e.calcProjection()}function lq(e){e.resetSkewAndRotation()}function aq(e){e.removeLeadSnapshot()}function U8(e,t,n){e.translate=d0(t.translate,0,n),e.scale=d0(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function G8(e,t,n,r){e.min=d0(t.min,n.min,r),e.max=d0(t.max,n.max,r)}function sq(e,t,n,r){G8(e.x,t.x,n.x,r),G8(e.y,t.y,n.y,r)}function uq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cq={duration:.45,ease:[.4,0,.1,1]},q8=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y8=q8("applewebkit/")&&!q8("chrome/")?Math.round:z0;function X8(e){e.min=Y8(e.min),e.max=Y8(e.max)}function dq(e){X8(e.x),X8(e.y)}function K_(e,t,n){return e==="position"||e==="preserve-aspect"&&!k7(N8(t),N8(n),.2)}const fq=z_({attachResizeListener:(e,t)=>Hn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ti={current:void 0},j_=z_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ti.current){const e=new fq({});e.mount(window),e.setOptions({layoutScroll:!0}),ti.current=e}return ti.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),W_={pan:{Feature:LG},drag:{Feature:AG,ProjectionNode:j_,MeasureLayout:R_}},gc={current:null},Yp={current:!1};function U_(){if(Yp.current=!0,!!o1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gc.current=e.matches;e.addListener(t),t()}else gc.current=!1}function pq(e,t,n){for(const r in t){const i=t[r],o=n[r];if(h0(i))e.addValue(r,i);else if(h0(o))e.addValue(r,En(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,En(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mo=new WeakMap,vq=[...GC,U0,Tr],hq=e=>vq.find(UC(e)),Q8=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mq=vp.length;class Xp{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},u={}){this.applyWillChange=!1,this.resolveKeyframes=(h,y,x,C)=>new this.KeyframeResolver(h,y,x,C,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ke.render(this.render,!1,!0);const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=s1(n),this.isVariantNode=gC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in v){const y=v[h];c[h]!==void 0&&h0(y)&&y.set(c[h],!1)}}mount(t){this.current=t,Mo.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Yp.current||U_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mo.delete(this.current),this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Lr.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Eo){const n=Eo[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):g0()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=En(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(jC(i)||KC(i))?i=parseFloat(i):!hq(i)&&Tr.test(n)&&(i=n_(t,n)),this.setBaseTarget(t,h0(i)?i.get():i)),h0(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=_p(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!h0(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class G_ extends Xp{constructor(){super(...arguments),this.KeyframeResolver=r_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function gq(e){return window.getComputedStyle(e)}class q_ extends G_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(t,n){if(Lr.has(n)){const r=Ap(n);return r&&r.default||0}else{const r=gq(t),i=(CC(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return A_(t,n)}build(t,n,r){xp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Cp(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;h0(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){AC(t,n,r,i)}}class Y_ extends G_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lr.has(n)){const r=Ap(n);return r&&r.default||0}return n=LC.has(n)?n:l1(n),t.getAttribute(n)}measureInstanceViewportBox(){return g0()}scrapeMotionValuesFromProps(t,n,r){return RC(t,n,r)}build(t,n,r){$p(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){DC(t,n,r,i)}mount(t){this.isSVGTag=Sp(t.tagName),super.mount(t)}}const Qp=(e,t)=>gp(e)?new Y_(t):new q_(t,{allowProjection:e!==m.Fragment}),X_={layout:{ProjectionNode:j_,MeasureLayout:R_}},Q_={...Gp,...NC,...W_,...X_},Jp=bC((e,t)=>Pp(e,t,Q_,Qp));function yq(e){return mp(Pp(e,{forwardMotionProps:!1},Q_,Qp))}const J_=bC(Pp);function eP(){const e=m.useRef(!1);return E2(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function x1(){const e=eP(),[t,n]=m.useState(0),r=m.useCallback(()=>{e.current&&n(t+1)},[t]);return[m.useCallback(()=>ke.postRender(r),[r]),t]}class bq extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function xq({children:e,isPresent:t}){const n=m.useId(),r=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=m.useContext(Qn);return m.useInsertionEffect(()=>{const{width:a,height:u,top:c,left:d}=i.current;if(t||!r.current||!a||!u)return;r.current.dataset.motionPopId=n;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${a}px !important;