@ctlyst.id/voila-ui 1.45.0 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18,13 +18,13 @@
18
18
  `+z+x}}var ie=!1,ee;{var oe=typeof WeakMap=="function"?WeakMap:Map;ee=new oe}function re(x,V){if(!x||ie)return"";{var Q=ee.get(x);if(Q!==void 0)return Q}var fe;ie=!0;var Ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=ce.current,ce.current=null,Y();try{if(V){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(qe){fe=qe}Reflect.construct(x,[],xe)}else{try{xe.call()}catch(qe){fe=qe}x.call(xe.prototype)}}else{try{throw Error()}catch(qe){fe=qe}x()}}catch(qe){if(qe&&fe&&typeof qe.stack=="string"){for(var we=qe.stack.split(`
19
19
  `),nt=fe.stack.split(`
20
20
  `),Fe=we.length-1,He=nt.length-1;Fe>=1&&He>=0&&we[Fe]!==nt[He];)He--;for(;Fe>=1&&He>=0;Fe--,He--)if(we[Fe]!==nt[He]){if(Fe!==1||He!==1)do if(Fe--,He--,He<0||we[Fe]!==nt[He]){var Ge=`
21
- `+we[Fe].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&ee.set(x,Ge),Ge}while(Fe>=1&&He>=0);break}}}finally{ie=!1,ce.current=Pe,Z(),Error.prepareStackTrace=Ce}var qt=x?x.displayName||x.name:"",Er=qt?X(qt):"";return typeof x=="function"&&ee.set(x,Er),Er}function pe(x,V,Q){return re(x,!1)}function Ee(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function _e(x,V,Q){if(x==null)return"";if(typeof x=="function")return re(x,Ee(x));if(typeof x=="string")return X(x);switch(x){case u:return X("Suspense");case d:return X("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return pe(x.render);case f:return _e(x.type,V,Q);case m:{var fe=x,Ce=fe._payload,Pe=fe._init;try{return _e(Pe(Ce),V,Q)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,$e={},ke=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);ke.setExtraStackFrame(Q)}else ke.setExtraStackFrame(null)}function it(x,V,Q,fe,Ce){{var Pe=Function.call.bind(Ae);for(var xe in x)if(Pe(x,xe)){var we=void 0;try{if(typeof x[xe]!="function"){var nt=Error((fe||"React class")+": "+Q+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[xe](V,xe,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Fe){we=Fe}we&&!(we instanceof Error)&&(De(Ce),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,xe,typeof we),De(null)),we instanceof Error&&!(we.message in $e)&&($e[we.message]=!0,De(Ce),v("Failed %s type: %s",Q,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,Q=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return Q}}function Pt(x){try{return Se(x),!1}catch{return!0}}function Se(x){return""+x}function ut(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),Se(x)}var Le=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},St,tt,Ve;Ve={};function gt(x){if(Ae.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function rn(x){if(Ae.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function on(x,V){if(typeof x.ref=="string"&&Le.current&&V&&Le.current.stateNode!==V){var Q=h(Le.current.type);Ve[Q]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',h(Le.current.type),x.ref),Ve[Q]=!0)}}function Qt(x,V){{var Q=function(){St||(St=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"key",{get:Q,configurable:!0})}}function he(x,V){{var Q=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"ref",{get:Q,configurable:!0})}}var Ye=function(x,V,Q,fe,Ce,Pe,xe){var we={$$typeof:t,type:x,key:V,ref:Q,props:xe,_owner:Pe};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,Q,fe,Ce){{var Pe,xe={},we=null,nt=null;Q!==void 0&&(ut(Q),we=""+Q),rn(V)&&(ut(V.key),we=""+V.key),gt(V)&&(nt=V.ref,on(V,Ce));for(Pe in V)Ae.call(V,Pe)&&!Zt.hasOwnProperty(Pe)&&(xe[Pe]=V[Pe]);if(x&&x.defaultProps){var Fe=x.defaultProps;for(Pe in Fe)xe[Pe]===void 0&&(xe[Pe]=Fe[Pe])}if(we||nt){var He=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(xe,He),nt&&he(xe,He)}return Ye(x,we,nt,Ce,fe,Le.current,xe)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(Q)}else Jt.setExtraStackFrame(null)}var gn;gn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=h(At.current.type);if(x)return`
21
+ `+we[Fe].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&ee.set(x,Ge),Ge}while(Fe>=1&&He>=0);break}}}finally{ie=!1,ce.current=Pe,Z(),Error.prepareStackTrace=Ce}var qt=x?x.displayName||x.name:"",Er=qt?X(qt):"";return typeof x=="function"&&ee.set(x,Er),Er}function pe(x,V,Q){return re(x,!1)}function Ee(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function _e(x,V,Q){if(x==null)return"";if(typeof x=="function")return re(x,Ee(x));if(typeof x=="string")return X(x);switch(x){case u:return X("Suspense");case d:return X("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return pe(x.render);case f:return _e(x.type,V,Q);case m:{var fe=x,Ce=fe._payload,Pe=fe._init;try{return _e(Pe(Ce),V,Q)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,$e={},ke=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);ke.setExtraStackFrame(Q)}else ke.setExtraStackFrame(null)}function it(x,V,Q,fe,Ce){{var Pe=Function.call.bind(Ae);for(var xe in x)if(Pe(x,xe)){var we=void 0;try{if(typeof x[xe]!="function"){var nt=Error((fe||"React class")+": "+Q+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[xe](V,xe,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Fe){we=Fe}we&&!(we instanceof Error)&&(De(Ce),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,xe,typeof we),De(null)),we instanceof Error&&!(we.message in $e)&&($e[we.message]=!0,De(Ce),v("Failed %s type: %s",Q,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,Q=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return Q}}function Pt(x){try{return Se(x),!1}catch{return!0}}function Se(x){return""+x}function ut(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),Se(x)}var Le=S.ReactCurrentOwner,Qt={key:!0,ref:!0,__self:!0,__source:!0},St,tt,Ve;Ve={};function gt(x){if(Ae.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function rn(x){if(Ae.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function on(x,V){if(typeof x.ref=="string"&&Le.current&&V&&Le.current.stateNode!==V){var Q=h(Le.current.type);Ve[Q]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',h(Le.current.type),x.ref),Ve[Q]=!0)}}function Jt(x,V){{var Q=function(){St||(St=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"key",{get:Q,configurable:!0})}}function he(x,V){{var Q=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"ref",{get:Q,configurable:!0})}}var Ye=function(x,V,Q,fe,Ce,Pe,xe){var we={$$typeof:t,type:x,key:V,ref:Q,props:xe,_owner:Pe};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,Q,fe,Ce){{var Pe,xe={},we=null,nt=null;Q!==void 0&&(ut(Q),we=""+Q),rn(V)&&(ut(V.key),we=""+V.key),gt(V)&&(nt=V.ref,on(V,Ce));for(Pe in V)Ae.call(V,Pe)&&!Qt.hasOwnProperty(Pe)&&(xe[Pe]=V[Pe]);if(x&&x.defaultProps){var Fe=x.defaultProps;for(Pe in Fe)xe[Pe]===void 0&&(xe[Pe]=Fe[Pe])}if(we||nt){var He=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Jt(xe,He),nt&&he(xe,He)}return Ye(x,we,nt,Ce,fe,Le.current,xe)}}var At=S.ReactCurrentOwner,en=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);en.setExtraStackFrame(Q)}else en.setExtraStackFrame(null)}var gn;gn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=h(At.current.type);if(x)return`
22
22
 
23
23
  Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){var V=x.fileName.replace(/^.*[\\\/]/,""),Q=x.lineNumber;return`
24
24
 
25
25
  Check your code at `+V+":"+Q+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var Q=typeof x=="string"?x:x.displayName||x.name;Q&&(V=`
26
26
 
27
- Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+h(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Wt(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var Ce=T(x);if(typeof Ce=="function"&&Ce!==x.entries)for(var Pe=Ce.call(x),xe;!(xe=Pe.next()).done;)Lt(xe.value)&&Wt(xe.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=h(V);it(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!gn){gn=!0;var Ce=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,Ce,Pe){{var xe=H(x);if(!xe){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(Ce);nt?we+=nt:we+=Dn();var Fe;x===null?Fe="null":xt(x)?Fe="array":x!==void 0&&x.$$typeof===t?(Fe="<"+(h(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var He=kt(x,V,Q,Ce,Pe);if(He==null)return He;if(xe){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(He):Nn(He),He}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var zt=nr,rr=kn;To.Fragment=r,To.jsx=zt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?xc.exports=Uy():xc.exports=Yy();var M=xc.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function mn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(f){const{scope:m,children:p,...b}=f,y=(m==null?void 0:m[e][c])||s,T=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:T},p)}function d(f,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Ky(o,...t)]}function Ky(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function qy(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bh(...e){return t=>e.forEach(n=>qy(n,t))}function ct(...e){return l.useCallback(bh(...e),e)}const lo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(Xy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(_c,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(_c,ae({},r,{ref:t}),n)});lo.displayName="Slot";const _c=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Gy(r,n.props),ref:t?bh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wh=({children:e})=>l.createElement(l.Fragment,null,e);function Xy(e){return l.isValidElement(e)&&e.type===wh}function Gy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qa(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,T=l.useRef(null),S=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:S,collectionRef:T},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:T}=p,S=i(s,y),v=ct(b,S.collectionRef);return l.createElement(lo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((p,b)=>{const{scope:y,children:T,...S}=p,v=l.useRef(null),w=ct(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(lo,{[d]:"",ref:w},T)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const S=Array.from(T.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,I)=>S.indexOf(C.ref.current)-S.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function cn(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function _n({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Zy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=cn(n),c=l.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function Zy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=cn(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Qy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=Qy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Eh(e,t){e&&pn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Jy(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=eb(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=ct(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function eb(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Jy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Vi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,p=Vi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=f=>{const p=Vi(r.current).includes(f.animationName);f.target===t&&p&&pn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Vi(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Vi(e){return(e==null?void 0:e.animationName)||"none"}const tb=Re["useId".toString()]||(()=>{});let nb=0;function Xn(e){const[t,n]=Re.useState(tb());return Gt(()=>{e||n(r=>r??String(nb++))},[e]),e||(t?`radix-${t}`:"")}const xh="Collapsible",[rb,_h]=mn(xh),[ob,pu]=rb(xh),ib=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=_n({prop:r,defaultProp:o,onChange:a});return l.createElement(ob,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ue.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ab="CollapsibleTrigger",sb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pu(ab,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),Sh="CollapsibleContent",cb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pu(Sh,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(ub,ae({},r,{ref:t,present:i})))}),ub=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=pu(Sh,n),[s,c]=l.useState(r),u=l.useRef(null),d=ct(t,u),f=l.useRef(0),m=f.current,p=l.useRef(0),b=p.current,y=a.open||s,T=l.useRef(y),S=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){S.current=S.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();f.current=w.height,p.current=w.width,T.current||(v.style.transitionDuration=S.current.transitionDuration,v.style.animationName=S.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const lb=ib,db=sb,fb=cb,pb=l.createContext(void 0);function Ja(e){const t=l.useContext(pb);return e||t||"ltr"}const br="Accordion",hb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,vb,mb]=Qa(br),[es,TP]=mn(br,[mb,_h]),mu=_h(),Ch=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(vu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(wb,ae({},i,{ref:t})):l.createElement(bb,ae({},o,{ref:t})))});Ch.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[$h,gb]=es(br),[Th,yb]=es(br,{collapsible:!1}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=_n({prop:n,defaultProp:r,onChange:o});return l.createElement($h,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ih,ae({},a,{ref:t}))))}),wb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=_n({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=l.useCallback(d=>s((f=[])=>f.filter(m=>m!==d)),[s]);return l.createElement($h,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ih,ae({},i,{ref:t}))))}),[Eb,ts]=es(br),Ih=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=ct(s,t),u=vb(n),f=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!hb.includes(p.key))return;const y=p.target,T=u().filter(k=>{var H;return!((H=k.ref.current)!==null&&H!==void 0&&H.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;p.preventDefault();let w=S;const C=0,I=v-1,D=()=>{w=S+1,w>I&&(w=C)},P=()=>{w=S-1,w<C&&(w=I)};switch(p.key){case"Home":w=C;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(f?D():P());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?P():D());break;case"ArrowUp":i==="vertical"&&P();break}const F=w%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(Eb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(vu.Slot,{scope:n},l.createElement(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[xb,gu]=es(Sc),_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(Sc,n),a=gb(Sc,n),s=mu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(xb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(lb,ae({"data-orientation":i.orientation,"data-state":Rh(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),Sb="AccordionHeader",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Sb,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rh(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",$b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Nd,n),a=yb(Nd,n),s=mu(n);return l.createElement(vu.ItemSlot,{scope:n},l.createElement(db,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),Tb="AccordionContent",Ib=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Tb,n),a=mu(n);return l.createElement(fb,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function Rh(e){return e?"open":"closed"}const Rb=Ch,Ob=_b,Pb=Cb,Ab=$b,Db=Ib;function Oh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Oh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Oe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Oh(e))&&(r&&(r+=" "),r+=t);return r}const Nb=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:Oe("accordion-root",t),...n,ref:r,children:e})),Hs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},kb=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},ns=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Hs(o,"className"),a=Hs(o,"otherProps"),s=Hs(o,"style");return{otherProps:kb(e,a),className:i,style:s}},{backgroundAtoms:Mb,borderAtoms:jb,commonAtoms:kd,flexAtoms:Md,positionAtoms:Lb,radiiAtoms:Fb,shadowAtoms:Vb,sizesAtoms:Bb,spaceAtoms:Hb,typographyAtoms:Wb}=Ct.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=kd({display:o?"flex":i.display}),u=Md({flexWrap:o?"wrap":i.flexWrap}),{className:d,otherProps:f,style:m}=ns({commonAtoms:kd,flexAtoms:Md,positionAtoms:Lb,spaceAtoms:Hb,sizesAtoms:Bb,borderAtoms:jb,typographyAtoms:Wb,radiiAtoms:Fb,backgroundAtoms:Mb,shadowAtoms:Vb},i,[c,u]);return M.jsx(s,{ref:a,className:Oe(d,n),disabled:r,style:m,...f,children:t})});et.displayName="Box";et.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const yu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});yu.displayName="Card";yu.defaultProps={withShadow:!1};var zb="ifvo3u0";const{sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd,flexAtoms:Ub}=Ct.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=jd({width:"$full",maxW:t?"$full":"$lg"}),s=Ld({mx:"$auto",my:"$0"}),c=Fd({display:r}),{className:u,style:d}=ns({flexAtoms:Ub,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:Oe("vds-container",!t&&zb,u,n),style:d,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Vd,spaceAtoms:Yb,sizesAtoms:Kb,radiiAtoms:qb,flexAtoms:Xb,backgroundAtoms:Gb}=Ct.atoms,Ht=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:Xb,commonAtoms:Vd,spaceAtoms:Yb,sizesAtoms:Kb,radiiAtoms:qb,backgroundAtoms:Gb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(s,n),style:u,...c,children:t})});Ht.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Ht.displayName="Flex";const{gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0}=Ct.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Ct.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(s,n),style:u,...c,children:t})});wu.displayName="Grid";wu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const n0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},r0=e=>e?n0[e]:void 0,Bd={1:"wrap",0:"nowrap"},o0=e=>e?typeof e=="boolean"?Bd[1]:Bd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const d=r0(o),f=o0(a);return M.jsx(Ht,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.displayName="Stack";function i0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){i0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var a0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},ot=e=>t=>{var n=e.defaultClassName,r=Wd(Wd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,d]of e.compoundVariants)a0(u,r,e.defaultVariants)&&(n+=" "+d);return n},s0=ot({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const nn=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(et,{as:e,ref:a,className:Oe(s0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));nn.displayName="Text";nn.defaultProps={as:"p"};var c0="_13vyt6x7",u0="_13vyt6x5",l0="_13vyt6x6",d0="_13vyt6x2",f0="_13vyt6x3",p0="_13vyt6x4";const h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Db,{className:Oe(u0,t),...n,ref:r,children:M.jsx(et,{className:l0,children:e})})),v0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:Oe(d0,t),...n,ref:r,children:e}));var Cc={exports:{}},Io={};/**
27
+ Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+h(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function tn(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Wt(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var Ce=T(x);if(typeof Ce=="function"&&Ce!==x.entries)for(var Pe=Ce.call(x),xe;!(xe=Pe.next()).done;)Lt(xe.value)&&Wt(xe.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=h(V);it(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!gn){gn=!0;var Ce=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,Ce,Pe){{var xe=H(x);if(!xe){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(Ce);nt?we+=nt:we+=Dn();var Fe;x===null?Fe="null":xt(x)?Fe="array":x!==void 0&&x.$$typeof===t?(Fe="<"+(h(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var He=kt(x,V,Q,Ce,Pe);if(He==null)return He;if(xe){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)tn(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ge,x)}return x===r?Kt(He):Nn(He),He}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var zt=nr,rr=kn;To.Fragment=r,To.jsx=zt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?xc.exports=Uy():xc.exports=Yy();var M=xc.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function mn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(f){const{scope:m,children:p,...b}=f,y=(m==null?void 0:m[e][c])||s,T=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:T},p)}function d(f,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Ky(o,...t)]}function Ky(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function qy(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bh(...e){return t=>e.forEach(n=>qy(n,t))}function ct(...e){return l.useCallback(bh(...e),e)}const lo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(Xy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(_c,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(_c,ae({},r,{ref:t}),n)});lo.displayName="Slot";const _c=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Gy(r,n.props),ref:t?bh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wh=({children:e})=>l.createElement(l.Fragment,null,e);function Xy(e){return l.isValidElement(e)&&e.type===wh}function Gy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Qa(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,T=l.useRef(null),S=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:S,collectionRef:T},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:T}=p,S=i(s,y),v=ct(b,S.collectionRef);return l.createElement(lo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((p,b)=>{const{scope:y,children:T,...S}=p,v=l.useRef(null),w=ct(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(lo,{[d]:"",ref:w},T)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const S=Array.from(T.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,I)=>S.indexOf(C.ref.current)-S.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function cn(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function _n({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Zy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=cn(n),c=l.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function Zy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=cn(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Qy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=Qy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Eh(e,t){e&&pn.flushSync(()=>e.dispatchEvent(t))}const Zt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Jy(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=eb(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=ct(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function eb(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Jy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Vi(r.current);i.current=s==="mounted"?u:"none"},[s]),Zt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,p=Vi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Zt(()=>{if(t){const u=f=>{const p=Vi(r.current).includes(f.animationName);f.target===t&&p&&pn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Vi(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Vi(e){return(e==null?void 0:e.animationName)||"none"}const tb=Re["useId".toString()]||(()=>{});let nb=0;function Xn(e){const[t,n]=Re.useState(tb());return Zt(()=>{e||n(r=>r??String(nb++))},[e]),e||(t?`radix-${t}`:"")}const xh="Collapsible",[rb,_h]=mn(xh),[ob,pu]=rb(xh),ib=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=_n({prop:r,defaultProp:o,onChange:a});return l.createElement(ob,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ue.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ab="CollapsibleTrigger",sb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pu(ab,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),Sh="CollapsibleContent",cb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pu(Sh,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(ub,ae({},r,{ref:t,present:i})))}),ub=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=pu(Sh,n),[s,c]=l.useState(r),u=l.useRef(null),d=ct(t,u),f=l.useRef(0),m=f.current,p=l.useRef(0),b=p.current,y=a.open||s,T=l.useRef(y),S=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(v)},[]),Zt(()=>{const v=u.current;if(v){S.current=S.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();f.current=w.height,p.current=w.width,T.current||(v.style.transitionDuration=S.current.transitionDuration,v.style.animationName=S.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const lb=ib,db=sb,fb=cb,pb=l.createContext(void 0);function Ja(e){const t=l.useContext(pb);return e||t||"ltr"}const br="Accordion",hb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,vb,mb]=Qa(br),[es,TP]=mn(br,[mb,_h]),mu=_h(),Ch=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(vu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(wb,ae({},i,{ref:t})):l.createElement(bb,ae({},o,{ref:t})))});Ch.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[$h,gb]=es(br),[Th,yb]=es(br,{collapsible:!1}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=_n({prop:n,defaultProp:r,onChange:o});return l.createElement($h,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ih,ae({},a,{ref:t}))))}),wb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=_n({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=l.useCallback(d=>s((f=[])=>f.filter(m=>m!==d)),[s]);return l.createElement($h,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ih,ae({},i,{ref:t}))))}),[Eb,ts]=es(br),Ih=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=ct(s,t),u=vb(n),f=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!hb.includes(p.key))return;const y=p.target,T=u().filter(k=>{var H;return!((H=k.ref.current)!==null&&H!==void 0&&H.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;p.preventDefault();let w=S;const C=0,I=v-1,D=()=>{w=S+1,w>I&&(w=C)},P=()=>{w=S-1,w<C&&(w=I)};switch(p.key){case"Home":w=C;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(f?D():P());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?P():D());break;case"ArrowUp":i==="vertical"&&P();break}const F=w%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(Eb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(vu.Slot,{scope:n},l.createElement(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[xb,gu]=es(Sc),_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(Sc,n),a=gb(Sc,n),s=mu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(xb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(lb,ae({"data-orientation":i.orientation,"data-state":Rh(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),Sb="AccordionHeader",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Sb,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rh(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",$b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Nd,n),a=yb(Nd,n),s=mu(n);return l.createElement(vu.ItemSlot,{scope:n},l.createElement(db,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),Tb="AccordionContent",Ib=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(Tb,n),a=mu(n);return l.createElement(fb,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function Rh(e){return e?"open":"closed"}const Rb=Ch,Ob=_b,Pb=Cb,Ab=$b,Db=Ib;function Oh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Oh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Oe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Oh(e))&&(r&&(r+=" "),r+=t);return r}const Nb=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:Oe("accordion-root",t),...n,ref:r,children:e})),Hs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},kb=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},ns=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Hs(o,"className"),a=Hs(o,"otherProps"),s=Hs(o,"style");return{otherProps:kb(e,a),className:i,style:s}},{backgroundAtoms:Mb,borderAtoms:jb,commonAtoms:kd,flexAtoms:Md,positionAtoms:Lb,radiiAtoms:Fb,shadowAtoms:Vb,sizesAtoms:Bb,spaceAtoms:Hb,typographyAtoms:Wb}=Ct.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=kd({display:o?"flex":i.display}),u=Md({flexWrap:o?"wrap":i.flexWrap}),{className:d,otherProps:f,style:m}=ns({commonAtoms:kd,flexAtoms:Md,positionAtoms:Lb,spaceAtoms:Hb,sizesAtoms:Bb,borderAtoms:jb,typographyAtoms:Wb,radiiAtoms:Fb,backgroundAtoms:Mb,shadowAtoms:Vb},i,[c,u]);return M.jsx(s,{ref:a,className:Oe(d,n),disabled:r,style:m,...f,children:t})});et.displayName="Box";et.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const yu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});yu.displayName="Card";yu.defaultProps={withShadow:!1};var zb="ifvo3u0";const{sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd,flexAtoms:Ub}=Ct.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=jd({width:"$full",maxW:t?"$full":"$lg"}),s=Ld({mx:"$auto",my:"$0"}),c=Fd({display:r}),{className:u,style:d}=ns({flexAtoms:Ub,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:Oe("vds-container",!t&&zb,u,n),style:d,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Vd,spaceAtoms:Yb,sizesAtoms:Kb,radiiAtoms:qb,flexAtoms:Xb,backgroundAtoms:Gb}=Ct.atoms,Ht=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:Xb,commonAtoms:Vd,spaceAtoms:Yb,sizesAtoms:Kb,radiiAtoms:qb,backgroundAtoms:Gb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(s,n),style:u,...c,children:t})});Ht.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Ht.displayName="Flex";const{gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0}=Ct.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Ct.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(s,n),style:u,...c,children:t})});wu.displayName="Grid";wu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const n0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},r0=e=>e?n0[e]:void 0,Bd={1:"wrap",0:"nowrap"},o0=e=>e?typeof e=="boolean"?Bd[1]:Bd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const d=r0(o),f=o0(a);return M.jsx(Ht,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.displayName="Stack";function i0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){i0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var a0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},ot=e=>t=>{var n=e.defaultClassName,r=Wd(Wd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,d]of e.compoundVariants)a0(u,r,e.defaultVariants)&&(n+=" "+d);return n},s0=ot({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const Gt=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(et,{as:e,ref:a,className:Oe(s0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));Gt.displayName="Text";Gt.defaultProps={as:"p"};var c0="_13vyt6x7",u0="_13vyt6x5",l0="_13vyt6x6",d0="_13vyt6x2",f0="_13vyt6x3",p0="_13vyt6x4";const h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Db,{className:Oe(u0,t),...n,ref:r,children:M.jsx(et,{className:l0,children:e})})),v0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:Oe(d0,t),...n,ref:r,children:e}));var Cc={exports:{}},Io={};/**
28
28
  * @license React
29
29
  * react-jsx-runtime.production.min.js
30
30
  *
@@ -44,13 +44,13 @@ Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(
44
44
  `+z+x}}var ie=!1,ee;{var oe=typeof WeakMap=="function"?WeakMap:Map;ee=new oe}function re(x,V){if(!x||ie)return"";{var Q=ee.get(x);if(Q!==void 0)return Q}var fe;ie=!0;var Ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=ce.current,ce.current=null,Y();try{if(V){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(qe){fe=qe}Reflect.construct(x,[],xe)}else{try{xe.call()}catch(qe){fe=qe}x.call(xe.prototype)}}else{try{throw Error()}catch(qe){fe=qe}x()}}catch(qe){if(qe&&fe&&typeof qe.stack=="string"){for(var we=qe.stack.split(`
45
45
  `),nt=fe.stack.split(`
46
46
  `),Fe=we.length-1,He=nt.length-1;Fe>=1&&He>=0&&we[Fe]!==nt[He];)He--;for(;Fe>=1&&He>=0;Fe--,He--)if(we[Fe]!==nt[He]){if(Fe!==1||He!==1)do if(Fe--,He--,He<0||we[Fe]!==nt[He]){var Ge=`
47
- `+we[Fe].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&ee.set(x,Ge),Ge}while(Fe>=1&&He>=0);break}}}finally{ie=!1,ce.current=Pe,Z(),Error.prepareStackTrace=Ce}var qt=x?x.displayName||x.name:"",Er=qt?X(qt):"";return typeof x=="function"&&ee.set(x,Er),Er}function pe(x,V,Q){return re(x,!1)}function Ee(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function _e(x,V,Q){if(x==null)return"";if(typeof x=="function")return re(x,Ee(x));if(typeof x=="string")return X(x);switch(x){case u:return X("Suspense");case d:return X("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return pe(x.render);case f:return _e(x.type,V,Q);case m:{var fe=x,Ce=fe._payload,Pe=fe._init;try{return _e(Pe(Ce),V,Q)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,$e={},ke=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);ke.setExtraStackFrame(Q)}else ke.setExtraStackFrame(null)}function it(x,V,Q,fe,Ce){{var Pe=Function.call.bind(Ae);for(var xe in x)if(Pe(x,xe)){var we=void 0;try{if(typeof x[xe]!="function"){var nt=Error((fe||"React class")+": "+Q+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[xe](V,xe,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Fe){we=Fe}we&&!(we instanceof Error)&&(De(Ce),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,xe,typeof we),De(null)),we instanceof Error&&!(we.message in $e)&&($e[we.message]=!0,De(Ce),v("Failed %s type: %s",Q,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,Q=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return Q}}function Pt(x){try{return Se(x),!1}catch{return!0}}function Se(x){return""+x}function ut(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),Se(x)}var Le=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},St,tt,Ve;Ve={};function gt(x){if(Ae.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function rn(x){if(Ae.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function on(x,V){if(typeof x.ref=="string"&&Le.current&&V&&Le.current.stateNode!==V){var Q=h(Le.current.type);Ve[Q]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',h(Le.current.type),x.ref),Ve[Q]=!0)}}function Qt(x,V){{var Q=function(){St||(St=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"key",{get:Q,configurable:!0})}}function he(x,V){{var Q=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"ref",{get:Q,configurable:!0})}}var Ye=function(x,V,Q,fe,Ce,Pe,xe){var we={$$typeof:t,type:x,key:V,ref:Q,props:xe,_owner:Pe};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,Q,fe,Ce){{var Pe,xe={},we=null,nt=null;Q!==void 0&&(ut(Q),we=""+Q),rn(V)&&(ut(V.key),we=""+V.key),gt(V)&&(nt=V.ref,on(V,Ce));for(Pe in V)Ae.call(V,Pe)&&!Zt.hasOwnProperty(Pe)&&(xe[Pe]=V[Pe]);if(x&&x.defaultProps){var Fe=x.defaultProps;for(Pe in Fe)xe[Pe]===void 0&&(xe[Pe]=Fe[Pe])}if(we||nt){var He=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(xe,He),nt&&he(xe,He)}return Ye(x,we,nt,Ce,fe,Le.current,xe)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(Q)}else Jt.setExtraStackFrame(null)}var gn;gn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=h(At.current.type);if(x)return`
47
+ `+we[Fe].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&ee.set(x,Ge),Ge}while(Fe>=1&&He>=0);break}}}finally{ie=!1,ce.current=Pe,Z(),Error.prepareStackTrace=Ce}var qt=x?x.displayName||x.name:"",Er=qt?X(qt):"";return typeof x=="function"&&ee.set(x,Er),Er}function pe(x,V,Q){return re(x,!1)}function Ee(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function _e(x,V,Q){if(x==null)return"";if(typeof x=="function")return re(x,Ee(x));if(typeof x=="string")return X(x);switch(x){case u:return X("Suspense");case d:return X("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return pe(x.render);case f:return _e(x.type,V,Q);case m:{var fe=x,Ce=fe._payload,Pe=fe._init;try{return _e(Pe(Ce),V,Q)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,$e={},ke=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);ke.setExtraStackFrame(Q)}else ke.setExtraStackFrame(null)}function it(x,V,Q,fe,Ce){{var Pe=Function.call.bind(Ae);for(var xe in x)if(Pe(x,xe)){var we=void 0;try{if(typeof x[xe]!="function"){var nt=Error((fe||"React class")+": "+Q+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[xe](V,xe,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Fe){we=Fe}we&&!(we instanceof Error)&&(De(Ce),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,xe,typeof we),De(null)),we instanceof Error&&!(we.message in $e)&&($e[we.message]=!0,De(Ce),v("Failed %s type: %s",Q,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,Q=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return Q}}function Pt(x){try{return Se(x),!1}catch{return!0}}function Se(x){return""+x}function ut(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),Se(x)}var Le=S.ReactCurrentOwner,Qt={key:!0,ref:!0,__self:!0,__source:!0},St,tt,Ve;Ve={};function gt(x){if(Ae.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function rn(x){if(Ae.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function on(x,V){if(typeof x.ref=="string"&&Le.current&&V&&Le.current.stateNode!==V){var Q=h(Le.current.type);Ve[Q]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',h(Le.current.type),x.ref),Ve[Q]=!0)}}function Jt(x,V){{var Q=function(){St||(St=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"key",{get:Q,configurable:!0})}}function he(x,V){{var Q=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};Q.isReactWarning=!0,Object.defineProperty(x,"ref",{get:Q,configurable:!0})}}var Ye=function(x,V,Q,fe,Ce,Pe,xe){var we={$$typeof:t,type:x,key:V,ref:Q,props:xe,_owner:Pe};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,Q,fe,Ce){{var Pe,xe={},we=null,nt=null;Q!==void 0&&(ut(Q),we=""+Q),rn(V)&&(ut(V.key),we=""+V.key),gt(V)&&(nt=V.ref,on(V,Ce));for(Pe in V)Ae.call(V,Pe)&&!Qt.hasOwnProperty(Pe)&&(xe[Pe]=V[Pe]);if(x&&x.defaultProps){var Fe=x.defaultProps;for(Pe in Fe)xe[Pe]===void 0&&(xe[Pe]=Fe[Pe])}if(we||nt){var He=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Jt(xe,He),nt&&he(xe,He)}return Ye(x,we,nt,Ce,fe,Le.current,xe)}}var At=S.ReactCurrentOwner,en=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,Q=_e(x.type,x._source,V?V.type:null);en.setExtraStackFrame(Q)}else en.setExtraStackFrame(null)}var gn;gn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=h(At.current.type);if(x)return`
48
48
 
49
49
  Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){var V=x.fileName.replace(/^.*[\\\/]/,""),Q=x.lineNumber;return`
50
50
 
51
51
  Check your code at `+V+":"+Q+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var Q=typeof x=="string"?x:x.displayName||x.name;Q&&(V=`
52
52
 
53
- Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+h(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Wt(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var Ce=T(x);if(typeof Ce=="function"&&Ce!==x.entries)for(var Pe=Ce.call(x),xe;!(xe=Pe.next()).done;)Lt(xe.value)&&Wt(xe.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=h(V);it(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!gn){gn=!0;var Ce=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,Ce,Pe){{var xe=H(x);if(!xe){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(Ce);nt?we+=nt:we+=Dn();var Fe;x===null?Fe="null":xt(x)?Fe="array":x!==void 0&&x.$$typeof===t?(Fe="<"+(h(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var He=kt(x,V,Q,Ce,Pe);if(He==null)return He;if(xe){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(He):Nn(He),He}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var zt=nr,rr=kn;Bi.Fragment=r,Bi.jsx=zt,Bi.jsxs=rr}()),Bi}process.env.NODE_ENV==="production"?Cc.exports=m0():Cc.exports=g0();var $t=Cc.exports;const y0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Ct.theme.colors[e.color]?Ct.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},Cn=y0,b0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},Eu=b0,w0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},si=w0,E0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},x0=E0,_0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},xu=_0,S0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},rs=S0,C0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},I0=T0,R0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm3.29 14.71-3.31-3.31-3.27 3.27-1.41-1.41 3.27-3.27-3.23-3.23 1.41-1.41 3.23 3.23 3.27-3.27 1.41 1.41-3.27 3.27 3.31 3.31-1.41 1.41Z",fill:t})})},O0=R0,P0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},A0=P0,D0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm1 15h-2v-6h2v6Zm-1-7.88c-.62 0-1.12-.5-1.12-1.12 0-.62.5-1.12 1.12-1.12.62 0 1.12.5 1.12 1.12 0 .62-.5 1.12-1.12 1.12Z",fill:t})})},N0=D0,k0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm-1.33 14.41-4.04-4.04 1.41-1.41 2.63 2.63 5.29-5.29 1.41 1.41-6.71 6.71.01-.01Z",fill:t})})},M0=k0,j0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m12 3.5-10 18h20l-10-18Zm0 15c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm-1-3v-5h2v5h-2Z",fill:t})})},L0=j0,F0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Pb,{className:"accordion-header",children:M.jsxs(Ab,{className:Oe(f0,t),...n,ref:r,children:[M.jsx(et,{className:p0,children:e}),M.jsx(si,{className:c0,size:24,color:Ct.theme.colors.black})]})}));var V0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},B0=ot({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",d=(()=>{switch(o){case"error":return O0;case"warning":return L0;case"success":return M0;default:return N0}})();return M.jsxs(c,{ref:s,className:Oe(B0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Ht,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:Ct.theme.space[24],children:M.jsx(d,{size:24,color:V0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Ar,{gap:"$8",children:[t&&M.jsx(nn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Ht,{pl:"$16",pt:"$4",children:M.jsx(rs,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Ct.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const H0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),_u=({children:e,...t})=>M.jsx(H0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var W0=ot({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{medium:"_15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",small:"_15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj49",false:"_1er7sj4a"},variant:{primary:"_1er7sj4b",secondary:"_1er7sj4c"}},defaultVariants:{colorScheme:"primary",size:"medium",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4d"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4h"]]});const Su=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const d=e||"span";return M.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Oe(W0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});Su.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};Su.displayName="Badge";function Yd(e,[t,n]){return Math.min(n,Math.max(t,e))}function z0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const $c="dismissableLayer.update",U0="dismissableLayer.pointerDownOutside",Y0="dismissableLayer.focusOutside";let Kd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,d=l.useContext(Ah),[f,m]=l.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=ct(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),w=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=q0(F=>{const k=F.target,H=[...d.branches].some(R=>R.contains(k));!I||H||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),P=X0(F=>{const k=F.target;[...d.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return z0(F=>{w===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),qd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Kd)}},[f,p,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),qd())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),K0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=ct(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function q0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(U0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(Y0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Dh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Eh(o,i):o.dispatchEvent(i)}const G0=os,Z0=K0;let Ws=0;function Nh(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Xd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Xd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zs="focusScope.autoFocusOnMount",Us="focusScope.autoFocusOnUnmount",Gd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=cn(o),d=cn(i),f=l.useRef(null),m=ct(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(w){if(p.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(w){const C=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(C)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const v=new MutationObserver(S);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Qd.add(p);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Gd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(Q0(rw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Gd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Qd.remove(p)},0)}}},[s,u,d,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[w,C]=J0(v);w&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&S===w&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Q0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function J0(e){const t=Mh(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e,t){for(const n of e)if(!ew(n,{upTo:t}))return n}function ew(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tw(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tw(e)&&t&&e.select()}}const Qd=nw();function nw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jd(e,t),e.unshift(t)},remove(t){var n;e=Jd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rw(e){return e.filter(t=>t.tagName!=="A")}const ow=["top","right","bottom","left"],vr=Math.min,fn=Math.max,$a=Math.round,Hi=Math.floor,mr=e=>({x:e,y:e}),iw={left:"right",right:"left",bottom:"top",top:"bottom"},aw={start:"end",end:"start"};function Tc(e,t,n){return fn(e,vr(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function Zn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Tu(e){return Cu(yo(e))}function sw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=Tu(e),i=$u(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function cw(e){const t=Ta(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>aw[t])}function uw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function lw(e,t,n,r){const o=go(e);let i=uw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ta(e){return e.replace(/left|right|bottom|top/g,t=>iw[t])}function dw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jh(e){return typeof e!="number"?dw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ef(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=Tu(t),s=$u(a),c=Zn(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}const fw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=ef(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:w,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=w??f,p={...p,[T]:{...p[T],...C}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:f}=ef(u,m,c)),y=-1;continue}}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function ci(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Gn(t,e),b=jh(p),T=s[m?f==="floating"?"reference":"floating":f],S=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(S.top-I.top+b.top)/C.y,bottom:(I.bottom-S.bottom+b.bottom)/C.y,left:(S.left-I.left+b.left)/C.x,right:(I.right-S.right+b.right)/C.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Gn(e,t)||{};if(c==null)return{};const d=jh(u),f={x:n,y:r},m=Tu(o),p=$u(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-f[m]-i.floating[p],C=f[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[p]);const P=w/2-C/2,F=D/2-b[p]/2-1,k=vr(d[T],F),H=vr(d[S],F),R=k,E=D-b[p]-H,h=D/2-b[p]/2+P,$=Tc(R,h,E),j=go(o)!=null&&h!=$&&i.reference[p]/2-(h<R?k:H)-b[p]/2<0?h<R?R-h:E-h:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:h-$+j}}}}),pw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Gn(e,t),T=Zn(r),S=Zn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=f||(S||!b?[Ta(a)]:cw(a));!f&&p!=="none"&&w.push(...lw(a,b,p,v));const C=[a,...w],I=await ci(t,y),D=[];let P=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=sw(r,i,v);D.push(I[R[0]],I[R[1]])}if(P=[...P,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,E=C[R];if(E)return{data:{index:R,overflows:P},reset:{placement:E}};let h=(k=P.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var H;const $=(H=P.map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:H[0];$&&(h=$);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return ow.some(t=>e[t]>=0)}const hw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=nf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rf(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=nf(i,n.floating);return{data:{escapedOffsets:a,escaped:rf(a)}}}default:return{}}}}};async function vw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Zn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const mw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await vw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},gw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:S,y:v}=T;return{x:S,y:v}}},...c}=Gn(e,t),u={x:n,y:r},d=await ci(t,c),f=yo(Zn(o)),m=Cu(f);let p=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=p+d[T],w=p-d[S];p=Tc(v,p,w)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],w=b-d[S];b=Tc(v,b,w)}const y=s.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},yw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Gn(e,t),d={x:n,y:r},f=yo(o),m=Cu(f);let p=d[m],b=d[f];const y=Gn(s,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+T.mainAxis,I=i.reference[m]+i.reference[w]-T.mainAxis;p<C?p=C:p>I&&(p=I)}if(u){var S,v;const w=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[w]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[w]+(C?0:((v=a.offset)==null?void 0:v[f])||0)-(C?T.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[f]:b}}}},bw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Gn(e,t),c=await ci(t,s),u=Zn(n),d=go(n),f=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=d==="end"?"top":"bottom");const T=p-c[b],S=m-c[y],v=!t.middlewareData.shift;let w=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=p-c.top-c.bottom;w=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),P=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||P!==0?D+P:fn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof vn(e).Node}function Qn(e){return e instanceof Element||e instanceof vn(e).Element}function Vn(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function of(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ww(e){return["table","td","th"].includes(gr(e))}function Iu(e){const t=Ru(),n=Sn(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 Ew(e){let t=fo(e);for(;Vn(t)&&!is(t);){if(Iu(t))return t;t=fo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function is(e){return["html","body","#document"].includes(gr(e))}function Sn(e){return vn(e).getComputedStyle(e)}function as(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||of(e)&&e.host||Jn(e);return of(t)?t.host:t}function Fh(e){const t=fo(e);return is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=Sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Qn(e)?e:e.contextElement}function oo(e){const t=Ou(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xw=mr(0);function Bh(e){const t=vn(e);return!Ru()||!t.visualViewport?xw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _w(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ou(e);let a=mr(1);t&&(r?Qn(r)&&(a=oo(r)):a=oo(e));const s=_w(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const m=vn(i),p=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),T=b.getBoundingClientRect(),S=Sn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,w=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=w,b=vn(b).frameElement}}return Ia({width:d,height:f,x:c,y:u})}function Sw(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Vn(n),i=Jn(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||$i(i))&&(a=as(n)),Vn(n))){const u=Mr(n);s=oo(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Cw(e){return Array.from(e.getClientRects())}function Hh(e){return Mr(Jn(e)).left+as(e).scrollLeft}function $w(e){const t=Jn(e),n=as(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return Sn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Tw(e,t){const n=vn(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Ru();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Iw(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?oo(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function af(e,t,n){let r;if(t==="viewport")r=Tw(e,n);else if(t==="document")r=$w(Jn(e));else if(Qn(t))r=Iw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Qn(n)||is(n)?!1:Sn(n).position==="fixed"||Wh(n,t)}function Rw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Sn(e).position==="fixed";let a=i?fo(e):e;for(;Qn(a)&&!is(a);){const s=Sn(a),c=Iu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Wh(e,a))?r=r.filter(d=>d!==a):o=s,a=fo(a)}return t.set(e,r),r}function Ow(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Rw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=af(t,d,o);return u.top=fn(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=fn(f.left,u.left),u},af(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pw(e){return Vh(e)}function Aw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=Mr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||$i(o))&&(s=as(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sf(e,t){return!Vn(e)||Sn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=vn(e);if(!Vn(e))return n;let r=sf(e,t);for(;r&&ww(r)&&Sn(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Sn(r).position==="static"&&!Iu(r))?n:r||Ew(e)||n}const Dw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:Aw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Nw(e){return Sn(e).direction==="rtl"}const kw={convertOffsetParentRelativeRectToViewportRelativeRect:Sw,getDocumentElement:Jn,getClippingRect:Ow,getOffsetParent:zh,getElementRects:Dw,getClientRects:Cw,getDimensions:Pw,getScale:oo,isElement:Qn,isRTL:Nw};function Mw(e,t){let n=null,r;const o=Jn(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(s||t(),!f||!m)return;const p=Hi(d),b=Hi(o.clientWidth-(u+f)),y=Hi(o.clientHeight-(d+m)),T=Hi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let w=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function jw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ou(e),d=o||i?[...u?Ra(u):[],...Ra(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Mw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&T();function T(){const S=Mr(e);y&&(S.x!==y.x||S.y!==y.y||S.width!==y.width||S.height!==y.height)&&n(),y=S,b=requestAnimationFrame(T)}return n(),()=>{d.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const Lw=(e,t,n)=>{const r=new Map,o={platform:kw,...n},i={...o.platform,_c:r};return fw(e,t,{...o,platform:i})},Fw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tf({element:r.current,padding:o}).fn(n):{}:r?tf({element:r,padding:o}).fn(n):{}}}};var da=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Uh(e);return Math.round(t*n)/n}function uf(e){const t=Re.useRef(e);return da(()=>{t.current=e}),t}function Vw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=Re.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Re.useState(r);Oa(m,r)||p(r);const[b,y]=Re.useState(null),[T,S]=Re.useState(null),v=Re.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Re.useCallback(j=>{j!==P.current&&(P.current=j,S(j))},[S]),C=i||b,I=a||T,D=Re.useRef(null),P=Re.useRef(null),F=Re.useRef(d),k=uf(c),H=uf(o),R=Re.useCallback(()=>{if(!D.current||!P.current)return;const j={placement:t,strategy:n,middleware:m};H.current&&(j.platform=H.current),Lw(D.current,P.current,j).then(W=>{const U={...W,isPositioned:!0};E.current&&!Oa(F.current,U)&&(F.current=U,Wy.flushSync(()=>{f(U)}))})},[m,t,n,H]);da(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const E=Re.useRef(!1);da(()=>(E.current=!0,()=>{E.current=!1}),[]),da(()=>{if(C&&(D.current=C),I&&(P.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const h=Re.useMemo(()=>({reference:D,floating:P,setReference:v,setFloating:w}),[v,w]),$=Re.useMemo(()=>({reference:C,floating:I}),[C,I]),A=Re.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=cf($.floating,d.x),U=cf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+U+"px)",...Uh($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,s,$.floating,d.x,d.y]);return Re.useMemo(()=>({...d,update:R,refs:h,elements:$,floatingStyles:A}),[d,R,h,$,A])}const Bw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Hw=Bw;function ss(e){const[t,n]=l.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Yh="Popper",[Kh,cs]=mn(Yh),[Ww,qh]=Kh(Yh),zw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Ww,{scope:t,anchor:r,onAnchorChange:o},n)},Uw="PopperAnchor",Yw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qh(Uw,n),a=l.useRef(null),s=ct(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Kw,qw]=Kh(Xh),Xw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,P=qh(Xh,d),[F,k]=l.useState(null),H=ct(t,Ee=>k(Ee)),[R,E]=l.useState(null),h=ss(R),$=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,A=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=f+(p!=="center"?"-"+p:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},U=Array.isArray(T)?T:[T],J=U.length>0,B={padding:W,boundary:U.filter(Jw),altBoundary:J},{refs:L,floatingStyles:ne,placement:G,isPositioned:Y,middlewareData:Z}=Vw({strategy:"fixed",placement:j,whileElementsMounted:jw,elements:{reference:P.anchor},middleware:[mw({mainAxis:m+A,alignmentAxis:b}),C&&gw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?yw():void 0,...B}),C&&pw({...B}),bw({...B,apply:({elements:Ee,rects:_e,availableWidth:Ae,availableHeight:$e})=>{const{width:ke,height:De}=_e.reference,it=Ee.floating.style;it.setProperty("--radix-popper-available-width",`${Ae}px`),it.setProperty("--radix-popper-available-height",`${$e}px`),it.setProperty("--radix-popper-anchor-width",`${ke}px`),it.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Fw({element:R,padding:y}),e1({arrowWidth:$,arrowHeight:A}),w&&hw({strategy:"referenceHidden"})]}),[ce,z]=Gh(G),X=cn(I);Gt(()=>{Y&&(X==null||X())},[Y,X]);const ie=(o=Z.arrow)===null||o===void 0?void 0:o.x,ee=(i=Z.arrow)===null||i===void 0?void 0:i.y,oe=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,pe]=l.useState();return Gt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Y?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Kw,{scope:d,placedSide:ce,onArrowChange:E,arrowX:ie,arrowY:ee,shouldHideArrow:oe},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:H,style:{...D.style,animation:Y?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Gw="PopperArrow",Zw={top:"bottom",right:"left",bottom:"top",left:"right"},Qw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=qw(Gw,r),a=Zw[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(Hw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function Jw(e){return e!==null}const e1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[b,y]=Gh(s),T={start:"0%",center:"50%",end:"100%"}[y],S=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let w="",C="";return b==="bottom"?(w=f?T:`${S}px`,C=`${-p}px`):b==="top"?(w=f?T:`${S}px`,C=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,C=f?T:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,C=f?T:`${v}px`),{data:{x:w,y:C}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=zw,Qh=Yw,Jh=Xw,t1=Qw,ev=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?pn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),n1=ev;function us(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ls=l.forwardRef((e,t)=>l.createElement(Ue.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),r1=ls;var o1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Wi=new WeakMap,zi={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},i1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},a1=function(e,t,n,r){var o=i1(t,Array.isArray(e)?e:[e]);zi[n]||(zi[n]=new WeakMap);var i=zi[n],a=[],s=new Set,c=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(s.has(m))d(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,T=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,T),a.push(m),y===1&&b&&Wi.set(m,!0),T===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),Ys++,function(){a.forEach(function(f){var m=Ur.get(f)-1,p=i.get(f)-1;Ur.set(f,m),i.set(f,p),m||(Wi.has(f)||f.removeAttribute(r),Wi.delete(f)),p||f.removeAttribute(n)}),Ys--,Ys||(Ur=new WeakMap,Ur=new WeakMap,Wi=new WeakMap,zi={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||o1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),a1(r,o,n,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},En.apply(this,arguments)};function rv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fa="right-scroll-bar-position",pa="width-before-scroll-bar",c1="with-scroll-bars-hidden",u1="--removed-body-scroll-bar-size";function l1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function f1(e,t){return d1(t||null,function(n){return e.forEach(function(r){return l1(r,n)})})}function p1(e){return e}function h1(e,t){t===void 0&&(t=p1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function v1(e){e===void 0&&(e={});var t=h1(null);return t.options=En({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return Re.createElement(r,En({},n))};ov.isSideCarExport=!0;function m1(e,t){return e.useMedium(t),ov}var iv=v1(),Ks=function(){},ds=Re.forwardRef(function(e,t){var n=Re.useRef(null),r=Re.useState({onScrollCapture:Ks,onWheelCapture:Ks,onTouchMoveCapture:Ks}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,T=e.as,S=T===void 0?"div":T,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,C=f1([n,t]),I=En(En({},v),o);return Re.createElement(Re.Fragment,null,d&&Re.createElement(w,{sideCar:iv,removeScrollBar:u,shards:f,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Re.cloneElement(Re.Children.only(s),En(En({},I),{ref:C})):Re.createElement(S,En({},I,{className:c,ref:C}),s))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:pa,zeroRight:fa};var lf,g1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function y1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g1();return t&&e.setAttribute("nonce",t),e}function b1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function w1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=y1())&&(b1(t,n),w1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x1=function(){var e=E1();return function(t,n){Re.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=x1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},S1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qs(n),qs(r),qs(o)]},C1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _1;var t=S1(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$1=av(),T1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
53
+ Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+h(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function tn(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Wt(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var Ce=T(x);if(typeof Ce=="function"&&Ce!==x.entries)for(var Pe=Ce.call(x),xe;!(xe=Pe.next()).done;)Lt(xe.value)&&Wt(xe.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=h(V);it(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!gn){gn=!0;var Ce=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,Ce,Pe){{var xe=H(x);if(!xe){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(Ce);nt?we+=nt:we+=Dn();var Fe;x===null?Fe="null":xt(x)?Fe="array":x!==void 0&&x.$$typeof===t?(Fe="<"+(h(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var He=kt(x,V,Q,Ce,Pe);if(He==null)return He;if(xe){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)tn(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(Ge,x)}return x===r?Kt(He):Nn(He),He}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var zt=nr,rr=kn;Bi.Fragment=r,Bi.jsx=zt,Bi.jsxs=rr}()),Bi}process.env.NODE_ENV==="production"?Cc.exports=m0():Cc.exports=g0();var $t=Cc.exports;const y0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Ct.theme.colors[e.color]?Ct.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},Cn=y0,b0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},Eu=b0,w0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},si=w0,E0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},x0=E0,_0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},xu=_0,S0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},rs=S0,C0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},I0=T0,R0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm3.29 14.71-3.31-3.31-3.27 3.27-1.41-1.41 3.27-3.27-3.23-3.23 1.41-1.41 3.23 3.23 3.27-3.27 1.41 1.41-3.27 3.27 3.31 3.31-1.41 1.41Z",fill:t})})},O0=R0,P0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},A0=P0,D0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm1 15h-2v-6h2v6Zm-1-7.88c-.62 0-1.12-.5-1.12-1.12 0-.62.5-1.12 1.12-1.12.62 0 1.12.5 1.12 1.12 0 .62-.5 1.12-1.12 1.12Z",fill:t})})},N0=D0,k0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm-1.33 14.41-4.04-4.04 1.41-1.41 2.63 2.63 5.29-5.29 1.41 1.41-6.71 6.71.01-.01Z",fill:t})})},M0=k0,j0=e=>{const{color:t,...n}=Cn(e);return $t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:$t.jsx("path",{d:"m12 3.5-10 18h20l-10-18Zm0 15c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm-1-3v-5h2v5h-2Z",fill:t})})},L0=j0,F0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Pb,{className:"accordion-header",children:M.jsxs(Ab,{className:Oe(f0,t),...n,ref:r,children:[M.jsx(et,{className:p0,children:e}),M.jsx(si,{className:c0,size:24,color:Ct.theme.colors.black})]})}));var V0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},B0=ot({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",d=(()=>{switch(o){case"error":return O0;case"warning":return L0;case"success":return M0;default:return N0}})();return M.jsxs(c,{ref:s,className:Oe(B0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Ht,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:Ct.theme.space[24],children:M.jsx(d,{size:24,color:V0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Ar,{gap:"$8",children:[t&&M.jsx(Gt,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Ht,{pl:"$16",pt:"$4",children:M.jsx(rs,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Ct.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const H0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),_u=({children:e,...t})=>M.jsx(H0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var W0=ot({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{medium:"_15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",small:"_15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj49",false:"_1er7sj4a"},variant:{primary:"_1er7sj4b",secondary:"_1er7sj4c"}},defaultVariants:{colorScheme:"primary",size:"medium",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4d"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4h"]]});const Su=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const d=e||"span";return M.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Oe(W0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});Su.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};Su.displayName="Badge";function Yd(e,[t,n]){return Math.min(n,Math.max(t,e))}function z0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const $c="dismissableLayer.update",U0="dismissableLayer.pointerDownOutside",Y0="dismissableLayer.focusOutside";let Kd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,d=l.useContext(Ah),[f,m]=l.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=ct(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),w=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=q0(F=>{const k=F.target,H=[...d.branches].some(R=>R.contains(k));!I||H||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),P=X0(F=>{const k=F.target;[...d.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return z0(F=>{w===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),qd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Kd)}},[f,p,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),qd())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),K0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=ct(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function q0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(U0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(Y0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Dh(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Eh(o,i):o.dispatchEvent(i)}const G0=os,Z0=K0;let Ws=0;function Nh(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Xd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Xd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Xd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zs="focusScope.autoFocusOnMount",Us="focusScope.autoFocusOnUnmount",Gd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=cn(o),d=cn(i),f=l.useRef(null),m=ct(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(w){if(p.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(w){const C=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(C)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const v=new MutationObserver(S);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Qd.add(p);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Gd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(Q0(rw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Gd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Qd.remove(p)},0)}}},[s,u,d,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[w,C]=J0(v);w&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&S===w&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function Q0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function J0(e){const t=Mh(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zd(e,t){for(const n of e)if(!ew(n,{upTo:t}))return n}function ew(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tw(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tw(e)&&t&&e.select()}}const Qd=nw();function nw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jd(e,t),e.unshift(t)},remove(t){var n;e=Jd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rw(e){return e.filter(t=>t.tagName!=="A")}const ow=["top","right","bottom","left"],vr=Math.min,fn=Math.max,$a=Math.round,Hi=Math.floor,mr=e=>({x:e,y:e}),iw={left:"right",right:"left",bottom:"top",top:"bottom"},aw={start:"end",end:"start"};function Tc(e,t,n){return fn(e,vr(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function Zn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Tu(e){return Cu(yo(e))}function sw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=Tu(e),i=$u(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function cw(e){const t=Ta(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>aw[t])}function uw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function lw(e,t,n,r){const o=go(e);let i=uw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ta(e){return e.replace(/left|right|bottom|top/g,t=>iw[t])}function dw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jh(e){return typeof e!="number"?dw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ef(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=Tu(t),s=$u(a),c=Zn(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}const fw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=ef(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:w,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=w??f,p={...p,[T]:{...p[T],...C}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:f}=ef(u,m,c)),y=-1;continue}}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}};async function ci(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Gn(t,e),b=jh(p),T=s[m?f==="floating"?"reference":"floating":f],S=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(S.top-I.top+b.top)/C.y,bottom:(I.bottom-S.bottom+b.bottom)/C.y,left:(S.left-I.left+b.left)/C.x,right:(I.right-S.right+b.right)/C.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Gn(e,t)||{};if(c==null)return{};const d=jh(u),f={x:n,y:r},m=Tu(o),p=$u(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-f[m]-i.floating[p],C=f[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[p]);const P=w/2-C/2,F=D/2-b[p]/2-1,k=vr(d[T],F),H=vr(d[S],F),R=k,E=D-b[p]-H,h=D/2-b[p]/2+P,$=Tc(R,h,E),j=go(o)!=null&&h!=$&&i.reference[p]/2-(h<R?k:H)-b[p]/2<0?h<R?R-h:E-h:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:h-$+j}}}}),pw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Gn(e,t),T=Zn(r),S=Zn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=f||(S||!b?[Ta(a)]:cw(a));!f&&p!=="none"&&w.push(...lw(a,b,p,v));const C=[a,...w],I=await ci(t,y),D=[];let P=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=sw(r,i,v);D.push(I[R[0]],I[R[1]])}if(P=[...P,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,E=C[R];if(E)return{data:{index:R,overflows:P},reset:{placement:E}};let h=(k=P.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var H;const $=(H=P.map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:H[0];$&&(h=$);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return ow.some(t=>e[t]>=0)}const hw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=nf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rf(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=nf(i,n.floating);return{data:{escapedOffsets:a,escaped:rf(a)}}}default:return{}}}}};async function vw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Zn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const mw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await vw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},gw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:S,y:v}=T;return{x:S,y:v}}},...c}=Gn(e,t),u={x:n,y:r},d=await ci(t,c),f=yo(Zn(o)),m=Cu(f);let p=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=p+d[T],w=p-d[S];p=Tc(v,p,w)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],w=b-d[S];b=Tc(v,b,w)}const y=s.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},yw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Gn(e,t),d={x:n,y:r},f=yo(o),m=Cu(f);let p=d[m],b=d[f];const y=Gn(s,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+T.mainAxis,I=i.reference[m]+i.reference[w]-T.mainAxis;p<C?p=C:p>I&&(p=I)}if(u){var S,v;const w=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[w]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[w]+(C?0:((v=a.offset)==null?void 0:v[f])||0)-(C?T.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[f]:b}}}},bw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Gn(e,t),c=await ci(t,s),u=Zn(n),d=go(n),f=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=d==="end"?"top":"bottom");const T=p-c[b],S=m-c[y],v=!t.middlewareData.shift;let w=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=p-c.top-c.bottom;w=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),P=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||P!==0?D+P:fn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof vn(e).Node}function Qn(e){return e instanceof Element||e instanceof vn(e).Element}function Vn(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function of(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ww(e){return["table","td","th"].includes(gr(e))}function Iu(e){const t=Ru(),n=Sn(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 Ew(e){let t=fo(e);for(;Vn(t)&&!is(t);){if(Iu(t))return t;t=fo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function is(e){return["html","body","#document"].includes(gr(e))}function Sn(e){return vn(e).getComputedStyle(e)}function as(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||of(e)&&e.host||Jn(e);return of(t)?t.host:t}function Fh(e){const t=fo(e);return is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=Sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Qn(e)?e:e.contextElement}function oo(e){const t=Ou(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xw=mr(0);function Bh(e){const t=vn(e);return!Ru()||!t.visualViewport?xw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _w(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ou(e);let a=mr(1);t&&(r?Qn(r)&&(a=oo(r)):a=oo(e));const s=_w(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const m=vn(i),p=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),T=b.getBoundingClientRect(),S=Sn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,w=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=w,b=vn(b).frameElement}}return Ia({width:d,height:f,x:c,y:u})}function Sw(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Vn(n),i=Jn(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||$i(i))&&(a=as(n)),Vn(n))){const u=Mr(n);s=oo(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Cw(e){return Array.from(e.getClientRects())}function Hh(e){return Mr(Jn(e)).left+as(e).scrollLeft}function $w(e){const t=Jn(e),n=as(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return Sn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Tw(e,t){const n=vn(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Ru();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Iw(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?oo(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function af(e,t,n){let r;if(t==="viewport")r=Tw(e,n);else if(t==="document")r=$w(Jn(e));else if(Qn(t))r=Iw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Qn(n)||is(n)?!1:Sn(n).position==="fixed"||Wh(n,t)}function Rw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Sn(e).position==="fixed";let a=i?fo(e):e;for(;Qn(a)&&!is(a);){const s=Sn(a),c=Iu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Wh(e,a))?r=r.filter(d=>d!==a):o=s,a=fo(a)}return t.set(e,r),r}function Ow(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Rw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=af(t,d,o);return u.top=fn(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=fn(f.left,u.left),u},af(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pw(e){return Vh(e)}function Aw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=Mr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||$i(o))&&(s=as(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function sf(e,t){return!Vn(e)||Sn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=vn(e);if(!Vn(e))return n;let r=sf(e,t);for(;r&&ww(r)&&Sn(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Sn(r).position==="static"&&!Iu(r))?n:r||Ew(e)||n}const Dw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:Aw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Nw(e){return Sn(e).direction==="rtl"}const kw={convertOffsetParentRelativeRectToViewportRelativeRect:Sw,getDocumentElement:Jn,getClippingRect:Ow,getOffsetParent:zh,getElementRects:Dw,getClientRects:Cw,getDimensions:Pw,getScale:oo,isElement:Qn,isRTL:Nw};function Mw(e,t){let n=null,r;const o=Jn(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(s||t(),!f||!m)return;const p=Hi(d),b=Hi(o.clientWidth-(u+f)),y=Hi(o.clientHeight-(d+m)),T=Hi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let w=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function jw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ou(e),d=o||i?[...u?Ra(u):[],...Ra(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Mw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&T();function T(){const S=Mr(e);y&&(S.x!==y.x||S.y!==y.y||S.width!==y.width||S.height!==y.height)&&n(),y=S,b=requestAnimationFrame(T)}return n(),()=>{d.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const Lw=(e,t,n)=>{const r=new Map,o={platform:kw,...n},i={...o.platform,_c:r};return fw(e,t,{...o,platform:i})},Fw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tf({element:r.current,padding:o}).fn(n):{}:r?tf({element:r,padding:o}).fn(n):{}}}};var da=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Uh(e);return Math.round(t*n)/n}function uf(e){const t=Re.useRef(e);return da(()=>{t.current=e}),t}function Vw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=Re.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Re.useState(r);Oa(m,r)||p(r);const[b,y]=Re.useState(null),[T,S]=Re.useState(null),v=Re.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Re.useCallback(j=>{j!==P.current&&(P.current=j,S(j))},[S]),C=i||b,I=a||T,D=Re.useRef(null),P=Re.useRef(null),F=Re.useRef(d),k=uf(c),H=uf(o),R=Re.useCallback(()=>{if(!D.current||!P.current)return;const j={placement:t,strategy:n,middleware:m};H.current&&(j.platform=H.current),Lw(D.current,P.current,j).then(W=>{const U={...W,isPositioned:!0};E.current&&!Oa(F.current,U)&&(F.current=U,Wy.flushSync(()=>{f(U)}))})},[m,t,n,H]);da(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const E=Re.useRef(!1);da(()=>(E.current=!0,()=>{E.current=!1}),[]),da(()=>{if(C&&(D.current=C),I&&(P.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const h=Re.useMemo(()=>({reference:D,floating:P,setReference:v,setFloating:w}),[v,w]),$=Re.useMemo(()=>({reference:C,floating:I}),[C,I]),A=Re.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=cf($.floating,d.x),U=cf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+U+"px)",...Uh($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:U}},[n,s,$.floating,d.x,d.y]);return Re.useMemo(()=>({...d,update:R,refs:h,elements:$,floatingStyles:A}),[d,R,h,$,A])}const Bw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Hw=Bw;function ss(e){const[t,n]=l.useState(void 0);return Zt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Yh="Popper",[Kh,cs]=mn(Yh),[Ww,qh]=Kh(Yh),zw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Ww,{scope:t,anchor:r,onAnchorChange:o},n)},Uw="PopperAnchor",Yw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qh(Uw,n),a=l.useRef(null),s=ct(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Kw,qw]=Kh(Xh),Xw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,P=qh(Xh,d),[F,k]=l.useState(null),H=ct(t,Ee=>k(Ee)),[R,E]=l.useState(null),h=ss(R),$=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,A=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=f+(p!=="center"?"-"+p:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},U=Array.isArray(T)?T:[T],J=U.length>0,B={padding:W,boundary:U.filter(Jw),altBoundary:J},{refs:L,floatingStyles:ne,placement:G,isPositioned:Y,middlewareData:Z}=Vw({strategy:"fixed",placement:j,whileElementsMounted:jw,elements:{reference:P.anchor},middleware:[mw({mainAxis:m+A,alignmentAxis:b}),C&&gw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?yw():void 0,...B}),C&&pw({...B}),bw({...B,apply:({elements:Ee,rects:_e,availableWidth:Ae,availableHeight:$e})=>{const{width:ke,height:De}=_e.reference,it=Ee.floating.style;it.setProperty("--radix-popper-available-width",`${Ae}px`),it.setProperty("--radix-popper-available-height",`${$e}px`),it.setProperty("--radix-popper-anchor-width",`${ke}px`),it.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Fw({element:R,padding:y}),e1({arrowWidth:$,arrowHeight:A}),w&&hw({strategy:"referenceHidden"})]}),[ce,z]=Gh(G),X=cn(I);Zt(()=>{Y&&(X==null||X())},[Y,X]);const ie=(o=Z.arrow)===null||o===void 0?void 0:o.x,ee=(i=Z.arrow)===null||i===void 0?void 0:i.y,oe=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,pe]=l.useState();return Zt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Y?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Kw,{scope:d,placedSide:ce,onArrowChange:E,arrowX:ie,arrowY:ee,shouldHideArrow:oe},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:H,style:{...D.style,animation:Y?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Gw="PopperArrow",Zw={top:"bottom",right:"left",bottom:"top",left:"right"},Qw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=qw(Gw,r),a=Zw[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(Hw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function Jw(e){return e!==null}const e1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[b,y]=Gh(s),T={start:"0%",center:"50%",end:"100%"}[y],S=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+p/2;let w="",C="";return b==="bottom"?(w=f?T:`${S}px`,C=`${-p}px`):b==="top"?(w=f?T:`${S}px`,C=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,C=f?T:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,C=f?T:`${v}px`),{data:{x:w,y:C}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=zw,Qh=Yw,Jh=Xw,t1=Qw,ev=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?pn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),n1=ev;function us(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ls=l.forwardRef((e,t)=>l.createElement(Ue.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),r1=ls;var o1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Wi=new WeakMap,zi={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},i1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},a1=function(e,t,n,r){var o=i1(t,Array.isArray(e)?e:[e]);zi[n]||(zi[n]=new WeakMap);var i=zi[n],a=[],s=new Set,c=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(s.has(m))d(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,T=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,T),a.push(m),y===1&&b&&Wi.set(m,!0),T===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),Ys++,function(){a.forEach(function(f){var m=Ur.get(f)-1,p=i.get(f)-1;Ur.set(f,m),i.set(f,p),m||(Wi.has(f)||f.removeAttribute(r),Wi.delete(f)),p||f.removeAttribute(n)}),Ys--,Ys||(Ur=new WeakMap,Ur=new WeakMap,Wi=new WeakMap,zi={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||o1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),a1(r,o,n,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},En.apply(this,arguments)};function rv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fa="right-scroll-bar-position",pa="width-before-scroll-bar",c1="with-scroll-bars-hidden",u1="--removed-body-scroll-bar-size";function l1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function f1(e,t){return d1(t||null,function(n){return e.forEach(function(r){return l1(r,n)})})}function p1(e){return e}function h1(e,t){t===void 0&&(t=p1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function v1(e){e===void 0&&(e={});var t=h1(null);return t.options=En({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return Re.createElement(r,En({},n))};ov.isSideCarExport=!0;function m1(e,t){return e.useMedium(t),ov}var iv=v1(),Ks=function(){},ds=Re.forwardRef(function(e,t){var n=Re.useRef(null),r=Re.useState({onScrollCapture:Ks,onWheelCapture:Ks,onTouchMoveCapture:Ks}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,T=e.as,S=T===void 0?"div":T,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,C=f1([n,t]),I=En(En({},v),o);return Re.createElement(Re.Fragment,null,d&&Re.createElement(w,{sideCar:iv,removeScrollBar:u,shards:f,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Re.cloneElement(Re.Children.only(s),En(En({},I),{ref:C})):Re.createElement(S,En({},I,{className:c,ref:C}),s))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:pa,zeroRight:fa};var lf,g1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function y1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g1();return t&&e.setAttribute("nonce",t),e}function b1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function w1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=y1())&&(b1(t,n),w1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x1=function(){var e=E1();return function(t,n){Re.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=x1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},S1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qs(n),qs(r),qs(o)]},C1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _1;var t=S1(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$1=av(),T1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
54
54
  .`.concat(c1,` {
55
55
  overflow: hidden `).concat(r,`;
56
56
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -90,7 +90,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Wt(x,V){{if(
90
90
  `)},I1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=Re.useMemo(function(){return C1(o)},[o]);return Re.createElement($1,{styles:T1(i,!t,o,n?"":"!important")})},Rc=!1;if(typeof window<"u")try{var Ui=Object.defineProperty({},"passive",{get:function(){return Rc=!0,!0}});window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Rc=!1}var Yr=Rc?{passive:!1}:!1,R1=function(e){return e.tagName==="TEXTAREA"},sv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!R1(e)&&n[t]==="visible")},O1=function(e){return sv(e,"overflowY")},P1=function(e){return sv(e,"overflowX")},df=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=cv(e,n);if(r){var o=uv(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},A1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},D1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cv=function(e,t){return e==="v"?O1(t):P1(t)},uv=function(e,t){return e==="v"?A1(t):D1(t)},N1=function(e,t){return e==="h"&&t==="rtl"?-1:1},k1=function(e,t,n,r,o){var i=N1(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,d=a>0,f=0,m=0;do{var p=uv(e,s),b=p[0],y=p[1],T=p[2],S=y-T-i*b;(b||S)&&cv(e,s)&&(f+=S,m+=b),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&(o&&f===0||!o&&a>f)||!d&&(o&&m===0||!o&&-a>m))&&(u=!0),u},Yi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ff=function(e){return[e.deltaX,e.deltaY]},pf=function(e){return e&&"current"in e?e.current:e},M1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j1=function(e){return`
91
91
  .block-interactivity-`.concat(e,` {pointer-events: none;}
92
92
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
93
- `)},L1=0,Kr=[];function F1(e){var t=Re.useRef([]),n=Re.useRef([0,0]),r=Re.useRef(),o=Re.useState(L1++)[0],i=Re.useState(function(){return av()})[0],a=Re.useRef(e);Re.useEffect(function(){a.current=e},[e]),Re.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=s1([e.lockRef.current],(e.shards||[]).map(pf),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Re.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Yi(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in y&&P==="h"&&D.type==="range")return!1;var F=df(P,D);if(!F)return!0;if(F?I=P:(I=P==="v"?"h":"v",F=df(P,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||C)&&(r.current=I),!I)return!0;var k=r.current||I;return k1(k,T,y,k==="h"?w:C,!0)},[]),c=Re.useCallback(function(y){var T=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var S="deltaY"in T?ff(T):Yi(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&M1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(pf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=w.length>0?s(T,w[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=Re.useCallback(function(y,T,S,v){var w={name:y,delta:T,target:S,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=Re.useCallback(function(y){n.current=Yi(y),r.current=void 0},[]),f=Re.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=Re.useCallback(function(y){u(y.type,Yi(y),y.target,s(y,e.lockRef.current))},[]);Re.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",d,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",d,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Re.createElement(Re.Fragment,null,b?Re.createElement(i,{styles:j1(o)}):null,p?Re.createElement(I1,{gapMode:"margin"}):null)}const V1=m1(iv,F1);var lv=Re.forwardRef(function(e,t){return Re.createElement(ds,En({},e,{ref:t,sideCar:V1}))});lv.classNames=ds.classNames;const dv=lv,B1=[" ","Enter","ArrowUp","ArrowDown"],H1=[" ","Enter"],fs="Select",[ps,hs,W1]=Qa(fs),[bo,IP]=mn(fs,[W1,cs]),Pu=cs(),[z1,Br]=bo(fs),[U1,Y1]=bo(fs),K1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:p}=e,b=Pu(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[w,C]=l.useState(!1),I=Ja(u),[D=!1,P]=_n({prop:r,defaultProp:o,onChange:i}),[F,k]=_n({prop:a,defaultProp:s,onChange:c}),H=l.useRef(null),R=y?!!y.closest("form"):!0,[E,h]=l.useState(new Set),$=Array.from(E).map(A=>A.props.value).join(";");return l.createElement(Zh,b,l.createElement(z1,{required:p,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:P,dir:I,triggerPointerDownPosRef:H,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(U1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(A=>{h(j=>new Set(j).add(A))},[]),onNativeOptionRemove:l.useCallback(A=>{h(j=>{const W=new Set(j);return W.delete(A),W})},[])},n)),R?l.createElement(hv,{key:$,"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:A=>k(A.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},q1="SelectTrigger",X1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Br(q1,n),s=a.disabled||r,c=ct(t,a.onTriggerChange),u=hs(n),[d,f,m]=vv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=mv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&B1.includes(b.key)&&(p(),b.preventDefault())})})))}),G1="SelectValue",Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(G1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=ct(t,c.onValueNodeChange);return Gt(()=>{u(d)},[u,d]),l.createElement(Ue.span,ae({},s,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),Q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",J1=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?pn.createPortal(l.createElement(fv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(eE,ae({},e,{ref:t}))}),Yn=10,[fv,Hr]=bo(po),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Br(po,n),[w,C]=l.useState(null),[I,D]=l.useState(null),P=ct(t,z=>C(z)),[F,k]=l.useState(null),[H,R]=l.useState(null),E=hs(n),[h,$]=l.useState(!1),A=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[X,...ie]=E().map(re=>re.ref.current),[ee]=ie.slice(-1),oe=document.activeElement;for(const re of z)if(re===oe||(re==null||re.scrollIntoView({block:"nearest"}),re===X&&I&&(I.scrollTop=0),re===ee&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==oe))return},[E,I]),W=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&W()},[h,W]);const{onOpenChange:U,triggerPointerDownPosRef:J}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const X=ee=>{var oe,re,pe,Ee;z={x:Math.abs(Math.round(ee.pageX)-((oe=(re=J.current)===null||re===void 0?void 0:re.x)!==null&&oe!==void 0?oe:0)),y:Math.abs(Math.round(ee.pageY)-((pe=(Ee=J.current)===null||Ee===void 0?void 0:Ee.y)!==null&&pe!==void 0?pe:0))}},ie=ee=>{z.x<=10&&z.y<=10?ee.preventDefault():w.contains(ee.target)||U(!1),document.removeEventListener("pointermove",X),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ie,{capture:!0})}}},[w,U,J]),l.useEffect(()=>{const z=()=>U(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[U]);const[B,L]=vv(z=>{const X=E().filter(oe=>!oe.disabled),ie=X.find(oe=>oe.ref.current===document.activeElement),ee=mv(X,z,ie);ee&&setTimeout(()=>ee.ref.current.focus())}),ne=l.useCallback((z,X,ie)=>{const ee=!A.current&&!ie;(v.value!==void 0&&v.value===X||ee)&&(k(z),ee&&(A.current=!0))},[v.value]),G=l.useCallback(()=>w==null?void 0:w.focus(),[w]),Y=l.useCallback((z,X,ie)=>{const ee=!A.current&&!ie;(v.value!==void 0&&v.value===X||ee)&&R(z)},[v.value]),Z=r==="popper"?hf:tE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:ne,selectedItem:F,onItemLeave:G,itemTextRefCallback:Y,focusSelectedItem:W,selectedItemText:H,position:r,isPositioned:h,searchRef:B},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var X;(X=v.trigger)===null||X===void 0||X.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ne(S.onKeyDown,z=>{const X=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!X&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ee=E().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const oe=z.target,re=ee.indexOf(oe);ee=ee.slice(re+1)}setTimeout(()=>j(ee)),z.preventDefault()}})}))))))}),tE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=ct(t,P=>d(P)),m=hs(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const P=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(i.dir!=="rtl"){const oe=H.left-F.left,re=k.left-oe,pe=P.left-re,Ee=P.width+pe,_e=Math.max(Ee,F.width),Ae=window.innerWidth-Yn,$e=Yd(re,[Yn,Ae-_e]);s.style.minWidth=Ee+"px",s.style.left=$e+"px"}else{const oe=F.right-H.right,re=window.innerWidth-k.right-oe,pe=window.innerWidth-P.right-re,Ee=P.width+pe,_e=Math.max(Ee,F.width),Ae=window.innerWidth-Yn,$e=Yd(re,[Yn,Ae-_e]);s.style.minWidth=Ee+"px",s.style.right=$e+"px"}const R=m(),E=window.innerHeight-Yn*2,h=y.scrollHeight,$=window.getComputedStyle(u),A=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),J=A+j+h+U+W,B=Math.min(T.offsetHeight*5,J),L=window.getComputedStyle(y),ne=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),Y=P.top+P.height/2-Yn,Z=E-Y,ce=T.offsetHeight/2,z=T.offsetTop+ce,X=A+j+z,ie=J-X;if(X<=Y){const oe=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(oe?G:0)+re+W),Ee=X+pe;s.style.height=Ee+"px"}else{const oe=T===R[0].ref.current;s.style.top="0px";const pe=Math.max(Y,A+y.offsetTop+(oe?ne:0)+ce)+ie;s.style.height=pe+"px",y.scrollTop=X-Y+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>w(),[w]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(P=>{P&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(nE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},l.createElement(Ue.div,ae({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Pu(n);return l.createElement(Jh,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[nE,Au]=bo(po,{}),vf="SelectViewport",rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(vf,n),i=Au(vf,n),a=ct(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(ps.Slot,{scope:n},l.createElement(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<p){const S=T+m,v=Math.min(p,S),w=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),oE="SelectGroup";bo(oE);const Oc="SelectItem",[iE,aE]=bo(Oc),sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Oc,n),c=Hr(Oc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,p]=l.useState(!1),b=ct(t,S=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,S,r,o)}),y=Xn(),T=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(iE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var w;return v||((w=S==null?void 0:S.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},l.createElement(Ue.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,T),onPointerMove:Ne(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(H1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),Ki="SelectItemText",cE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Ki,n),s=Hr(Ki,n),c=aE(Ki,n),u=Y1(Ki,n),[d,f]=l.useState(null),m=ct(t,S=>f(S),c.onItemTextChange,S=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,S,c.value,c.disabled)}),p=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:T}=u;return Gt(()=>(y(b),()=>T(b)),[y,T,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?pn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",uE=l.forwardRef((e,t)=>{const n=Hr(mf,e.__scopeSelect),r=Au(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=ct(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",lE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=ct(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,d=Math.ceil(s.scrollTop)<u;i(d)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=hs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const d=s().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=ct(t,o),a=us(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),l.createElement(ls,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=cn(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function mv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=dE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const fE=K1,pE=X1,hE=Z1,vE=Q1,mE=J1,gE=rE,yE=sE,bE=cE,wE=uE,EE=lE;var xE=ot({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var _E=ot({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var SE=ot({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),CE="_1kg30950";var $E="ldkv8w2",TE="ldkv8w1",IE="ldkv8w0",RE="ldkv8w3";var OE="yihd6a0",PE=ot({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a7 yihd6a1",error:"yihd6a8 yihd6a2",valid:"yihd6a9 yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),AE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Oe(xE({state:e,place:t})),children:M.jsx(nn,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:d,className:f,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,w=!!r,C=!!i,I=!!a,D=!!s,P=Du({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>P==="disabled"?"$blackTypoMedium":P==="error"?"$redAccent1":P==="valid"?"$greenAccent1":"$blackTypoMedium",[P]),k=()=>c&&D?M.jsx(nn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(nn,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Oe(CE),onClick:p,children:[M.jsx("div",{className:Oe(SE({state:P}),f),children:M.jsxs(Ht,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:P,place:"left",children:o}),C&&i,M.jsx("div",{className:Oe(OE,m),children:e}),I&&a,w&&M.jsx(Pc,{formState:P,place:"right",children:r})]})}),(S||D)&&M.jsxs(Ht,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(nn,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function sn(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ac(e,t)}function Nu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},qi={exports:{}},pt={};/** @license React v16.13.1
93
+ `)},L1=0,Kr=[];function F1(e){var t=Re.useRef([]),n=Re.useRef([0,0]),r=Re.useRef(),o=Re.useState(L1++)[0],i=Re.useState(function(){return av()})[0],a=Re.useRef(e);Re.useEffect(function(){a.current=e},[e]),Re.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=s1([e.lockRef.current],(e.shards||[]).map(pf),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Re.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Yi(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in y&&P==="h"&&D.type==="range")return!1;var F=df(P,D);if(!F)return!0;if(F?I=P:(I=P==="v"?"h":"v",F=df(P,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||C)&&(r.current=I),!I)return!0;var k=r.current||I;return k1(k,T,y,k==="h"?w:C,!0)},[]),c=Re.useCallback(function(y){var T=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var S="deltaY"in T?ff(T):Yi(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&M1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(pf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=w.length>0?s(T,w[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=Re.useCallback(function(y,T,S,v){var w={name:y,delta:T,target:S,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=Re.useCallback(function(y){n.current=Yi(y),r.current=void 0},[]),f=Re.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=Re.useCallback(function(y){u(y.type,Yi(y),y.target,s(y,e.lockRef.current))},[]);Re.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",d,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",d,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Re.createElement(Re.Fragment,null,b?Re.createElement(i,{styles:j1(o)}):null,p?Re.createElement(I1,{gapMode:"margin"}):null)}const V1=m1(iv,F1);var lv=Re.forwardRef(function(e,t){return Re.createElement(ds,En({},e,{ref:t,sideCar:V1}))});lv.classNames=ds.classNames;const dv=lv,B1=[" ","Enter","ArrowUp","ArrowDown"],H1=[" ","Enter"],fs="Select",[ps,hs,W1]=Qa(fs),[bo,IP]=mn(fs,[W1,cs]),Pu=cs(),[z1,Br]=bo(fs),[U1,Y1]=bo(fs),K1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:p}=e,b=Pu(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[w,C]=l.useState(!1),I=Ja(u),[D=!1,P]=_n({prop:r,defaultProp:o,onChange:i}),[F,k]=_n({prop:a,defaultProp:s,onChange:c}),H=l.useRef(null),R=y?!!y.closest("form"):!0,[E,h]=l.useState(new Set),$=Array.from(E).map(A=>A.props.value).join(";");return l.createElement(Zh,b,l.createElement(z1,{required:p,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:P,dir:I,triggerPointerDownPosRef:H,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(U1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(A=>{h(j=>new Set(j).add(A))},[]),onNativeOptionRemove:l.useCallback(A=>{h(j=>{const W=new Set(j);return W.delete(A),W})},[])},n)),R?l.createElement(hv,{key:$,"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:A=>k(A.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},q1="SelectTrigger",X1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Br(q1,n),s=a.disabled||r,c=ct(t,a.onTriggerChange),u=hs(n),[d,f,m]=vv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=mv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&B1.includes(b.key)&&(p(),b.preventDefault())})})))}),G1="SelectValue",Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(G1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=ct(t,c.onValueNodeChange);return Zt(()=>{u(d)},[u,d]),l.createElement(Ue.span,ae({},s,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),Q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",J1=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Zt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?pn.createPortal(l.createElement(fv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(eE,ae({},e,{ref:t}))}),Yn=10,[fv,Hr]=bo(po),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Br(po,n),[w,C]=l.useState(null),[I,D]=l.useState(null),P=ct(t,z=>C(z)),[F,k]=l.useState(null),[H,R]=l.useState(null),E=hs(n),[h,$]=l.useState(!1),A=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[X,...ie]=E().map(re=>re.ref.current),[ee]=ie.slice(-1),oe=document.activeElement;for(const re of z)if(re===oe||(re==null||re.scrollIntoView({block:"nearest"}),re===X&&I&&(I.scrollTop=0),re===ee&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==oe))return},[E,I]),W=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&W()},[h,W]);const{onOpenChange:U,triggerPointerDownPosRef:J}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const X=ee=>{var oe,re,pe,Ee;z={x:Math.abs(Math.round(ee.pageX)-((oe=(re=J.current)===null||re===void 0?void 0:re.x)!==null&&oe!==void 0?oe:0)),y:Math.abs(Math.round(ee.pageY)-((pe=(Ee=J.current)===null||Ee===void 0?void 0:Ee.y)!==null&&pe!==void 0?pe:0))}},ie=ee=>{z.x<=10&&z.y<=10?ee.preventDefault():w.contains(ee.target)||U(!1),document.removeEventListener("pointermove",X),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ie,{capture:!0})}}},[w,U,J]),l.useEffect(()=>{const z=()=>U(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[U]);const[B,L]=vv(z=>{const X=E().filter(oe=>!oe.disabled),ie=X.find(oe=>oe.ref.current===document.activeElement),ee=mv(X,z,ie);ee&&setTimeout(()=>ee.ref.current.focus())}),ne=l.useCallback((z,X,ie)=>{const ee=!A.current&&!ie;(v.value!==void 0&&v.value===X||ee)&&(k(z),ee&&(A.current=!0))},[v.value]),G=l.useCallback(()=>w==null?void 0:w.focus(),[w]),Y=l.useCallback((z,X,ie)=>{const ee=!A.current&&!ie;(v.value!==void 0&&v.value===X||ee)&&R(z)},[v.value]),Z=r==="popper"?hf:tE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:ne,selectedItem:F,onItemLeave:G,itemTextRefCallback:Y,focusSelectedItem:W,selectedItemText:H,position:r,isPositioned:h,searchRef:B},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var X;(X=v.trigger)===null||X===void 0||X.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ne(S.onKeyDown,z=>{const X=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!X&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ee=E().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const oe=z.target,re=ee.indexOf(oe);ee=ee.slice(re+1)}setTimeout(()=>j(ee)),z.preventDefault()}})}))))))}),tE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=ct(t,P=>d(P)),m=hs(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const P=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(i.dir!=="rtl"){const oe=H.left-F.left,re=k.left-oe,pe=P.left-re,Ee=P.width+pe,_e=Math.max(Ee,F.width),Ae=window.innerWidth-Yn,$e=Yd(re,[Yn,Ae-_e]);s.style.minWidth=Ee+"px",s.style.left=$e+"px"}else{const oe=F.right-H.right,re=window.innerWidth-k.right-oe,pe=window.innerWidth-P.right-re,Ee=P.width+pe,_e=Math.max(Ee,F.width),Ae=window.innerWidth-Yn,$e=Yd(re,[Yn,Ae-_e]);s.style.minWidth=Ee+"px",s.style.right=$e+"px"}const R=m(),E=window.innerHeight-Yn*2,h=y.scrollHeight,$=window.getComputedStyle(u),A=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),J=A+j+h+U+W,B=Math.min(T.offsetHeight*5,J),L=window.getComputedStyle(y),ne=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),Y=P.top+P.height/2-Yn,Z=E-Y,ce=T.offsetHeight/2,z=T.offsetTop+ce,X=A+j+z,ie=J-X;if(X<=Y){const oe=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(oe?G:0)+re+W),Ee=X+pe;s.style.height=Ee+"px"}else{const oe=T===R[0].ref.current;s.style.top="0px";const pe=Math.max(Y,A+y.offsetTop+(oe?ne:0)+ce)+ie;s.style.height=pe+"px",y.scrollTop=X-Y+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Zt(()=>w(),[w]);const[C,I]=l.useState();Zt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(P=>{P&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(nE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},l.createElement(Ue.div,ae({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Pu(n);return l.createElement(Jh,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[nE,Au]=bo(po,{}),vf="SelectViewport",rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(vf,n),i=Au(vf,n),a=ct(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(ps.Slot,{scope:n},l.createElement(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<p){const S=T+m,v=Math.min(p,S),w=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),oE="SelectGroup";bo(oE);const Oc="SelectItem",[iE,aE]=bo(Oc),sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Oc,n),c=Hr(Oc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,p]=l.useState(!1),b=ct(t,S=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,S,r,o)}),y=Xn(),T=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(iE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var w;return v||((w=S==null?void 0:S.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},l.createElement(Ue.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,T),onPointerMove:Ne(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(H1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),Ki="SelectItemText",cE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Ki,n),s=Hr(Ki,n),c=aE(Ki,n),u=Y1(Ki,n),[d,f]=l.useState(null),m=ct(t,S=>f(S),c.onItemTextChange,S=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,S,c.value,c.disabled)}),p=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:T}=u;return Zt(()=>(y(b),()=>T(b)),[y,T,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?pn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",uE=l.forwardRef((e,t)=>{const n=Hr(mf,e.__scopeSelect),r=Au(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=ct(t,r.onScrollButtonChange);return Zt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",lE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=ct(t,r.onScrollButtonChange);return Zt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,d=Math.ceil(s.scrollTop)<u;i(d)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=hs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Zt(()=>{var u;const d=s().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=ct(t,o),a=us(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),l.createElement(ls,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=cn(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function mv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=dE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const fE=K1,pE=X1,hE=Z1,vE=Q1,mE=J1,gE=rE,yE=sE,bE=cE,wE=uE,EE=lE;var xE=ot({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var _E=ot({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var SE=ot({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),CE="_1kg30950";var $E="ldkv8w2",TE="ldkv8w1",IE="ldkv8w0",RE="ldkv8w3";var OE="yihd6a0",PE=ot({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a7 yihd6a1",error:"yihd6a8 yihd6a2",valid:"yihd6a9 yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),AE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Oe(xE({state:e,place:t})),children:M.jsx(Gt,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:d,className:f,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,w=!!r,C=!!i,I=!!a,D=!!s,P=Du({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>P==="disabled"?"$blackTypoMedium":P==="error"?"$redAccent1":P==="valid"?"$greenAccent1":"$blackTypoMedium",[P]),k=()=>c&&D?M.jsx(Gt,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(Gt,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Oe(CE),onClick:p,children:[M.jsx("div",{className:Oe(SE({state:P}),f),children:M.jsxs(Ht,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:P,place:"left",children:o}),C&&i,M.jsx("div",{className:Oe(OE,m),children:e}),I&&a,w&&M.jsx(Pc,{formState:P,place:"right",children:r})]})}),(S||D)&&M.jsxs(Ht,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(Gt,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function sn(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ac(e,t)}function Nu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},qi={exports:{}},pt={};/** @license React v16.13.1
94
94
  * react-is.production.min.js
95
95
  *
96
96
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -136,14 +136,14 @@ Event: `).concat(JSON.stringify(m.data))),r.state;if(r.status!==Vt.Running&&!r.o
136
136
  Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var p=r._nextState(m);r.update(p,m)}),r._state},this.sendTo=function(d,f,m){var p=r.parent&&(f===ho.Parent||r.parent.id===f),b=p?r.parent:st(f)?f===ho.Internal?r:r.children.get(f)||Ro.get(f):gx(f)?f:void 0;if(!b){if(!p)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(r.id,"'."));jt||Yt(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in b){if(r.status!==Vt.Stopped||r.parent!==b||r.state.done){var y=be(be({},d),{name:d.name===ix?"".concat(Fo(r.id)):d.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,y]):b.send(y)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,d.data]):b.send(d.data)},this._exec=function(d,f,m,p){p===void 0&&(p=r.machine.options.actions);var b=d.exec||Vc(d.type,p),y=dt(b)?b:b?b.exec:d.exec;if(y)try{return y(f,m.data,r.machine.config.predictableActionArguments?{action:d,_event:m}:{action:d,state:r.state,_event:m})}catch($){throw r.parent&&r.parent.send({type:"xstate.error",data:$}),$}switch(d.type){case Ti:{var T=d;r.defer(T);break}case ms:var S=d;if(typeof S.delay=="number"){r.defer(S);return}else S.to?r.sendTo(S._event,S.to,m===io):r.send(S._event);break;case Sv:r.cancel(d.sendId);break;case kc:{if(r.status!==Vt.Running)return;var v=d.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[v.id||v.type])break;if(v.type===wt.Invoke){var w=Dv(v.src),C=r.machine.options.services?r.machine.options.services[w.type]:void 0,I=v.id,D=v.data;jt||Yt(!("forward"in v),"`forward` property is deprecated (found in invocation of '".concat(v.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var P="autoForward"in v?v.autoForward:!!v.forward;if(!C){jt||Yt(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(r.machine.id,"'."));return}var F=D?Aa(D,f,m):void 0;if(typeof C=="string")return;var k=dt(C)?C(f,m.data,{data:F,src:w,meta:v.meta}):C;if(!k)return;var H=void 0;jr(k)&&(k=F?k.withContext(F):k,H={autoForward:P}),r.spawn(k,I,H)}else r.spawnActivity(v);break}case Fu:{r.stopChild(d.activity.id);break}case Cv:var R=d,E=R.label,h=R.value;E?r.logger(E,h):r.logger(h);break;default:jt||Yt(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var o=be(be({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,c=o.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new jf({deferEvents:this.options.deferEvents}),this.sessionId=Ro.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:no(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return jt||Yt(this.status!==Vt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var i=Ze(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,i,a,s,c,u,d,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===io)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){f.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var p=Ze(this.eventListeners),b=p.next();!b.done;b=p.next()){var y=b.value;y(t.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}try{for(var T=Ze(this.listeners),S=T.next();!S.done;S=T.next()){var y=S.value;y(t,t.event)}}catch(k){i={error:k}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.contextListeners),w=v.next();!w.done;w=v.next()){var C=w.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(this.state.done){var I=t.configuration.find(function(k){return k.type==="final"&&k.parent===f.machine}),D=I&&I.doneData?Aa(I.doneData,t.context,n):void 0;this._doneEvent=ma(this.id,D);try{for(var P=Ze(this.doneListeners),F=P.next();!F.done;F=P.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(d=P.return)&&d.call(P)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),Ro.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Vt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,i=va(t,n,r);this.listeners.add(i.next),this.status!==Vt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===Vt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Vt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===Vt.Running)return this;this.machine._init(),Ro.register(this.sessionId,this),this.initialized=!0,this.status=Vt.Running;var r=t===void 0?this.initialState:no(this,function(){return Fx(t)?n.machine.resolveState(t):n.machine.resolveState(bn.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,io)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){dt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,i,a,s,c,u,d;try{for(var f=Ze(this.listeners),m=f.next();!m.done;m=f.next()){var p=m.value;this.listeners.delete(p)}}catch(P){t={error:P}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var b=Ze(this.stopListeners),y=b.next();!y.done;y=b.next()){var p=y.value;p(),this.stopListeners.delete(p)}}catch(P){r={error:P}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}try{for(var T=Ze(this.contextListeners),S=T.next();!S.done;S=T.next()){var p=S.value;this.contextListeners.delete(p)}}catch(P){i={error:P}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.doneListeners),w=v.next();!w.done;w=v.next()){var p=w.value;this.doneListeners.delete(p)}}catch(P){s={error:P}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Vt.Stopped,this._initialState=void 0;try{for(var C=Ze(Object.keys(this.delayedEventsMap)),I=C.next();!I.done;I=C.next()){var D=I.value;this.clock.clearTimeout(this.delayedEventsMap[D])}}catch(P){u={error:P}}finally{try{I&&!I.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new jf({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=Ut({type:"xstate.stop"}),o=no(t,function(){var i=It(_t([],at(t.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return cr(d.onExit,t.machine.options.actions)})),a=at(Da(t.machine,t.state,t.state.context,r,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new bn({value:t.state.value,context:c,_event:r,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(d){return!Fc(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,r),t._stopChildren(),Ro.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===Vt.NotStarted&&this.options.deferEvents)jt||Yt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
137
137
  Event: `).concat(JSON.stringify(event)));else if(this.status!==Vt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=n.state,s=!1,c=[],u=function(p){var b=Ut(p);n.forward(b),a=no(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,_t([],at(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Vx(y,a)})),!1)),s=s||!!a.changed};try{for(var d=Ze(t),f=d.next();!f.done;f=d.next()){var m=f.value;u(m)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,Ut(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=Ut(t);if(o.name.indexOf(Of)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Of)===0}))throw o.data.data;var i=no(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=Ze(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),dt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return kv(t,n);if(Df(t))return this.spawnPromise(Promise.resolve(t),n);if(dt(t))return this.spawnCallback(t,n);if(Nx(t))return this.spawnActor(t,n);if(mx(t))return this.spawnObservable(t,n);if(jr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(px(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,be(be({},this.options),{parent:this,id:n.id||t.id})),i=be(be({},Yx),n);i.sync&&o.onTransition(function(s){r.send($v,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(Ut(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Ux(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,i=!1,a;t.then(function(c){i||(a=c,o.removeChild(n),o.send(Ut(ma(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(Ut(u,{origin:n}))}catch(d){bx(c,d,n),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(c,u,d){var f=va(c,u,d),m=!1;return t.then(function(p){m||(f.next(p),!m&&f.complete())},function(p){m||f.error(p)}),{unsubscribe:function(){return m=!0}}},stop:function(){i=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,o=this,i=!1,a=new Set,s=new Set,c,u=function(m){c=m,s.forEach(function(p){return p(m)}),!i&&o.send(Ut(m,{origin:n}))},d;try{d=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Df(d))return this.spawnPromise(d,n);var f=(r={id:n,send:function(m){return a.forEach(function(p){return p(m)})},subscribe:function(m){var p=va(m);return s.add(p.next),{unsubscribe:function(){s.delete(p.next)}}},stop:function(){i=!0,dt(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,f),f},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(Ut(c,{origin:n}))},function(c){o.removeChild(n),o.send(Ut(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(Ut(ma(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,d){return t.subscribe(c,u,d)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:n}}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){jt||Yt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[sr]=function(){return this},r))},e.prototype.attachDev=function(){var t=Wu();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(be(be({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:be({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}zx(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sr]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Vt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Vv,e}();function Vv(e,t){var n=new Kx(e,t);return n}function qx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Ji(e){return be(be({type:Mc},e),{toJSON:function(){e.onDone,e.onError;var t=Lu(e,["onDone","onError"]);return be(be({},t),{type:Mc,src:qx(e.src)})}})}var ro="",Hc="#",Oo="*",Gr={},Zr=function(e){return e[0]===Hc},Xx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Gx=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(st(i.target)||jr(i.target))}),o=t===ro?"the transient event":"event '".concat(t,"'");Yt(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},Zx=function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Xx(),n),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Tv),this.id=this.config.id||_t([this.machine.key],at(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,jt||Yt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Lo(this.config.states,function(u,d){var f,m=new e(u,{},void 0,{parent:i,key:d});return Object.assign(i.idMap,be((f={},f[m.id]=m,f),m.idMap)),m}):Gr;var s=0;function c(u){var d,f;u.order=s++;try{for(var m=Ze(Mv(u)),p=m.next();!p.done;p=m.next()){var b=p.value;c(b)}}catch(y){d={error:y}}finally{try{p&&!p.done&&(f=m.return)&&f.call(m)}finally{if(d)throw d.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var d=u.event;return d===ro}):ro in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=In(this.config.entry||this.config.onEntry).map(function(u){return ui(u)}),this.onExit=In(this.config.exit||this.config.onExit).map(function(u){return ui(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=In(this.config.invoke).map(function(u,d){var f,m;if(jr(u)){var p=Zi(i.id,d);return i.machine.options.services=be((f={},f[p]=u,f),i.machine.options.services),Ji({src:p,id:p})}else if(st(u.src)){var p=u.id||Zi(i.id,d);return Ji(be(be({},u),{id:p,src:u.src}))}else if(jr(u.src)||dt(u.src)){var p=u.id||Zi(i.id,d);return i.machine.options.services=be((m={},m[p]=u.src,m),i.machine.options.services),Ji(be(be({id:p},u),{src:p}))}else{var b=u.src;return Ji(be(be({id:Zi(i.id,d)},u),{src:b}))}}),this.activities=In(this.config.activities).concat(this.invoke).map(function(u){return Hu(u)}),this.transition=this.transition.bind(this),this.tags=In(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||jv(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,c=r.delays;return new e(this.config,{actions:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return dt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Lo(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===ro,r=this.transitions.filter(function(o){var i=o.eventType===t;return n?i:i||o.eventType===Oo});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(i,a){var s=dt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=Ox(s,t.id);return t.onEntry.push(xx(c,{delay:i})),t.onExit.push(Cx(c)),c},o=Eo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):It(Object.keys(n).map(function(i,a){var s=n[i],c=st(s)?{target:s}:s,u=isNaN(+i)?i:+i,d=r(u,a);return In(c).map(function(f){return be(be({},f),{event:d,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof bn?t.value:Uo(t,this.delimiter);if(st(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((n={},n[o]=i,n)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,_t([],at(It(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Iv(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof bn?t:bn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new bn(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ga(r,this),tags:Mf(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),i=o.next(n,r);return!i||!i.transitions.length?this.next(n,r):i},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,i,a={};try{for(var s=Ze(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,d=t[u];if(d){var f=this.getStateNode(u),m=f._transition(d,n,r);m&&(a[u]=m)}}}catch(S){o={error:S}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var p=Object.keys(a).map(function(S){return a[S]}),b=It(p.map(function(S){return S.transitions})),y=p.some(function(S){return S.transitions.length>0});if(!y)return this.next(n,r);var T=It(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:b,exitSet:It(p.map(function(S){return S.exitSet})),configuration:T,source:n,actions:It(Object.keys(a).map(function(S){return a[S].actions}))}},e.prototype._transition=function(t,n,r){return st(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Ut(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var d=Ze(this.getCandidates(a)),f=d.next();!f.done;f=d.next()){var m=f.value,p=m.cond,b=m.in,y=t.context,T=b?st(b)&&Zr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Bu(Uo(b,this.delimiter),lx(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!p||Av(this.machine,p,y,n,t)}catch(C){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
138
138
  `).concat(C.message))}if(S&&T){m.target!==void 0&&(c=m.target),s.push.apply(s,_t([],at(m.actions),!1)),u=m;break}}}catch(C){r={error:C}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var v=It(c.map(function(C){return i.getRelativeStateNodes(C,t.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:It(c.map(function(C){return i.getPotentiallyReenteringNodes(C)})),configuration:v,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,i,a,s){var c,u,d,f,m=this,p=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Ze(Array.from(t).sort(function(R,E){return R.order-E.order})),T=y.next();!T.done;T=y.next()){var S=T.value;(!Bo(p,S)||Bo(r.exitSet,S)||S.parent&&b.has(S.parent))&&b.add(S)}}catch(R){c={error:R}}finally{try{T&&!T.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var v=Ze(p),w=v.next();!w.done;w=v.next()){var S=w.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{w&&!w.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,E){return E.order-R.order});var C=Array.from(b).sort(function(R,E){return R.order-E.order}),I=new Set(r.exitSet),D=It(C.map(function(R){var E=[];if(R.type!=="final")return E;var h=R.parent;if(!h.parent)return E;E.push(Qi(R.id,R.doneData),Qi(h.id,R.doneData?Aa(R.doneData,o,i):void 0));var $=h.parent;return $.type==="parallel"&&li($).every(function(A){return ga(r.configuration,A)})&&E.push(Qi($.id)),E})),P=C.map(function(R){var E=R.onEntry,h=R.activities.map(function($){return $x($)});return{type:"entry",actions:cr(s?_t(_t([],at(E),!1),at(h),!1):_t(_t([],at(h),!1),at(E),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return wx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(_t(_t([],at(R.onExit),!1),at(R.activities.map(function(E){return Tx(E)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(P);if(n){var H=cr(It(_t([],at(t),!1).sort(function(R,E){return E.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Fc(R)});return k.concat({type:"stop",actions:H})}return k},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var i=Ut(n),a;if(t instanceof bn)a=r===void 0?t:this.resolveState(bn.from(t,r));else{var s=st(t)?this.resolve(Pa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(bn.from(s,c))}if(!jt&&i.name===Oo)throw new Error("An event cannot have the wildcard type ('".concat(Oo,"')"));if(this.strict&&!this.events.includes(i.name)&&!fx(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},d=Vo([],this.getStateNodes(a.value)),f=u.configuration.length?Vo(d,u.configuration):d;return u.configuration=_t([],at(f),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var i,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(i=t.actions).unshift.apply(i,_t([],at(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,d=this;i===void 0&&(i=io);var f=t.configuration,m=!n||t.transitions.length>0,p=m?t.configuration:n?n.configuration:[],b=ga(p,this),y=m?Mx(this.machine,f):void 0,T=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,S=this.getActions(new Set(p),b,t,r,i,n,o),v=n?be({},n.activities):{};try{for(var w=Ze(S),C=w.next();!C.done;C=w.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),P=D.next();!P.done;P=D.next()){var F=P.value;F.type===kc?v[F.activity.id||F.activity.type]=F:F.type===Fu&&(v[F.activity.id||F.activity.type]=!1)}}catch(Y){c={error:Y}}finally{try{P&&!P.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(Y){a={error:Y}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var k=at(Da(this,n,r,i,S,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],R=k[1],E=at(hx(H,Fc),2),h=E[0],$=E[1],A=H.filter(function(Y){var Z;return Y.type===kc&&((Z=Y.activity)===null||Z===void 0?void 0:Z.type)===Mc}),j=A.reduce(function(Y,Z){return Y[Z.activity.id]=Ax(Z.activity,d.machine,R,i),Y},n?be({},n.children):{}),W=new bn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?vx(T,y):void 0:n?n.historyValue:void 0,history:!y||t.source?n:void 0,actions:y?$:[],activities:y?v:n?n.activities:{},events:[],configuration:p,transitions:t.transitions,children:j,done:b,tags:Mf(p),machine:this}),U=r!==R;W.changed=i.name===$v||U;var J=W.history;J&&delete J.history;var B=!b&&(this._transient||f.some(function(Y){return Y._transient}));if(!m&&(!B||i.name===ro))return W;var L=W;if(!b)for(B&&(L=this.resolveRaisedTransition(L,{type:rx},i,o));h.length;){var ne=h.shift();L=this.resolveRaisedTransition(L,ne._event,i,o)}var G=L.changed||(J?!!L.actions.length||U||typeof J.value!=typeof L.value||!Fv(L.value,J.value):void 0);return L.changed=G,L.history=J,L},e.prototype.getStateNode=function(t){if(Zr(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Zr(t)?t.slice(Hc.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Zr(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=Lc(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||Gr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):Gr});case"compound":if(st(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?Lo(t,function(i,a){return i?r.getStateNode(a).resolve(i):Gr}):this.initialStateValue||{};default:return t||Gr}},e.prototype.getResolvedPath=function(t){if(Zr(t)){var n=this.machine.idMap[t.slice(Hc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Lc(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Af(this.states,function(r){return r.initialStateValue||Gr},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Na(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;st(n.target)?t=Zr(n.target)?Pa(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Na(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Yt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=ha(this.initialStateValue);return It(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=at(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var i=this.getStateNode(r);if(i.type==="history")return i.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Af(this.states,function(n,r){if(!t)return n.historyValue();var o=st(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?It(ha(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=dx(r.path,"states")(t).current;return st(i)?[r.getStateNode(i)]:It(ha(i).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=It(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ze(Object.keys(i)),c=s.next();!c.done;c=s.next()){var u=c.value,d=i[u];if(d.states)try{for(var f=(r=void 0,Ze(d.events)),m=f.next();!m.done;m=f.next()){var p=m.value;a.add("".concat(p))}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!st(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var i=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
139
- `).concat(s.message))}else return n.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var n=this,r=yx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return st(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=be(be({},t),{actions:cr(In(t.actions)),cond:Pv(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Oo,s=i[a],c=s===void 0?[]:s,u=Lu(i,[typeof a=="symbol"?a:a+""]);o=It(Object.keys(u).map(function(v){!jt&&v===ro&&Yt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Xr(v,u[v]);return jt||Gx(r,v,w),w}).concat(Xr(Oo,c)))}var d=this.config.always?Xr("",this.config.always):[],f=this.config.onDone?Xr(String(Qi(this.id)),this.config.onDone):[];jt||Yt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=It(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,_t([],at(Xr(String(ma(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,_t([],at(Xr(String(Fo(v.id)),v.onError)),!1)),w})),p=this.after,b=It(_t(_t(_t(_t([],at(f),!1),at(m),!1),at(o),!1),at(d),!1).map(function(v){return In(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Ze(p),T=y.next();!T.done;T=y.next()){var S=T.value;b.push(S)}}catch(v){t={error:v}}finally{try{T&&!T.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return b},e}();function Qx(e,t,n){return n===void 0&&(n=e.context),new Zx(e,t,n)}var Jx=Rx,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function Lf(e){var t=Re.useRef();return t.current||(t.current={v:e()}),t.current.v}var e_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},t_=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function n_(e,t){var n,r,o=e_([[],[]],2),i=o[0],a=o[1];try{for(var s=t_(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}var Po=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Ff=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function Vf(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function r_(e){var t=l.useRef([]),n=l.useRef([]);Yo(function(){var r=e.subscribe(function(o){var i,a;if(o.actions.length){var s=o.actions.filter(function(f){return typeof f.exec=="function"&&"__effect"in f.exec}),c=Po(n_(s,function(f){return f.exec.__effect===Wc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,Ff([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,Ff([],Po(d.map(function(f){return[f,o]})),!1))}});return function(){r.unsubscribe()}},[]),Yo(function(){for(;n.current.length;){var r=Po(n.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}})}var Ko=globalThis&&globalThis.__assign||function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ko.apply(this,arguments)},o_=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},i_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function a_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function s_(e,t,n){t===void 0&&(t={});var r=Lf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=i_(l.useState(r),1),i=o[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,c=t.actions,u=t.activities,d=t.services,f=t.delays,m=t.state,p=o_(t,["context","guards","actions","activities","services","delays","state"]),b=Lf(function(){var y={context:a,guards:s,actions:c,activities:u,services:d,delays:f},T=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return Vv(T,Ko({deferEvents:!0},p))});return Yo(function(){var y;return n&&(y=b.subscribe(a_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?bn.create(m):void 0),function(){b.stop()}},[]),Yo(function(){Object.assign(b.machine.options.actions,c),Object.assign(b.machine.options.guards,s),Object.assign(b.machine.options.activities,u),Object.assign(b.machine.options.services,d),Object.assign(b.machine.options.delays,f)},[c,s,u,d,f]),r_(b),b}var c_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};globalThis&&globalThis.__spreadArray;function u_(e,t){t===void 0&&(t={});var n=l.useCallback(function(s){var c=s.changed===void 0&&Object.keys(s.children).length;(s.changed||c)&&a(s)},[]),r=s_(e,t,n),o=c_(l.useState(function(){var s=r.machine.initialState;return t.state?bn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var l_=Object.defineProperty,d_=(e,t)=>{for(var n in t)l_(e,n,{get:t[n],enumerable:!0})},An={};d_(An,{assign:()=>h_,colors:()=>hr,createStringInterpolator:()=>Gu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Zu});var zu=Ri(),We=e=>Ii(e,zu),Uu=Ri();We.write=e=>Ii(e,Uu);var ys=Ri();We.onStart=e=>Ii(e,ys);var Yu=Ri();We.onFrame=e=>Ii(e,Yu);var Ku=Ri();We.onFinish=e=>Ii(e,Ku);var ao=[];We.setTimeout=(e,t)=>{const n=We.now()+t,r=()=>{const i=ao.findIndex(a=>a.cancel==r);~i&&ao.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return ao.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~ao.findIndex(t=>t.time>e)||~ao.length);We.cancel=e=>{ys.delete(e),Yu.delete(e),Ku.delete(e),zu.delete(e),Uu.delete(e)};We.sync=e=>{zc=!0,We.batchedUpdates(e),zc=!1};We.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,We.onStart(n)}return r.handler=e,r.cancel=()=>{ys.delete(n),t=null},r};var qu=typeof window<"u"?window.requestAnimationFrame:()=>{};We.use=e=>qu=e;We.now=typeof performance<"u"?()=>performance.now():Date.now;We.batchedUpdates=e=>e();We.catch=console.error;We.frameLoop="always";We.advance=()=>{We.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zv()};var lr=-1,dr=0,zc=!1;function Ii(e,t){zc?(t.delete(e),e(0)):(t.add(e),Hv())}function Hv(){lr<0&&(lr=0,We.frameLoop!=="demand"&&qu(Wv))}function f_(){lr=-1}function Wv(){~lr&&(qu(Wv),We.batchedUpdates(zv))}function zv(){const e=lr;lr=We.now();const t=Bv(lr);if(t&&(Uv(ao.splice(0,t),n=>n.handler()),dr-=t),!dr){f_();return}ys.flush(),zu.flush(e?Math.min(64,lr-e):16.667),Yu.flush(),Uu.flush(),Ku.flush()}function Ri(){let e=new Set,t=e;return{add(n){dr+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return dr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,dr-=t.size,Uv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Uv(e,t){e.forEach(n=>{try{t(n)}catch(r){We.catch(r)}})}function Uc(){}var p_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),me={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Kn(e,t){if(me.arr(e)){if(!me.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Qe=(e,t)=>e.forEach(t);function Bn(e,t,n){if(me.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var hn=e=>me.und(e)?[]:me.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Qe(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),Xu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Gu,Yv,hr=null,Kv=!1,Zu=Uc,h_=e=>{e.to&&(Yv=e.to),e.now&&(We.now=e.now),e.colors!==void 0&&(hr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Gu=e.createStringInterpolator),e.requestAnimationFrame&&We.use(e.requestAnimationFrame),e.batchedUpdates&&(We.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zu=e.willAdvance),e.frameLoop&&(We.frameLoop=e.frameLoop)},Xo=new Set,xn=[],rc=[],ka=0,bs={get idle(){return!Xo.size&&!xn.length},start(e){ka>e.priority?(Xo.add(e),We.onStart(v_)):(qv(e),We(Yc))},advance:Yc,sort(e){if(ka)We.onFrame(()=>bs.sort(e));else{const t=xn.indexOf(e);~t&&(xn.splice(t,1),Xv(e))}},clear(){xn=[],Xo.clear()}};function v_(){Xo.forEach(qv),Xo.clear(),We(Yc)}function qv(e){xn.includes(e)||Xv(e)}function Xv(e){xn.splice(m_(xn,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<xn.length;n++){const r=xn[n];ka=r.priority,r.idle||(Zu(r),r.advance(e),r.idle||t.push(r))}return ka=0,rc=xn,rc.length=0,xn=t,xn.length>0}function m_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var g_=(e,t,n)=>Math.min(Math.max(n,e),t),y_={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},On="[-+]?\\d*\\.?\\d+",Ma=On+"%";function ws(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var b_=new RegExp("rgb"+ws(On,On,On)),w_=new RegExp("rgba"+ws(On,On,On,On)),E_=new RegExp("hsl"+ws(On,Ma,Ma)),x_=new RegExp("hsla"+ws(On,Ma,Ma,On)),__=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,S_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,C_=/^#([0-9a-fA-F]{6})$/,$_=/^#([0-9a-fA-F]{8})$/;function T_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=C_.exec(e))?parseInt(t[1]+"ff",16)>>>0:hr&&hr[e]!==void 0?hr[e]:(t=b_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|255)>>>0:(t=w_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|Wf(t[4]))>>>0:(t=__.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=$_.exec(e))?parseInt(t[1],16)>>>0:(t=S_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=E_.exec(e))?(Bf(Hf(t[1]),ea(t[2]),ea(t[3]))|255)>>>0:(t=x_.exec(e))?(Bf(Hf(t[1]),ea(t[2]),ea(t[3]))|Wf(t[4]))>>>0:null}function oc(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 Bf(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oc(o,r,e+1/3),a=oc(o,r,e),s=oc(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function Qr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Hf(e){return(parseFloat(e)%360+360)%360/360}function Wf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ea(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zf(e){let t=T_(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var di=(e,t,n)=>{if(me.fun(e))return e;if(me.arr(e))return di({range:e,output:t,extrapolate:n});if(me.str(e.output[0]))return Gu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=R_(u,i);return I_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function I_(e,t,n,r,o,i,a,s,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function R_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var O_=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return g_(0,1,o/e)},ja=1.70158,ta=ja*1.525,Uf=ja+1,Yf=2*Math.PI/3,Kf=2*Math.PI/4.5,na=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,P_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Uf*e*e*e-ja*e*e,easeOutBack:e=>1+Uf*Math.pow(e-1,3)+ja*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ta+1)*2*e-ta)/2:(Math.pow(2*e-2,2)*((ta+1)*(e*2-2)+ta)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Yf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Yf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kf)/2+1,easeInBounce:e=>1-na(1-e),easeOutBounce:na,easeInOutBounce:e=>e<.5?(1-na(1-2*e))/2:(1+na(2*e-1))/2,steps:O_},fi=Symbol.for("FluidValue.get"),vo=Symbol.for("FluidValue.observers"),wn=e=>!!(e&&e[fi]),an=e=>e&&e[fi]?e[fi]():e,qf=e=>e[vo]||null;function A_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function pi(e,t){const n=e[vo];n&&n.forEach(r=>{A_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");D_(this,e)}},D_=(e,t)=>Zv(e,fi,t);function xo(e,t){if(e[fi]){let n=e[vo];n||Zv(e,vo,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hi(e,t){const n=e[vo];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[vo]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ya=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,N_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Xf=new RegExp(`(${ya.source})(%|[a-z]+)`,"i"),k_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Es=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=M_(e);if(!t||Xu())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&Es.test(n))return Qv(n);if(n)return n}return e},M_=e=>{const t=Es.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,j_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Jv=e=>{ic||(ic=hr?new RegExp(`(${Object.keys(hr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>an(i).replace(Es,Qv).replace(N_,zf).replace(ic,zf)),n=t.map(i=>i.match(ya).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>di({...e,output:i}));return i=>{var c;const a=!Xf.test(t[0])&&((c=t.find(u=>Xf.test(u)))==null?void 0:c.replace(ya,""));let s=0;return t[0].replace(ya,()=>`${o[s++](i)}${a||""}`).replace(k_,j_)}},Qu="react-spring: ",em=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Qu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},L_=em(console.warn);function F_(){L_(`${Qu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var V_=em(console.warn);function B_(){V_(`${Qu}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function xs(e){return me.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xu()&&Es.test(e)||e in(hr||{}))}var Ju=Xu()?l.useEffect:l.useLayoutEffect,H_=()=>{const e=l.useRef(!1);return Ju(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){const e=l.useState()[1],t=H_();return()=>{t.current&&e(Math.random())}}function W_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&z_(t,i.inputs)||(i={inputs:t,result:e()}):i=n,l.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function z_(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var nm=e=>l.useEffect(e,U_),U_=[];function Gf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),Y_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],el=(e,t)=>p_(e,vi,t),_s=e=>e&&e[vi]&&e[vi].getPayload(),rm=class{constructor(){el(this,this)}getPayload(){return this.payload||[]}},Oi=class extends rm{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,me.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Oi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return me.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,me.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},mi=class extends Oi{constructor(e){super(0),this._string=null,this._toString=di({output:[e,e]})}static create(e){return new mi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(me.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=di({output:[this.getValue(),e]})),this._value=0,super.reset()}},La={dependencies:null},Ss=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{Y_(n)?t[r]=n.getValue(e):wn(n)?t[r]=an(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Qe(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Bn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){La.dependencies&&wn(e)&&La.dependencies.add(e);const t=_s(e);t&&Qe(t,n=>this.add(n))}},om=class extends Ss{constructor(e){super(e)}static create(e){return new om(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(K_)),!0)}};function K_(e){return(xs(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:me.arr(e)?om:xs(e)?mi:Oi}var Zf=(e,t)=>{const n=!me.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=G_(o,b)},[o]),[s,c]=X_(r,t),u=tm(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new q_(d,c),m=l.useRef();Ju(()=>(m.current=f,Qe(c,b=>xo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>hi(b,m.current)),We.cancel(m.current.update))})),l.useEffect(d,[]),nm(()=>()=>{const b=m.current;Qe(b.deps,y=>hi(y,b))});const p=t.getComponentProps(s.getValue());return Re.createElement(e,{...p,ref:a})})},q_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&We.write(this.update)}};function X_(e,t){const n=new Set;return La.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ss(e),La.dependencies=null,[e,n]}function G_(e,t){return e&&(me.fun(e)?e(t):e.current=t),t}var Qf=Symbol.for("AnimatedComponent"),Z_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Ss(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Jf(a)||"Anonymous";return me.str(a)?a=i[a]||(i[a]=Zf(a,o)):a=a[Qf]||(a[Qf]=Zf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{me.arr(e)&&(s=Jf(a)),i[s]=i(a)}),{animated:i}},Jf=e=>me.str(e)?e:e&&me.str(e.displayName)?e.displayName:me.fun(e)&&e.name||null;function Ir(e,...t){return me.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(me.fun(e)?e(t):hn(e).includes(t))),im=(e,t)=>me.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Q_=e=>e,tl=(e,t=Q_)=>{let n=J_;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);me.und(i)||(r[o]=i)}return r},J_=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tS(e){const t={};let n=0;if(Bn(e,(r,o)=>{eS[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=tS(e);if(t){const n={to:t};return Bn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function gi(e){return e=an(e),me.arr(e)?e.map(gi):xs(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nS(e){for(const t in e)return!0;return!1}function qc(e){return me.fun(e)||me.arr(e)&&me.obj(e[0])}function rS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function oS(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var cm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Xc={...cm.default,mass:1,damping:1,easing:P_.linear,clamp:!1},iS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function aS(e,t,n){n&&(n={...n},ep(n,t),t={...n,...t}),ep(e,t),Object.assign(e,t);for(const a in Xc)e[a]==null&&(e[a]=Xc[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return me.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function ep(e,t){if(!me.und(t.decay))e.duration=void 0;else{const n=!me.und(t.tension)||!me.und(t.friction);(n||!me.und(t.frequency)||!me.und(t.damping)||!me.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var tp=[],sS=class{constructor(){this.changed=!1,this.values=tp,this.toValues=null,this.fromValues=tp,this.config=new iS,this.immediate=!1}};function um(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,d=Go(n.cancel??(r==null?void 0:r.cancel),t);if(d)p();else{me.und(n.pause)||(o.paused=Go(n.pause,t));let b=r==null?void 0:r.pause;b!==!0&&(b=o.paused||Go(b,t)),c=Ir(n.delay||0,t),b?(o.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-We.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=We.setTimeout(p,c),o.pauseQueue.add(f),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},a)}catch(b){s(b)}}})}var nl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?so(e.get()):t.every(n=>n.noop)?lm(e.get()):Rn(e.get(),t.every(n=>n.finished)),lm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Rn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),so=e=>({value:e,cancelled:!0,finished:!1});function dm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=n;return!i&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=tl(t,(T,S)=>S==="onRest"?void 0:T);let d,f;const m=new Promise((T,S)=>(d=T,f=S)),p=T=>{const S=o<=(n.cancelId||0)&&so(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new np,w=new rp;return(async()=>{if(An.skipAnimation)throw yi(n),w.result=Rn(r,!1),f(w),w;p(v);const C=me.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,P)=>{me.und(C[P])&&(C[P]=D)});const I=await r.start(C);return p(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(An.skipAnimation)return yi(n),Rn(r,!1);try{let T;me.arr(e)?T=(async S=>{for(const v of S)await b(v)})(e):T=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([T.then(d),m]),y=Rn(r.get(),!0,!1)}catch(T){if(T instanceof np)y=T.result;else if(T instanceof rp)y=T.result;else throw T}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return me.fun(a)&&We.batchedUpdates(()=>{a(y,r,r.item)}),y})()}function yi(e,t){qo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var np=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},rp=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof rl,cS=1,rl=class extends Gv{constructor(){super(...arguments),this.id=cS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Fn(this);return e&&e.getValue()}to(...e){return An.to(this,e)}interpolate(...e){return F_(),An.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){pi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||bs.sort(this),pi(this,{type:"priority",parent:this,priority:e})}},Lr=Symbol.for("SpringPhase"),fm=1,Zc=2,Qc=4,ac=e=>(e[Lr]&fm)>0,ir=e=>(e[Lr]&Zc)>0,Ao=e=>(e[Lr]&Qc)>0,op=(e,t)=>t?e[Lr]|=Zc|fm:e[Lr]&=~Zc,ip=(e,t)=>t?e[Lr]|=Qc:e[Lr]&=~Qc,uS=class extends rl{constructor(e,t){if(super(),this.animation=new sS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!me.und(e)||!me.und(t)){const n=me.obj(e)?{...e}:{...t,from:e};me.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return an(this.animation.to)}get velocity(){const e=Fn(this);return e instanceof Oi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ac(this)}get isAnimating(){return ir(this)}get isPaused(){return Ao(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=_s(r.to);!a&&wn(r.to)&&(o=hn(an(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const f=u.constructor==mi?1:a?a[d].lastPosition:o[d];let m=r.immediate,p=f;if(!m){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[d],T=u.v0!=null?u.v0:u.v0=me.arr(i.velocity)?i.velocity[d]:i.velocity;let S;const v=i.precision||(y==f?.005:Math.min(1,Math.abs(f-y)*.001));if(me.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,C=Math.exp(-(1-w)*b);p=y+T/(1-w)*(1-C),m=Math.abs(u.lastPosition-p)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const w=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!me.und(C),D=y==f?u.v0>0:y<f;let P,F=!1;const k=1,H=Math.ceil(e/k);for(let R=0;R<H&&(P=Math.abs(S)>w,!(!P&&(m=Math.abs(f-p)<=v,m)));++R){I&&(F=p==f||p>f==D,F&&(S=-S*C,p=f));const E=-i.tension*1e-6*(p-f),h=-i.friction*.001*S,$=(E+h)/i.mass;S=S+$*k,p=p+S*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),p=y+i.easing(w)*(f-y),S=(p-u.lastPosition)/e,m=w==1}u.lastVelocity=S,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=an(r.to);(c!==u||n)&&!i.decay?(s.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return We.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ir(this)){const{to:e,config:t}=this.animation;We.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return me.und(e)?(n=this.queue||[],this.queue=[]):n=[me.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>nl(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),yi(this._state,e&&this._lastCallId),We.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=me.obj(n)?n[t]:n,(n==null||qc(n))&&(n=void 0),r=me.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ac(this)||(e.reverse&&([n,r]=[r,n]),r=an(r),me.und(r)?Fn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,tl(e,(a,s)=>/^on/.test(s)?im(a,n):a)),sp(this,e,"onProps"),No(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return um(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(ip(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ip(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Rn(this,Do(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=pm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(so(this));const r=!me.und(e.to),o=!me.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(so(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:d=c,from:f=u}=e;o&&!r&&(!t.default||me.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=an(f);const p=!Kn(d,c);p&&this._focus(d);const b=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&aS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||me.und(d))return n(Rn(this,!0));const w=me.und(t.reset)?o&&!t.default:!me.und(f)&&Go(t.reset,i),C=w?f:this.get(),I=gi(d),D=me.num(I)||me.arr(I)||xs(I),P=!b&&(!D||Go(a.immediate||t.immediate,i));if(p){const R=Kc(d);if(R!==v.constructor)if(P)v=this._set(I);else throw Error(`Cannot animate between ${v.constructor.name} and ${R.name}, as the "to" prop suggests`)}const F=v.constructor;let k=wn(d),H=!1;if(!k){const R=w||!ac(this)&&m;(p||R)&&(H=Kn(gi(C),I),k=!H),(!Kn(s.immediate,P)&&!P||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(H&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||wn(c))&&(s.values=v.getPayload(),s.toValues=wn(d)?null:F==mi?[1]:hn(I)),s.immediate!=P&&(s.immediate=P,!P&&!w&&this._set(c)),k)){const{onRest:R}=s;Qe(dS,h=>sp(this,t,h));const E=Rn(this,Do(this,c));Ho(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&We.batchedUpdates(()=>{var h;s.changed=!w,R==null||R(E,this),w?Ir(a.onRest,E):(h=s.onStart)==null||h.call(s,E,this)})}w&&this._set(C),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!p?this._pendingCalls.add(n):n(lm(C))}_focus(e){const t=this.animation;e!==t.to&&(qf(this)&&this._detach(),t.to=e,qf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;wn(t)&&(xo(t,this),Gc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;wn(e)&&hi(e,this)}_set(e,t=!0){const n=an(e);if(!me.und(n)){const r=Fn(this);if(!r||!Kn(n,r.getValue())){const o=Kc(n);!r||r.constructor!=o?el(this,o.create(n)):r.setValue(n),r&&We.batchedUpdates(()=>{this._onChange(n,t)})}}return Fn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Rn(this,Do(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ir(this.animation.onChange,e,this)),Ir(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Fn(this).reset(an(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(op(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():bs.start(this)}_stop(e,t){if(ir(this)){op(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),pi(this,{type:"idle",parent:this});const r=t?so(this.get()):Rn(this.get(),Do(this,e??n.to));Ho(this._pendingCalls,r),n.changed&&(n.changed=!1,No(this,"onRest",r,this))}}};function Do(e,t){const n=gi(t),r=gi(e.get());return Kn(r,n)}function pm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&sm(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||qc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=sm(e),r=new Set;return me.obj(t)&&ap(t,r),me.obj(n)&&ap(n,r),e.keys=r.size?Array.from(r):null,e}function lS(e){const t=bi(e);return me.und(t.default)&&(t.default=tl(t)),t}function ap(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var dS=["onStart","onRest","onChange","onPause","onResume"];function sp(e,t,n){e.animation[n]=t[n]!==am(t,n)?im(t[n],e.key):void 0}function No(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var fS=["onStart","onChange","onRest"],pS=1,hS=class{constructor(t,n){this.id=pS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];me.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(bi(t)),this}start(t){let{queue:n}=this;return t?n=hn(t).map(bi):this.queue=[],this._flush?this._flush(this,n):(ym(this,n),Jc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Qe(hn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(me.und(t))this.start({pause:!0});else{const n=this.springs;Qe(hn(t),r=>n[r].pause())}return this}resume(t){if(me.und(t))this.start({pause:!1});else{const n=this.springs;Qe(hn(t),r=>n[r].resume())}return this}each(t){Bn(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,o=this._active.size>0,i=this._changed.size>0;(o&&!this._started||i&&!this._started)&&(this._started=!0,qo(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!o&&this._started,s=i||a&&r.size?this.get():null;i&&n.size&&qo(n,([c,u])=>{u.value=s,c(u,this,this._item)}),a&&(this._started=!1,qo(r,([c,u])=>{u.value=s,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;We.onFrame(this._onFrame)}};function Jc(e,t){return Promise.all(t.map(n=>hm(e,n))).then(n=>nl(e,n))}async function hm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=me.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=me.arr(o)||me.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(fS,y=>{const T=t[y];if(me.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:w})=>{const C=S.get(T);C?(v||(C.finished=!1),w&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Ho(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),p=t.cancel===!0||am(t,"cancel")===!0;(d||p&&f.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){p?(yi(f,e._lastAsyncId),T(so(e))):(y.onRest=s,T(dm(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=nl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=pm(t,a,o);if(y)return ym(e,[y]),hm(e,y,!0)}return c&&We.batchedUpdates(()=>c(b,e,e.item)),b}function cp(e,t){const n={...e.springs};return t&&Qe(hn(t),r=>{me.und(r.keys)&&(r=bi(r)),me.obj(r.to)||(r={...r,to:void 0}),gm(n,r,o=>mm(o))}),vm(e,n),n}function vm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,xo(n,e))})}function mm(e,t){const n=new uS;return n.key=e,t&&xo(n,t),n}function gm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ym(e,t){Qe(t,n=>{gm(e.springs,n,r=>mm(r,e))})}var Cs=({children:e,...t})=>{const n=l.useContext(Fa),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=W_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Fa;return Re.createElement(i,{value:t},e)},Fa=vS(Cs,{});Cs.Provider=Fa.Provider;Cs.Consumer=Fa.Consumer;function vS(e,t){return Object.assign(e,Re.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var mS=()=>{const e=[],t=function(r){B_();const o=[];return Qe(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Qe(e,r=>r.pause(...arguments)),this},t.resume=function(){return Qe(e,r=>r.resume(...arguments)),this},t.set=function(r){Qe(e,(o,i)=>{const a=me.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return Qe(e,r=>r.stop(...arguments)),this},t.update=function(r){return Qe(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return me.fun(r)?r(i,o):r};return t._getProps=n,t};function gS(e,t,n){const r=me.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?mS():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const w=cp(S,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{vm(S,w),s.queue.push(()=>{I(Jc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=Gf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{rS(S,o),S.stop(!0)}),c.current.length=e,f(d,e)},[e]),l.useMemo(()=>{f(0,Math.min(d,e))},n);function f(S,v){for(let w=S;w<v;w++){const C=c.current[w]||(c.current[w]=new hS(null,s.flush)),I=r?r(w,C):t[w];I&&(u[w]=lS(I))}}const m=c.current.map((S,v)=>cp(S,u[v])),p=l.useContext(Cs),b=Gf(p),y=p!==b&&nS(p);Ju(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:p});const C=u[w];C&&(oS(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),nm(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function yS(e,t){const n=me.fun(e),[[r],o]=gS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var bm=class extends rl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Kc(n);el(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Kn(t,n)||(Fn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&up(this._active)&&sc(this)}_get(){const e=me.arr(this.source)?this.source.map(an):hn(an(this.source));return this.calc(...e)}_start(){this.idle&&!up(this._active)&&(this.idle=!1,Qe(_s(this),e=>{e.done=!1}),An.skipAnimation?(We.batchedUpdates(()=>this.advance()),sc(this)):bs.start(this))}_attach(){let e=1;Qe(hn(this.source),t=>{wn(t)&&xo(t,this),Gc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(hn(this.source),e=>{wn(e)&&hi(e,this)}),this._active.clear(),sc(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=hn(this.source).reduce((t,n)=>Math.max(t,(Gc(n)?n.priority:0)+1),0))}};function bS(e){return e.idle!==!1}function up(e){return!e.size||Array.from(e).every(bS)}function sc(e){e.idle||(e.idle=!0,Qe(_s(e),t=>{t.done=!0}),pi(e,{type:"idle",parent:e}))}var Jr=(e,...t)=>new bm(e,t);An.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function wS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!wm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var lp={};function ES(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:lp[f]||(lp[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in r)if(r.hasOwnProperty(f)){const m=wS(f,r[f]);wm.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),_S=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(_S.forEach(n=>e[xS(n,t)]=e[t]),e),Zo);var SS=/^(matrix|translate|scale|rotate|skew)/,CS=/^(translate)/,$S=/^(rotate|skew)/,cc=(e,t)=>me.num(e)&&e!==0?e+t:e,ba=(e,t)=>me.arr(e)?e.every(n=>ba(n,t)):me.num(e)?e===t:parseFloat(e)===t,TS=class extends Ss{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>cc(s,"px")).join(",")})`,ba(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(SS.test(s)){if(delete r[s],me.und(a))return;const c=CS.test(s)?"px":$S.test(s)?"deg":"";o.push(hn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,ba(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,ba(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new IS(o,i)),super(r)}},IS=class extends Gv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Qe(this.inputs,(n,r)=>{const o=an(n[0]),[i,a]=this.transforms[r](me.arr(o)?o:n.map(an));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>wn(n)&&xo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>wn(n)&&hi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),pi(this,e)}},RS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];An.assign({batchedUpdates:pn.unstable_batchedUpdates,createStringInterpolator:Jv,colors:y_});var OS=Z_(RS,{applyAnimatedValues:ES,createAnimatedStyle:e=>new TS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),PS=OS.animated;function eu(e,t){return e.map(function(n,r){return n+t[r]})}function ol(e,t){return e.map(function(n,r){return n-t[r]})}function tu(e){return Math.hypot.apply(Math,e)}function AS(e,t,n){var r=tu(t),o=r===0?0:1/r,i=n===0?0:1/n,a=i*r,s=t.map(function(d){return i*d}),c=t.map(function(d){return o*d}),u=tu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function nu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function DS(e,t,n){return Math.max(t,Math.min(e,n))}function NS(e,t){return Math.pow(e,t*5)}function dp(e,t,n){return t===0||Math.abs(t)===1/0?NS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?DS(e,t,n):e<t?-dp(t-e,n-t,r)+t:e>n?+dp(e-n,n-t,r)+n:e}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kS(e,t,n){return t&&fp(e.prototype,t),n&&fp(e,n),e}function tn(){return tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(this,arguments)}function Em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function MS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jS(e,t){if(e){if(typeof e=="string")return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pp(e,t)}}function pp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $s(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=jS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function xm(){}function _m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?xm:t.length===1?t[0]:function(){for(var r,o=$s(t),i;!(i=o()).done;){var a=i.value;r=a.apply(this,arguments)||r}return r}}function ur(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function hp(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function il(e,t){e===void 0&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=il(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function LS(){try{return"constructor"in GestureEvent}catch{return!1}}function Sm(){return typeof window<"u"&&"ontouchstart"in window}function FS(){return typeof window<"u"&&"onpointerdown"in window}function Cm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function $m(e){return Array.from(Cm(e)).map(function(t){return t.identifier})}function vp(e){var t="buttons"in e?e.buttons:0,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey;return{buttons:t,shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}}var VS=function(t){return t};function mp(e,t){t===void 0&&(t=VS);var n=Cm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var BS=180,HS=.15,WS=.5,zS=50,US=250,YS={threshold:function(t){return t===void 0&&(t=0),ur(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return ur(HS);case!1:return ur(0);default:return ur(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:ur(t)},transform:!0},Tm=tn({},YS,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(f){return Tm.bounds(t(f))};var n=t,r=n.left,o=r===void 0?-1/0:r,i=n.right,a=i===void 0?1/0:i,s=n.top,c=s===void 0?-1/0:s,u=n.bottom,d=u===void 0?1/0:u;return[[o,a],[c,d]]}}),KS=typeof window<"u"&&window.document&&window.document.createElement,qS={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=KS?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,o=r===void 0?!0:r,i=n.capture,a=i===void 0?!1:i;return{passive:o,capture:a}},transform:!0},XS=tn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),r=FS();return!!(t&&n||n&&!r)},experimental_preventWindowScrollY:function(t){return t===void 0&&(t=!1),t},threshold:function(t,n,r){var o=r.filterTaps,i=o===void 0?!1:o,a=r.lockDirection,s=a===void 0?!1:a,c=r.axis,u=c===void 0?void 0:c,d=ur(t,i?3:s||u?1:0);return this.filterTaps=i,d},swipeVelocity:function(t){return t===void 0&&(t=WS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=zS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=US),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return BS;case!1:return 0;default:return t}}});function GS(e){return e===void 0&&(e={}),il(e,qS)}function ZS(e){return e===void 0&&(e={}),il(e,XS)}function QS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=MS(e,["domTarget","eventOptions","window","enabled"]),a=GS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=ZS(i),a}function ko(e){return tn({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:xm,canceled:!1,memo:void 0,args:void 0},e)}function Im(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},t=ko({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),n=ko({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:o,scroll:i}}var Tr=new Map,JS=function(t){return t},eC=function(){function e(n,r){var o=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(i,a){var s;a===void 0&&(a=140),clearTimeout(o.controller.timeouts[o.stateKey]);for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];o.controller.timeouts[o.stateKey]=(s=window).setTimeout.apply(s,[i,a].concat(u))},this.clearTimeout=function(){clearTimeout(o.controller.timeouts[o.stateKey])},this.fireGestureHandler=function(i){if(i===void 0&&(i=!1),o.state._blocked)return o.debounced||(o.state._active=!1,o.clean()),null;if(!i&&!o.state.intentional&&!o.config.triggerAllEvents)return null;if(o.state.intentional){var a=o.state.active,s=o.state._active;o.state.active=s,o.state.first=s&&!a,o.state.last=a&&!s,o.controller.state.shared[o.ingKey]=s}var c=o.controller.pointerIds.size||o.controller.touchIds.size,u=o.controller.state.shared.buttons>0||c>0,d=tn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),f=o.handler(d);return o.state.memo=f!==void 0?f:o.state.memo,d},this.controller=n,this.args=r}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,o){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var o=this.config.rubberband,i=this.state,a=i._bounds,s=i._initial,c=i._active,u=i._intentional,d=i.lastOffset,f=i.movement,m=i._threshold,p=this.getInternalMovement(r,this.state),b=u[0]===!1?gp(p[0],m[0]):u[0],y=u[1]===!1?gp(p[1],m[1]):u[1],T=this.checkIntentionality([b,y],p);if(T._blocked)return tn({},T,{_movement:p,delta:[0,0]});var S=T._intentional,v=p,w=[S[0]!==!1?p[0]-S[0]:0,S[1]!==!1?p[1]-S[1]:0],C=eu(w,d),I=c?o:[0,0];return w=yp(a,eu(w,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:yp(a,C,I),delta:ol(w,f)})},t.clean=function(){this.clearTimeout()},kS(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||JS}}]),e}();function gp(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function yp(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],c=s[0],u=s[1],d=e[1],f=d[0],m=d[1];return[Qo(r,c,u,i),Qo(o,f,m,a)]}function uc(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values,s=n?0:o-r.startTime;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:s,previous:a}}function tC(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,c=e.transform,u=o.offset,d=n.timeStamp,f=i.initial,m=i.bounds,p=i.threshold,b=ol(c(p),c([0,0])).map(Math.abs),y=tn({},Im()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return tn({},y,{_initial:hp(f,y),_bounds:hp(m,y)})}var nC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),this.supportsGestureEvents=LS(),this.bind=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a={},s=$s(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(p){Ln(a,p,function(b){return n.nativeRefs[p](tn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?cC(n,a):uC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Om(n.config),o=n.config.eventOptions;r&&Pi(r,Rm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),iC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function rC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function oC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(t).forEach(function(n){return e.touchIds.delete(n)})}function iC(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o){var a=o[i];Pi(n,a,r)}e.windowListeners={}}}function aC(e,t,n){var r=e.config,o=e.windowListeners;n===void 0&&(n=r.eventOptions),r.window&&(Pi(r.window,o[t],n),delete o[t])}function sC(e,t,n,r){var o=e.config,i=e.windowListeners;n===void 0&&(n=[]),r===void 0&&(r=o.eventOptions),o.window&&(Pi(o.window,i[t],r),Pm(o.window,i[t]=n,r))}function cC(e,t){var n=e.config,r=e.domListeners,o=Om(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Rm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],d=c[1],f=u.slice(2).toLowerCase();r.push([f,_m.apply(void 0,d)])}Pm(o,r,i)}function uC(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],c=s[0],u=s[1],d=Array.isArray(u)?u:[u],f=c+o;r[f]=_m.apply(void 0,d)}return r}function Rm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Om(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Ln(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Pm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Pi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function lC(e,t,n){n===void 0&&(n={});var r=fC(e),o=l.useMemo(function(){return new nC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?dC:o.bind}function dC(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function fC(e){var t=new Set;return e.drag&&t.add(Tr.get("drag")),e.wheel&&t.add(Tr.get("wheel")),e.scroll&&t.add(Tr.get("scroll")),e.move&&t.add(Tr.get("move")),e.pinch&&t.add(Tr.get("pinch")),e.hover&&t.add(Tr.get("hover")),t}var pC=function(e){Em(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return ol(o,i.initial)},n.checkIntentionality=function(o,i){if(o[0]===!1&&o[1]===!1)return{_intentional:o,axis:this.state.axis};var a=i.map(Math.abs),s=a[0],c=a[1],u=this.state.axis||(s>c?"x":s<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:o,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:o,_blocked:!0,axis:u}:(o[u==="x"?1:0]=!1,{_intentional:o,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(o,i){var a=this.getMovement(o);if(!a._blocked){var s=i.timeStamp-this.state.timeStamp;Object.assign(a,AS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(eC),hC=3;function bp(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var vC=function(e){Em(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.setPointerCapture=function(o){if(!(r.config.useTouch||document.pointerLockElement)){var i=o.target,a=o.pointerId;i&&"setPointerCapture"in i&&i.setPointerCapture(a),r.updateGestureState({_dragTarget:i,_dragPointerId:a})}},r.releasePointerCapture=function(){if(!(r.config.useTouch||document.pointerLockElement)){var o=r.state,i=o._dragTarget,a=o._dragPointerId;if(a&&i&&"releasePointerCapture"in i&&(!("hasPointerCapture"in i)||i.hasPointerCapture(a)))try{i.releasePointerCapture(a)}catch{}}},r.preventScroll=function(o){r.state._dragPreventScroll&&o.cancelable&&o.preventDefault()},r.getEventId=function(o){return r.config.useTouch?o.changedTouches[0].identifier:o.pointerId},r.isValidEvent=function(o){return r.state._pointerId===r.getEventId(o)},r.shouldPreventWindowScrollY=r.config.experimental_preventWindowScrollY&&r.controller.supportsTouchEvents,r.setUpWindowScrollDetection=function(o){bp(o),sC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Un(r))],["touchcancel",r.clean.bind(Un(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Un(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,bp(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=mp(o,r.transform);r.updateSharedState(vp(o)),r.updateGestureState(tn({},tC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){rC(r.controller,o),!(!r.enabled||r.state._active)&&(r.setStartState(o),r.setPointerCapture(o),r.shouldPreventWindowScrollY?r.setUpWindowScrollDetection(o):r.config.delay>0?r.setUpDelayedDragTrigger(o):r.startDrag(o,!0))},r.onDragChange=function(o){if(!(r.state.canceled||!r.state._active||!r.isValidEvent(o)||r.state._lastEventType===o.type&&o.timeStamp===r.state.timeStamp)){var i;if(document.pointerLockElement){var a=o.movementX,s=o.movementY;i=eu(r.transform([a,s]),r.state.values)}else i=mp(o,r.transform);var c=r.getKinematics(i,o);if(!r.state._dragStarted){if(r.state._dragDelayed){r.startDrag(o);return}if(r.shouldPreventWindowScrollY)if(!r.state._dragPreventScroll&&c.axis)if(c.axis==="x")r.startDrag(o);else{r.state._active=!1;return}else return;else return}var u=vp(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=hC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(oC(r.controller,o),!!r.isValidEvent(o)&&(r.clean(),!!r.state._active)){r.state._active=!1;var i=r.state._dragIsTap,a=r.state.velocities,s=a[0],c=a[1],u=r.state.movement,d=u[0],f=u[1],m=r.state._intentional,p=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,w=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),P=[0,0];D.elapsedTime<I&&(p!==!1&&Math.abs(s)>T&&Math.abs(d)>w&&(P[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(P[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:P})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),aC(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0,_active:!1}),r.updateSharedState({buttons:0}),setTimeout(function(){return r.fireGestureHandler()},0))},r.onClick=function(o){r.state._dragIsTap||o.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(o,i){i===void 0&&(i=!1),!(!this.state._active||this.state._dragStarted)&&(i||this.setStartState(o),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(o){if(this.config.useTouch?(Ln(o,"onTouchStart",this.onDragStart),Ln(o,"onTouchMove",this.onDragChange),Ln(o,"onTouchEnd",this.onDragEnd),Ln(o,"onTouchCancel",this.onDragEnd)):(Ln(o,"onPointerDown",this.onDragStart),Ln(o,"onPointerMove",this.onDragChange),Ln(o,"onPointerUp",this.onDragEnd),Ln(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ln(o,i,this.onClick)}},t}(pC);function mC(e,t){var n,r=[],o,i=!1;function a(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return i&&n===this&&t(c,r)||(o=e.apply(this,c),i=!0,n=this,r=c),o}return a}function wa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wa(e[r],t[r]))return!1;return!0}var i;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!wa(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(o[r]==="_owner"&&e.$$typeof)&&!wa(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function gC(e,t){try{return wa(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function yC(e,t){t===void 0&&(t={}),Tr.set("drag",vC);var n=l.useRef();return n.current||(n.current=mC(QS,gC)),lC({drag:e},n.current(t))}var bC=ot({defaultClassName:"aglyib0",variantClassNames:{variant:{small:"aglyib1",medium:"aglyib2"}},defaultVariants:{},compoundVariants:[]});const Wr=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,variant:i,...a},s)=>{const c=e||"button",u=i==="medium"?12:8;return M.jsx(c,{ref:s,as:e,"data-test-id":a["data-test-id"],className:Oe(bC({variant:i}),n),disabled:o,style:r,...a,children:M.jsx(et,{display:"inline-flex",children:M.jsx(rs,{size:u,color:o?Ct.theme.colors.grey1:Ct.theme.colors.black})})})});Wr.displayName="Button";Wr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,variant:"medium"};const Am=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?M.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||M.jsxs(Ht,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Ht,{alignItems:"center",gap:"$16",children:[r&&M.jsx(x0,{cursor:"pointer",onClick:t,size:18,color:Ct.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(nn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(Wr,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):M.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Am.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function wC({targetRef:e,enabled:t}){const n=l.useRef({activate:()=>{throw new TypeError("Tried to activate aria hider too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){n.current.deactivate(),n.current={activate:()=>{},deactivate:()=>{}};return}const r=e.current;let o=!1,i=[],a=[];n.current={activate:()=>{if(o)return;o=!0;const{parentNode:s}=r;document.querySelectorAll("body > *").forEach(c=>{if(c===s)return;const u=c.getAttribute("aria-hidden");u!==null&&u!=="false"||(i.push(u),a.push(c),c.setAttribute("aria-hidden","true"))})},deactivate:()=>{o&&(o=!1,a.forEach((s,c)=>{const u=i[c];u===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",u)}),i=[],a=[])}}},[e,t]),n}/*!
139
+ `).concat(s.message))}else return n.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var n=this,r=yx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return st(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=be(be({},t),{actions:cr(In(t.actions)),cond:Pv(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Oo,s=i[a],c=s===void 0?[]:s,u=Lu(i,[typeof a=="symbol"?a:a+""]);o=It(Object.keys(u).map(function(v){!jt&&v===ro&&Yt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Xr(v,u[v]);return jt||Gx(r,v,w),w}).concat(Xr(Oo,c)))}var d=this.config.always?Xr("",this.config.always):[],f=this.config.onDone?Xr(String(Qi(this.id)),this.config.onDone):[];jt||Yt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=It(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,_t([],at(Xr(String(ma(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,_t([],at(Xr(String(Fo(v.id)),v.onError)),!1)),w})),p=this.after,b=It(_t(_t(_t(_t([],at(f),!1),at(m),!1),at(o),!1),at(d),!1).map(function(v){return In(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Ze(p),T=y.next();!T.done;T=y.next()){var S=T.value;b.push(S)}}catch(v){t={error:v}}finally{try{T&&!T.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return b},e}();function Qx(e,t,n){return n===void 0&&(n=e.context),new Zx(e,t,n)}var Jx=Rx,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function Lf(e){var t=Re.useRef();return t.current||(t.current={v:e()}),t.current.v}var e_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},t_=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function n_(e,t){var n,r,o=e_([[],[]],2),i=o[0],a=o[1];try{for(var s=t_(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}var Po=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Ff=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function Vf(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function r_(e){var t=l.useRef([]),n=l.useRef([]);Yo(function(){var r=e.subscribe(function(o){var i,a;if(o.actions.length){var s=o.actions.filter(function(f){return typeof f.exec=="function"&&"__effect"in f.exec}),c=Po(n_(s,function(f){return f.exec.__effect===Wc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,Ff([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,Ff([],Po(d.map(function(f){return[f,o]})),!1))}});return function(){r.unsubscribe()}},[]),Yo(function(){for(;n.current.length;){var r=Po(n.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Vf(o,i)}})}var Ko=globalThis&&globalThis.__assign||function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ko.apply(this,arguments)},o_=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},i_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function a_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function s_(e,t,n){t===void 0&&(t={});var r=Lf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=i_(l.useState(r),1),i=o[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,c=t.actions,u=t.activities,d=t.services,f=t.delays,m=t.state,p=o_(t,["context","guards","actions","activities","services","delays","state"]),b=Lf(function(){var y={context:a,guards:s,actions:c,activities:u,services:d,delays:f},T=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return Vv(T,Ko({deferEvents:!0},p))});return Yo(function(){var y;return n&&(y=b.subscribe(a_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?bn.create(m):void 0),function(){b.stop()}},[]),Yo(function(){Object.assign(b.machine.options.actions,c),Object.assign(b.machine.options.guards,s),Object.assign(b.machine.options.activities,u),Object.assign(b.machine.options.services,d),Object.assign(b.machine.options.delays,f)},[c,s,u,d,f]),r_(b),b}var c_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};globalThis&&globalThis.__spreadArray;function u_(e,t){t===void 0&&(t={});var n=l.useCallback(function(s){var c=s.changed===void 0&&Object.keys(s.children).length;(s.changed||c)&&a(s)},[]),r=s_(e,t,n),o=c_(l.useState(function(){var s=r.machine.initialState;return t.state?bn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var l_=Object.defineProperty,d_=(e,t)=>{for(var n in t)l_(e,n,{get:t[n],enumerable:!0})},An={};d_(An,{assign:()=>h_,colors:()=>hr,createStringInterpolator:()=>Gu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Zu});var zu=Ri(),We=e=>Ii(e,zu),Uu=Ri();We.write=e=>Ii(e,Uu);var ys=Ri();We.onStart=e=>Ii(e,ys);var Yu=Ri();We.onFrame=e=>Ii(e,Yu);var Ku=Ri();We.onFinish=e=>Ii(e,Ku);var ao=[];We.setTimeout=(e,t)=>{const n=We.now()+t,r=()=>{const i=ao.findIndex(a=>a.cancel==r);~i&&ao.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return ao.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~ao.findIndex(t=>t.time>e)||~ao.length);We.cancel=e=>{ys.delete(e),Yu.delete(e),Ku.delete(e),zu.delete(e),Uu.delete(e)};We.sync=e=>{zc=!0,We.batchedUpdates(e),zc=!1};We.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,We.onStart(n)}return r.handler=e,r.cancel=()=>{ys.delete(n),t=null},r};var qu=typeof window<"u"?window.requestAnimationFrame:()=>{};We.use=e=>qu=e;We.now=typeof performance<"u"?()=>performance.now():Date.now;We.batchedUpdates=e=>e();We.catch=console.error;We.frameLoop="always";We.advance=()=>{We.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zv()};var lr=-1,dr=0,zc=!1;function Ii(e,t){zc?(t.delete(e),e(0)):(t.add(e),Hv())}function Hv(){lr<0&&(lr=0,We.frameLoop!=="demand"&&qu(Wv))}function f_(){lr=-1}function Wv(){~lr&&(qu(Wv),We.batchedUpdates(zv))}function zv(){const e=lr;lr=We.now();const t=Bv(lr);if(t&&(Uv(ao.splice(0,t),n=>n.handler()),dr-=t),!dr){f_();return}ys.flush(),zu.flush(e?Math.min(64,lr-e):16.667),Yu.flush(),Uu.flush(),Ku.flush()}function Ri(){let e=new Set,t=e;return{add(n){dr+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return dr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,dr-=t.size,Uv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Uv(e,t){e.forEach(n=>{try{t(n)}catch(r){We.catch(r)}})}function Uc(){}var p_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),me={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Kn(e,t){if(me.arr(e)){if(!me.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Qe=(e,t)=>e.forEach(t);function Bn(e,t,n){if(me.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var hn=e=>me.und(e)?[]:me.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Qe(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),Xu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Gu,Yv,hr=null,Kv=!1,Zu=Uc,h_=e=>{e.to&&(Yv=e.to),e.now&&(We.now=e.now),e.colors!==void 0&&(hr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Gu=e.createStringInterpolator),e.requestAnimationFrame&&We.use(e.requestAnimationFrame),e.batchedUpdates&&(We.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zu=e.willAdvance),e.frameLoop&&(We.frameLoop=e.frameLoop)},Xo=new Set,xn=[],rc=[],ka=0,bs={get idle(){return!Xo.size&&!xn.length},start(e){ka>e.priority?(Xo.add(e),We.onStart(v_)):(qv(e),We(Yc))},advance:Yc,sort(e){if(ka)We.onFrame(()=>bs.sort(e));else{const t=xn.indexOf(e);~t&&(xn.splice(t,1),Xv(e))}},clear(){xn=[],Xo.clear()}};function v_(){Xo.forEach(qv),Xo.clear(),We(Yc)}function qv(e){xn.includes(e)||Xv(e)}function Xv(e){xn.splice(m_(xn,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<xn.length;n++){const r=xn[n];ka=r.priority,r.idle||(Zu(r),r.advance(e),r.idle||t.push(r))}return ka=0,rc=xn,rc.length=0,xn=t,xn.length>0}function m_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var g_=(e,t,n)=>Math.min(Math.max(n,e),t),y_={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},On="[-+]?\\d*\\.?\\d+",Ma=On+"%";function ws(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var b_=new RegExp("rgb"+ws(On,On,On)),w_=new RegExp("rgba"+ws(On,On,On,On)),E_=new RegExp("hsl"+ws(On,Ma,Ma)),x_=new RegExp("hsla"+ws(On,Ma,Ma,On)),__=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,S_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,C_=/^#([0-9a-fA-F]{6})$/,$_=/^#([0-9a-fA-F]{8})$/;function T_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=C_.exec(e))?parseInt(t[1]+"ff",16)>>>0:hr&&hr[e]!==void 0?hr[e]:(t=b_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|255)>>>0:(t=w_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|Wf(t[4]))>>>0:(t=__.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=$_.exec(e))?parseInt(t[1],16)>>>0:(t=S_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=E_.exec(e))?(Bf(Hf(t[1]),ea(t[2]),ea(t[3]))|255)>>>0:(t=x_.exec(e))?(Bf(Hf(t[1]),ea(t[2]),ea(t[3]))|Wf(t[4]))>>>0:null}function oc(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 Bf(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oc(o,r,e+1/3),a=oc(o,r,e),s=oc(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function Qr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Hf(e){return(parseFloat(e)%360+360)%360/360}function Wf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ea(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zf(e){let t=T_(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var di=(e,t,n)=>{if(me.fun(e))return e;if(me.arr(e))return di({range:e,output:t,extrapolate:n});if(me.str(e.output[0]))return Gu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=R_(u,i);return I_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function I_(e,t,n,r,o,i,a,s,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function R_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var O_=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return g_(0,1,o/e)},ja=1.70158,ta=ja*1.525,Uf=ja+1,Yf=2*Math.PI/3,Kf=2*Math.PI/4.5,na=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,P_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Uf*e*e*e-ja*e*e,easeOutBack:e=>1+Uf*Math.pow(e-1,3)+ja*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ta+1)*2*e-ta)/2:(Math.pow(2*e-2,2)*((ta+1)*(e*2-2)+ta)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Yf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Yf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Kf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Kf)/2+1,easeInBounce:e=>1-na(1-e),easeOutBounce:na,easeInOutBounce:e=>e<.5?(1-na(1-2*e))/2:(1+na(2*e-1))/2,steps:O_},fi=Symbol.for("FluidValue.get"),vo=Symbol.for("FluidValue.observers"),wn=e=>!!(e&&e[fi]),an=e=>e&&e[fi]?e[fi]():e,qf=e=>e[vo]||null;function A_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function pi(e,t){const n=e[vo];n&&n.forEach(r=>{A_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");D_(this,e)}},D_=(e,t)=>Zv(e,fi,t);function xo(e,t){if(e[fi]){let n=e[vo];n||Zv(e,vo,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hi(e,t){const n=e[vo];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[vo]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ya=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,N_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Xf=new RegExp(`(${ya.source})(%|[a-z]+)`,"i"),k_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Es=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=M_(e);if(!t||Xu())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&Es.test(n))return Qv(n);if(n)return n}return e},M_=e=>{const t=Es.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,j_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Jv=e=>{ic||(ic=hr?new RegExp(`(${Object.keys(hr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>an(i).replace(Es,Qv).replace(N_,zf).replace(ic,zf)),n=t.map(i=>i.match(ya).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>di({...e,output:i}));return i=>{var c;const a=!Xf.test(t[0])&&((c=t.find(u=>Xf.test(u)))==null?void 0:c.replace(ya,""));let s=0;return t[0].replace(ya,()=>`${o[s++](i)}${a||""}`).replace(k_,j_)}},Qu="react-spring: ",em=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Qu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},L_=em(console.warn);function F_(){L_(`${Qu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var V_=em(console.warn);function B_(){V_(`${Qu}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function xs(e){return me.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xu()&&Es.test(e)||e in(hr||{}))}var Ju=Xu()?l.useEffect:l.useLayoutEffect,H_=()=>{const e=l.useRef(!1);return Ju(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){const e=l.useState()[1],t=H_();return()=>{t.current&&e(Math.random())}}function W_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&z_(t,i.inputs)||(i={inputs:t,result:e()}):i=n,l.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function z_(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var nm=e=>l.useEffect(e,U_),U_=[];function Gf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),Y_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],el=(e,t)=>p_(e,vi,t),_s=e=>e&&e[vi]&&e[vi].getPayload(),rm=class{constructor(){el(this,this)}getPayload(){return this.payload||[]}},Oi=class extends rm{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,me.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Oi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return me.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,me.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},mi=class extends Oi{constructor(e){super(0),this._string=null,this._toString=di({output:[e,e]})}static create(e){return new mi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(me.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=di({output:[this.getValue(),e]})),this._value=0,super.reset()}},La={dependencies:null},Ss=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{Y_(n)?t[r]=n.getValue(e):wn(n)?t[r]=an(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Qe(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Bn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){La.dependencies&&wn(e)&&La.dependencies.add(e);const t=_s(e);t&&Qe(t,n=>this.add(n))}},om=class extends Ss{constructor(e){super(e)}static create(e){return new om(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(K_)),!0)}};function K_(e){return(xs(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:me.arr(e)?om:xs(e)?mi:Oi}var Zf=(e,t)=>{const n=!me.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=G_(o,b)},[o]),[s,c]=X_(r,t),u=tm(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new q_(d,c),m=l.useRef();Ju(()=>(m.current=f,Qe(c,b=>xo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>hi(b,m.current)),We.cancel(m.current.update))})),l.useEffect(d,[]),nm(()=>()=>{const b=m.current;Qe(b.deps,y=>hi(y,b))});const p=t.getComponentProps(s.getValue());return Re.createElement(e,{...p,ref:a})})},q_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&We.write(this.update)}};function X_(e,t){const n=new Set;return La.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ss(e),La.dependencies=null,[e,n]}function G_(e,t){return e&&(me.fun(e)?e(t):e.current=t),t}var Qf=Symbol.for("AnimatedComponent"),Z_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Ss(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Jf(a)||"Anonymous";return me.str(a)?a=i[a]||(i[a]=Zf(a,o)):a=a[Qf]||(a[Qf]=Zf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{me.arr(e)&&(s=Jf(a)),i[s]=i(a)}),{animated:i}},Jf=e=>me.str(e)?e:e&&me.str(e.displayName)?e.displayName:me.fun(e)&&e.name||null;function Ir(e,...t){return me.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(me.fun(e)?e(t):hn(e).includes(t))),im=(e,t)=>me.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Q_=e=>e,tl=(e,t=Q_)=>{let n=J_;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);me.und(i)||(r[o]=i)}return r},J_=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tS(e){const t={};let n=0;if(Bn(e,(r,o)=>{eS[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=tS(e);if(t){const n={to:t};return Bn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function gi(e){return e=an(e),me.arr(e)?e.map(gi):xs(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nS(e){for(const t in e)return!0;return!1}function qc(e){return me.fun(e)||me.arr(e)&&me.obj(e[0])}function rS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function oS(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var cm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Xc={...cm.default,mass:1,damping:1,easing:P_.linear,clamp:!1},iS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function aS(e,t,n){n&&(n={...n},ep(n,t),t={...n,...t}),ep(e,t),Object.assign(e,t);for(const a in Xc)e[a]==null&&(e[a]=Xc[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return me.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function ep(e,t){if(!me.und(t.decay))e.duration=void 0;else{const n=!me.und(t.tension)||!me.und(t.friction);(n||!me.und(t.frequency)||!me.und(t.damping)||!me.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var tp=[],sS=class{constructor(){this.changed=!1,this.values=tp,this.toValues=null,this.fromValues=tp,this.config=new iS,this.immediate=!1}};function um(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,d=Go(n.cancel??(r==null?void 0:r.cancel),t);if(d)p();else{me.und(n.pause)||(o.paused=Go(n.pause,t));let b=r==null?void 0:r.pause;b!==!0&&(b=o.paused||Go(b,t)),c=Ir(n.delay||0,t),b?(o.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-We.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=We.setTimeout(p,c),o.pauseQueue.add(f),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},a)}catch(b){s(b)}}})}var nl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?so(e.get()):t.every(n=>n.noop)?lm(e.get()):Rn(e.get(),t.every(n=>n.finished)),lm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Rn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),so=e=>({value:e,cancelled:!0,finished:!1});function dm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=n;return!i&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=tl(t,(T,S)=>S==="onRest"?void 0:T);let d,f;const m=new Promise((T,S)=>(d=T,f=S)),p=T=>{const S=o<=(n.cancelId||0)&&so(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new np,w=new rp;return(async()=>{if(An.skipAnimation)throw yi(n),w.result=Rn(r,!1),f(w),w;p(v);const C=me.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,P)=>{me.und(C[P])&&(C[P]=D)});const I=await r.start(C);return p(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(An.skipAnimation)return yi(n),Rn(r,!1);try{let T;me.arr(e)?T=(async S=>{for(const v of S)await b(v)})(e):T=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([T.then(d),m]),y=Rn(r.get(),!0,!1)}catch(T){if(T instanceof np)y=T.result;else if(T instanceof rp)y=T.result;else throw T}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return me.fun(a)&&We.batchedUpdates(()=>{a(y,r,r.item)}),y})()}function yi(e,t){qo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var np=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},rp=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof rl,cS=1,rl=class extends Gv{constructor(){super(...arguments),this.id=cS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Fn(this);return e&&e.getValue()}to(...e){return An.to(this,e)}interpolate(...e){return F_(),An.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){pi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||bs.sort(this),pi(this,{type:"priority",parent:this,priority:e})}},Lr=Symbol.for("SpringPhase"),fm=1,Zc=2,Qc=4,ac=e=>(e[Lr]&fm)>0,ir=e=>(e[Lr]&Zc)>0,Ao=e=>(e[Lr]&Qc)>0,op=(e,t)=>t?e[Lr]|=Zc|fm:e[Lr]&=~Zc,ip=(e,t)=>t?e[Lr]|=Qc:e[Lr]&=~Qc,uS=class extends rl{constructor(e,t){if(super(),this.animation=new sS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!me.und(e)||!me.und(t)){const n=me.obj(e)?{...e}:{...t,from:e};me.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return an(this.animation.to)}get velocity(){const e=Fn(this);return e instanceof Oi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ac(this)}get isAnimating(){return ir(this)}get isPaused(){return Ao(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=_s(r.to);!a&&wn(r.to)&&(o=hn(an(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const f=u.constructor==mi?1:a?a[d].lastPosition:o[d];let m=r.immediate,p=f;if(!m){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[d],T=u.v0!=null?u.v0:u.v0=me.arr(i.velocity)?i.velocity[d]:i.velocity;let S;const v=i.precision||(y==f?.005:Math.min(1,Math.abs(f-y)*.001));if(me.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,C=Math.exp(-(1-w)*b);p=y+T/(1-w)*(1-C),m=Math.abs(u.lastPosition-p)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const w=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!me.und(C),D=y==f?u.v0>0:y<f;let P,F=!1;const k=1,H=Math.ceil(e/k);for(let R=0;R<H&&(P=Math.abs(S)>w,!(!P&&(m=Math.abs(f-p)<=v,m)));++R){I&&(F=p==f||p>f==D,F&&(S=-S*C,p=f));const E=-i.tension*1e-6*(p-f),h=-i.friction*.001*S,$=(E+h)/i.mass;S=S+$*k,p=p+S*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),p=y+i.easing(w)*(f-y),S=(p-u.lastPosition)/e,m=w==1}u.lastVelocity=S,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=an(r.to);(c!==u||n)&&!i.decay?(s.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return We.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ir(this)){const{to:e,config:t}=this.animation;We.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return me.und(e)?(n=this.queue||[],this.queue=[]):n=[me.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>nl(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),yi(this._state,e&&this._lastCallId),We.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=me.obj(n)?n[t]:n,(n==null||qc(n))&&(n=void 0),r=me.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ac(this)||(e.reverse&&([n,r]=[r,n]),r=an(r),me.und(r)?Fn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,tl(e,(a,s)=>/^on/.test(s)?im(a,n):a)),sp(this,e,"onProps"),No(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return um(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(ip(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ip(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Rn(this,Do(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=pm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(so(this));const r=!me.und(e.to),o=!me.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(so(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:d=c,from:f=u}=e;o&&!r&&(!t.default||me.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=an(f);const p=!Kn(d,c);p&&this._focus(d);const b=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&aS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||me.und(d))return n(Rn(this,!0));const w=me.und(t.reset)?o&&!t.default:!me.und(f)&&Go(t.reset,i),C=w?f:this.get(),I=gi(d),D=me.num(I)||me.arr(I)||xs(I),P=!b&&(!D||Go(a.immediate||t.immediate,i));if(p){const R=Kc(d);if(R!==v.constructor)if(P)v=this._set(I);else throw Error(`Cannot animate between ${v.constructor.name} and ${R.name}, as the "to" prop suggests`)}const F=v.constructor;let k=wn(d),H=!1;if(!k){const R=w||!ac(this)&&m;(p||R)&&(H=Kn(gi(C),I),k=!H),(!Kn(s.immediate,P)&&!P||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(H&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||wn(c))&&(s.values=v.getPayload(),s.toValues=wn(d)?null:F==mi?[1]:hn(I)),s.immediate!=P&&(s.immediate=P,!P&&!w&&this._set(c)),k)){const{onRest:R}=s;Qe(dS,h=>sp(this,t,h));const E=Rn(this,Do(this,c));Ho(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&We.batchedUpdates(()=>{var h;s.changed=!w,R==null||R(E,this),w?Ir(a.onRest,E):(h=s.onStart)==null||h.call(s,E,this)})}w&&this._set(C),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!p?this._pendingCalls.add(n):n(lm(C))}_focus(e){const t=this.animation;e!==t.to&&(qf(this)&&this._detach(),t.to=e,qf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;wn(t)&&(xo(t,this),Gc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;wn(e)&&hi(e,this)}_set(e,t=!0){const n=an(e);if(!me.und(n)){const r=Fn(this);if(!r||!Kn(n,r.getValue())){const o=Kc(n);!r||r.constructor!=o?el(this,o.create(n)):r.setValue(n),r&&We.batchedUpdates(()=>{this._onChange(n,t)})}}return Fn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Rn(this,Do(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ir(this.animation.onChange,e,this)),Ir(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Fn(this).reset(an(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(op(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():bs.start(this)}_stop(e,t){if(ir(this)){op(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),pi(this,{type:"idle",parent:this});const r=t?so(this.get()):Rn(this.get(),Do(this,e??n.to));Ho(this._pendingCalls,r),n.changed&&(n.changed=!1,No(this,"onRest",r,this))}}};function Do(e,t){const n=gi(t),r=gi(e.get());return Kn(r,n)}function pm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&sm(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||qc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=sm(e),r=new Set;return me.obj(t)&&ap(t,r),me.obj(n)&&ap(n,r),e.keys=r.size?Array.from(r):null,e}function lS(e){const t=bi(e);return me.und(t.default)&&(t.default=tl(t)),t}function ap(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var dS=["onStart","onRest","onChange","onPause","onResume"];function sp(e,t,n){e.animation[n]=t[n]!==am(t,n)?im(t[n],e.key):void 0}function No(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var fS=["onStart","onChange","onRest"],pS=1,hS=class{constructor(t,n){this.id=pS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];me.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(bi(t)),this}start(t){let{queue:n}=this;return t?n=hn(t).map(bi):this.queue=[],this._flush?this._flush(this,n):(ym(this,n),Jc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Qe(hn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(me.und(t))this.start({pause:!0});else{const n=this.springs;Qe(hn(t),r=>n[r].pause())}return this}resume(t){if(me.und(t))this.start({pause:!1});else{const n=this.springs;Qe(hn(t),r=>n[r].resume())}return this}each(t){Bn(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,o=this._active.size>0,i=this._changed.size>0;(o&&!this._started||i&&!this._started)&&(this._started=!0,qo(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!o&&this._started,s=i||a&&r.size?this.get():null;i&&n.size&&qo(n,([c,u])=>{u.value=s,c(u,this,this._item)}),a&&(this._started=!1,qo(r,([c,u])=>{u.value=s,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;We.onFrame(this._onFrame)}};function Jc(e,t){return Promise.all(t.map(n=>hm(e,n))).then(n=>nl(e,n))}async function hm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=me.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=me.arr(o)||me.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(fS,y=>{const T=t[y];if(me.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:w})=>{const C=S.get(T);C?(v||(C.finished=!1),w&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Ho(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),p=t.cancel===!0||am(t,"cancel")===!0;(d||p&&f.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){p?(yi(f,e._lastAsyncId),T(so(e))):(y.onRest=s,T(dm(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=nl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=pm(t,a,o);if(y)return ym(e,[y]),hm(e,y,!0)}return c&&We.batchedUpdates(()=>c(b,e,e.item)),b}function cp(e,t){const n={...e.springs};return t&&Qe(hn(t),r=>{me.und(r.keys)&&(r=bi(r)),me.obj(r.to)||(r={...r,to:void 0}),gm(n,r,o=>mm(o))}),vm(e,n),n}function vm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,xo(n,e))})}function mm(e,t){const n=new uS;return n.key=e,t&&xo(n,t),n}function gm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ym(e,t){Qe(t,n=>{gm(e.springs,n,r=>mm(r,e))})}var Cs=({children:e,...t})=>{const n=l.useContext(Fa),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=W_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Fa;return Re.createElement(i,{value:t},e)},Fa=vS(Cs,{});Cs.Provider=Fa.Provider;Cs.Consumer=Fa.Consumer;function vS(e,t){return Object.assign(e,Re.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var mS=()=>{const e=[],t=function(r){B_();const o=[];return Qe(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Qe(e,r=>r.pause(...arguments)),this},t.resume=function(){return Qe(e,r=>r.resume(...arguments)),this},t.set=function(r){Qe(e,(o,i)=>{const a=me.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(me.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return Qe(e,r=>r.stop(...arguments)),this},t.update=function(r){return Qe(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return me.fun(r)?r(i,o):r};return t._getProps=n,t};function gS(e,t,n){const r=me.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?mS():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const w=cp(S,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{vm(S,w),s.queue.push(()=>{I(Jc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=Gf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{rS(S,o),S.stop(!0)}),c.current.length=e,f(d,e)},[e]),l.useMemo(()=>{f(0,Math.min(d,e))},n);function f(S,v){for(let w=S;w<v;w++){const C=c.current[w]||(c.current[w]=new hS(null,s.flush)),I=r?r(w,C):t[w];I&&(u[w]=lS(I))}}const m=c.current.map((S,v)=>cp(S,u[v])),p=l.useContext(Cs),b=Gf(p),y=p!==b&&nS(p);Ju(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:p});const C=u[w];C&&(oS(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),nm(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function yS(e,t){const n=me.fun(e),[[r],o]=gS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var bm=class extends rl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Kc(n);el(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Kn(t,n)||(Fn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&up(this._active)&&sc(this)}_get(){const e=me.arr(this.source)?this.source.map(an):hn(an(this.source));return this.calc(...e)}_start(){this.idle&&!up(this._active)&&(this.idle=!1,Qe(_s(this),e=>{e.done=!1}),An.skipAnimation?(We.batchedUpdates(()=>this.advance()),sc(this)):bs.start(this))}_attach(){let e=1;Qe(hn(this.source),t=>{wn(t)&&xo(t,this),Gc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(hn(this.source),e=>{wn(e)&&hi(e,this)}),this._active.clear(),sc(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=hn(this.source).reduce((t,n)=>Math.max(t,(Gc(n)?n.priority:0)+1),0))}};function bS(e){return e.idle!==!1}function up(e){return!e.size||Array.from(e).every(bS)}function sc(e){e.idle||(e.idle=!0,Qe(_s(e),t=>{t.done=!0}),pi(e,{type:"idle",parent:e}))}var Jr=(e,...t)=>new bm(e,t);An.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function wS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!wm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var lp={};function ES(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:lp[f]||(lp[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in r)if(r.hasOwnProperty(f)){const m=wS(f,r[f]);wm.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),_S=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(_S.forEach(n=>e[xS(n,t)]=e[t]),e),Zo);var SS=/^(matrix|translate|scale|rotate|skew)/,CS=/^(translate)/,$S=/^(rotate|skew)/,cc=(e,t)=>me.num(e)&&e!==0?e+t:e,ba=(e,t)=>me.arr(e)?e.every(n=>ba(n,t)):me.num(e)?e===t:parseFloat(e)===t,TS=class extends Ss{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>cc(s,"px")).join(",")})`,ba(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(SS.test(s)){if(delete r[s],me.und(a))return;const c=CS.test(s)?"px":$S.test(s)?"deg":"";o.push(hn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,ba(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,ba(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new IS(o,i)),super(r)}},IS=class extends Gv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Qe(this.inputs,(n,r)=>{const o=an(n[0]),[i,a]=this.transforms[r](me.arr(o)?o:n.map(an));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>wn(n)&&xo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>wn(n)&&hi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),pi(this,e)}},RS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];An.assign({batchedUpdates:pn.unstable_batchedUpdates,createStringInterpolator:Jv,colors:y_});var OS=Z_(RS,{applyAnimatedValues:ES,createAnimatedStyle:e=>new TS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),PS=OS.animated;function eu(e,t){return e.map(function(n,r){return n+t[r]})}function ol(e,t){return e.map(function(n,r){return n-t[r]})}function tu(e){return Math.hypot.apply(Math,e)}function AS(e,t,n){var r=tu(t),o=r===0?0:1/r,i=n===0?0:1/n,a=i*r,s=t.map(function(d){return i*d}),c=t.map(function(d){return o*d}),u=tu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function nu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function DS(e,t,n){return Math.max(t,Math.min(e,n))}function NS(e,t){return Math.pow(e,t*5)}function dp(e,t,n){return t===0||Math.abs(t)===1/0?NS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?DS(e,t,n):e<t?-dp(t-e,n-t,r)+t:e>n?+dp(e-n,n-t,r)+n:e}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kS(e,t,n){return t&&fp(e.prototype,t),n&&fp(e,n),e}function nn(){return nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nn.apply(this,arguments)}function Em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function MS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jS(e,t){if(e){if(typeof e=="string")return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pp(e,t)}}function pp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $s(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=jS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function xm(){}function _m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?xm:t.length===1?t[0]:function(){for(var r,o=$s(t),i;!(i=o()).done;){var a=i.value;r=a.apply(this,arguments)||r}return r}}function ur(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function hp(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function il(e,t){e===void 0&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=il(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function LS(){try{return"constructor"in GestureEvent}catch{return!1}}function Sm(){return typeof window<"u"&&"ontouchstart"in window}function FS(){return typeof window<"u"&&"onpointerdown"in window}function Cm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function $m(e){return Array.from(Cm(e)).map(function(t){return t.identifier})}function vp(e){var t="buttons"in e?e.buttons:0,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey;return{buttons:t,shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}}var VS=function(t){return t};function mp(e,t){t===void 0&&(t=VS);var n=Cm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var BS=180,HS=.15,WS=.5,zS=50,US=250,YS={threshold:function(t){return t===void 0&&(t=0),ur(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return ur(HS);case!1:return ur(0);default:return ur(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:ur(t)},transform:!0},Tm=nn({},YS,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(f){return Tm.bounds(t(f))};var n=t,r=n.left,o=r===void 0?-1/0:r,i=n.right,a=i===void 0?1/0:i,s=n.top,c=s===void 0?-1/0:s,u=n.bottom,d=u===void 0?1/0:u;return[[o,a],[c,d]]}}),KS=typeof window<"u"&&window.document&&window.document.createElement,qS={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=KS?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,o=r===void 0?!0:r,i=n.capture,a=i===void 0?!1:i;return{passive:o,capture:a}},transform:!0},XS=nn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),r=FS();return!!(t&&n||n&&!r)},experimental_preventWindowScrollY:function(t){return t===void 0&&(t=!1),t},threshold:function(t,n,r){var o=r.filterTaps,i=o===void 0?!1:o,a=r.lockDirection,s=a===void 0?!1:a,c=r.axis,u=c===void 0?void 0:c,d=ur(t,i?3:s||u?1:0);return this.filterTaps=i,d},swipeVelocity:function(t){return t===void 0&&(t=WS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=zS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=US),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return BS;case!1:return 0;default:return t}}});function GS(e){return e===void 0&&(e={}),il(e,qS)}function ZS(e){return e===void 0&&(e={}),il(e,XS)}function QS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=MS(e,["domTarget","eventOptions","window","enabled"]),a=GS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=ZS(i),a}function ko(e){return nn({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:xm,canceled:!1,memo:void 0,args:void 0},e)}function Im(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},t=ko({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),n=ko({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:o,scroll:i}}var Tr=new Map,JS=function(t){return t},eC=function(){function e(n,r){var o=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(i,a){var s;a===void 0&&(a=140),clearTimeout(o.controller.timeouts[o.stateKey]);for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];o.controller.timeouts[o.stateKey]=(s=window).setTimeout.apply(s,[i,a].concat(u))},this.clearTimeout=function(){clearTimeout(o.controller.timeouts[o.stateKey])},this.fireGestureHandler=function(i){if(i===void 0&&(i=!1),o.state._blocked)return o.debounced||(o.state._active=!1,o.clean()),null;if(!i&&!o.state.intentional&&!o.config.triggerAllEvents)return null;if(o.state.intentional){var a=o.state.active,s=o.state._active;o.state.active=s,o.state.first=s&&!a,o.state.last=a&&!s,o.controller.state.shared[o.ingKey]=s}var c=o.controller.pointerIds.size||o.controller.touchIds.size,u=o.controller.state.shared.buttons>0||c>0,d=nn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),f=o.handler(d);return o.state.memo=f!==void 0?f:o.state.memo,d},this.controller=n,this.args=r}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,o){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var o=this.config.rubberband,i=this.state,a=i._bounds,s=i._initial,c=i._active,u=i._intentional,d=i.lastOffset,f=i.movement,m=i._threshold,p=this.getInternalMovement(r,this.state),b=u[0]===!1?gp(p[0],m[0]):u[0],y=u[1]===!1?gp(p[1],m[1]):u[1],T=this.checkIntentionality([b,y],p);if(T._blocked)return nn({},T,{_movement:p,delta:[0,0]});var S=T._intentional,v=p,w=[S[0]!==!1?p[0]-S[0]:0,S[1]!==!1?p[1]-S[1]:0],C=eu(w,d),I=c?o:[0,0];return w=yp(a,eu(w,s),I),nn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:yp(a,C,I),delta:ol(w,f)})},t.clean=function(){this.clearTimeout()},kS(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||JS}}]),e}();function gp(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function yp(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],c=s[0],u=s[1],d=e[1],f=d[0],m=d[1];return[Qo(r,c,u,i),Qo(o,f,m,a)]}function uc(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values,s=n?0:o-r.startTime;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:s,previous:a}}function tC(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,c=e.transform,u=o.offset,d=n.timeStamp,f=i.initial,m=i.bounds,p=i.threshold,b=ol(c(p),c([0,0])).map(Math.abs),y=nn({},Im()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return nn({},y,{_initial:hp(f,y),_bounds:hp(m,y)})}var nC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),this.supportsGestureEvents=LS(),this.bind=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a={},s=$s(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(p){Ln(a,p,function(b){return n.nativeRefs[p](nn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?cC(n,a):uC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Om(n.config),o=n.config.eventOptions;r&&Pi(r,Rm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),iC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function rC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function oC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(t).forEach(function(n){return e.touchIds.delete(n)})}function iC(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o){var a=o[i];Pi(n,a,r)}e.windowListeners={}}}function aC(e,t,n){var r=e.config,o=e.windowListeners;n===void 0&&(n=r.eventOptions),r.window&&(Pi(r.window,o[t],n),delete o[t])}function sC(e,t,n,r){var o=e.config,i=e.windowListeners;n===void 0&&(n=[]),r===void 0&&(r=o.eventOptions),o.window&&(Pi(o.window,i[t],r),Pm(o.window,i[t]=n,r))}function cC(e,t){var n=e.config,r=e.domListeners,o=Om(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Rm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],d=c[1],f=u.slice(2).toLowerCase();r.push([f,_m.apply(void 0,d)])}Pm(o,r,i)}function uC(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],c=s[0],u=s[1],d=Array.isArray(u)?u:[u],f=c+o;r[f]=_m.apply(void 0,d)}return r}function Rm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Om(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Ln(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Pm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Pi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function lC(e,t,n){n===void 0&&(n={});var r=fC(e),o=l.useMemo(function(){return new nC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?dC:o.bind}function dC(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function fC(e){var t=new Set;return e.drag&&t.add(Tr.get("drag")),e.wheel&&t.add(Tr.get("wheel")),e.scroll&&t.add(Tr.get("scroll")),e.move&&t.add(Tr.get("move")),e.pinch&&t.add(Tr.get("pinch")),e.hover&&t.add(Tr.get("hover")),t}var pC=function(e){Em(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return ol(o,i.initial)},n.checkIntentionality=function(o,i){if(o[0]===!1&&o[1]===!1)return{_intentional:o,axis:this.state.axis};var a=i.map(Math.abs),s=a[0],c=a[1],u=this.state.axis||(s>c?"x":s<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:o,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:o,_blocked:!0,axis:u}:(o[u==="x"?1:0]=!1,{_intentional:o,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(o,i){var a=this.getMovement(o);if(!a._blocked){var s=i.timeStamp-this.state.timeStamp;Object.assign(a,AS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(eC),hC=3;function bp(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var vC=function(e){Em(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.setPointerCapture=function(o){if(!(r.config.useTouch||document.pointerLockElement)){var i=o.target,a=o.pointerId;i&&"setPointerCapture"in i&&i.setPointerCapture(a),r.updateGestureState({_dragTarget:i,_dragPointerId:a})}},r.releasePointerCapture=function(){if(!(r.config.useTouch||document.pointerLockElement)){var o=r.state,i=o._dragTarget,a=o._dragPointerId;if(a&&i&&"releasePointerCapture"in i&&(!("hasPointerCapture"in i)||i.hasPointerCapture(a)))try{i.releasePointerCapture(a)}catch{}}},r.preventScroll=function(o){r.state._dragPreventScroll&&o.cancelable&&o.preventDefault()},r.getEventId=function(o){return r.config.useTouch?o.changedTouches[0].identifier:o.pointerId},r.isValidEvent=function(o){return r.state._pointerId===r.getEventId(o)},r.shouldPreventWindowScrollY=r.config.experimental_preventWindowScrollY&&r.controller.supportsTouchEvents,r.setUpWindowScrollDetection=function(o){bp(o),sC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Un(r))],["touchcancel",r.clean.bind(Un(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Un(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,bp(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=mp(o,r.transform);r.updateSharedState(vp(o)),r.updateGestureState(nn({},tC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){rC(r.controller,o),!(!r.enabled||r.state._active)&&(r.setStartState(o),r.setPointerCapture(o),r.shouldPreventWindowScrollY?r.setUpWindowScrollDetection(o):r.config.delay>0?r.setUpDelayedDragTrigger(o):r.startDrag(o,!0))},r.onDragChange=function(o){if(!(r.state.canceled||!r.state._active||!r.isValidEvent(o)||r.state._lastEventType===o.type&&o.timeStamp===r.state.timeStamp)){var i;if(document.pointerLockElement){var a=o.movementX,s=o.movementY;i=eu(r.transform([a,s]),r.state.values)}else i=mp(o,r.transform);var c=r.getKinematics(i,o);if(!r.state._dragStarted){if(r.state._dragDelayed){r.startDrag(o);return}if(r.shouldPreventWindowScrollY)if(!r.state._dragPreventScroll&&c.axis)if(c.axis==="x")r.startDrag(o);else{r.state._active=!1;return}else return;else return}var u=vp(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=hC&&(m=!1),r.updateGestureState(nn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(oC(r.controller,o),!!r.isValidEvent(o)&&(r.clean(),!!r.state._active)){r.state._active=!1;var i=r.state._dragIsTap,a=r.state.velocities,s=a[0],c=a[1],u=r.state.movement,d=u[0],f=u[1],m=r.state._intentional,p=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,w=v[0],C=v[1],I=r.config.swipeDuration,D=nn({},uc(Un(r),o),r.getMovement(r.state.values)),P=[0,0];D.elapsedTime<I&&(p!==!1&&Math.abs(s)>T&&Math.abs(d)>w&&(P[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(P[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(nn({},D,{tap:i,swipe:P})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),aC(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0,_active:!1}),r.updateSharedState({buttons:0}),setTimeout(function(){return r.fireGestureHandler()},0))},r.onClick=function(o){r.state._dragIsTap||o.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(o,i){i===void 0&&(i=!1),!(!this.state._active||this.state._dragStarted)&&(i||this.setStartState(o),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(o){if(this.config.useTouch?(Ln(o,"onTouchStart",this.onDragStart),Ln(o,"onTouchMove",this.onDragChange),Ln(o,"onTouchEnd",this.onDragEnd),Ln(o,"onTouchCancel",this.onDragEnd)):(Ln(o,"onPointerDown",this.onDragStart),Ln(o,"onPointerMove",this.onDragChange),Ln(o,"onPointerUp",this.onDragEnd),Ln(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ln(o,i,this.onClick)}},t}(pC);function mC(e,t){var n,r=[],o,i=!1;function a(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return i&&n===this&&t(c,r)||(o=e.apply(this,c),i=!0,n=this,r=c),o}return a}function wa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wa(e[r],t[r]))return!1;return!0}var i;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!wa(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(o[r]==="_owner"&&e.$$typeof)&&!wa(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function gC(e,t){try{return wa(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function yC(e,t){t===void 0&&(t={}),Tr.set("drag",vC);var n=l.useRef();return n.current||(n.current=mC(QS,gC)),lC({drag:e},n.current(t))}var bC=ot({defaultClassName:"aglyib0",variantClassNames:{variant:{small:"aglyib1",medium:"aglyib2"}},defaultVariants:{},compoundVariants:[]});const Wr=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,variant:i,...a},s)=>{const c=e||"button",u=i==="medium"?12:8;return M.jsx(c,{ref:s,as:e,"data-test-id":a["data-test-id"],className:Oe(bC({variant:i}),n),disabled:o,style:r,...a,children:M.jsx(et,{display:"inline-flex",children:M.jsx(rs,{size:u,color:o?Ct.theme.colors.grey1:Ct.theme.colors.black})})})});Wr.displayName="Button";Wr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,variant:"medium"};const Am=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?M.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||M.jsxs(Ht,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Ht,{alignItems:"center",gap:"$16",children:[r&&M.jsx(x0,{cursor:"pointer",onClick:t,size:18,color:Ct.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(Gt,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(Wr,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):M.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Am.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function wC({targetRef:e,enabled:t}){const n=l.useRef({activate:()=>{throw new TypeError("Tried to activate aria hider too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){n.current.deactivate(),n.current={activate:()=>{},deactivate:()=>{}};return}const r=e.current;let o=!1,i=[],a=[];n.current={activate:()=>{if(o)return;o=!0;const{parentNode:s}=r;document.querySelectorAll("body > *").forEach(c=>{if(c===s)return;const u=c.getAttribute("aria-hidden");u!==null&&u!=="false"||(i.push(u),a.push(c),c.setAttribute("aria-hidden","true"))})},deactivate:()=>{o&&(o=!1,a.forEach((s,c)=>{const u=i[c];u===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",u)}),i=[],a=[])}}},[e,t]),n}/*!
141
141
  * tabbable 6.2.0
142
142
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
143
143
  */var Dm=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Va=Dm.join(","),Nm=typeof Element>"u",Fr=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Nm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ha=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},EC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},km=function(t,n,r){if(Ha(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Va));return n&&Fr.call(t,Va)&&o.unshift(t),o=o.filter(r),o},Mm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ha(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var d=Fr.call(a,Va);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Ha(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var p=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},jm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EC(t))&&!jm(t)?0:t.tabIndex},xC=function(t,n){var r=Rr(t);return r<0&&n&&!jm(t)?0:r},_C=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lm=function(t){return t.tagName==="INPUT"},SC=function(t){return Lm(t)&&t.type==="hidden"},CC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$C=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TC=function(t){if(!t.name)return!0;var n=t.form||Ba(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=$C(o,t.form);return!i||i===t},IC=function(t){return Lm(t)&&t.type==="radio"},RC=function(t){return IC(t)&&!TC(t)},OC=function(t){var n,r=t&&Ba(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,d,f;r=Ba(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},wp=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},PC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ba(t);if(c&&!c.shadowRoot&&o(c)===!0)return wp(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(OC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wp(t);return!1},AC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Fr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wa=function(t,n){return!(n.disabled||Ha(n)||SC(n)||PC(n,t)||CC(n)||AC(n))},ru=function(t,n){return!(RC(n)||Rr(n)<0||!Wa(t,n))},DC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=xC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(_C).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},kC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:ru.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DC}):r=km(t,n.includeContainer,ru.bind(null,n)),NC(r)},MC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:Wa.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=km(t,n.includeContainer,Wa.bind(null,n)),r},eo=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,Va)===!1?!1:ru(n,t)},jC=Dm.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,jC)===!1?!1:Wa(n,t)};/*!
144
144
  * focus-trap 7.5.2
145
145
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
146
- */function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=VC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VC(e){var t=FC(e,"string");return typeof t=="symbol"?t:String(t)}var _p={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},BC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},HC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},WC=function(t){return Jo(t)&&!t.shiftKey},zC=function(t){return Jo(t)&&t.shiftKey},Sp=function(t){return setTimeout(t,0)},Cp=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},ra=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},UC=[],YC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||UC,i=xp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:WC,isKeyBackward:zC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,E,h){return R&&R[E]!==void 0?R[E]:i[h||E]},u=function(R,E){var h=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function($){var A=$.container,j=$.tabbableNodes;return A.contains(R)||(h==null?void 0:h.includes(A))||j.find(function(W){return W===R})})},d=function(R){var E=i[R];if(typeof E=="function"){for(var h=arguments.length,$=new Array(h>1?h-1:0),A=1;A<h;A++)$[A-1]=arguments[A];E=E.apply(void 0,$)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=E;if(typeof E=="string"&&(j=r.querySelector(E),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],h=E&&E.firstTabbableNode;R=h||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=kC(R,i.tabbableOptions),h=MC(R,i.tabbableOptions),$=E.length>0?E[0]:void 0,A=E.length>0?E[E.length-1]:void 0,j=h.find(function(J){return eo(J)}),W=h.slice().reverse().find(function(J){return eo(J)}),U=!!E.find(function(J){return Rr(J)>0});return{container:R,tabbableNodes:E,focusableNodes:h,posTabIndexesFound:U,firstTabbableNode:$,lastTabbableNode:A,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ne=E.indexOf(B);return ne<0?L?h.slice(h.indexOf(B)+1).find(function(G){return eo(G)}):h.slice(0,h.indexOf(B)).reverse().find(function(G){return eo(G)}):E[ne+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function H(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){H(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,BC(R)&&R.select()}},b=function(R){var E=d("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,h=R.event,$=R.isBackward,A=$===void 0?!1:$;E=E||ra(h),m();var j=null;if(a.tabbableGroups.length>0){var W=u(E,h),U=W>=0?a.containerGroups[W]:void 0;if(W<0)A?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(A){var J=Cp(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(J<0&&(U.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!U.nextTabbableNode(E,!1))&&(J=W),J>=0){var B=J===0?a.tabbableGroups.length-1:J-1,L=a.tabbableGroups[B];j=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(E,!1))}else{var ne=Cp(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(ne<0&&(U.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!U.nextTabbableNode(E))&&(ne=W),ne>=0){var G=ne===a.tabbableGroups.length-1?0:ne+1,Y=a.tabbableGroups[G];j=Rr(E)>=0?Y.firstTabbableNode:Y.firstDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(E))}}else j=d("fallbackFocus");return j},T=function(R){var E=ra(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var E=ra(R),h=u(E,R)>=0;if(h||E instanceof Document)h&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var $,A=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var U=W.findIndex(function(J){return J===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<W.length&&($=W[U+1],A=!1):U-1>=0&&($=W[U-1],A=!1))}}else a.containerGroups.some(function(J){return J.tabbableNodes.some(function(B){return Rr(B)>0})})||(A=!1);else A=!1;A&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:E});h&&(Jo(R)&&R.preventDefault(),p(h))},w=function(R){if(HC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var E=ra(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _p.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sp(function(){p(f())}):p(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",w,!0),s},P=function(R){var E=R.some(function(h){var $=Array.from(h.removedNodes);return $.some(function(A){return A===a.mostRecentlyFocusedNode})});E&&p(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(P):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var E=c(R,"onActivate"),h=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var A=function(){$&&m(),I(),k(),h==null||h()};return $?($(a.containers.concat()).then(A,A),this):(A(),this)},deactivate:function(R){if(!a.active)return this;var E=xp({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_p.deactivateTrap(o,s);var h=c(E,"onDeactivate"),$=c(E,"onPostDeactivate"),A=c(E,"checkCanReturnFocus"),j=c(E,"returnFocus","returnFocusOnDeactivate");h==null||h();var W=function(){Sp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&A?(A(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(h){return typeof h=="string"?r.querySelector(h):h}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function KC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=YC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function qC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function XC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function GC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var al=!1;if(typeof window<"u"){var $p={get passive(){al=!0}};window.addEventListener("testPassive",null,$p),window.removeEventListener("testPassive",null,$p)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},ZC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},QC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},JC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},e$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||JC(n)&&r<0?Ua(t):(t.stopPropagation(),!0)},t$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(GC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&e$(o,t)},za||(document.addEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!0)):ZC(n)}},n$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!1)):fr.length||QC()};function r$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,t$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,n$(o))}}},[t,e,n]),r}var Dr=[],o$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},i$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Tp="ResizeObserver loop completed with undelivered notifications.",a$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Tp}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Tp),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Nr=function(e){return Object.freeze(e)},s$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Nr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ip=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},c$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},oa=new WeakMap,Rp=/auto|scroll/,u$=/^tb|vertical/,l$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},co=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new s$((n?t:e)||0,(n?e:t)||0)},Op=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),oa.has(e)&&!t)return oa.get(e);if(Wm(e))return oa.set(e,Op),Op;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!l$&&n.boxSizing==="border-box",i=u$.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),p=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+p,w=m+b,C=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,P=o?S+w:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-P-C,H=F+T+I+v,R=k+S+C+w,E=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(H,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(f,c,F,k)});return oa.set(e,E),E},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},d$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},f$=function(){var e=1/0,t=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new d$(u.target),f=Ym(u.target);s.push(d),u.lastReportedSize=Um(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Pp=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},p$=function(){var e=0;for(Pp(e);o$();)e=f$(),Pp(e);return i$()&&a$(),e>0},dc,Km=[],h$=function(){return Km.splice(0).forEach(function(e){return e()})},v$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return h$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},m$=function(e){v$(function(){requestAnimationFrame(e)})},Ea=0,g$=function(){return!!Ea},y$=250,b$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ap=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dp=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,w$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=y$),!fc){fc=!0;var r=Dp(t);m$(function(){var o=!1;try{o=p$()}finally{if(fc=!1,t=r-Dp(),!g$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,b$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ap.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ap.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new w$,Np=function(e){!Ea&&e>0&&ou.start(),Ea+=e,!Ea&&ou.stop()},E$=function(e){return!sl(e)&&!c$(e)&&getComputedStyle(e).display==="inline"},x$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return E$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),ia=new WeakMap,kp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},aa=function(){function e(){}return e.connect=function(t,n){var r=new _$(t,n);ia.set(t,r)},e.observe=function(t,n,r){var o=ia.get(t),i=o.observationTargets.length===0;kp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new x$(n,r&&r.box)),Np(1),ou.schedule())},e.unobserve=function(t,n){var r=ia.get(t),o=kp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),Np(-1))},e.disconnect=function(t){var n=this,r=ia.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),S$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");aa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.unobserve(this,t)},e.prototype.disconnect=function(){aa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ya(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function C$(e,t){const r=[].concat(e).map(Ya).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const $$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,T$={box:"border-box"};function pc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new S$(a);return s.observe(e.current,T$),()=>s.disconnect()},[e,a,n]),n?o:0}function I$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ya(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ya(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=I$(t,a,s),f=pc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=pc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=pc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-p,m+b)+(f+y+T)+p;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:p}}function O$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:T}=R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:w}=C$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:S,lastSnap:c.current}):D=I;const P=Ya(D);return S.reduce((F,k)=>Math.abs(k-P)<Math.abs(F-P)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:C,maxHeight:p}}function P$(){return yS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function A$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,p=(1-f)/(d-u),b=(s-u)*(p+f);return Wo(b,0,1)}),a=Jr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const D$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jp={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},N$=({initialState:e})=>e==="OPEN",k$=({initialState:e})=>e==="CLOSED",M$=Qx({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...D$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Jx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:k$,initiallyOpen:N$}}),{tension:j$,friction:sa}=cm.default,L$=["closed","opening","open","closing","dragging","snapping","resizing"];function F$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function V$({minHeight:e}){return e}const B$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=F$,snapPoints:p=V$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:P,showBack:F,onBack:k,onCloseWhenClickOutside:H=!0,hasHandleBar:R=!0,"data-test-id":E,padding:h,...$},A){const{ready:j,registerReady:W}=qC(),U=l.useRef(!1),J=l.useRef(S),B=l.useRef(v),L=l.useRef(w);l.useEffect(()=>{J.current=S,B.current=v,L.current=w},[v,S,w]);const[ne,G]=P$(),Y=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),X=l.useRef(null),ie=l.useRef(null),ee=l.useRef(0),oe=l.useRef(),re=l.useRef(!1),pe=XC(),{x:Ee="default",y:_e="default"}=h??{},Ae=Ee==="default",$e=_e==="default",ke=r$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=wC({targetRef:Y,enabled:j&&b}),it=KC({targetRef:Y,fallbackRef:ie,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=O$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:X,getSnapPoints:p,headerEnabled:i!==!1,headerRef:z,heightRef:ee,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:oe,conditions:{hasPaddingY:$e,hasHeader:i!==!1,hasCustomHeader:!!i}}),Se=l.useRef(Xe),ut=l.useRef(ze),Le=l.useRef(xt),Zt=l.useRef(Pt),St=l.useRef(0);wi(()=>{Se.current=Xe,Le.current=xt,ut.current=ze,Zt.current=Pt,St.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ye=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ye,...kt,mass:1,tension:j$,friction:Math.max(sa,sa+(sa-sa*Ye))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Ve,gt]=u_(M$,{devTools:$$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ye;return(Ye=B.current)==null?void 0:Ye.call(B,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"RESIZE",source:oe.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:oe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=J.current)==null?void 0:kt.call(J,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"RESIZE",source:oe.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:oe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:St.current,ready:0,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{U.current=!0,await Promise.all([ke.current.activate(),it.current.activate(),De.current.activate()])},[De,it,ke]),deactivate:l.useCallback(async()=>{ke.current.deactivate(),it.current.deactivate(),De.current.deactivate(),U.current=!1},[De,it,ke]),openImmediately:l.useCallback(async()=>{ee.current=St.current,await tt({y:St.current,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0}),ee.current=St.current,await tt({y:St.current,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:pe.current})},[tt,pe]),snapSmoothly:l.useCallback(async he=>{const Ye=Zt.current(he.y);ee.current=Ye,c.current=Ye,await tt({y:Ye,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:pe.current,config:{velocity:he.velocity}})},[tt,c,pe]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(ee.current);ee.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:oe.current==="element"?pe.current:!0})},[tt,c,pe]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:ee.current,immediate:!0}),ee.current=0,await tt({y:0,maxHeight:Se.current,maxSnap:Le.current,immediate:pe.current}),await tt({ready:0,immediate:!0})},[tt,pe])}});l.useEffect(()=>{j&&gt(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&&gt("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{ke.current.deactivate(),it.current.deactivate(),De.current.deactivate()},[De,it,ke]),l.useImperativeHandle(A,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ye,source:kt}})},get height(){return ee.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ye=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ye),he==null||he.addEventListener("touchmove",Ye),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ye),he==null||he.removeEventListener("touchmove",Ye),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const on=yC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:gn,memo:Lt=ne.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!U.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Wt=Lt+$n,en=$n*un,Nn=Math.max(ut.current,Math.min(Le.current,Wt+en*2));if(!Jt&&d&&At>0&&Wt+en<ut.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ut.current===Le.current?Wt<ut.current?Qo(Wt,ut.current,Le.current*2,.55):Qo(Wt,ut.current/2,Le.current,.55):Qo(Wt,d?0:ut.current,Le.current,.55):Nn;return I&&Ye?(Kt>=Le.current&&(Kt=Le.current),Lt===Le.current&&Z.current&&Z.current.scrollTop>0&&(Kt=Le.current),re.current=Kt<Le.current):re.current=!1,Ot&&gt("DRAG"),gn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(Le.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ut.current))throw new TypeError("minSnapRef is NaN!!");const Qt=A$({spring:ne});return M.jsxs(PS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":L$.find(Ve.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:Y,style:{...Qt,...T,opacity:ne.ready},"data-test-id":E,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...on({closeOnTap:H})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ae,"data-rsbs-overlay-has-padding-y":$e,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:P,bind:on,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ae,"data-rsbs-scroll-has-padding-y":$e,ref:Z,...I?on({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:X,"data-rsbs-footer":!0,...on(),children:o},"footer")]},"overlay")]})}),H$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(B$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const W$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},z$=W$;process.env.NODE_ENV;var U$=ot({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Y$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},K$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var q$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=z$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,p=Math.max(m,f);r([...n,{top:d-p/2,left:u-p/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?Ct.theme.colors.primary:Y$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:q$,style:{...i}},a))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},p)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Oe(U$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?K$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lp[r||"primary"]:Lp.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[X$,OP]=mn(qm),[G$,Z$]=X$(qm),Q$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),p=ct(t,w=>m(w)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=_n({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const C=()=>S(v.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[f,S]),l.createElement(G$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{S(C=>kr(C)?!0:!C),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(tT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Z$(J$,n);return l.createElement(yr,{present:r||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),tT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),f.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const nT=Q$,rT=eT;var oT="glci2q0",Fp="glci2q3",iT="glci2q4",Vp={disabled:"glci2q1",enabled:"glci2q2"},aT=ot({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:oT,children:[M.jsx(nT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:aT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(rT,{className:iT,children:[u==="indeterminate"&&M.jsx($0,{color:"white",className:Fp}),u===!0&&M.jsx(Eu,{color:"white",className:Fp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vp.disabled:Vp.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const sT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var cT=ot({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:d,...f},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":f["data-test-id"],className:Oe(cT({variant:n,isActive:r,size:d}),a),disabled:s,style:c,...f,children:[o&&o,t,i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:d,isDisabled:s,onClick:u})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};ul.displayName="Chips";const Zm="Dialog",[Qm,PP]=mn(Zm),[uT,wr]=Qm(Zm),lT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=_n({prop:r,defaultProp:o,onChange:i});return l.createElement(uT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},dT="DialogTrigger",fT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(dT,n),i=ct(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),pT="DialogPortal",[AP,Jm]=Qm(pT,{forceMount:void 0}),iu="DialogOverlay",hT=l.forwardRef((e,t)=>{const n=Jm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(vT,ae({},o,{ref:t}))):null}),vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",mT=l.forwardRef((e,t)=>{const n=Jm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(gT,ae({},o,{ref:t})):l.createElement(yT,ae({},o,{ref:t})))}),gT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=ct(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),yT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=ct(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(os,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),bT="DialogClose",wT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(bT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ET=lT,xT=fT,_T=hT,ST=mT,CT=wT;var $T="_1jc0z8o4",TT="_1jc0z8o0",IT=ot({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),RT="_1jc0z8o1",OT=ot({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),PT=ot({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(ST,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const AT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{className:t,ref:r,...n,children:e})),DT=({children:e,className:t,...n})=>M.jsx(vs,{className:t,...n,children:e}),NT=({children:e,...t})=>M.jsx(ET,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(xT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},p)=>!n&&i?null:M.jsx(NT,{open:n,onOpenChange:r,children:M.jsxs(DT,{children:[M.jsx(AT,{className:Oe(PT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Oe(IT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(CT,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:$T,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const Ts=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:TT,...r,children:t})});Ts.displayName="modalBody";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:RT,ref:o,...r,children:t})});Is.displayName="modalFooter";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:OT({bold:t}),...o,children:M.jsx(nn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Rs.displayName="modalHeader";Rs.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var kT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Rs,{children:o}),M.jsx(Ts,{children:M.jsx(nn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:kT,children:r})}),M.jsx(Is,{style:{maxHeight:"none"},children:M.jsxs(Ht,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const fl=l.createContext({}),MT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},jT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var LT=ot({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:FT}=Ct.atoms,pl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=FT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Oe(LT({variant:n}),u,r),style:o,...a,children:e})});pl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};pl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Oe(_E({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Di=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Oe(PE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Di.displayName="Label";Di.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:p,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,elementLeft:C,elementRight:I,className:D,...P}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[H,R]=l.useState(!1),[E,h]=l.useState(!1),$=j=>{if(H){const W=k.current;W&&W.focus(),E&&(R(!1),h(!1))}else o==null||o(j)},A=()=>{const j=k.current;j&&j.focus(),E&&(R(!1),h(!1))};return l.useEffect(()=>{E&&R(!0)},[E]),M.jsxs(wo,{addonLeft:m,addonRight:p,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,className:u,inputAreaClassName:IE,children:[M.jsx("input",{ref:k,type:t,className:Oe(TE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...P}),M.jsx(Di,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Oe(RE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>h(!0),onClick:A,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Oe(s&&!i&&!F&&$E),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(rs,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Ct.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Oe(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Oe(AE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Di,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var VT=ot({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=cl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const p=e||"button";return M.jsx(p,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Oe(VT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bp[r||"primary"]:Bp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var BT=ot({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const HT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[w,C]=l.useState(n),I=P=>{C("fill"),v(!0),u==null||u(P)},D=P=>{v(!1),c==null||c(P)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(HT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:p,className:Oe(BT({fit:w})),...m})});yl.displayName="Image";yl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=ot({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Oe(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var WT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(WT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var zT=ot({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hp="xw6nfa2",UT="xw6nfa3";const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Oe(zT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:UT,children:[t,M.jsx("div",{className:Hp,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hp,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(zy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),K&&K.nb()}let g=0,O=0,N=new Map,K=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),K=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),K=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Be,Ke){if(Be=ye.createShader(Be),ye.shaderSource(Be,Ke),ye.compileShader(Be),Ke=ye.getShaderInfoLog(Be),0<Ke.length)throw Ke;ye.attachShader(Dt,Be)};var Ie=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ie.getContext("webgl2",je);if(ye)O=2;else if(ye=Ie.getContext("webgl",je))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ie=ye.createProgram(),Et(Ie,ye.VERTEX_SHADER,`attribute vec2 vertex;
146
+ */function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=VC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VC(e){var t=FC(e,"string");return typeof t=="symbol"?t:String(t)}var _p={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},BC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},HC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},WC=function(t){return Jo(t)&&!t.shiftKey},zC=function(t){return Jo(t)&&t.shiftKey},Sp=function(t){return setTimeout(t,0)},Cp=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},ra=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},UC=[],YC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||UC,i=xp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:WC,isKeyBackward:zC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,E,h){return R&&R[E]!==void 0?R[E]:i[h||E]},u=function(R,E){var h=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function($){var A=$.container,j=$.tabbableNodes;return A.contains(R)||(h==null?void 0:h.includes(A))||j.find(function(W){return W===R})})},d=function(R){var E=i[R];if(typeof E=="function"){for(var h=arguments.length,$=new Array(h>1?h-1:0),A=1;A<h;A++)$[A-1]=arguments[A];E=E.apply(void 0,$)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=E;if(typeof E=="string"&&(j=r.querySelector(E),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],h=E&&E.firstTabbableNode;R=h||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=kC(R,i.tabbableOptions),h=MC(R,i.tabbableOptions),$=E.length>0?E[0]:void 0,A=E.length>0?E[E.length-1]:void 0,j=h.find(function(J){return eo(J)}),W=h.slice().reverse().find(function(J){return eo(J)}),U=!!E.find(function(J){return Rr(J)>0});return{container:R,tabbableNodes:E,focusableNodes:h,posTabIndexesFound:U,firstTabbableNode:$,lastTabbableNode:A,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ne=E.indexOf(B);return ne<0?L?h.slice(h.indexOf(B)+1).find(function(G){return eo(G)}):h.slice(0,h.indexOf(B)).reverse().find(function(G){return eo(G)}):E[ne+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function H(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){H(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,BC(R)&&R.select()}},b=function(R){var E=d("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,h=R.event,$=R.isBackward,A=$===void 0?!1:$;E=E||ra(h),m();var j=null;if(a.tabbableGroups.length>0){var W=u(E,h),U=W>=0?a.containerGroups[W]:void 0;if(W<0)A?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(A){var J=Cp(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(J<0&&(U.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!U.nextTabbableNode(E,!1))&&(J=W),J>=0){var B=J===0?a.tabbableGroups.length-1:J-1,L=a.tabbableGroups[B];j=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(E,!1))}else{var ne=Cp(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(ne<0&&(U.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!U.nextTabbableNode(E))&&(ne=W),ne>=0){var G=ne===a.tabbableGroups.length-1?0:ne+1,Y=a.tabbableGroups[G];j=Rr(E)>=0?Y.firstTabbableNode:Y.firstDomTabbableNode}else Jo(h)||(j=U.nextTabbableNode(E))}}else j=d("fallbackFocus");return j},T=function(R){var E=ra(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var E=ra(R),h=u(E,R)>=0;if(h||E instanceof Document)h&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var $,A=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var U=W.findIndex(function(J){return J===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<W.length&&($=W[U+1],A=!1):U-1>=0&&($=W[U-1],A=!1))}}else a.containerGroups.some(function(J){return J.tabbableNodes.some(function(B){return Rr(B)>0})})||(A=!1);else A=!1;A&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:E});h&&(Jo(R)&&R.preventDefault(),p(h))},w=function(R){if(HC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var E=ra(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _p.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sp(function(){p(f())}):p(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",w,!0),s},P=function(R){var E=R.some(function(h){var $=Array.from(h.removedNodes);return $.some(function(A){return A===a.mostRecentlyFocusedNode})});E&&p(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(P):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var E=c(R,"onActivate"),h=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var A=function(){$&&m(),I(),k(),h==null||h()};return $?($(a.containers.concat()).then(A,A),this):(A(),this)},deactivate:function(R){if(!a.active)return this;var E=xp({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),_p.deactivateTrap(o,s);var h=c(E,"onDeactivate"),$=c(E,"onPostDeactivate"),A=c(E,"checkCanReturnFocus"),j=c(E,"returnFocus","returnFocusOnDeactivate");h==null||h();var W=function(){Sp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&A?(A(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(h){return typeof h=="string"?r.querySelector(h):h}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function KC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=YC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function qC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function XC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function GC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var al=!1;if(typeof window<"u"){var $p={get passive(){al=!0}};window.addEventListener("testPassive",null,$p),window.removeEventListener("testPassive",null,$p)}var Fm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},ZC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},QC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},JC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},e$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||JC(n)&&r<0?Ua(t):(t.stopPropagation(),!0)},t$=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(GC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&e$(o,t)},za||(document.addEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!0)):ZC(n)}},n$=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!1)):fr.length||QC()};function r$({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,t$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,n$(o))}}},[t,e,n]),r}var Dr=[],o$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},i$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Tp="ResizeObserver loop completed with undelivered notifications.",a$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Tp}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Tp),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Nr=function(e){return Object.freeze(e)},s$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Nr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ip=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},c$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},oa=new WeakMap,Rp=/auto|scroll/,u$=/^tb|vertical/,l$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},co=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new s$((n?t:e)||0,(n?e:t)||0)},Op=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),oa.has(e)&&!t)return oa.get(e);if(Wm(e))return oa.set(e,Op),Op;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!l$&&n.boxSizing==="border-box",i=u$.test(n.writingMode||""),a=!r&&Rp.test(n.overflowY||""),s=!r&&Rp.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),p=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+p,w=m+b,C=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,P=o?S+w:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-P-C,H=F+T+I+v,R=k+S+C+w,E=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(H,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(f,c,F,k)});return oa.set(e,E),E},Um=function(e,t,n){var r=zm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},d$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},f$=function(){var e=1/0,t=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new d$(u.target),f=Ym(u.target);s.push(d),u.lastReportedSize=Um(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Pp=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},p$=function(){var e=0;for(Pp(e);o$();)e=f$(),Pp(e);return i$()&&a$(),e>0},dc,Km=[],h$=function(){return Km.splice(0).forEach(function(e){return e()})},v$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return h$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},m$=function(e){v$(function(){requestAnimationFrame(e)})},Ea=0,g$=function(){return!!Ea},y$=250,b$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ap=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dp=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,w$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=y$),!fc){fc=!0;var r=Dp(t);m$(function(){var o=!1;try{o=p$()}finally{if(fc=!1,t=r-Dp(),!g$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,b$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ap.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ap.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new w$,Np=function(e){!Ea&&e>0&&ou.start(),Ea+=e,!Ea&&ou.stop()},E$=function(e){return!sl(e)&&!c$(e)&&getComputedStyle(e).display==="inline"},x$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Um(this.target,this.observedBox,!0);return E$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),ia=new WeakMap,kp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},aa=function(){function e(){}return e.connect=function(t,n){var r=new _$(t,n);ia.set(t,r)},e.observe=function(t,n,r){var o=ia.get(t),i=o.observationTargets.length===0;kp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new x$(n,r&&r.box)),Np(1),ou.schedule())},e.unobserve=function(t,n){var r=ia.get(t),o=kp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),Np(-1))},e.disconnect=function(t){var n=this,r=ia.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),S$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");aa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ip(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.unobserve(this,t)},e.prototype.disconnect=function(){aa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ya(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function C$(e,t){const r=[].concat(e).map(Ya).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const $$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,T$={box:"border-box"};function pc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new S$(a);return s.observe(e.current,T$),()=>s.disconnect()},[e,a,n]),n?o:0}function I$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ya(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ya(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=I$(t,a,s),f=pc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=pc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=pc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-p,m+b)+(f+y+T)+p;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:p}}function O$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:T}=R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:w}=C$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:S,lastSnap:c.current}):D=I;const P=Ya(D);return S.reduce((F,k)=>Math.abs(k-P)<Math.abs(F-P)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:C,maxHeight:p}}function P$(){return yS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function A$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,p=(1-f)/(d-u),b=(s-u)*(p+f);return Wo(b,0,1)}),a=Jr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const D$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jp={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},N$=({initialState:e})=>e==="OPEN",k$=({initialState:e})=>e==="CLOSED",M$=Qx({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Mp,...jp}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...D$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Jx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:k$,initiallyOpen:N$}}),{tension:j$,friction:sa}=cm.default,L$=["closed","opening","open","closing","dragging","snapping","resizing"];function F$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function V$({minHeight:e}){return e}const B$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=F$,snapPoints:p=V$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:P,showBack:F,onBack:k,onCloseWhenClickOutside:H=!0,hasHandleBar:R=!0,"data-test-id":E,padding:h,...$},A){const{ready:j,registerReady:W}=qC(),U=l.useRef(!1),J=l.useRef(S),B=l.useRef(v),L=l.useRef(w);l.useEffect(()=>{J.current=S,B.current=v,L.current=w},[v,S,w]);const[ne,G]=P$(),Y=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),X=l.useRef(null),ie=l.useRef(null),ee=l.useRef(0),oe=l.useRef(),re=l.useRef(!1),pe=XC(),{x:Ee="default",y:_e="default"}=h??{},Ae=Ee==="default",$e=_e==="default",ke=r$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=wC({targetRef:Y,enabled:j&&b}),it=KC({targetRef:Y,fallbackRef:ie,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=O$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:X,getSnapPoints:p,headerEnabled:i!==!1,headerRef:z,heightRef:ee,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:oe,conditions:{hasPaddingY:$e,hasHeader:i!==!1,hasCustomHeader:!!i}}),Se=l.useRef(Xe),ut=l.useRef(ze),Le=l.useRef(xt),Qt=l.useRef(Pt),St=l.useRef(0);wi(()=>{Se.current=Xe,Le.current=xt,ut.current=ze,Qt.current=Pt,St.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ye=1,...kt}={},...At})=>new Promise(en=>G({...At,config:{velocity:Ye,...kt,mass:1,tension:j$,friction:Math.max(sa,sa+(sa-sa*Ye))},onRest:(...Ot)=>{en(...Ot),he==null||he(...Ot)}})),[G]),[Ve,gt]=u_(M$,{devTools:$$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ye;return(Ye=B.current)==null?void 0:Ye.call(B,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"RESIZE",source:oe.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:oe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=J.current)==null?void 0:kt.call(J,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=J.current)==null?void 0:he.call(J,{type:"RESIZE",source:oe.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ye;return(Ye=L.current)==null?void 0:Ye.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:oe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:St.current,ready:0,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{U.current=!0,await Promise.all([ke.current.activate(),it.current.activate(),De.current.activate()])},[De,it,ke]),deactivate:l.useCallback(async()=>{ke.current.deactivate(),it.current.deactivate(),De.current.deactivate(),U.current=!1},[De,it,ke]),openImmediately:l.useCallback(async()=>{ee.current=St.current,await tt({y:St.current,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:!0}),ee.current=St.current,await tt({y:St.current,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:St.current,immediate:pe.current})},[tt,pe]),snapSmoothly:l.useCallback(async he=>{const Ye=Qt.current(he.y);ee.current=Ye,c.current=Ye,await tt({y:Ye,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:pe.current,config:{velocity:he.velocity}})},[tt,c,pe]),resizeSmoothly:l.useCallback(async()=>{const he=Qt.current(ee.current);ee.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:oe.current==="element"?pe.current:!0})},[tt,c,pe]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:ee.current,immediate:!0}),ee.current=0,await tt({y:0,maxHeight:Se.current,maxSnap:Le.current,immediate:pe.current}),await tt({ready:0,immediate:!0})},[tt,pe])}});l.useEffect(()=>{j&&gt(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&&gt("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{ke.current.deactivate(),it.current.deactivate(),De.current.deactivate()},[De,it,ke]),l.useImperativeHandle(A,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Qt.current(he),velocity:Ye,source:kt}})},get height(){return ee.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ye=At=>{re.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ye),he==null||he.addEventListener("touchmove",Ye),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ye),he==null||he.removeEventListener("touchmove",Ye),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const on=yC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:en,first:Ot,last:gn,memo:Lt=ne.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!U.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Wt=Lt+$n,tn=$n*un,Nn=Math.max(ut.current,Math.min(Le.current,Wt+tn*2));if(!en&&d&&At>0&&Wt+tn<ut.current/2)return kt(),d(),Lt;let Kt=en?!d&&ut.current===Le.current?Wt<ut.current?Qo(Wt,ut.current,Le.current*2,.55):Qo(Wt,ut.current/2,Le.current,.55):Qo(Wt,d?0:ut.current,Le.current,.55):Nn;return I&&Ye?(Kt>=Le.current&&(Kt=Le.current),Lt===Le.current&&Z.current&&Z.current.scrollTop>0&&(Kt=Le.current),re.current=Kt<Le.current):re.current=!1,Ot&&gt("DRAG"),gn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:Se.current,maxSnap:Le.current,minSnap:ut.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(Le.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ut.current))throw new TypeError("minSnapRef is NaN!!");const Jt=A$({spring:ne});return M.jsxs(PS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":L$.find(Ve.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:Y,style:{...Jt,...T,opacity:ne.ready},"data-test-id":E,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...on({closeOnTap:H})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ae,"data-rsbs-overlay-has-padding-y":$e,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:P,bind:on,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ae,"data-rsbs-scroll-has-padding-y":$e,ref:Z,...I?on({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:X,"data-rsbs-footer":!0,...on(),children:o},"footer")]},"overlay")]})}),H$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?M.jsx(_v,{"data-rsbs-portal":!0,children:M.jsx(B$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:M.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const W$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},z$=W$;process.env.NODE_ENV;var U$=ot({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),Y$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},K$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var q$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=z$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,p=Math.max(m,f);r([...n,{top:d-p/2,left:u-p/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?Ct.theme.colors.primary:Y$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>M.jsx("span",{className:q$,style:{...i}},a))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},p)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Oe(U$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?K$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lp[r||"primary"]:Lp.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[X$,OP]=mn(qm),[G$,Z$]=X$(qm),Q$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),p=ct(t,w=>m(w)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=_n({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const C=()=>S(v.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[f,S]),l.createElement(G$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{S(C=>kr(C)?!0:!C),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(tT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Z$(J$,n);return l.createElement(yr,{present:r||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),tT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),f.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const nT=Q$,rT=eT;var oT="glci2q0",Fp="glci2q3",iT="glci2q4",Vp={disabled:"glci2q1",enabled:"glci2q2"},aT=ot({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Gm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),M.jsxs("div",{className:oT,children:[M.jsx(nT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:aT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(rT,{className:iT,children:[u==="indeterminate"&&M.jsx($0,{color:"white",className:Fp}),u===!0&&M.jsx(Eu,{color:"white",className:Fp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vp.disabled:Vp.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const sT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var cT=ot({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:d,...f},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":f["data-test-id"],className:Oe(cT({variant:n,isActive:r,size:d}),a),disabled:s,style:c,...f,children:[o&&o,M.jsx(Gt,{textAlign:"left",textStyle:d==="small"?"caption":"body2",children:t}),i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:d,isDisabled:s,onClick:u})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};ul.displayName="Chip";const Zm="Dialog",[Qm,PP]=mn(Zm),[uT,wr]=Qm(Zm),lT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=_n({prop:r,defaultProp:o,onChange:i});return l.createElement(uT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},dT="DialogTrigger",fT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(dT,n),i=ct(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),pT="DialogPortal",[AP,Jm]=Qm(pT,{forceMount:void 0}),iu="DialogOverlay",hT=l.forwardRef((e,t)=>{const n=Jm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(vT,ae({},o,{ref:t}))):null}),vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",mT=l.forwardRef((e,t)=>{const n=Jm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(gT,ae({},o,{ref:t})):l.createElement(yT,ae({},o,{ref:t})))}),gT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=ct(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),yT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=ct(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(os,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),bT="DialogClose",wT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(bT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ET=lT,xT=fT,_T=hT,ST=mT,CT=wT;var $T="_1jc0z8o4",TT="_1jc0z8o0",IT=ot({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),RT="_1jc0z8o1",OT=ot({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),PT=ot({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(ST,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const AT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{className:t,ref:r,...n,children:e})),DT=({children:e,className:t,...n})=>M.jsx(vs,{className:t,...n,children:e}),NT=({children:e,...t})=>M.jsx(ET,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(xT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},p)=>!n&&i?null:M.jsx(NT,{open:n,onOpenChange:r,children:M.jsxs(DT,{children:[M.jsx(AT,{className:Oe(PT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Oe(IT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(CT,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:$T,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const Ts=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,ref:o,className:TT,...r,children:t})});Ts.displayName="modalBody";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return M.jsx(i,{"data-test-id":n,as:e,className:RT,ref:o,...r,children:t})});Is.displayName="modalFooter";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return M.jsx(a,{"data-test-id":r,as:e,ref:i,className:OT({bold:t}),...o,children:M.jsx(Gt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Rs.displayName="modalHeader";Rs.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var kT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Rs,{children:o}),M.jsx(Ts,{children:M.jsx(Gt,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:kT,children:r})}),M.jsx(Is,{style:{maxHeight:"none"},children:M.jsxs(Ht,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const fl=l.createContext({}),MT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},jT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var LT=ot({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:FT}=Ct.atoms,pl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=FT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Oe(LT({variant:n}),u,r),style:o,...a,children:e})});pl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};pl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Oe(_E({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Di=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Oe(PE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Di.displayName="Label";Di.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:p,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,elementLeft:C,elementRight:I,className:D,...P}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[H,R]=l.useState(!1),[E,h]=l.useState(!1),$=j=>{if(H){const W=k.current;W&&W.focus(),E&&(R(!1),h(!1))}else o==null||o(j)},A=()=>{const j=k.current;j&&j.focus(),E&&(R(!1),h(!1))};return l.useEffect(()=>{E&&R(!0)},[E]),M.jsxs(wo,{addonLeft:m,addonRight:p,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,className:u,inputAreaClassName:IE,children:[M.jsx("input",{ref:k,type:t,className:Oe(TE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...P}),M.jsx(Di,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Oe(RE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>h(!0),onClick:A,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Oe(s&&!i&&!F&&$E),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(rs,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Ct.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Oe(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Oe(AE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Di,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var VT=ot({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Bp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=cl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const p=e||"button";return M.jsx(p,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Oe(VT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bp[r||"primary"]:Bp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var BT=ot({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const HT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[w,C]=l.useState(n),I=P=>{C("fill"),v(!0),u==null||u(P)},D=P=>{v(!1),c==null||c(P)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(HT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:p,className:Oe(BT({fit:w})),...m})});yl.displayName="Image";yl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var ng=ot({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Oe(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var WT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Oe(WT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var zT=ot({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hp="xw6nfa2",UT="xw6nfa3";const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return M.jsx(u,{"data-test-id":s["data-test-id"],className:Oe(zT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:UT,children:[t,M.jsx("div",{className:Hp,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hp,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(zy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),K&&K.nb()}let g=0,O=0,N=new Map,K=null,te=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),K=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){te&&(document.body.remove(te),te=null),K=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Be,Ke){if(Be=ye.createShader(Be),ye.shaderSource(Be,Ke),ye.compileShader(Be),Ke=ye.getShaderInfoLog(Be),0<Ke.length)throw Ke;ye.attachShader(Dt,Be)};var Ie=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ie.getContext("webgl2",je);if(ye)O=2;else if(ye=Ie.getContext("webgl",je))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ie=ye.createProgram(),Et(Ie,ye.VERTEX_SHADER,`attribute vec2 vertex;
147
147
  attribute vec2 uv;
148
148
  uniform vec4 mat;
149
149
  uniform vec2 translate;
@@ -156,8 +156,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156
156
  varying vec2 st;
157
157
  void main() {
158
158
  gl_FragColor = texture2D(image, st);
159
- }`),ye.bindAttribLocation(Ie,0,"vertex"),ye.bindAttribLocation(Ie,1,"uv"),ye.linkProgram(Ie),je=ye.getProgramInfoLog(Ie),0<je.trim().length)throw je;K=ye.getUniformLocation(Ie,"mat"),te=ye.getUniformLocation(Ie,"translate"),ye.useProgram(Ie),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Ie,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,K=null,te=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ie){if(!_())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ie),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),je};const de=new S(8),le=new S(8),ge=new S(10),Te=new S(10);this.kb=function(Ie,je,ye,Et,Dt){if(_()){var Be=de.push(Ie),Ke=le.push(je);(g.canvas.width!=Be||g.canvas.height!=Ke)&&(g.canvas.width=Be,g.canvas.height=Ke),g.viewport(0,Ke-je,Ie,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((Je,or)=>or.Ua-Je.Ua),Be=ge.push(Et),ue!=Be&&(g.bufferData(g.ARRAY_BUFFER,8*Be,g.DYNAMIC_DRAW),ue=Be),Be=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Be,Nt.Da),Be+=4*Nt.Da.length;console.assert(Be==4*Et);for(var ln of ye)g.bufferSubData(g.ARRAY_BUFFER,Be,ln.Xa),Be+=4*ln.Xa.length;console.assert(Be==8*Et),Be=Te.push(Dt),se!=Be&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Be,g.DYNAMIC_DRAW),se=Be),Nt=0;for(var zn of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,Nt,zn.indices),Nt+=2*zn.indices.length;console.assert(Nt==2*Dt),zn=0,ln=!0,Be=Nt=0;for(const Je of ye){Je.image.za!=zn&&(g.bindTexture(g.TEXTURE_2D,Je.image.cb||null),zn=Je.image.za),Je.zb?(g.scissor(Je.Ia,Ke-Je.Ja-Je.Pa,Je.Gb,Je.Pa),ln=!0):ln&&(g.scissor(0,Ke-je,Ie,je),ln=!1),ye=2/Ie;const or=-2/je;g.uniform4f(K,Je.oa[0]*ye*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ye*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(te,Je.oa[4]*ye*Je.va+ye*(Je.Ia-Je.xb*Je.va)-1,Je.oa[5]*or*Je.wa+or*(Je.Ja-Je.yb*Je.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Be),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Be+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Be+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Be==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};p.onRuntimeInitialized=function(){function _(ve){switch(ve){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(ve){return"rgba("+((16711680&ve)>>>16)+","+((65280&ve)>>>8)+","+((255&ve)>>>0)+","+((4278190080&ve)>>>24)/255+")"}function O(){0<Nt.length&&(v.kb(Ke.drawWidth(),Ke.drawHeight(),Nt,ln,zn),Nt=[],zn=ln=0,Ke.reset(512,512));for(const ve of Be){for(const Me of ve.da)Me();ve.da=[]}Be.clear()}var N=p.RenderPaintStyle;const K=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Te=N.stroke,Ie=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(ve){let Me=Bs;Me.total++;var vt=this,lt=new Image;lt.src=URL.createObjectURL(new Blob([ve],{type:"image/png"})),lt.onload=function(){if(vt.ab=lt,vt.cb=v.gb(lt),vt.size(lt.width,lt.height),Me.loaded++,Me.loaded===Me.total){const mt=Me.ready;mt&&(mt(),Me.ready=null)}}}}),Et=K.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(ve,Me,vt,lt,mt,Tt,rt){var ft=this.ia,yn=ft.addPath;ve=ve.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=vt,Ft.c=lt,Ft.d=mt,Ft.e=Tt,Ft.f=rt,yn.call(ft,ve,Ft)},fillRule:function(ve){this.Ga=ve},moveTo:function(ve,Me){this.ia.moveTo(ve,Me)},lineTo:function(ve,Me){this.ia.lineTo(ve,Me)},cubicTo:function(ve,Me,vt,lt,mt,Tt){this.ia.bezierCurveTo(ve,Me,vt,lt,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.extend("CanvasRenderPaint",{color:function(ve){this.Ha=g(ve)},thickness:function(ve){this.eb=ve},join:function(ve){switch(ve){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(ve){switch(ve){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(ve){this.bb=ve},blendMode:function(ve){this.$a=_(ve)},clearGradient:function(){this.qa=null},linearGradient:function(ve,Me,vt,lt){this.qa={Va:ve,Wa:Me,La:vt,Ma:lt,Ca:[]}},radialGradient:function(ve,Me,vt,lt){this.qa={Va:ve,Wa:Me,La:vt,Ma:lt,Ca:[],ub:!0}},addStop:function(ve,Me){this.qa.Ca.push({color:ve,stop:Me})},completeGradient:function(){},draw:function(ve,Me,vt){let lt=this.bb;var mt=this.Ha,Tt=this.qa;if(ve.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var rt=Tt.Wa;const yn=Tt.La;var ft=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=yn-mt,ft-=rt,mt=ve.createRadialGradient(mt,rt,0,mt,rt,Math.sqrt(Tt*Tt+ft*ft))):mt=ve.createLinearGradient(mt,rt,yn,ft);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],mt.addColorStop(rt.stop,g(rt.color));this.Ha=mt,this.qa=null}switch(lt){case Te:ve.strokeStyle=mt,ve.lineWidth=this.eb,ve.lineCap=this.xa,ve.lineJoin=this.ya,ve.stroke(Me);break;case ge:ve.fillStyle=mt,ve.fill(Me,vt)}}});const Be=new Set;let Ke=null,Nt=[],ln=0,zn=0;var Je=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(ve){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=ve.getContext("2d"),this.Fa=ve,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const ve=this.ha.length-6;if(6>ve)throw"restore() called without matching save().";this.ha.splice(ve),this.da.push(this.ba.restore.bind(this.ba))},transform:function(ve,Me,vt,lt,mt,Tt){const rt=this.ha,ft=rt.length-6;rt.splice(ft,6,rt[ft]*ve+rt[ft+2]*Me,rt[ft+1]*ve+rt[ft+3]*Me,rt[ft]*vt+rt[ft+2]*lt,rt[ft+1]*vt+rt[ft+3]*lt,rt[ft]*mt+rt[ft+2]*Tt+rt[ft+4],rt[ft+1]*mt+rt[ft+3]*Tt+rt[ft+5]),this.da.push(this.ba.transform.bind(this.ba,ve,Me,vt,lt,mt,Tt))},rotate:function(ve){const Me=Math.sin(ve);ve=Math.cos(ve),this.transform(ve,Me,-Me,ve,0,0)},_drawPath:function(ve,Me){this.da.push(Me.draw.bind(Me,this.ba,ve.ia,ve.Ga===Ie?"evenodd":"nonzero"))},drawImage:function(ve,...Me){var vt=this.ba;this.da.push(function(){vt.drawImage(ve,...Me)})},_drawRiveImage:function(ve,Me,vt){var lt=ve.ab;if(lt){var mt=this.ba,Tt=_(Me);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(lt,0,0),mt.globalAlpha=1})}},_getMatrix:function(ve){const Me=this.ha,vt=Me.length-6;for(let lt=0;6>lt;++lt)ve[lt]=Me[vt+lt]},_drawImageMesh:function(ve,Me,vt,lt,mt,Tt,rt,ft,yn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Id=yn-rt,Rd=Ft-ft;rt=Math.max(rt,0),ft=Math.max(ft,0),yn=Math.min(yn,Mn),Ft=Math.min(Ft,Bt);const So=yn-rt,Co=Ft-ft;if(console.assert(So<=Math.min(Id,Mn)),console.assert(Co<=Math.min(Rd,Bt)),!(0>=So||0>=Co)){yn=So<Id||Co<Rd,Mn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*Mn);Bt=v.wb(),xr>Bt&&(Ft*=Bt/xr,xr=Bt),_r>Bt&&(Mn*=Bt/_r,_r=Bt),Ke||(Ke=new p.DynamicRectanizer(Bt),Ke.reset(512,512)),Bt=Ke.addRect(xr,_r),0>Bt&&(O(),Be.add(this),Bt=Ke.addRect(xr,_r),console.assert(0<=Bt));var Od=Bt&65535,Pd=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:ve,Ia:Od,Ja:Pd,xb:rt,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(lt),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:yn,Ua:ve.za<<1|(yn?1:0)}),ln+=lt.length,zn+=Tt.length;var zr=this.ba,Hy=_(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=Hy,zr.globalAlpha=vt,zr.drawImage(v.canvas(),Od,Pd,xr,_r,rt,ft,So,Co),zr.restore()})}},_clipPath:function(ve){this.da.push(this.ba.clip.bind(this.ba,ve.ia,ve.Ga===Ie?"evenodd":"nonzero"))},clear:function(){Be.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(ve,Me){this.transform(1,0,0,1,ve,Me)}});p.makeRenderer=function(ve){return new Je(ve)},p.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=p.load,Bs=null;p.load=function(ve){return new Promise(function(Me){let vt=null;Bs={total:0,loaded:0,ready:function(){Me(vt)}},vt=or(ve),Bs.total==0&&Me(vt)})},N=new T,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ke&&Ke.delete()}};var w=Object.assign({},p),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",P="",F,k;(I||D)&&(D?P=self.location.href:typeof document<"u"&&document.currentScript&&(P=document.currentScript.src),f&&(P=f),P.indexOf("blob:")!==0?P=P.substr(0,P.replace(/[?#].*/,"").lastIndexOf("/")+1):P="",D&&(k=_=>{var g=new XMLHttpRequest;return g.open("GET",_,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(_,g,O)=>{var N=new XMLHttpRequest;N.open("GET",_,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var H=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(C=p.thisProgram);var E;p.wasmBinary&&(E=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&oe("no native wasm support detected");var h,$=!1,A,j,W,U,J,B,L,ne;function G(){var _=h.buffer;p.HEAP8=A=new Int8Array(_),p.HEAP16=W=new Int16Array(_),p.HEAP32=J=new Int32Array(_),p.HEAPU8=j=new Uint8Array(_),p.HEAPU16=U=new Uint16Array(_),p.HEAPU32=B=new Uint32Array(_),p.HEAPF32=L=new Float32Array(_),p.HEAPF64=ne=new Float64Array(_)}var Y,Z=[],ce=[],z=[];function X(){var _=p.preRun.shift();Z.unshift(_)}var ie=0,ee=null;function oe(_){throw p.onAbort&&p.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!re(pe)){var Ee=pe;pe=p.locateFile?p.locateFile(Ee,P):P+Ee}function _e(_){if(_==pe&&E)return new Uint8Array(E);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ae(_){if(!E&&(I||D)){if(typeof fetch=="function"&&!_.startsWith("file://"))return fetch(_,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+_+"'";return g.arrayBuffer()}).catch(()=>_e(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>_e(_))}function $e(_,g,O){return Ae(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),oe(N)})}function ke(_,g){var O=pe;return E||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?$e(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(K){return R("wasm streaming compile failed: "+K),R("falling back to ArrayBuffer instantiation"),$e(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(p)};function it(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=it(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function Se(_){throw new Pt(_)}var ut=_=>(_||Se("Cannot use deleted val. handle = "+_),Xe.get(_).value),Le=_=>{switch(_){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:_})}};function Zt(_){var g=Error,O=ze(_,function(N){this.name=_,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
160
- `+N.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O}var St=void 0,tt=void 0;function Ve(_){for(var g="";j[_];)g+=tt[j[_++]];return g}var gt=[];function rn(){for(;gt.length;){var _=gt.pop();_.W.na=!1,_.delete()}}var on=void 0,Qt={};function he(_,g){for(g===void 0&&Se("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ye={};function kt(_){_=$d(_);var g=Ve(_);return Wn(_),g}function At(_,g){var O=Ye[_];return O===void 0&&Se(g+" has unknown type "+kt(_)),O}function Jt(){}var Ot=!1;function gn(_){--_.count.value,_.count.value===0&&(_.ca?_.fa.ka(_.ca):_.Z.X.ka(_.Y))}function Lt(_,g,O){return g===O?_:O.$===void 0?null:(_=Lt(_,g,O.$),_===null?null:O.jb(_))}var Dn={};function tr(_,g){return g=he(_,g),Qt[g]}var un=void 0;function $n(_){throw new un(_)}function Wt(_,g){return g.Z&&g.Y||$n("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&$n("Both smartPtrType and smartPtr must be specified"),g.count={value:1},en(Object.create(_,{W:{value:g}}))}function en(_){return typeof FinalizationRegistry>"u"?(en=g=>g,_):(Ot=new FinalizationRegistry(g=>{gn(g.W)}),en=g=>{var O=g.W;return O.ca&&Ot.register(g,{W:O},g),g},Jt=g=>{Ot.unregister(g)},en(_))}var Nn={};function Kt(_){for(;_.length;){var g=_.pop();_.pop()(g)}}function Tn(_){return this.fromWireType(J[_>>2])}var kn={},nr={};function zt(_,g,O){function N(se){se=O(se),se.length!==_.length&&$n("Mismatched type converter count");for(var de=0;de<_.length;++de)V(_[de],se[de])}_.forEach(function(se){nr[se]=g});var K=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{Ye.hasOwnProperty(se)?K[de]=Ye[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{K[de]=Ye[se],++ue,ue===te.length&&N(K)}))}),te.length===0&&N(K)}function rr(_){switch(_){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${_}`)}}function x(_,g,O={}){var N=g.name;if(_||Se(`type "${N}" must have a positive integer typeid pointer`),Ye.hasOwnProperty(_)){if(O.tb)return;Se(`Cannot register type '${N}' twice`)}Ye[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(K=>K()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function Q(_){Se(_.W.Z.X.name+" instance already deleted")}function fe(){}function Ce(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||Se(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${_[g].aa})!`),_[g].aa[arguments.length].apply(this,arguments)},_[g].aa=[],_[g].aa[N.ma]=N}}function Pe(_,g,O){p.hasOwnProperty(_)?((O===void 0||p[_].aa!==void 0&&p[_].aa[O]!==void 0)&&Se(`Cannot register public name '${_}' twice`),Ce(p,_,_),p.hasOwnProperty(O)&&Se(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),p[_].aa[O]=g):(p[_]=g,O!==void 0&&(p[_].Hb=O))}function xe(_,g,O,N,K,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=K,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,g,O){for(;g!==O;)g.ra||Se(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),_=g.ra(_),g=g.$;return _}function nt(_,g){return g===null?(this.Aa&&Se(`null is not a valid ${this.name}`),0):(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Fe(_,g){if(g===null){if(this.Aa&&Se(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return _!==null&&_.push(this.ka,O),O}return 0}if(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&Se(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),O=we(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&Se("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:Se(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:O=g.W.ca;break;case 2:if(g.W.fa===this)O=g.W.ca;else{var N=g.clone();O=this.Bb(O,Le(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:Se("Unsupporting sharing policy")}return O}function He(_,g){return g===null?(this.Aa&&Se(`null is not a valid ${this.name}`),0):(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&Se(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Ge(_,g,O,N){this.name=_,this.X=g,this.Aa=O,this.ta=N,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Fe:(this.toWireType=N?nt:He,this.ea=null)}function qt(_,g,O){p.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),p[_].aa!==void 0&&O!==void 0?p[_].aa[O]=g:(p[_]=g,p[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=p["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=Y.get(g).apply(null,O);return N}};function qe(_,g){_=Ve(_);var O=_.includes("j")?Er(_,g):Y.get(g);return typeof O!="function"&&Se(`unknown function pointer with signature ${_}: ${g}`),O}var yd=void 0;function Hn(_,g){function O(te){K[te]||Ye[te]||(nr[te]?nr[te].forEach(O):(N.push(te),K[te]=!0))}var N=[],K={};throw g.forEach(O),new yd(`${_}: `+N.map(kt).join([", "]))}function Ni(_,g,O,N,K){var te=g.length;2>te&&Se("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=g[1]!==null&&O!==null,se=!1;for(O=1;O<g.length;++O)if(g[O]!==null&&g[O].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=te-2,ge=Array(le),Te=[],Ie=[];return function(){if(arguments.length!==le&&Se(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ie.length=0,Te.length=ue?2:1,Te[0]=K,ue){var je=g[1].toWireType(Ie,this);Te[1]=je}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ie,arguments[ye]),Te.push(ge[ye]);if(ye=N.apply(null,Te),se)Kt(Ie);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?je:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return je=de?g[0].fromWireType(ye):void 0,je}}function ki(_,g){for(var O=[],N=0;N<_;N++)O.push(B[g+4*N>>2]);return O}function bd(_,g,O){return _ instanceof Object||Se(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||Se(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||Se(`cannot call emscripten binding method ${O} on deleted object`),we(_.W.Y,_.W.Z.X,g.X)}function Ms(_){_>=Xe.Ea&&--Xe.get(_).Ta===0&&Xe.Za(_)}function Iy(_,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?A:j)[N])};case 1:return function(N){return this.fromWireType((O?W:U)[N>>1])};case 2:return function(N){return this.fromWireType((O?J:B)[N>>2])};default:throw new TypeError("Unknown integer type: "+_)}}function js(_){if(_===null)return"null";var g=typeof _;return g==="object"||g==="array"||g==="function"?_.toString():""+_}function Ry(_,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(ne[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Oy(_,g,O){switch(g){case 0:return O?function(N){return A[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return U[N>>1]};case 2:return O?function(N){return J[N>>2]}:function(N){return B[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var wd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ed=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&wd)return wd.decode(_.subarray(g,O));for(N="";g<O;){var K=_[g++];if(K&128){var te=_[g++]&63;if((K&224)==192)N+=String.fromCharCode((K&31)<<6|te);else{var ue=_[g++]&63;K=(K&240)==224?(K&15)<<12|te<<6|ue:(K&7)<<18|te<<12|ue<<6|_[g++]&63,65536>K?N+=String.fromCharCode(K):(K-=65536,N+=String.fromCharCode(55296|K>>10,56320|K&1023))}}else N+=String.fromCharCode(K)}return N},xd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Py=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&U[O];)++O;if(O<<=1,32<O-_&&xd)return xd.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var K=W[_+2*N>>1];if(K==0)break;O+=String.fromCharCode(K)}return O},Ay=(_,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*_.length?O/2:_.length;for(var K=0;K<O;++K)W[g>>1]=_.charCodeAt(K),g+=2;return W[g>>1]=0,g-N},Dy=_=>2*_.length,Ny=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var K=J[_+4*O>>2];if(K==0)break;++O,65536<=K?(K-=65536,N+=String.fromCharCode(55296|K>>10,56320|K&1023)):N+=String.fromCharCode(K)}return N},ky=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var K=0;K<_.length;++K){var te=_.charCodeAt(K);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++K);te=65536+((te&1023)<<10)|ue&1023}if(J[g>>2]=te,g+=4,g+4>O)break}return J[g>>2]=0,g-N},My=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},jy={};function Mi(_){var g=jy[_];return g===void 0?Ve(_):g}var ji=[];function Ly(_){var g=ji.length;return ji.push(_),g}function Fy(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(B[g+4*N>>2],"parameter "+N);return O}var _d=[],Ls={},Sd=()=>{if(!Fs){var _={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:C||"./this.program"},g;for(g in Ls)Ls[g]===void 0?delete _[g]:_[g]=Ls[g];var O=[];for(g in _)O.push(`${g}=${_[g]}`);Fs=O}return Fs},Fs,Vy=[null,[],[]];Object.assign(xt.prototype,{get(_){return this.ja[_]},has(_){return this.ja[_]!==void 0},Ya(_){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=_,g},Za(_){this.ja[_]=void 0,this.Oa.push(_)}}),Pt=p.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,p.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},St=p.PureVirtualError=Zt("PureVirtualError");for(var Cd=Array(256),Li=0;256>Li;++Li)Cd[Li]=String.fromCharCode(Li);tt=Cd,p.getInheritedInstanceCount=function(){return Object.keys(Qt).length},p.getLiveInheritedInstances=function(){var _=[],g;for(g in Qt)Qt.hasOwnProperty(g)&&_.push(Qt[g]);return _},p.flushPendingDeletes=rn,p.setDelayFunction=function(_){on=_,gt.length&&on&&on(rn)},un=p.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},fe.prototype.isAliasOf=function(_){if(!(this instanceof fe&&_ instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=_.W.Z.X;for(_=_.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)_=N.ra(_),N=N.$;return g===N&&O===_},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var _=en,g=Object,O=g.create,N=Object.getPrototypeOf(this),K=this.W;return _=_(O.call(g,N,{W:{value:{count:K.count,na:K.na,pa:K.pa,Y:K.Y,Z:K.Z,ca:K.ca,fa:K.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&Se("Object already scheduled for deletion"),Jt(this),gn(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&Se("Object already scheduled for deletion"),gt.push(this),gt.length===1&&on&&on(rn),this.W.na=!0,this},Ge.prototype.pb=function(_){return this.Sa&&(_=this.Sa(_)),_},Ge.prototype.Ka=function(_){this.ka&&this.ka(_)},Ge.prototype.argPackAdvance=8,Ge.prototype.readValueFromPointer=Tn,Ge.prototype.deleteObject=function(_){_!==null&&_.delete()},Ge.prototype.fromWireType=function(_){function g(){return this.ua?Wt(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Wt(this.X.ga,{Z:this,Y:_})}var O=this.pb(_);if(!O)return this.Ka(_),null;var N=tr(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=_,N.clone()):(N=N.clone(),this.Ka(_),N);if(N=this.X.ob(O),N=Dn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var K=Lt(O,this.X,N.X);return K===null?g.call(this):this.ua?Wt(N.X.ga,{Z:N,Y:K,fa:this,ca:_}):Wt(N.X.ga,{Z:N,Y:K})},yd=p.UnboundTypeError=Zt("UnboundTypeError");var By={I:function(_,g,O){_=Ve(_),g=At(g,"wrapper"),O=ut(O);var N=[].slice,K=g.X,te=K.ga,ue=K.$.ga,se=K.$.constructor;_=ze(_,function(){K.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new St(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:te}),this.__construct.apply(this,N.call(arguments))}),te.__construct=function(){this===te&&Se("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Jt(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),en(this),le=ge.Y,le=he(K,le),Qt.hasOwnProperty(le)?Se(`Tried to register registered instance: ${le}`):Qt[le]=this},te.__destruct=function(){this===te&&Se("Pass correct 'this' to __destruct"),Jt(this);var le=this.W.Y;le=he(K,le),Qt.hasOwnProperty(le)?delete Qt[le]:Se(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(te);for(var de in O)_.prototype[de]=O[de];return Le(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,K=g.Na,te=K.map(ue=>ue.sb).concat(K.map(ue=>ue.Db));zt([_],te,ue=>{var se={};return K.forEach((de,le)=>{var ge=ue[le],Te=de.qb,Ie=de.rb,je=ue[le+K.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Te(Ie,Dt)),write:(Dt,Be)=>{var Ke=[];ye(Et,Dt,je.toWireType(Ke,Be)),Kt(Ke)}}}),[{name:g.name,fromWireType:function(de){var le={},ge;for(ge in se)le[ge]=se[ge].read(de);return N(de),le},toWireType:function(de,le){for(var ge in se)if(!(ge in le))throw new TypeError(`Missing field: "${ge}"`);var Te=O();for(ge in se)se[ge].write(Te,le[ge]);return de!==null&&de.push(N,Te),Te},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,K){var te=rr(O);g=Ve(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:K},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=A;else if(O===2)se=W;else if(O===4)se=J;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,K,te,ue,se,de,le,ge,Te,Ie){ge=Ve(ge),te=qe(K,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ie=qe(Te,Ie);var je=it(ge);Pe(je,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),zt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(je,function(){if(Object.getPrototypeOf(this)!==Be)throw new Pt("Use 'new' to construct "+ge);if(Ke.la===void 0)throw new Pt(ge+" has no accessible constructor");var ln=Ke.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${ge} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ke.la).toString()}) parameters instead!`);return ln.apply(this,arguments)});var Be=Object.create(Dt,{constructor:{value:ye}});ye.prototype=Be;var Ke=new xe(ge,ye,Be,Ie,Et,te,se,le);Ke.$&&(Ke.$.sa===void 0&&(Ke.$.sa=[]),Ke.$.sa.push(Ke)),Et=new Ge(ge,Ke,!0,!1),Dt=new Ge(ge+"*",Ke,!1,!1);var Nt=new Ge(ge+" const*",Ke,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(je,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,K,te,ue){var se=ki(O,N);g=Ve(g),te=qe(K,te),zt([],[_],function(de){function le(){Hn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Te=de.X.constructor;return Te[g]===void 0?(le.ma=O-1,Te[g]=le):(Ce(Te,g,ge),Te[g].aa[O-1]=le),zt([],se,function(Ie){if(Ie=Ni(ge,[Ie[0],null].concat(Ie.slice(1)),null,te,ue),Te[g].aa===void 0?(Ie.ma=O-1,Te[g]=Ie):Te[g].aa[O-1]=Ie,de.X.sa)for(const je of de.X.sa)je.constructor.hasOwnProperty(g)||(je.constructor[g]=Ie);return[]}),[]})},s:function(_,g,O,N,K,te,ue,se){g=Ve(g),te=qe(K,te),zt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{Se(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),zt([],[O],function(Te){Te=Te[0];var Ie={get(){return Te.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ie.set=je=>{var ye=[];se(N,Te.toWireType(ye,je)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ie),[]}),[]})},o:function(_,g,O,N,K,te){var ue=ki(g,O);K=qe(N,K),zt([],[_],function(se){se=se[0];var de=`constructor ${se.name}`;if(se.X.la===void 0&&(se.X.la=[]),se.X.la[g-1]!==void 0)throw new Pt(`Cannot register multiple constructors with identical number of parameters (${g-1}) for class '${se.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return se.X.la[g-1]=()=>{Hn(`Cannot construct ${se.name} due to unbound types`,ue)},zt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=Ni(de,le,null,K,te),[]}),[]})},a:function(_,g,O,N,K,te,ue,se){var de=ki(O,N);g=Ve(g),te=qe(K,te),zt([],[_],function(le){function ge(){Hn(`Cannot call ${Te} due to unbound types`,de)}le=le[0];var Te=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ie=le.X.ga,je=Ie[g];return je===void 0||je.aa===void 0&&je.className!==le.name&&je.ma===O-2?(ge.ma=O-2,ge.className=le.name,Ie[g]=ge):(Ce(Ie,g,Te),Ie[g].aa[O-2]=ge),zt([],de,function(ye){return ye=Ni(Te,ye,le,te,ue),Ie[g].aa===void 0?(ye.ma=O-2,Ie[g]=ye):Ie[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,K,te,ue,se,de,le){g=Ve(g),K=qe(N,K),zt([],[_],function(ge){ge=ge[0];var Te=`${ge.name}.${g}`,Ie={get(){Hn(`Cannot access ${Te} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ie.set=de?()=>{Hn(`Cannot access ${Te} due to unbound types`,[O,ue])}:()=>{Se(Te+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Ie),zt([],de?[O,ue]:[O],function(je){var ye=je[0],Et={get(){var Be=bd(this,ge,Te+" getter");return ye.fromWireType(K(te,Be))},enumerable:!0};if(de){de=qe(se,de);var Dt=je[1];Et.set=function(Be){var Ke=bd(this,ge,Te+" setter"),Nt=[];de(le,Ke,Dt.toWireType(Nt,Be)),Kt(Nt)}}return Object.defineProperty(ge.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Ve(g),V(_,{name:g,fromWireType:function(O){var N=ut(O);return Ms(O),N},toWireType:function(O,N){return Le(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function K(){}O=rr(O),g=Ve(g),K.values={},V(_,{name:g,constructor:K,fromWireType:function(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Iy(g,O,N),ea:null}),Pe(g,K)},c:function(_,g,O){var N=At(_,"enum");g=Ve(g),_=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:ze(`${N.name}_${g}`,function(){})}}),_.values[O]=N,_[g]=N},u:function(_,g,O){O=rr(O),g=Ve(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,K){return K},argPackAdvance:8,readValueFromPointer:Ry(g,O),ea:null})},q:function(_,g,O,N,K,te){var ue=ki(g,O);_=Ve(_),K=qe(N,K),Pe(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),zt([],ue,function(se){return qt(_,Ni(_,[se[0],null].concat(se.slice(1)),null,K,te),g-1),[]})},j:function(_,g,O,N,K){g=Ve(g),K===-1&&(K=4294967295),K=rr(O);var te=se=>se;if(N===0){var ue=32-8*O;te=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Oy(g,K,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=B;return new K(ue.buffer,ue[te+1],ue[te])}var K=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Ve(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Ve(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var K=B[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=K;++se){var de=te+se;if(se==K||j[de]==0){if(ue=ue?Ed(j,ue,de-ue):"",le===void 0)var le=ue;else le+=String.fromCharCode(0),le+=ue;ue=de+1}}else{for(le=Array(K),se=0;se<K;++se)le[se]=String.fromCharCode(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,K){K instanceof ArrayBuffer&&(K=new Uint8Array(K));var te,ue=typeof K=="string";ue||K instanceof Uint8Array||K instanceof Uint8ClampedArray||K instanceof Int8Array||Se("Cannot pass non-string to std::string");var se;if(O&&ue)for(te=se=0;te<K.length;++te){var de=K.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=K.length;if(te=se,se=Vs(4+te+1),de=se+4,B[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<K.length;++le){var ge=K.charCodeAt(le);if(55296<=ge&&57343>=ge){var Te=K.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Te&1023}if(127>=ge){if(ue>=de)break;te[ue++]=ge}else{if(2047>=ge){if(ue+1>=de)break;te[ue++]=192|ge>>6}else{if(65535>=ge){if(ue+2>=de)break;te[ue++]=224|ge>>12}else{if(ue+3>=de)break;te[ue++]=240|ge>>18,te[ue++]=128|ge>>12&63}te[ue++]=128|ge>>6&63}te[ue++]=128|ge&63}}te[ue]=0}}else if(ue)for(ue=0;ue<te;++ue)le=K.charCodeAt(ue),255<le&&(Wn(de),Se("String has UTF-16 code units that do not fit in 8 bits")),j[de+ue]=le;else for(ue=0;ue<te;++ue)j[de+ue]=K[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Ve(O),g===2)var N=Py,K=Ay,te=Dy,ue=()=>U,se=1;else g===4&&(N=Ny,K=ky,te=My,ue=()=>B,se=2);V(_,{name:O,fromWireType:function(de){for(var le=B[de>>2],ge=ue(),Te,Ie=de+4,je=0;je<=le;++je){var ye=de+4+je*g;(je==le||ge[ye>>se]==0)&&(Ie=N(Ie,ye-Ie),Te===void 0?Te=Ie:(Te+=String.fromCharCode(0),Te+=Ie),Ie=ye+g)}return Wn(de),Te},toWireType:function(de,le){typeof le!="string"&&Se(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Te=Vs(4+ge+g);return B[Te>>2]=ge>>se,K(le,Te+4,ge+g),de!==null&&de.push(Wn,Te),Te},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,K,te){Nn[_]={name:Ve(g),Ba:qe(O,N),ka:qe(K,te),Na:[]}},M:function(_,g,O,N,K,te,ue,se,de,le){Nn[_].Na.push({mb:Ve(g),sb:O,qb:qe(N,K),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Ve(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ut(_),g=At(g,"emval::as");var N=[],K=Le(N);return B[O>>2]=K,g.toWireType(N,_)},w:function(_,g,O,N,K){_=ji[_],g=ut(g),O=Mi(O);var te=[];return B[N>>2]=Le(te),_(g,O,te,K)},i:function(_,g,O,N){_=ji[_],g=ut(g),O=Mi(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=Fy(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var K=_d[g];if(K!==void 0)return K;var te=Array(_-1);return K=Ly((ue,se,de,le)=>{for(var ge=0,Te=0;Te<_-1;++Te)te[Te]=O[Te+1].readValueFromPointer(le+ge),ge+=O[Te+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Te=0;Te<_-1;++Te)O[Te+1].hb&&O[Te+1].hb(te[Te]);if(!N.vb)return N.toWireType(de,ue)}),_d[g]=K},p:function(_){return _=Mi(_),Le(p[_])},K:function(_,g){return _=ut(_),g=ut(g),Le(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return Le(Mi(_))},n:function(_){var g=ut(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),Le(_)},b:()=>{oe("")},A:_=>{var g=j.length;if(_>>>=0,2147483648<_)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,_+100663296);var K=Math;N=Math.max(_,N);e:{K=K.min.call(K,2147483648,N+(65536-N%65536)%65536)-h.buffer.byteLength+65535>>>16;try{h.grow(K),G();var te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(_,g)=>{var O=0;return Sd().forEach(function(N,K){var te=g+O;for(K=B[_+4*K>>2]=te,te=0;te<N.length;++te)A[K++>>0]=N.charCodeAt(te);A[K>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Sd();B[_>>2]=O.length;var N=0;return O.forEach(function(K){N+=K.length+1}),B[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var K=0,te=0;te<O;te++){var ue=B[g>>2],se=B[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Vy[_];le===0||le===10?((_===1?H:R)(Ed(ge,0)),ge.length=0):ge.push(le)}K+=se}return B[N>>2]=K,0}};(function(){function _(O){if(O=O.exports,p.asm=O,h=p.asm.O,G(),Y=p.asm.U,ce.unshift(p.asm.P),ie--,p.monitorRunDependencies&&p.monitorRunDependencies(ie),ie==0&&ee){var N=ee;ee=null,N()}return O}var g={a:By};if(ie++,p.monitorRunDependencies&&p.monitorRunDependencies(ie),p.instantiateWasm)try{return p.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return ke(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=p.asm.Q).apply(null,arguments)}function Vs(){return(Vs=p.asm.R).apply(null,arguments)}function $d(){return($d=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Fi;ee=function _(){Fi||Td(),Fi||(ee=_)};function Td(){function _(){if(!Fi&&(Fi=!0,p.calledRun=!0,!$)){if(De(ce),b(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();z.unshift(g)}De(z)}}if(!(0<ie)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)X();De(Z),0<ie||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),_()},1)):_())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return Td(),m.ready}})();const d=u},a=>{a.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"1.2.4","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>u.registerTouchInteractions});var u=c(4)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>f});var u=void 0,d=function(m){var p,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((b=m.changedTouches)===null||b===void 0)&&b.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var p=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,w=m.fit,C=m.alignment;if(!p||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(P){var F=P.currentTarget.getBoundingClientRect(),k=d(P),H=k.clientX,R=k.clientY;if(!(!H&&!R)){var E=H-F.left,h=R-F.top,$=v.computeAlignment(w,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),A=new v.Mat2D;$.invert(A);var j=new v.Vec2D(E,h),W=v.mapXY(A,j),U=W.x(),J=W.y();switch(W.delete(),A.delete(),j.delete(),$.delete(),P.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var B=0,L=T;B<L.length;B++){var ne=L[B];ne.pointerMove(U,J)}break}case"touchstart":case"mousedown":{for(var G=0,Y=T;G<Y.length;G++){var ne=Y[G];ne.pointerDown(U,J)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var ne=ce[Z];ne.pointerUp(U,J)}break}}}},D=I.bind(u);return p.addEventListener("mouseover",D),p.addEventListener("mouseout",D),p.addEventListener("mousemove",D),p.addEventListener("mousedown",D),p.addEventListener("mouseup",D),p.addEventListener("touchmove",D),p.addEventListener("touchstart",D),p.addEventListener("touchend",D),function(){p.removeEventListener("mouseover",D),p.removeEventListener("mouseout",D),p.removeEventListener("mousemove",D),p.removeEventListener("mousedown",D),p.removeEventListener("mouseup",D),p.removeEventListener("touchmove",D),p.removeEventListener("touchstart",D),p.removeEventListener("touchend",D)}}}],r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var c=r[a]={exports:{}};return n[a](c,c.exports,o),c.exports}o.d=(a,s)=>{for(var c in s)o.o(s,c)&&!o.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:s[c]})},o.o=(a,s)=>Object.prototype.hasOwnProperty.call(a,s),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Alignment:()=>m,EventType:()=>C,Fit:()=>f,Layout:()=>p,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(E,h,$,A){function j(W){return W instanceof $?W:new $(function(U){U(W)})}return new($||($=Promise))(function(W,U){function J(ne){try{L(A.next(ne))}catch(G){U(G)}}function B(ne){try{L(A.throw(ne))}catch(G){U(G)}}function L(ne){ne.done?W(ne.value):j(ne.value).then(J,B)}L((A=A.apply(E,h||[])).next())})},d=function(E,h){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},A,j,W,U;return U={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function J(L){return function(ne){return B([L,ne])}}function B(L){if(A)throw new TypeError("Generator is already executing.");for(;U&&(U=0,L[0]&&($=0)),$;)try{if(A=1,j&&(W=L[0]&2?j.return:L[0]?j.throw||((W=j.return)&&W.call(j),0):j.next)&&!(W=W.call(j,L[1])).done)return W;switch(j=0,W&&(L=[L[0]&2,W.value]),L[0]){case 0:case 1:W=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,j=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(W=$.trys,!(W=W.length>0&&W[W.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!W||L[1]>W[0]&&L[1]<W[3])){$.label=L[1];break}if(L[0]===6&&$.label<W[1]){$.label=W[1],W=L;break}if(W&&$.label<W[2]){$.label=W[2],$.ops.push(L);break}W[2]&&$.ops.pop(),$.trys.pop();continue}L=h.call(E,$)}catch(ne){L=[6,ne],j=0}finally{A=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(E){E.Cover="cover",E.Contain="contain",E.Fill="fill",E.FitWidth="fitWidth",E.FitHeight="fitHeight",E.None="none",E.ScaleDown="scaleDown"})(f||(f={}));var m;(function(E){E.Center="center",E.TopLeft="topLeft",E.TopCenter="topCenter",E.TopRight="topRight",E.CenterLeft="centerLeft",E.CenterRight="centerRight",E.BottomLeft="bottomLeft",E.BottomCenter="bottomCenter",E.BottomRight="bottomRight"})(m||(m={}));var p=function(){function E(h){var $,A,j,W,U,J;this.fit=($=h==null?void 0:h.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(A=h==null?void 0:h.alignment)!==null&&A!==void 0?A:m.Center,this.minX=(j=h==null?void 0:h.minX)!==null&&j!==void 0?j:0,this.minY=(W=h==null?void 0:h.minY)!==null&&W!==void 0?W:0,this.maxX=(U=h==null?void 0:h.maxX)!==null&&U!==void 0?U:0,this.maxY=(J=h==null?void 0:h.maxY)!==null&&J!==void 0?J:0}return E.new=function(h){var $=h.fit,A=h.alignment,j=h.minX,W=h.minY,U=h.maxX,J=h.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new E({fit:$,alignment:A,minX:j,minY:W,maxX:U,maxY:J})},E.prototype.copyWith=function(h){var $=h.fit,A=h.alignment,j=h.minX,W=h.minY,U=h.maxX,J=h.maxY;return new E({fit:$??this.fit,alignment:A??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:U??this.maxX,maxY:J??this.maxY})},E.prototype.runtimeFit=function(h){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=h.Fit.cover:this.fit===f.Contain?$=h.Fit.contain:this.fit===f.Fill?$=h.Fit.fill:this.fit===f.FitWidth?$=h.Fit.fitWidth:this.fit===f.FitHeight?$=h.Fit.fitHeight:this.fit===f.ScaleDown?$=h.Fit.scaleDown:$=h.Fit.none,this.cachedRuntimeFit=$,$},E.prototype.runtimeAlignment=function(h){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=h.Alignment.topLeft:this.alignment===m.TopCenter?$=h.Alignment.topCenter:this.alignment===m.TopRight?$=h.Alignment.topRight:this.alignment===m.CenterLeft?$=h.Alignment.centerLeft:this.alignment===m.CenterRight?$=h.Alignment.centerRight:this.alignment===m.BottomLeft?$=h.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=h.Alignment.bottomCenter:this.alignment===m.BottomRight?$=h.Alignment.bottomRight:$=h.Alignment.center,this.cachedRuntimeAlignment=$,$},E}(),b=function(){function E(){}return E.loadRuntime=function(){a.default({locateFile:function(){return E.wasmURL}}).then(function(h){var $;for(E.runtime=h;E.callBackQueue.length>0;)($=E.callBackQueue.shift())===null||$===void 0||$(E.runtime)})},E.getInstance=function(h){E.isLoading||(E.isLoading=!0,E.loadRuntime()),E.runtime?h(E.runtime):E.callBackQueue.push(h)},E.awaitInstance=function(){return new Promise(function(h){return E.getInstance(function($){return h($)})})},E.setWasmUrl=function(h){E.wasmURL=h},E.isLoading=!1,E.callBackQueue=[],E.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),E}(),y=function(){function E(h,$,A,j){this.animation=h,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new A.LinearAnimationInstance(h,$)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"time",{get:function(){return this.instance.time},set:function(h){this.instance.time=h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.scrubTo===null?this.instance.advance(h):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},E.prototype.apply=function(h){this.instance.apply(h)},Object.defineProperty(E.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){this.instance.delete()},E}(),T;(function(E){E[E.Number=56]="Number",E[E.Trigger=58]="Trigger",E[E.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function E(h,$){this.type=h,this.runtimeInput=$}return Object.defineProperty(E.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(h){this.runtimeInput.value=h},enumerable:!1,configurable:!0}),E.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},E}(),v=function(){function E(h,$,A,j){this.stateMachine=h,this.playing=A,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(h,j),this.initInputs($)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"statesChanged",{get:function(){for(var h=[],$=0;$<this.instance.stateChangedCount();$++)h.push(this.instance.stateChangedNameByIndex($));return h},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.instance.advance(h)},E.prototype.initInputs=function(h){for(var $=0;$<this.instance.inputCount();$++){var A=this.instance.input($);this.inputs.push(this.mapRuntimeInput(A,h))}},E.prototype.mapRuntimeInput=function(h,$){if(h.type===$.SMIInput.bool)return new S(T.Boolean,h.asBool());if(h.type===$.SMIInput.number)return new S(T.Number,h.asNumber());if(h.type===$.SMIInput.trigger)return new S(T.Trigger,h.asTrigger())},E.prototype.cleanup=function(){this.instance.delete()},E}(),w=function(){function E(h,$,A,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=h,this.artboard=$,this.eventManager=A,this.animations=j,this.stateMachines=W}return E.prototype.add=function(h,$,A){if(A===void 0&&(A=!0),h=H(h),h.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var j=this.animations.map(function(Z){return Z.name}),W=this.stateMachines.map(function(Z){return Z.name}),U=0;U<h.length;U++){var J=j.indexOf(h[U]),B=W.indexOf(h[U]);if(J>=0||B>=0)J>=0?this.animations[J].playing=$:this.stateMachines[B].playing=$;else{var L=this.artboard.animationByName(h[U]);if(L){var ne=new y(L,this.artboard,this.runtime,$);ne.advance(0),ne.apply(1),this.animations.push(ne)}else{var G=this.artboard.stateMachineByName(h[U]);if(G){var Y=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(Y)}}}}return A&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},E.prototype.play=function(h){return this.add(h,!0)},E.prototype.pause=function(h){return this.add(h,!1)},E.prototype.scrub=function(h,$){var A=this.animations.filter(function(j){return h.includes(j.name)});return A.forEach(function(j){return j.scrubTo=$}),A.map(function(j){return j.name})},Object.defineProperty(E.prototype,"playing",{get:function(){return this.animations.filter(function(h){return h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"paused",{get:function(){return this.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),E.prototype.stop=function(h){var $=this;h=H(h);var A=[];if(h.length===0)A=this.animations.map(function(U){return U.name}).concat(this.stateMachines.map(function(U){return U.name})),this.animations.forEach(function(U){return U.cleanup()}),this.stateMachines.forEach(function(U){return U.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(U){return h.includes(U.name)});j.forEach(function(U){U.cleanup(),$.animations.splice($.animations.indexOf(U),1)});var W=this.stateMachines.filter(function(U){return h.includes(U.name)});W.forEach(function(U){U.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(U),1)}),A=j.map(function(U){return U.name}).concat(W.map(function(U){return U.name}))}return this.eventManager.fire({type:C.Stop,data:A}),A},Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(h,$){return h||$.playing},!1)||this.stateMachines.reduce(function(h,$){return h||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),E.prototype.atLeastOne=function(h,$){$===void 0&&($=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],h,$):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],h,$)),A},E.prototype.handleLooping=function(){for(var h=0,$=this.animations.filter(function(j){return j.playing});h<$.length;h++){var A=$[h];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.PingPong}}),A.loopCount=0)}},E.prototype.handleStateChanges=function(){for(var h=[],$=0,A=this.stateMachines.filter(function(W){return W.playing});$<A.length;$++){var j=A[$];h.push.apply(h,j.statesChanged)}h.length>0&&this.eventManager.fire({type:C.StateChange,data:h})},E.prototype.handleAdvancing=function(h){this.eventManager.fire({type:C.Advance,data:h})},E}(),C;(function(E){E.Load="load",E.LoadError="loaderror",E.Play="play",E.Pause="pause",E.Stop="stop",E.Loop="loop",E.Draw="draw",E.Advance="advance",E.StateChange="statechange"})(C||(C={}));var I;(function(E){E.OneShot="oneshot",E.Loop="loop",E.PingPong="pingpong"})(I||(I={}));var D=function(){function E(h){h===void 0&&(h=[]),this.listeners=h}return E.prototype.getListeners=function(h){return this.listeners.filter(function($){return $.type===h})},E.prototype.add=function(h){this.listeners.includes(h)||this.listeners.push(h)},E.prototype.remove=function(h){for(var $=0;$<this.listeners.length;$++){var A=this.listeners[$];if(A.type===h.type&&A.callback===h.callback){this.listeners.splice($,1);break}}},E.prototype.removeAll=function(h){var $=this;h?this.listeners.filter(function(A){return A.type===h}).forEach(function(A){return $.remove(A)}):this.listeners.splice(0,this.listeners.length)},E.prototype.fire=function(h){var $=this.getListeners(h.type);$.forEach(function(A){return A.callback(h)})},E}(),P=function(){function E(h){this.eventManager=h,this.queue=[]}return E.prototype.add=function(h){this.queue.push(h)},E.prototype.process=function(){for(;this.queue.length>0;){var h=this.queue.shift();h!=null&&h.action&&h.action(),h!=null&&h.event&&this.eventManager.fire(h.event)}},E}(),F=function(){function E(h){var $;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.renderSecondTimer=0,this.canvas=h.canvas,this.src=h.src,this.buffer=h.buffer,this.layout=($=h.layout)!==null&&$!==void 0?$:new p,this.shouldDisableRiveListeners=!!h.shouldDisableRiveListeners,this.eventManager=new D,h.onLoad&&this.on(C.Load,h.onLoad),h.onLoadError&&this.on(C.LoadError,h.onLoadError),h.onPlay&&this.on(C.Play,h.onPlay),h.onPause&&this.on(C.Pause,h.onPause),h.onStop&&this.on(C.Stop,h.onStop),h.onLoop&&this.on(C.Loop,h.onLoop),h.onStateChange&&this.on(C.StateChange,h.onStateChange),h.onAdvance&&this.on(C.Advance,h.onAdvance),h.onload&&!h.onLoad&&this.on(C.Load,h.onload),h.onloaderror&&!h.onLoadError&&this.on(C.LoadError,h.onloaderror),h.onplay&&!h.onPlay&&this.on(C.Play,h.onplay),h.onpause&&!h.onPause&&this.on(C.Pause,h.onpause),h.onstop&&!h.onStop&&this.on(C.Stop,h.onstop),h.onloop&&!h.onLoop&&this.on(C.Loop,h.onloop),h.onstatechange&&!h.onStateChange&&this.on(C.StateChange,h.onstatechange),this.taskQueue=new P(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:h.autoplay,animations:h.animations,stateMachines:h.stateMachines,artboard:h.artboard,useOffscreenRenderer:h.useOffscreenRenderer})}return E.new=function(h){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new E(h)},E.prototype.init=function(h){var $=this,A=h.src,j=h.buffer,W=h.animations,U=h.stateMachines,J=h.artboard,B=h.autoplay,L=B===void 0?!1:B,ne=h.useOffscreenRenderer,G=ne===void 0?!1:ne;if(this.src=A,this.buffer=j,!this.src&&!this.buffer)throw new Error(E.missingErrorMessage);var Y=H(W),Z=H(U);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(J,Y,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},E.prototype.setupRiveListeners=function(){var h=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(A){return A.playing&&h.runtime.hasListeners(A.instance)}).map(function(A){return A.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:$,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},E.prototype.initData=function(h,$,A,j){var W;return u(this,void 0,void 0,function(){var U,J,B;return d(this,function(L){switch(L.label){case 0:return this.src?(U=this,[4,k(this.src)]):[3,2];case 1:U.buffer=L.sent(),L.label=2;case 2:return J=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return J.file=L.sent(),this.file?(this.initArtboard(h,$,A,j),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(W=this.src)!==null&&W!==void 0?W:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(B="Problem loading file; may be corrupt!",console.warn(B),this.eventManager.fire({type:C.LoadError,data:B}),[2,Promise.reject(B)])}})})},E.prototype.initArtboard=function(h,$,A,j){var W=h?this.file.artboardByName(h):this.file.defaultArtboard();if(!W){var U="Invalid artboard name or no default artboard";console.warn(U),this.eventManager.fire({type:C.LoadError,data:U});return}if(this.artboard=W,this.artboard.animationCount()<1){var U="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:U}),U}this.animator=new w(this.runtime,this.artboard,this.eventManager);var J;$.length>0||A.length>0?(J=$.concat(A),this.animator.add(J,j,!1)):J=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:J}})},E.prototype.drawFrame=function(){this.startRendering()},E.prototype.draw=function(h,$){var A=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=h),this.renderSecondTimer+=h-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(h-this.lastRenderTime)/1e3;this.lastRenderTime=h;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),U=0,J=W;U<J.length;U++){var B=J[U];B.advance(j),B.instance.didLoop&&(B.loopCount+=1),B.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),ne=0,G=L;ne<G.length;ne++){var Y=G[ne];Y.advance(j)}this.artboard.advance(j);var Z=this.renderer;Z.clear(),Z.save(),this.alignRenderer(),this.artboard.draw(Z),Z.restore(),Z.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(j),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-A);this.frameTimes[0]<=ce-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},E.prototype.alignRenderer=function(){var h=this,$=h.renderer,A=h.runtime,j=h._layout,W=h.artboard;$.align(j.runtimeFit(A),j.runtimeAlignment(A),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(E.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(h,$){return h+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){var h,$;this.stopRendering(),this.cleanupInstances(),(h=this.renderer)===null||h===void 0||h.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},E.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},E.prototype.play=function(h,$){var A=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(h,$)}});return}this.animator.play(h),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},E.prototype.pause=function(h){var $=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(h)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(h)},E.prototype.scrub=function(h,$){var A=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(h,$)}});return}this.animator.scrub(h,$||0),this.drawFrame()},E.prototype.stop=function(h){var $=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(h)}});return}this.animator.stop(h),this.eventCleanup&&this.eventCleanup()},E.prototype.reset=function(h){var $,A=h==null?void 0:h.artboard,j=H(h==null?void 0:h.animations),W=H(h==null?void 0:h.stateMachines),U=($=h==null?void 0:h.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(A,j,W,U),this.taskQueue.process()},E.prototype.load=function(h){this.stop(),this.init(h)},Object.defineProperty(E.prototype,"layout",{get:function(){return this._layout},set:function(h){this._layout=h,(!h.maxX||!h.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),E.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},E.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var h=this.canvas.getBoundingClientRect(),$=h.width,A=h.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*A,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(E.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var h=[],$=0;$<this.artboard.animationCount();$++)h.push(this.artboard.animationByIndex($).name);return h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var h=[],$=0;$<this.artboard.stateMachineCount();$++)h.push(this.artboard.stateMachineByIndex($).name);return h},enumerable:!1,configurable:!0}),E.prototype.stateMachineInputs=function(h){if(this.loaded){var $=this.animator.stateMachines.find(function(A){return A.name===h});return $==null?void 0:$.inputs}},Object.defineProperty(E.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),E.prototype.on=function(h,$){this.eventManager.add({type:h,callback:$})},E.prototype.off=function(h,$){this.eventManager.remove({type:h,callback:$})},E.prototype.unsubscribe=function(h,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(h,$)},E.prototype.removeAllRiveEventListeners=function(h){this.eventManager.removeAll(h)},E.prototype.unsubscribeAll=function(h){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(h)},E.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},E.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},E.prototype.enableFPSCounter=function(h){this.runtime.enableFPSCounter(h)},E.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(E.prototype,"contents",{get:function(){if(this.loaded){for(var h={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var A=this.file.artboardByIndex($),j={name:A.name,animations:[],stateMachines:[]},W=0;W<A.animationCount();W++){var U=A.animationByIndex(W);j.animations.push(U.name)}for(var J=0;J<A.stateMachineCount();J++){for(var B=A.stateMachineByIndex(J),L=B.name,ne=new this.runtime.StateMachineInstance(B,A),G=[],Y=0;Y<ne.inputCount();Y++){var Z=ne.input(Y);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}h.artboards.push(j)}return h}},enumerable:!1,configurable:!0}),E.missingErrorMessage="Rive source file or data buffer required",E}(),k=function(E){return u(void 0,void 0,void 0,function(){var h,$,A;return d(this,function(j){switch(j.label){case 0:return h=new Request(E),[4,fetch(h)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return A=j.sent(),[2,A]}})})},H=function(E){return typeof E=="string"?[E]:E instanceof Array?E:[]},R={EventManager:D,TaskQueueManager:P}})(),i})())})(ig);var YT=ig.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=YT;function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var o=r(t),i=function(){return i=Object.assign||function(v){for(var w,C=1,I=arguments.length;C<I;C++)for(var D in w=arguments[C])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(C[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(C[I[D]]=v[I[D]])}return C}function s(){var v=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,v),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function v(){}return v.prototype.observe=function(){},v.prototype.unobserve=function(){},v.prototype.disconnect=function(){},v}(),u=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(v,w){w===void 0&&(w=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var P,F,k,H=t.useRef(new u((P=function(R){d&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,E=[],h=0;h<arguments.length;h++)E[h]=arguments[h];clearTimeout(k),k=window.setTimeout(function(){return P.apply(R,E)},F)})));return t.useEffect(function(){var R=H.current;if(w){var E=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),E&&d&&R.unobserve(E)}}R.disconnect()},[v,H]),I}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},p,v)}function y(v){var w=v.riveLoaded,C=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,P=v.options,F=P===void 0?{}:P,k=v.onCanvasHasResized,H=v.artboardBounds,R=b(F),E=t.useState({height:0,width:0}),h=E[0],$=h.height,A=h.width,j=E[1],W=t.useState({height:0,width:0}),U=W[0],J=U.height,B=U.width,L=W[1],ne=t.useState(!0),G=ne[0],Y=ne[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,X=m(D,ce),ie=function(){var Ee=s(),_e=t.useState(Ee),Ae=_e[0],$e=_e[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var ke=function(){var it=s();$e(it)},De=window.matchMedia("screen and (resolution: ".concat(Ae,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",ke):De.addListener(ke),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",ke):De.removeListener(ke)}}},[Ae]),Ae}(),ee=H??{},oe=ee.maxX,re=ee.maxY,pe=t.useCallback(function(){var Ee,_e,Ae,$e,ke=(_e=(Ee=D.current)===null||Ee===void 0?void 0:Ee.clientWidth)!==null&&_e!==void 0?_e:0,De=($e=(Ae=D.current)===null||Ae===void 0?void 0:Ae.clientHeight)!==null&&$e!==void 0?$e:0;return Z&&H?{width:ke,height:ke*(H.maxY/H.maxX)}:{width:ke,height:De}},[D,Z,oe,re]);t.useEffect(function(){if(ce&&D.current&&C){var Ee=pe(),_e=Ee.width,Ae=Ee.height,$e=!1;if(I.current){var ke=_e!==A||Ae!==$;if(R.fitCanvasToArtboardHeight&&ke&&(D.current.style.height=Ae+"px",$e=!0),R.useDevicePixelRatio){if(ke||_e*ie!==B||Ae*ie!==J){var De=ie*_e,it=ie*Ae;I.current.width=De,I.current.height=it,I.current.style.width=_e+"px",I.current.style.height=Ae+"px",L({width:De,height:it}),$e=!0}}else ke&&(I.current.width=_e,I.current.height=Ae,L({width:_e,height:Ae}),$e=!0);j({width:_e,height:Ae})}k&&(G||$e)&&k&&k(),G&&Y(!1)}},[I,D,X,ie,pe,G,Y,J,B,$,A,k,ce,Z,z,C])}function T(v){var w=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,P=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),H=i({width:"100%",height:"100%"},P);return o.default.createElement("div",i({ref:w,className:D},!D&&{style:H}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,w){w===void 0&&(w={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),P=D[0],F=D[1],k=!!v,H=b(w),R=t.useCallback(function(){P&&(P.startRendering(),P.resizeToCanvas())},[P]);y({riveLoaded:!!P,canvasRef:C,containerRef:I,options:H,onCanvasHasResized:R,artboardBounds:P==null?void 0:P.bounds});var E=t.useCallback(function(j){if(j&&v&&k){var W=H.useOffscreenRenderer,U=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));U.on(n.EventType.Load,function(){C.current?F(U):U.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),h=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?P&&P.startRendering():P&&P.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[P]),t.useEffect(function(){return function(){P&&(P.cleanup(),F(null))}},[P]);var $=v==null?void 0:v.animations;t.useEffect(function(){P&&$&&(P.isPlaying?(P.stop(P.animationNames),P.play($)):P.isPaused&&(P.stop(P.animationNames),P.pause($)))},[$,P]);var A=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:h,setCanvasRef:E},j))},[E,h]);return{canvas:C.current,container:I.current,setCanvasRef:E,setContainerRef:h,rive:P,RiveComponent:A}}e.default=function(v){var w=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,P=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,H=v.shouldDisableRiveListeners,R=H!==void 0&&H,E=v.shouldResizeCanvasToContainer,h=E===void 0||E,$=v.children,A=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:w,artboard:C,animations:I,layout:P,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:h}).RiveComponent;return o.default.createElement(j,i({},A),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,w,C,I){var D=t.useState(null),P=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&C||F(null),v&&w&&C){var H=v.stateMachineInputs(w);if(H){var R=H.find(function(E){return E.name===C});I!==void 0&&R&&(R.value=I),F(R||null)}}else F(null)}k(),v&&v.on(n.EventType.Play,function(){k()})},[v]),P},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(og);const KT=yh(og),El=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(et,{width:t,height:n,style:r,children:M.jsx(KT,{src:e,...o})});El.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ag=({isLoading:e,className:t,width:n,height:r,onClose:o,src:i,noScroll:a="noscroll",...s})=>(l.useEffect(()=>(e?document.body.classList.add(a):document.body.classList.remove(a),()=>{document.body.classList.remove(a)}),[e,a]),e?M.jsx(et,{className:t,"data-test-id":s["data-testid-backdrop"],onClick:o,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:M.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:M.jsx(El,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ag.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var qT=ot({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const XT=({color:e,size:t,...n})=>M.jsx(et,{...n,className:Oe(qT({color:e,size:t}))});function GT(e){return class extends l.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?l.Children.map(n,o=>{const i=l.Children.toArray(o.children||o.props.children);return i&&i[0]&&i[0].props.value}):[]},this.onChange=(n,r,o)=>{const i=this.getValue().concat();i[n]=r,o&&o(i,n)},this.onValueChange=(n,r)=>{this.onChange(n,r,this.props.onValueChange)},this.onScrollChange=(n,r)=>{this.onChange(n,r,this.props.onScrollChange)}}render(){return M.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var ZT="_1ypj0tt5",QT="_1ypj0tt4",JT="_1ypj0tt3",Wp="_1ypj0tt1",eI="_1ypj0tt0",tI="_1ypj0tt2";const nI=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:o})=>{const i=n==null?void 0:n(),a=l.Children.map(t,(s,c)=>l.cloneElement(s,{selectedValue:i==null?void 0:i[c],onValueChange:(...u)=>o==null?void 0:o(c,...u),onScrollChange:(...u)=>r==null?void 0:r(c,...u)}));return M.jsx(et,{className:Oe(ZT,e),children:a})},sg=GT(nI),rI=e=>null;function oI(e){var t;const n=(r,o,i)=>{const a=Math.round(r/o);return Math.min(a,i-1)};return t=class extends l.Component{constructor(){super(...arguments),this.selectByIndex=(r,o,i)=>{r<0||r>=l.Children.count(this.props.children)||!o||i(r*o)},this.doScrollingComplete=(r,o,i)=>{const a=l.Children.toArray(this.props.children),s=n(r,o,a.length),c=a[s];c?i(c.props.value):console.warn&&console.warn("child not found",a,s)},this.select=(r,o,i)=>{const a=l.Children.toArray(this.props.children);for(let s=0,c=a.length;s<c;s+=1)if(a[s].props.value===r){this.selectByIndex(s,o,i);return}this.selectByIndex(0,o,i)}}render(){return M.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=rI,t}const iI=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:o,doScrollingComplete:i,onValueChange:a,computeChildIndex:s,disabled:c,className:u}=e,d=l.useRef(null),f=l.useRef(null),m=l.useRef(null),p=l.useRef(0),b=l.useRef(0),y=l.useMemo(()=>{if(n||r)return n||r;const k=l.Children.toArray(t);return k&&k[0]&&k[0].props.value},[t,r,n]),[T,S]=l.useState(y),v=(()=>{let k=-1,H=0,R=0,E=!1,h=!1;const $=(L,ne)=>{L.transform=ne},A=(L,ne)=>{L.transition=ne},j=(L,ne,G=.3)=>{var Y,Z;k!==ne&&(k=ne,A((Y=f.current)==null?void 0:Y.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-ne}px,0)`),setTimeout(()=>{P(),f.current&&A(f.current.style,"")},+G*1e3))},W=((L=30,ne=100)=>{let G=0,Y=0,Z=0;const ce={record:z=>{const X=+new Date;Z=(z-Y)/(X-G),X-G>=L&&(Z=X-G<=ne?Z:0,Y=z,G=X)},getVelocity:z=>(z!==Y&&ce.record(z),Z)};return ce})(),U=()=>{h=!1;let L=k;const ne=(t.length-1)*p.current;let G=.3;const Y=W.getVelocity(L)*4;Y&&(L=Y*40+L,G=Math.abs(Y)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>ne&&(L=ne),j(0,L,G<.3?.3:G),D()},J=L=>{E||(h=!0,R=L,H=k)},B=L=>{var ne;E||!h||(k=H-L+R,W.record(k),D(),$((ne=f.current)==null?void 0:ne.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>J(L.touches[0].pageY),mousedown:L=>J(L.pageY),touchmove:L=>{L.preventDefault(),B(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),B(L.pageY)},touchend:()=>U(),touchcancel:()=>U(),mouseup:()=>U(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{E=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),C=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==T&&("selectedValue"in e||S(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const H=l.Children.toArray(t),R=s(k,p.current,H.length);if(b.current!==R){b.current=R;const E=H[R];E&&e.onScrollChange?e.onScrollChange(E.props.value):!H&&console.warn&&console.warn("child not found",t,R)}}},P=()=>{const k=v.getValue();k>=0&&i(k,p.current,I)},F=()=>{const k=`${Wp} ${tI}`,H=E=>{const{className:h="",style:$,value:A}=E.props,j=T===A;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Wp} ${h}`,children:E.props.children},A)};return l.Children?l.Children.map(t,H):[].concat(t).map(H)};return l.useEffect(()=>{var E,h,$;const k=((E=d.current)==null?void 0:E.getBoundingClientRect().height)??0,H=((h=m.current)==null?void 0:h.getBoundingClientRect().height)??0;p.current=(($=m.current)==null?void 0:$.getBoundingClientRect().height)??0;let R=Math.floor(k/H);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${H*R}px 0`,m.current.style.top=`${H*R}px`,v.setDisabled(c),o(T,p.current,w),Object.keys(v).forEach(A=>{var j;if(A.indexOf("touch")===0||A.indexOf("mouse")===0){const W=A.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(A,v[A],W)}}),()=>{Object.keys(v).forEach(A=>{var j;(A.indexOf("touch")===0||A.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(A,v[A]))})}},[c,v,w,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,p.current,C)},[C,o,T]),M.jsxs("div",{className:Oe(eI,u),ref:d,children:[M.jsx("div",{className:Oe(JT,u),ref:m}),M.jsx("div",{className:QT,ref:f,children:F()})]})},au=oI(iI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const Ka=24*60*60*1e3,aI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),hc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),sI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},zp=(e,t,n)=>{if(n){const r=e.getHours();let o=t;o=r>=12?t+12:t,o=o>=24?0:o,e.setHours(o)}else e.setHours(t)},Up=(e,t)=>{t===0?e.setTime(+e-Ka/2):e.setTime(+e+Ka/2)},Yp=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),cI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],uI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=aI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[p,b]=l.useState(t||n),y=l.useRef(new Date(-1)),T=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const S=()=>$(p||y.current),v=()=>E().getFullYear(),w=()=>h().getFullYear(),C=()=>E().getMonth(),I=()=>h().getMonth(),D=()=>E().getDate(),P=()=>h().getDate(),F=()=>E().getHours(),k=()=>h().getHours(),H=()=>E().getMinutes(),R=()=>h().getMinutes(),E=()=>u||y.current,h=()=>d||T.current,$=G=>{const Y=E(),Z=h();if(o===Mt.DATE_TIME){if(G<Y)return Sr(Y);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+Ka<=Y)return Sr(Y);if(G>=+Z+Ka)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),X=Y.getHours(),ie=Y.getMinutes(),ee=G.getHours(),oe=G.getMinutes();if(ee<X||ee===X&&oe<ie)return Sr(Y);if(ee>ce||ee===ce&&oe>z)return Sr(Z)}return G},A=(G,Y)=>{const Z=parseInt(G[Y],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(Y){case 0:ce.setDate(Z);break;case 1:sI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:zp(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Up(ce,Z);break}else if(o===Mt.TIME)switch(Y){case 0:zp(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Up(ce,Z);break}return $(ce)},j=(G,Y)=>{const Z=A(G,Y);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,Y)},W=(G,Y)=>{if(e.onScrollChange){const Z=A(G,Y);e.onScrollChange(Z,G,Y)}},U=()=>{const G=S(),Y=G.getFullYear(),Z=G.getMonth(),ce=v(),z=w(),X=C(),ie=I(),ee=D(),oe=P(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const pe={key:"year",props:{children:re}};if(o===Mt.YEAR)return[pe];const Ee=[];let _e=0,Ae=11;ce===Y&&(_e=X),z===Y&&(Ae=ie);for(let ze=_e;ze<=Ae;ze+=1){const xt=m?m(ze,G):cI(ze);Ee.push({value:`${ze}`,label:xt})}const $e={key:"month",props:{children:Ee}};if(o===Mt.MONTH)return[$e,pe];const ke=[];let De=1,it=cg(G);ce===Y&&X===Z&&(De=ee),z===Y&&ie===Z&&(it=oe);for(let ze=De;ze<=it;ze+=1){const xt=f?f(ze,G):`${ze}`;ke.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:ke}},$e,pe]},J=G=>{let{minHour:Y=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const X=H(),ie=R(),ee=F(),oe=k(),re=G.getHours();if(o===Mt.DATE_TIME){const $e=G.getFullYear(),ke=G.getMonth(),De=G.getDate(),it=v(),ze=w(),xt=C(),Xe=I(),Pt=D(),Se=P();it===$e&&xt===ke&&Pt===De&&(Y=ee,ee===re&&(ce=X)),ze===$e&&Xe===ke&&Se===De&&(Z=oe,oe===re&&(z=ie))}else Y=ee,ee===re&&(ce=X),Z=oe,oe===re&&(z=ie);const pe=[];Y===0&&Z===0||Y!==0&&Z!==0?Y=Yp(Y):Y===0&&c&&(Y=1,pe.push({value:"0",label:"12"})),Z=Yp(Z);for(let $e=Y;$e<=Z;$e+=1)pe.push({value:`${$e}`,label:hc($e)});const Ee=[],_e=G.getMinutes();for(let $e=ce;$e<=z;$e+=s)Ee.push({value:`${$e}`,label:hc($e)}),_e>$e&&_e<$e+s&&Ee.push({value:`${_e}`,label:hc(_e)});return{cols:[{key:"hours",props:{children:pe}},{key:"minutes",props:{children:Ee}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:_e}},B=()=>{const G=S();let Y=[],Z=[];if(o===Mt.YEAR)return{cols:U(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:U(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(Y=U(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=J(G);Y=Y.concat(ce.cols);const z=G.getHours();let X=[`${z}`,`${ce.selMinute}`],ie=z;c&&(ie=z>12?z-12:z,X=[`${ie}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(X)}return{value:Z,cols:Y}},{value:L,cols:ne}=B();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:ne.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(Y=>M.jsx(au.Item,{value:Y.value,children:Y.label},Y.value))},G.key))})};var su={exports:{}},yt={};/** @license React v17.0.2
159
+ }`),ye.bindAttribLocation(Ie,0,"vertex"),ye.bindAttribLocation(Ie,1,"uv"),ye.linkProgram(Ie),je=ye.getProgramInfoLog(Ie),0<je.trim().length)throw je;K=ye.getUniformLocation(Ie,"mat"),te=ye.getUniformLocation(Ie,"translate"),ye.useProgram(Ie),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Ie,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,K=null,te=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ie){if(!_())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ie),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),je};const de=new S(8),le=new S(8),ge=new S(10),Te=new S(10);this.kb=function(Ie,je,ye,Et,Dt){if(_()){var Be=de.push(Ie),Ke=le.push(je);(g.canvas.width!=Be||g.canvas.height!=Ke)&&(g.canvas.width=Be,g.canvas.height=Ke),g.viewport(0,Ke-je,Ie,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((Je,or)=>or.Ua-Je.Ua),Be=ge.push(Et),ue!=Be&&(g.bufferData(g.ARRAY_BUFFER,8*Be,g.DYNAMIC_DRAW),ue=Be),Be=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Be,Nt.Da),Be+=4*Nt.Da.length;console.assert(Be==4*Et);for(var ln of ye)g.bufferSubData(g.ARRAY_BUFFER,Be,ln.Xa),Be+=4*ln.Xa.length;console.assert(Be==8*Et),Be=Te.push(Dt),se!=Be&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Be,g.DYNAMIC_DRAW),se=Be),Nt=0;for(var zn of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,Nt,zn.indices),Nt+=2*zn.indices.length;console.assert(Nt==2*Dt),zn=0,ln=!0,Be=Nt=0;for(const Je of ye){Je.image.za!=zn&&(g.bindTexture(g.TEXTURE_2D,Je.image.cb||null),zn=Je.image.za),Je.zb?(g.scissor(Je.Ia,Ke-Je.Ja-Je.Pa,Je.Gb,Je.Pa),ln=!0):ln&&(g.scissor(0,Ke-je,Ie,je),ln=!1),ye=2/Ie;const or=-2/je;g.uniform4f(K,Je.oa[0]*ye*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ye*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(te,Je.oa[4]*ye*Je.va+ye*(Je.Ia-Je.xb*Je.va)-1,Je.oa[5]*or*Je.wa+or*(Je.Ja-Je.yb*Je.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Be),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Be+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Be+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Be==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};p.onRuntimeInitialized=function(){function _(ve){switch(ve){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(ve){return"rgba("+((16711680&ve)>>>16)+","+((65280&ve)>>>8)+","+((255&ve)>>>0)+","+((4278190080&ve)>>>24)/255+")"}function O(){0<Nt.length&&(v.kb(Ke.drawWidth(),Ke.drawHeight(),Nt,ln,zn),Nt=[],zn=ln=0,Ke.reset(512,512));for(const ve of Be){for(const Me of ve.da)Me();ve.da=[]}Be.clear()}var N=p.RenderPaintStyle;const K=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Te=N.stroke,Ie=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(ve){let Me=Bs;Me.total++;var vt=this,lt=new Image;lt.src=URL.createObjectURL(new Blob([ve],{type:"image/png"})),lt.onload=function(){if(vt.ab=lt,vt.cb=v.gb(lt),vt.size(lt.width,lt.height),Me.loaded++,Me.loaded===Me.total){const mt=Me.ready;mt&&(mt(),Me.ready=null)}}}}),Et=K.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(ve,Me,vt,lt,mt,Tt,rt){var ft=this.ia,yn=ft.addPath;ve=ve.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=vt,Ft.c=lt,Ft.d=mt,Ft.e=Tt,Ft.f=rt,yn.call(ft,ve,Ft)},fillRule:function(ve){this.Ga=ve},moveTo:function(ve,Me){this.ia.moveTo(ve,Me)},lineTo:function(ve,Me){this.ia.lineTo(ve,Me)},cubicTo:function(ve,Me,vt,lt,mt,Tt){this.ia.bezierCurveTo(ve,Me,vt,lt,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.extend("CanvasRenderPaint",{color:function(ve){this.Ha=g(ve)},thickness:function(ve){this.eb=ve},join:function(ve){switch(ve){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(ve){switch(ve){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(ve){this.bb=ve},blendMode:function(ve){this.$a=_(ve)},clearGradient:function(){this.qa=null},linearGradient:function(ve,Me,vt,lt){this.qa={Va:ve,Wa:Me,La:vt,Ma:lt,Ca:[]}},radialGradient:function(ve,Me,vt,lt){this.qa={Va:ve,Wa:Me,La:vt,Ma:lt,Ca:[],ub:!0}},addStop:function(ve,Me){this.qa.Ca.push({color:ve,stop:Me})},completeGradient:function(){},draw:function(ve,Me,vt){let lt=this.bb;var mt=this.Ha,Tt=this.qa;if(ve.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var rt=Tt.Wa;const yn=Tt.La;var ft=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=yn-mt,ft-=rt,mt=ve.createRadialGradient(mt,rt,0,mt,rt,Math.sqrt(Tt*Tt+ft*ft))):mt=ve.createLinearGradient(mt,rt,yn,ft);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],mt.addColorStop(rt.stop,g(rt.color));this.Ha=mt,this.qa=null}switch(lt){case Te:ve.strokeStyle=mt,ve.lineWidth=this.eb,ve.lineCap=this.xa,ve.lineJoin=this.ya,ve.stroke(Me);break;case ge:ve.fillStyle=mt,ve.fill(Me,vt)}}});const Be=new Set;let Ke=null,Nt=[],ln=0,zn=0;var Je=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(ve){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=ve.getContext("2d"),this.Fa=ve,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const ve=this.ha.length-6;if(6>ve)throw"restore() called without matching save().";this.ha.splice(ve),this.da.push(this.ba.restore.bind(this.ba))},transform:function(ve,Me,vt,lt,mt,Tt){const rt=this.ha,ft=rt.length-6;rt.splice(ft,6,rt[ft]*ve+rt[ft+2]*Me,rt[ft+1]*ve+rt[ft+3]*Me,rt[ft]*vt+rt[ft+2]*lt,rt[ft+1]*vt+rt[ft+3]*lt,rt[ft]*mt+rt[ft+2]*Tt+rt[ft+4],rt[ft+1]*mt+rt[ft+3]*Tt+rt[ft+5]),this.da.push(this.ba.transform.bind(this.ba,ve,Me,vt,lt,mt,Tt))},rotate:function(ve){const Me=Math.sin(ve);ve=Math.cos(ve),this.transform(ve,Me,-Me,ve,0,0)},_drawPath:function(ve,Me){this.da.push(Me.draw.bind(Me,this.ba,ve.ia,ve.Ga===Ie?"evenodd":"nonzero"))},drawImage:function(ve,...Me){var vt=this.ba;this.da.push(function(){vt.drawImage(ve,...Me)})},_drawRiveImage:function(ve,Me,vt){var lt=ve.ab;if(lt){var mt=this.ba,Tt=_(Me);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(lt,0,0),mt.globalAlpha=1})}},_getMatrix:function(ve){const Me=this.ha,vt=Me.length-6;for(let lt=0;6>lt;++lt)ve[lt]=Me[vt+lt]},_drawImageMesh:function(ve,Me,vt,lt,mt,Tt,rt,ft,yn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Id=yn-rt,Rd=Ft-ft;rt=Math.max(rt,0),ft=Math.max(ft,0),yn=Math.min(yn,Mn),Ft=Math.min(Ft,Bt);const So=yn-rt,Co=Ft-ft;if(console.assert(So<=Math.min(Id,Mn)),console.assert(Co<=Math.min(Rd,Bt)),!(0>=So||0>=Co)){yn=So<Id||Co<Rd,Mn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*Mn);Bt=v.wb(),xr>Bt&&(Ft*=Bt/xr,xr=Bt),_r>Bt&&(Mn*=Bt/_r,_r=Bt),Ke||(Ke=new p.DynamicRectanizer(Bt),Ke.reset(512,512)),Bt=Ke.addRect(xr,_r),0>Bt&&(O(),Be.add(this),Bt=Ke.addRect(xr,_r),console.assert(0<=Bt));var Od=Bt&65535,Pd=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:ve,Ia:Od,Ja:Pd,xb:rt,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(lt),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:yn,Ua:ve.za<<1|(yn?1:0)}),ln+=lt.length,zn+=Tt.length;var zr=this.ba,Hy=_(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=Hy,zr.globalAlpha=vt,zr.drawImage(v.canvas(),Od,Pd,xr,_r,rt,ft,So,Co),zr.restore()})}},_clipPath:function(ve){this.da.push(this.ba.clip.bind(this.ba,ve.ia,ve.Ga===Ie?"evenodd":"nonzero"))},clear:function(){Be.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(ve,Me){this.transform(1,0,0,1,ve,Me)}});p.makeRenderer=function(ve){return new Je(ve)},p.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=p.load,Bs=null;p.load=function(ve){return new Promise(function(Me){let vt=null;Bs={total:0,loaded:0,ready:function(){Me(vt)}},vt=or(ve),Bs.total==0&&Me(vt)})},N=new T,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ke&&Ke.delete()}};var w=Object.assign({},p),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",P="",F,k;(I||D)&&(D?P=self.location.href:typeof document<"u"&&document.currentScript&&(P=document.currentScript.src),f&&(P=f),P.indexOf("blob:")!==0?P=P.substr(0,P.replace(/[?#].*/,"").lastIndexOf("/")+1):P="",D&&(k=_=>{var g=new XMLHttpRequest;return g.open("GET",_,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(_,g,O)=>{var N=new XMLHttpRequest;N.open("GET",_,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var H=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(C=p.thisProgram);var E;p.wasmBinary&&(E=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&oe("no native wasm support detected");var h,$=!1,A,j,W,U,J,B,L,ne;function G(){var _=h.buffer;p.HEAP8=A=new Int8Array(_),p.HEAP16=W=new Int16Array(_),p.HEAP32=J=new Int32Array(_),p.HEAPU8=j=new Uint8Array(_),p.HEAPU16=U=new Uint16Array(_),p.HEAPU32=B=new Uint32Array(_),p.HEAPF32=L=new Float32Array(_),p.HEAPF64=ne=new Float64Array(_)}var Y,Z=[],ce=[],z=[];function X(){var _=p.preRun.shift();Z.unshift(_)}var ie=0,ee=null;function oe(_){throw p.onAbort&&p.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!re(pe)){var Ee=pe;pe=p.locateFile?p.locateFile(Ee,P):P+Ee}function _e(_){if(_==pe&&E)return new Uint8Array(E);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ae(_){if(!E&&(I||D)){if(typeof fetch=="function"&&!_.startsWith("file://"))return fetch(_,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+_+"'";return g.arrayBuffer()}).catch(()=>_e(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>_e(_))}function $e(_,g,O){return Ae(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),oe(N)})}function ke(_,g){var O=pe;return E||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?$e(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(K){return R("wasm streaming compile failed: "+K),R("falling back to ArrayBuffer instantiation"),$e(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(p)};function it(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=it(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function Se(_){throw new Pt(_)}var ut=_=>(_||Se("Cannot use deleted val. handle = "+_),Xe.get(_).value),Le=_=>{switch(_){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:_})}};function Qt(_){var g=Error,O=ze(_,function(N){this.name=_,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
160
+ `+N.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O}var St=void 0,tt=void 0;function Ve(_){for(var g="";j[_];)g+=tt[j[_++]];return g}var gt=[];function rn(){for(;gt.length;){var _=gt.pop();_.W.na=!1,_.delete()}}var on=void 0,Jt={};function he(_,g){for(g===void 0&&Se("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ye={};function kt(_){_=$d(_);var g=Ve(_);return Wn(_),g}function At(_,g){var O=Ye[_];return O===void 0&&Se(g+" has unknown type "+kt(_)),O}function en(){}var Ot=!1;function gn(_){--_.count.value,_.count.value===0&&(_.ca?_.fa.ka(_.ca):_.Z.X.ka(_.Y))}function Lt(_,g,O){return g===O?_:O.$===void 0?null:(_=Lt(_,g,O.$),_===null?null:O.jb(_))}var Dn={};function tr(_,g){return g=he(_,g),Jt[g]}var un=void 0;function $n(_){throw new un(_)}function Wt(_,g){return g.Z&&g.Y||$n("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&$n("Both smartPtrType and smartPtr must be specified"),g.count={value:1},tn(Object.create(_,{W:{value:g}}))}function tn(_){return typeof FinalizationRegistry>"u"?(tn=g=>g,_):(Ot=new FinalizationRegistry(g=>{gn(g.W)}),tn=g=>{var O=g.W;return O.ca&&Ot.register(g,{W:O},g),g},en=g=>{Ot.unregister(g)},tn(_))}var Nn={};function Kt(_){for(;_.length;){var g=_.pop();_.pop()(g)}}function Tn(_){return this.fromWireType(J[_>>2])}var kn={},nr={};function zt(_,g,O){function N(se){se=O(se),se.length!==_.length&&$n("Mismatched type converter count");for(var de=0;de<_.length;++de)V(_[de],se[de])}_.forEach(function(se){nr[se]=g});var K=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{Ye.hasOwnProperty(se)?K[de]=Ye[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{K[de]=Ye[se],++ue,ue===te.length&&N(K)}))}),te.length===0&&N(K)}function rr(_){switch(_){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${_}`)}}function x(_,g,O={}){var N=g.name;if(_||Se(`type "${N}" must have a positive integer typeid pointer`),Ye.hasOwnProperty(_)){if(O.tb)return;Se(`Cannot register type '${N}' twice`)}Ye[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(K=>K()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function Q(_){Se(_.W.Z.X.name+" instance already deleted")}function fe(){}function Ce(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||Se(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${_[g].aa})!`),_[g].aa[arguments.length].apply(this,arguments)},_[g].aa=[],_[g].aa[N.ma]=N}}function Pe(_,g,O){p.hasOwnProperty(_)?((O===void 0||p[_].aa!==void 0&&p[_].aa[O]!==void 0)&&Se(`Cannot register public name '${_}' twice`),Ce(p,_,_),p.hasOwnProperty(O)&&Se(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),p[_].aa[O]=g):(p[_]=g,O!==void 0&&(p[_].Hb=O))}function xe(_,g,O,N,K,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=K,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,g,O){for(;g!==O;)g.ra||Se(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),_=g.ra(_),g=g.$;return _}function nt(_,g){return g===null?(this.Aa&&Se(`null is not a valid ${this.name}`),0):(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Fe(_,g){if(g===null){if(this.Aa&&Se(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return _!==null&&_.push(this.ka,O),O}return 0}if(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&Se(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),O=we(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&Se("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:Se(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:O=g.W.ca;break;case 2:if(g.W.fa===this)O=g.W.ca;else{var N=g.clone();O=this.Bb(O,Le(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:Se("Unsupporting sharing policy")}return O}function He(_,g){return g===null?(this.Aa&&Se(`null is not a valid ${this.name}`),0):(g.W||Se(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||Se(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&Se(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Ge(_,g,O,N){this.name=_,this.X=g,this.Aa=O,this.ta=N,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Fe:(this.toWireType=N?nt:He,this.ea=null)}function qt(_,g,O){p.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),p[_].aa!==void 0&&O!==void 0?p[_].aa[O]=g:(p[_]=g,p[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=p["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=Y.get(g).apply(null,O);return N}};function qe(_,g){_=Ve(_);var O=_.includes("j")?Er(_,g):Y.get(g);return typeof O!="function"&&Se(`unknown function pointer with signature ${_}: ${g}`),O}var yd=void 0;function Hn(_,g){function O(te){K[te]||Ye[te]||(nr[te]?nr[te].forEach(O):(N.push(te),K[te]=!0))}var N=[],K={};throw g.forEach(O),new yd(`${_}: `+N.map(kt).join([", "]))}function Ni(_,g,O,N,K){var te=g.length;2>te&&Se("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=g[1]!==null&&O!==null,se=!1;for(O=1;O<g.length;++O)if(g[O]!==null&&g[O].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=te-2,ge=Array(le),Te=[],Ie=[];return function(){if(arguments.length!==le&&Se(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ie.length=0,Te.length=ue?2:1,Te[0]=K,ue){var je=g[1].toWireType(Ie,this);Te[1]=je}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ie,arguments[ye]),Te.push(ge[ye]);if(ye=N.apply(null,Te),se)Kt(Ie);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?je:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return je=de?g[0].fromWireType(ye):void 0,je}}function ki(_,g){for(var O=[],N=0;N<_;N++)O.push(B[g+4*N>>2]);return O}function bd(_,g,O){return _ instanceof Object||Se(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||Se(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||Se(`cannot call emscripten binding method ${O} on deleted object`),we(_.W.Y,_.W.Z.X,g.X)}function Ms(_){_>=Xe.Ea&&--Xe.get(_).Ta===0&&Xe.Za(_)}function Iy(_,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?A:j)[N])};case 1:return function(N){return this.fromWireType((O?W:U)[N>>1])};case 2:return function(N){return this.fromWireType((O?J:B)[N>>2])};default:throw new TypeError("Unknown integer type: "+_)}}function js(_){if(_===null)return"null";var g=typeof _;return g==="object"||g==="array"||g==="function"?_.toString():""+_}function Ry(_,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(ne[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Oy(_,g,O){switch(g){case 0:return O?function(N){return A[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return U[N>>1]};case 2:return O?function(N){return J[N>>2]}:function(N){return B[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var wd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ed=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&wd)return wd.decode(_.subarray(g,O));for(N="";g<O;){var K=_[g++];if(K&128){var te=_[g++]&63;if((K&224)==192)N+=String.fromCharCode((K&31)<<6|te);else{var ue=_[g++]&63;K=(K&240)==224?(K&15)<<12|te<<6|ue:(K&7)<<18|te<<12|ue<<6|_[g++]&63,65536>K?N+=String.fromCharCode(K):(K-=65536,N+=String.fromCharCode(55296|K>>10,56320|K&1023))}}else N+=String.fromCharCode(K)}return N},xd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Py=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&U[O];)++O;if(O<<=1,32<O-_&&xd)return xd.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var K=W[_+2*N>>1];if(K==0)break;O+=String.fromCharCode(K)}return O},Ay=(_,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*_.length?O/2:_.length;for(var K=0;K<O;++K)W[g>>1]=_.charCodeAt(K),g+=2;return W[g>>1]=0,g-N},Dy=_=>2*_.length,Ny=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var K=J[_+4*O>>2];if(K==0)break;++O,65536<=K?(K-=65536,N+=String.fromCharCode(55296|K>>10,56320|K&1023)):N+=String.fromCharCode(K)}return N},ky=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var K=0;K<_.length;++K){var te=_.charCodeAt(K);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++K);te=65536+((te&1023)<<10)|ue&1023}if(J[g>>2]=te,g+=4,g+4>O)break}return J[g>>2]=0,g-N},My=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},jy={};function Mi(_){var g=jy[_];return g===void 0?Ve(_):g}var ji=[];function Ly(_){var g=ji.length;return ji.push(_),g}function Fy(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(B[g+4*N>>2],"parameter "+N);return O}var _d=[],Ls={},Sd=()=>{if(!Fs){var _={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:C||"./this.program"},g;for(g in Ls)Ls[g]===void 0?delete _[g]:_[g]=Ls[g];var O=[];for(g in _)O.push(`${g}=${_[g]}`);Fs=O}return Fs},Fs,Vy=[null,[],[]];Object.assign(xt.prototype,{get(_){return this.ja[_]},has(_){return this.ja[_]!==void 0},Ya(_){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=_,g},Za(_){this.ja[_]=void 0,this.Oa.push(_)}}),Pt=p.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,p.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},St=p.PureVirtualError=Qt("PureVirtualError");for(var Cd=Array(256),Li=0;256>Li;++Li)Cd[Li]=String.fromCharCode(Li);tt=Cd,p.getInheritedInstanceCount=function(){return Object.keys(Jt).length},p.getLiveInheritedInstances=function(){var _=[],g;for(g in Jt)Jt.hasOwnProperty(g)&&_.push(Jt[g]);return _},p.flushPendingDeletes=rn,p.setDelayFunction=function(_){on=_,gt.length&&on&&on(rn)},un=p.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},fe.prototype.isAliasOf=function(_){if(!(this instanceof fe&&_ instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=_.W.Z.X;for(_=_.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)_=N.ra(_),N=N.$;return g===N&&O===_},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var _=tn,g=Object,O=g.create,N=Object.getPrototypeOf(this),K=this.W;return _=_(O.call(g,N,{W:{value:{count:K.count,na:K.na,pa:K.pa,Y:K.Y,Z:K.Z,ca:K.ca,fa:K.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&Se("Object already scheduled for deletion"),en(this),gn(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&Se("Object already scheduled for deletion"),gt.push(this),gt.length===1&&on&&on(rn),this.W.na=!0,this},Ge.prototype.pb=function(_){return this.Sa&&(_=this.Sa(_)),_},Ge.prototype.Ka=function(_){this.ka&&this.ka(_)},Ge.prototype.argPackAdvance=8,Ge.prototype.readValueFromPointer=Tn,Ge.prototype.deleteObject=function(_){_!==null&&_.delete()},Ge.prototype.fromWireType=function(_){function g(){return this.ua?Wt(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Wt(this.X.ga,{Z:this,Y:_})}var O=this.pb(_);if(!O)return this.Ka(_),null;var N=tr(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=_,N.clone()):(N=N.clone(),this.Ka(_),N);if(N=this.X.ob(O),N=Dn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var K=Lt(O,this.X,N.X);return K===null?g.call(this):this.ua?Wt(N.X.ga,{Z:N,Y:K,fa:this,ca:_}):Wt(N.X.ga,{Z:N,Y:K})},yd=p.UnboundTypeError=Qt("UnboundTypeError");var By={I:function(_,g,O){_=Ve(_),g=At(g,"wrapper"),O=ut(O);var N=[].slice,K=g.X,te=K.ga,ue=K.$.ga,se=K.$.constructor;_=ze(_,function(){K.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new St(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:te}),this.__construct.apply(this,N.call(arguments))}),te.__construct=function(){this===te&&Se("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));en(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),tn(this),le=ge.Y,le=he(K,le),Jt.hasOwnProperty(le)?Se(`Tried to register registered instance: ${le}`):Jt[le]=this},te.__destruct=function(){this===te&&Se("Pass correct 'this' to __destruct"),en(this);var le=this.W.Y;le=he(K,le),Jt.hasOwnProperty(le)?delete Jt[le]:Se(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(te);for(var de in O)_.prototype[de]=O[de];return Le(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,K=g.Na,te=K.map(ue=>ue.sb).concat(K.map(ue=>ue.Db));zt([_],te,ue=>{var se={};return K.forEach((de,le)=>{var ge=ue[le],Te=de.qb,Ie=de.rb,je=ue[le+K.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Te(Ie,Dt)),write:(Dt,Be)=>{var Ke=[];ye(Et,Dt,je.toWireType(Ke,Be)),Kt(Ke)}}}),[{name:g.name,fromWireType:function(de){var le={},ge;for(ge in se)le[ge]=se[ge].read(de);return N(de),le},toWireType:function(de,le){for(var ge in se)if(!(ge in le))throw new TypeError(`Missing field: "${ge}"`);var Te=O();for(ge in se)se[ge].write(Te,le[ge]);return de!==null&&de.push(N,Te),Te},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,K){var te=rr(O);g=Ve(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:K},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=A;else if(O===2)se=W;else if(O===4)se=J;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,K,te,ue,se,de,le,ge,Te,Ie){ge=Ve(ge),te=qe(K,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ie=qe(Te,Ie);var je=it(ge);Pe(je,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),zt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(je,function(){if(Object.getPrototypeOf(this)!==Be)throw new Pt("Use 'new' to construct "+ge);if(Ke.la===void 0)throw new Pt(ge+" has no accessible constructor");var ln=Ke.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${ge} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ke.la).toString()}) parameters instead!`);return ln.apply(this,arguments)});var Be=Object.create(Dt,{constructor:{value:ye}});ye.prototype=Be;var Ke=new xe(ge,ye,Be,Ie,Et,te,se,le);Ke.$&&(Ke.$.sa===void 0&&(Ke.$.sa=[]),Ke.$.sa.push(Ke)),Et=new Ge(ge,Ke,!0,!1),Dt=new Ge(ge+"*",Ke,!1,!1);var Nt=new Ge(ge+" const*",Ke,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(je,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,K,te,ue){var se=ki(O,N);g=Ve(g),te=qe(K,te),zt([],[_],function(de){function le(){Hn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Te=de.X.constructor;return Te[g]===void 0?(le.ma=O-1,Te[g]=le):(Ce(Te,g,ge),Te[g].aa[O-1]=le),zt([],se,function(Ie){if(Ie=Ni(ge,[Ie[0],null].concat(Ie.slice(1)),null,te,ue),Te[g].aa===void 0?(Ie.ma=O-1,Te[g]=Ie):Te[g].aa[O-1]=Ie,de.X.sa)for(const je of de.X.sa)je.constructor.hasOwnProperty(g)||(je.constructor[g]=Ie);return[]}),[]})},s:function(_,g,O,N,K,te,ue,se){g=Ve(g),te=qe(K,te),zt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{Se(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),zt([],[O],function(Te){Te=Te[0];var Ie={get(){return Te.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ie.set=je=>{var ye=[];se(N,Te.toWireType(ye,je)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ie),[]}),[]})},o:function(_,g,O,N,K,te){var ue=ki(g,O);K=qe(N,K),zt([],[_],function(se){se=se[0];var de=`constructor ${se.name}`;if(se.X.la===void 0&&(se.X.la=[]),se.X.la[g-1]!==void 0)throw new Pt(`Cannot register multiple constructors with identical number of parameters (${g-1}) for class '${se.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return se.X.la[g-1]=()=>{Hn(`Cannot construct ${se.name} due to unbound types`,ue)},zt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=Ni(de,le,null,K,te),[]}),[]})},a:function(_,g,O,N,K,te,ue,se){var de=ki(O,N);g=Ve(g),te=qe(K,te),zt([],[_],function(le){function ge(){Hn(`Cannot call ${Te} due to unbound types`,de)}le=le[0];var Te=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ie=le.X.ga,je=Ie[g];return je===void 0||je.aa===void 0&&je.className!==le.name&&je.ma===O-2?(ge.ma=O-2,ge.className=le.name,Ie[g]=ge):(Ce(Ie,g,Te),Ie[g].aa[O-2]=ge),zt([],de,function(ye){return ye=Ni(Te,ye,le,te,ue),Ie[g].aa===void 0?(ye.ma=O-2,Ie[g]=ye):Ie[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,K,te,ue,se,de,le){g=Ve(g),K=qe(N,K),zt([],[_],function(ge){ge=ge[0];var Te=`${ge.name}.${g}`,Ie={get(){Hn(`Cannot access ${Te} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ie.set=de?()=>{Hn(`Cannot access ${Te} due to unbound types`,[O,ue])}:()=>{Se(Te+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Ie),zt([],de?[O,ue]:[O],function(je){var ye=je[0],Et={get(){var Be=bd(this,ge,Te+" getter");return ye.fromWireType(K(te,Be))},enumerable:!0};if(de){de=qe(se,de);var Dt=je[1];Et.set=function(Be){var Ke=bd(this,ge,Te+" setter"),Nt=[];de(le,Ke,Dt.toWireType(Nt,Be)),Kt(Nt)}}return Object.defineProperty(ge.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Ve(g),V(_,{name:g,fromWireType:function(O){var N=ut(O);return Ms(O),N},toWireType:function(O,N){return Le(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function K(){}O=rr(O),g=Ve(g),K.values={},V(_,{name:g,constructor:K,fromWireType:function(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Iy(g,O,N),ea:null}),Pe(g,K)},c:function(_,g,O){var N=At(_,"enum");g=Ve(g),_=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:ze(`${N.name}_${g}`,function(){})}}),_.values[O]=N,_[g]=N},u:function(_,g,O){O=rr(O),g=Ve(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,K){return K},argPackAdvance:8,readValueFromPointer:Ry(g,O),ea:null})},q:function(_,g,O,N,K,te){var ue=ki(g,O);_=Ve(_),K=qe(N,K),Pe(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),zt([],ue,function(se){return qt(_,Ni(_,[se[0],null].concat(se.slice(1)),null,K,te),g-1),[]})},j:function(_,g,O,N,K){g=Ve(g),K===-1&&(K=4294967295),K=rr(O);var te=se=>se;if(N===0){var ue=32-8*O;te=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Oy(g,K,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=B;return new K(ue.buffer,ue[te+1],ue[te])}var K=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Ve(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Ve(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var K=B[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=K;++se){var de=te+se;if(se==K||j[de]==0){if(ue=ue?Ed(j,ue,de-ue):"",le===void 0)var le=ue;else le+=String.fromCharCode(0),le+=ue;ue=de+1}}else{for(le=Array(K),se=0;se<K;++se)le[se]=String.fromCharCode(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,K){K instanceof ArrayBuffer&&(K=new Uint8Array(K));var te,ue=typeof K=="string";ue||K instanceof Uint8Array||K instanceof Uint8ClampedArray||K instanceof Int8Array||Se("Cannot pass non-string to std::string");var se;if(O&&ue)for(te=se=0;te<K.length;++te){var de=K.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=K.length;if(te=se,se=Vs(4+te+1),de=se+4,B[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<K.length;++le){var ge=K.charCodeAt(le);if(55296<=ge&&57343>=ge){var Te=K.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Te&1023}if(127>=ge){if(ue>=de)break;te[ue++]=ge}else{if(2047>=ge){if(ue+1>=de)break;te[ue++]=192|ge>>6}else{if(65535>=ge){if(ue+2>=de)break;te[ue++]=224|ge>>12}else{if(ue+3>=de)break;te[ue++]=240|ge>>18,te[ue++]=128|ge>>12&63}te[ue++]=128|ge>>6&63}te[ue++]=128|ge&63}}te[ue]=0}}else if(ue)for(ue=0;ue<te;++ue)le=K.charCodeAt(ue),255<le&&(Wn(de),Se("String has UTF-16 code units that do not fit in 8 bits")),j[de+ue]=le;else for(ue=0;ue<te;++ue)j[de+ue]=K[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Ve(O),g===2)var N=Py,K=Ay,te=Dy,ue=()=>U,se=1;else g===4&&(N=Ny,K=ky,te=My,ue=()=>B,se=2);V(_,{name:O,fromWireType:function(de){for(var le=B[de>>2],ge=ue(),Te,Ie=de+4,je=0;je<=le;++je){var ye=de+4+je*g;(je==le||ge[ye>>se]==0)&&(Ie=N(Ie,ye-Ie),Te===void 0?Te=Ie:(Te+=String.fromCharCode(0),Te+=Ie),Ie=ye+g)}return Wn(de),Te},toWireType:function(de,le){typeof le!="string"&&Se(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Te=Vs(4+ge+g);return B[Te>>2]=ge>>se,K(le,Te+4,ge+g),de!==null&&de.push(Wn,Te),Te},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,K,te){Nn[_]={name:Ve(g),Ba:qe(O,N),ka:qe(K,te),Na:[]}},M:function(_,g,O,N,K,te,ue,se,de,le){Nn[_].Na.push({mb:Ve(g),sb:O,qb:qe(N,K),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Ve(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ut(_),g=At(g,"emval::as");var N=[],K=Le(N);return B[O>>2]=K,g.toWireType(N,_)},w:function(_,g,O,N,K){_=ji[_],g=ut(g),O=Mi(O);var te=[];return B[N>>2]=Le(te),_(g,O,te,K)},i:function(_,g,O,N){_=ji[_],g=ut(g),O=Mi(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=Fy(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var K=_d[g];if(K!==void 0)return K;var te=Array(_-1);return K=Ly((ue,se,de,le)=>{for(var ge=0,Te=0;Te<_-1;++Te)te[Te]=O[Te+1].readValueFromPointer(le+ge),ge+=O[Te+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Te=0;Te<_-1;++Te)O[Te+1].hb&&O[Te+1].hb(te[Te]);if(!N.vb)return N.toWireType(de,ue)}),_d[g]=K},p:function(_){return _=Mi(_),Le(p[_])},K:function(_,g){return _=ut(_),g=ut(g),Le(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return Le(Mi(_))},n:function(_){var g=ut(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),Le(_)},b:()=>{oe("")},A:_=>{var g=j.length;if(_>>>=0,2147483648<_)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,_+100663296);var K=Math;N=Math.max(_,N);e:{K=K.min.call(K,2147483648,N+(65536-N%65536)%65536)-h.buffer.byteLength+65535>>>16;try{h.grow(K),G();var te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(_,g)=>{var O=0;return Sd().forEach(function(N,K){var te=g+O;for(K=B[_+4*K>>2]=te,te=0;te<N.length;++te)A[K++>>0]=N.charCodeAt(te);A[K>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Sd();B[_>>2]=O.length;var N=0;return O.forEach(function(K){N+=K.length+1}),B[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var K=0,te=0;te<O;te++){var ue=B[g>>2],se=B[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Vy[_];le===0||le===10?((_===1?H:R)(Ed(ge,0)),ge.length=0):ge.push(le)}K+=se}return B[N>>2]=K,0}};(function(){function _(O){if(O=O.exports,p.asm=O,h=p.asm.O,G(),Y=p.asm.U,ce.unshift(p.asm.P),ie--,p.monitorRunDependencies&&p.monitorRunDependencies(ie),ie==0&&ee){var N=ee;ee=null,N()}return O}var g={a:By};if(ie++,p.monitorRunDependencies&&p.monitorRunDependencies(ie),p.instantiateWasm)try{return p.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return ke(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=p.asm.Q).apply(null,arguments)}function Vs(){return(Vs=p.asm.R).apply(null,arguments)}function $d(){return($d=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Fi;ee=function _(){Fi||Td(),Fi||(ee=_)};function Td(){function _(){if(!Fi&&(Fi=!0,p.calledRun=!0,!$)){if(De(ce),b(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();z.unshift(g)}De(z)}}if(!(0<ie)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)X();De(Z),0<ie||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),_()},1)):_())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return Td(),m.ready}})();const d=u},a=>{a.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"1.2.4","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>u.registerTouchInteractions});var u=c(4)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>f});var u=void 0,d=function(m){var p,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((b=m.changedTouches)===null||b===void 0)&&b.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var p=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,w=m.fit,C=m.alignment;if(!p||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(P){var F=P.currentTarget.getBoundingClientRect(),k=d(P),H=k.clientX,R=k.clientY;if(!(!H&&!R)){var E=H-F.left,h=R-F.top,$=v.computeAlignment(w,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),A=new v.Mat2D;$.invert(A);var j=new v.Vec2D(E,h),W=v.mapXY(A,j),U=W.x(),J=W.y();switch(W.delete(),A.delete(),j.delete(),$.delete(),P.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var B=0,L=T;B<L.length;B++){var ne=L[B];ne.pointerMove(U,J)}break}case"touchstart":case"mousedown":{for(var G=0,Y=T;G<Y.length;G++){var ne=Y[G];ne.pointerDown(U,J)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var ne=ce[Z];ne.pointerUp(U,J)}break}}}},D=I.bind(u);return p.addEventListener("mouseover",D),p.addEventListener("mouseout",D),p.addEventListener("mousemove",D),p.addEventListener("mousedown",D),p.addEventListener("mouseup",D),p.addEventListener("touchmove",D),p.addEventListener("touchstart",D),p.addEventListener("touchend",D),function(){p.removeEventListener("mouseover",D),p.removeEventListener("mouseout",D),p.removeEventListener("mousemove",D),p.removeEventListener("mousedown",D),p.removeEventListener("mouseup",D),p.removeEventListener("touchmove",D),p.removeEventListener("touchstart",D),p.removeEventListener("touchend",D)}}}],r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var c=r[a]={exports:{}};return n[a](c,c.exports,o),c.exports}o.d=(a,s)=>{for(var c in s)o.o(s,c)&&!o.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:s[c]})},o.o=(a,s)=>Object.prototype.hasOwnProperty.call(a,s),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Alignment:()=>m,EventType:()=>C,Fit:()=>f,Layout:()=>p,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(E,h,$,A){function j(W){return W instanceof $?W:new $(function(U){U(W)})}return new($||($=Promise))(function(W,U){function J(ne){try{L(A.next(ne))}catch(G){U(G)}}function B(ne){try{L(A.throw(ne))}catch(G){U(G)}}function L(ne){ne.done?W(ne.value):j(ne.value).then(J,B)}L((A=A.apply(E,h||[])).next())})},d=function(E,h){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},A,j,W,U;return U={next:J(0),throw:J(1),return:J(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function J(L){return function(ne){return B([L,ne])}}function B(L){if(A)throw new TypeError("Generator is already executing.");for(;U&&(U=0,L[0]&&($=0)),$;)try{if(A=1,j&&(W=L[0]&2?j.return:L[0]?j.throw||((W=j.return)&&W.call(j),0):j.next)&&!(W=W.call(j,L[1])).done)return W;switch(j=0,W&&(L=[L[0]&2,W.value]),L[0]){case 0:case 1:W=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,j=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(W=$.trys,!(W=W.length>0&&W[W.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!W||L[1]>W[0]&&L[1]<W[3])){$.label=L[1];break}if(L[0]===6&&$.label<W[1]){$.label=W[1],W=L;break}if(W&&$.label<W[2]){$.label=W[2],$.ops.push(L);break}W[2]&&$.ops.pop(),$.trys.pop();continue}L=h.call(E,$)}catch(ne){L=[6,ne],j=0}finally{A=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(E){E.Cover="cover",E.Contain="contain",E.Fill="fill",E.FitWidth="fitWidth",E.FitHeight="fitHeight",E.None="none",E.ScaleDown="scaleDown"})(f||(f={}));var m;(function(E){E.Center="center",E.TopLeft="topLeft",E.TopCenter="topCenter",E.TopRight="topRight",E.CenterLeft="centerLeft",E.CenterRight="centerRight",E.BottomLeft="bottomLeft",E.BottomCenter="bottomCenter",E.BottomRight="bottomRight"})(m||(m={}));var p=function(){function E(h){var $,A,j,W,U,J;this.fit=($=h==null?void 0:h.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(A=h==null?void 0:h.alignment)!==null&&A!==void 0?A:m.Center,this.minX=(j=h==null?void 0:h.minX)!==null&&j!==void 0?j:0,this.minY=(W=h==null?void 0:h.minY)!==null&&W!==void 0?W:0,this.maxX=(U=h==null?void 0:h.maxX)!==null&&U!==void 0?U:0,this.maxY=(J=h==null?void 0:h.maxY)!==null&&J!==void 0?J:0}return E.new=function(h){var $=h.fit,A=h.alignment,j=h.minX,W=h.minY,U=h.maxX,J=h.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new E({fit:$,alignment:A,minX:j,minY:W,maxX:U,maxY:J})},E.prototype.copyWith=function(h){var $=h.fit,A=h.alignment,j=h.minX,W=h.minY,U=h.maxX,J=h.maxY;return new E({fit:$??this.fit,alignment:A??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:U??this.maxX,maxY:J??this.maxY})},E.prototype.runtimeFit=function(h){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=h.Fit.cover:this.fit===f.Contain?$=h.Fit.contain:this.fit===f.Fill?$=h.Fit.fill:this.fit===f.FitWidth?$=h.Fit.fitWidth:this.fit===f.FitHeight?$=h.Fit.fitHeight:this.fit===f.ScaleDown?$=h.Fit.scaleDown:$=h.Fit.none,this.cachedRuntimeFit=$,$},E.prototype.runtimeAlignment=function(h){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=h.Alignment.topLeft:this.alignment===m.TopCenter?$=h.Alignment.topCenter:this.alignment===m.TopRight?$=h.Alignment.topRight:this.alignment===m.CenterLeft?$=h.Alignment.centerLeft:this.alignment===m.CenterRight?$=h.Alignment.centerRight:this.alignment===m.BottomLeft?$=h.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=h.Alignment.bottomCenter:this.alignment===m.BottomRight?$=h.Alignment.bottomRight:$=h.Alignment.center,this.cachedRuntimeAlignment=$,$},E}(),b=function(){function E(){}return E.loadRuntime=function(){a.default({locateFile:function(){return E.wasmURL}}).then(function(h){var $;for(E.runtime=h;E.callBackQueue.length>0;)($=E.callBackQueue.shift())===null||$===void 0||$(E.runtime)})},E.getInstance=function(h){E.isLoading||(E.isLoading=!0,E.loadRuntime()),E.runtime?h(E.runtime):E.callBackQueue.push(h)},E.awaitInstance=function(){return new Promise(function(h){return E.getInstance(function($){return h($)})})},E.setWasmUrl=function(h){E.wasmURL=h},E.isLoading=!1,E.callBackQueue=[],E.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),E}(),y=function(){function E(h,$,A,j){this.animation=h,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new A.LinearAnimationInstance(h,$)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"time",{get:function(){return this.instance.time},set:function(h){this.instance.time=h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.scrubTo===null?this.instance.advance(h):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},E.prototype.apply=function(h){this.instance.apply(h)},Object.defineProperty(E.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){this.instance.delete()},E}(),T;(function(E){E[E.Number=56]="Number",E[E.Trigger=58]="Trigger",E[E.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function E(h,$){this.type=h,this.runtimeInput=$}return Object.defineProperty(E.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(h){this.runtimeInput.value=h},enumerable:!1,configurable:!0}),E.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},E}(),v=function(){function E(h,$,A,j){this.stateMachine=h,this.playing=A,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(h,j),this.initInputs($)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"statesChanged",{get:function(){for(var h=[],$=0;$<this.instance.stateChangedCount();$++)h.push(this.instance.stateChangedNameByIndex($));return h},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.instance.advance(h)},E.prototype.initInputs=function(h){for(var $=0;$<this.instance.inputCount();$++){var A=this.instance.input($);this.inputs.push(this.mapRuntimeInput(A,h))}},E.prototype.mapRuntimeInput=function(h,$){if(h.type===$.SMIInput.bool)return new S(T.Boolean,h.asBool());if(h.type===$.SMIInput.number)return new S(T.Number,h.asNumber());if(h.type===$.SMIInput.trigger)return new S(T.Trigger,h.asTrigger())},E.prototype.cleanup=function(){this.instance.delete()},E}(),w=function(){function E(h,$,A,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=h,this.artboard=$,this.eventManager=A,this.animations=j,this.stateMachines=W}return E.prototype.add=function(h,$,A){if(A===void 0&&(A=!0),h=H(h),h.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var j=this.animations.map(function(Z){return Z.name}),W=this.stateMachines.map(function(Z){return Z.name}),U=0;U<h.length;U++){var J=j.indexOf(h[U]),B=W.indexOf(h[U]);if(J>=0||B>=0)J>=0?this.animations[J].playing=$:this.stateMachines[B].playing=$;else{var L=this.artboard.animationByName(h[U]);if(L){var ne=new y(L,this.artboard,this.runtime,$);ne.advance(0),ne.apply(1),this.animations.push(ne)}else{var G=this.artboard.stateMachineByName(h[U]);if(G){var Y=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(Y)}}}}return A&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},E.prototype.play=function(h){return this.add(h,!0)},E.prototype.pause=function(h){return this.add(h,!1)},E.prototype.scrub=function(h,$){var A=this.animations.filter(function(j){return h.includes(j.name)});return A.forEach(function(j){return j.scrubTo=$}),A.map(function(j){return j.name})},Object.defineProperty(E.prototype,"playing",{get:function(){return this.animations.filter(function(h){return h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"paused",{get:function(){return this.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),E.prototype.stop=function(h){var $=this;h=H(h);var A=[];if(h.length===0)A=this.animations.map(function(U){return U.name}).concat(this.stateMachines.map(function(U){return U.name})),this.animations.forEach(function(U){return U.cleanup()}),this.stateMachines.forEach(function(U){return U.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(U){return h.includes(U.name)});j.forEach(function(U){U.cleanup(),$.animations.splice($.animations.indexOf(U),1)});var W=this.stateMachines.filter(function(U){return h.includes(U.name)});W.forEach(function(U){U.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(U),1)}),A=j.map(function(U){return U.name}).concat(W.map(function(U){return U.name}))}return this.eventManager.fire({type:C.Stop,data:A}),A},Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(h,$){return h||$.playing},!1)||this.stateMachines.reduce(function(h,$){return h||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),E.prototype.atLeastOne=function(h,$){$===void 0&&($=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],h,$):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],h,$)),A},E.prototype.handleLooping=function(){for(var h=0,$=this.animations.filter(function(j){return j.playing});h<$.length;h++){var A=$[h];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.PingPong}}),A.loopCount=0)}},E.prototype.handleStateChanges=function(){for(var h=[],$=0,A=this.stateMachines.filter(function(W){return W.playing});$<A.length;$++){var j=A[$];h.push.apply(h,j.statesChanged)}h.length>0&&this.eventManager.fire({type:C.StateChange,data:h})},E.prototype.handleAdvancing=function(h){this.eventManager.fire({type:C.Advance,data:h})},E}(),C;(function(E){E.Load="load",E.LoadError="loaderror",E.Play="play",E.Pause="pause",E.Stop="stop",E.Loop="loop",E.Draw="draw",E.Advance="advance",E.StateChange="statechange"})(C||(C={}));var I;(function(E){E.OneShot="oneshot",E.Loop="loop",E.PingPong="pingpong"})(I||(I={}));var D=function(){function E(h){h===void 0&&(h=[]),this.listeners=h}return E.prototype.getListeners=function(h){return this.listeners.filter(function($){return $.type===h})},E.prototype.add=function(h){this.listeners.includes(h)||this.listeners.push(h)},E.prototype.remove=function(h){for(var $=0;$<this.listeners.length;$++){var A=this.listeners[$];if(A.type===h.type&&A.callback===h.callback){this.listeners.splice($,1);break}}},E.prototype.removeAll=function(h){var $=this;h?this.listeners.filter(function(A){return A.type===h}).forEach(function(A){return $.remove(A)}):this.listeners.splice(0,this.listeners.length)},E.prototype.fire=function(h){var $=this.getListeners(h.type);$.forEach(function(A){return A.callback(h)})},E}(),P=function(){function E(h){this.eventManager=h,this.queue=[]}return E.prototype.add=function(h){this.queue.push(h)},E.prototype.process=function(){for(;this.queue.length>0;){var h=this.queue.shift();h!=null&&h.action&&h.action(),h!=null&&h.event&&this.eventManager.fire(h.event)}},E}(),F=function(){function E(h){var $;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.renderSecondTimer=0,this.canvas=h.canvas,this.src=h.src,this.buffer=h.buffer,this.layout=($=h.layout)!==null&&$!==void 0?$:new p,this.shouldDisableRiveListeners=!!h.shouldDisableRiveListeners,this.eventManager=new D,h.onLoad&&this.on(C.Load,h.onLoad),h.onLoadError&&this.on(C.LoadError,h.onLoadError),h.onPlay&&this.on(C.Play,h.onPlay),h.onPause&&this.on(C.Pause,h.onPause),h.onStop&&this.on(C.Stop,h.onStop),h.onLoop&&this.on(C.Loop,h.onLoop),h.onStateChange&&this.on(C.StateChange,h.onStateChange),h.onAdvance&&this.on(C.Advance,h.onAdvance),h.onload&&!h.onLoad&&this.on(C.Load,h.onload),h.onloaderror&&!h.onLoadError&&this.on(C.LoadError,h.onloaderror),h.onplay&&!h.onPlay&&this.on(C.Play,h.onplay),h.onpause&&!h.onPause&&this.on(C.Pause,h.onpause),h.onstop&&!h.onStop&&this.on(C.Stop,h.onstop),h.onloop&&!h.onLoop&&this.on(C.Loop,h.onloop),h.onstatechange&&!h.onStateChange&&this.on(C.StateChange,h.onstatechange),this.taskQueue=new P(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:h.autoplay,animations:h.animations,stateMachines:h.stateMachines,artboard:h.artboard,useOffscreenRenderer:h.useOffscreenRenderer})}return E.new=function(h){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new E(h)},E.prototype.init=function(h){var $=this,A=h.src,j=h.buffer,W=h.animations,U=h.stateMachines,J=h.artboard,B=h.autoplay,L=B===void 0?!1:B,ne=h.useOffscreenRenderer,G=ne===void 0?!1:ne;if(this.src=A,this.buffer=j,!this.src&&!this.buffer)throw new Error(E.missingErrorMessage);var Y=H(W),Z=H(U);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(J,Y,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},E.prototype.setupRiveListeners=function(){var h=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(A){return A.playing&&h.runtime.hasListeners(A.instance)}).map(function(A){return A.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:$,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},E.prototype.initData=function(h,$,A,j){var W;return u(this,void 0,void 0,function(){var U,J,B;return d(this,function(L){switch(L.label){case 0:return this.src?(U=this,[4,k(this.src)]):[3,2];case 1:U.buffer=L.sent(),L.label=2;case 2:return J=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return J.file=L.sent(),this.file?(this.initArtboard(h,$,A,j),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(W=this.src)!==null&&W!==void 0?W:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(B="Problem loading file; may be corrupt!",console.warn(B),this.eventManager.fire({type:C.LoadError,data:B}),[2,Promise.reject(B)])}})})},E.prototype.initArtboard=function(h,$,A,j){var W=h?this.file.artboardByName(h):this.file.defaultArtboard();if(!W){var U="Invalid artboard name or no default artboard";console.warn(U),this.eventManager.fire({type:C.LoadError,data:U});return}if(this.artboard=W,this.artboard.animationCount()<1){var U="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:U}),U}this.animator=new w(this.runtime,this.artboard,this.eventManager);var J;$.length>0||A.length>0?(J=$.concat(A),this.animator.add(J,j,!1)):J=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:J}})},E.prototype.drawFrame=function(){this.startRendering()},E.prototype.draw=function(h,$){var A=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=h),this.renderSecondTimer+=h-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(h-this.lastRenderTime)/1e3;this.lastRenderTime=h;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),U=0,J=W;U<J.length;U++){var B=J[U];B.advance(j),B.instance.didLoop&&(B.loopCount+=1),B.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),ne=0,G=L;ne<G.length;ne++){var Y=G[ne];Y.advance(j)}this.artboard.advance(j);var Z=this.renderer;Z.clear(),Z.save(),this.alignRenderer(),this.artboard.draw(Z),Z.restore(),Z.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(j),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-A);this.frameTimes[0]<=ce-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},E.prototype.alignRenderer=function(){var h=this,$=h.renderer,A=h.runtime,j=h._layout,W=h.artboard;$.align(j.runtimeFit(A),j.runtimeAlignment(A),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(E.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(h,$){return h+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){var h,$;this.stopRendering(),this.cleanupInstances(),(h=this.renderer)===null||h===void 0||h.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},E.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},E.prototype.play=function(h,$){var A=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(h,$)}});return}this.animator.play(h),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},E.prototype.pause=function(h){var $=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(h)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(h)},E.prototype.scrub=function(h,$){var A=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(h,$)}});return}this.animator.scrub(h,$||0),this.drawFrame()},E.prototype.stop=function(h){var $=this;if(h=H(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(h)}});return}this.animator.stop(h),this.eventCleanup&&this.eventCleanup()},E.prototype.reset=function(h){var $,A=h==null?void 0:h.artboard,j=H(h==null?void 0:h.animations),W=H(h==null?void 0:h.stateMachines),U=($=h==null?void 0:h.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(A,j,W,U),this.taskQueue.process()},E.prototype.load=function(h){this.stop(),this.init(h)},Object.defineProperty(E.prototype,"layout",{get:function(){return this._layout},set:function(h){this._layout=h,(!h.maxX||!h.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),E.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},E.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var h=this.canvas.getBoundingClientRect(),$=h.width,A=h.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*A,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(E.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var h=[],$=0;$<this.artboard.animationCount();$++)h.push(this.artboard.animationByIndex($).name);return h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var h=[],$=0;$<this.artboard.stateMachineCount();$++)h.push(this.artboard.stateMachineByIndex($).name);return h},enumerable:!1,configurable:!0}),E.prototype.stateMachineInputs=function(h){if(this.loaded){var $=this.animator.stateMachines.find(function(A){return A.name===h});return $==null?void 0:$.inputs}},Object.defineProperty(E.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),E.prototype.on=function(h,$){this.eventManager.add({type:h,callback:$})},E.prototype.off=function(h,$){this.eventManager.remove({type:h,callback:$})},E.prototype.unsubscribe=function(h,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(h,$)},E.prototype.removeAllRiveEventListeners=function(h){this.eventManager.removeAll(h)},E.prototype.unsubscribeAll=function(h){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(h)},E.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},E.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},E.prototype.enableFPSCounter=function(h){this.runtime.enableFPSCounter(h)},E.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(E.prototype,"contents",{get:function(){if(this.loaded){for(var h={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var A=this.file.artboardByIndex($),j={name:A.name,animations:[],stateMachines:[]},W=0;W<A.animationCount();W++){var U=A.animationByIndex(W);j.animations.push(U.name)}for(var J=0;J<A.stateMachineCount();J++){for(var B=A.stateMachineByIndex(J),L=B.name,ne=new this.runtime.StateMachineInstance(B,A),G=[],Y=0;Y<ne.inputCount();Y++){var Z=ne.input(Y);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}h.artboards.push(j)}return h}},enumerable:!1,configurable:!0}),E.missingErrorMessage="Rive source file or data buffer required",E}(),k=function(E){return u(void 0,void 0,void 0,function(){var h,$,A;return d(this,function(j){switch(j.label){case 0:return h=new Request(E),[4,fetch(h)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return A=j.sent(),[2,A]}})})},H=function(E){return typeof E=="string"?[E]:E instanceof Array?E:[]},R={EventManager:D,TaskQueueManager:P}})(),i})())})(ig);var YT=ig.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=YT;function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var o=r(t),i=function(){return i=Object.assign||function(v){for(var w,C=1,I=arguments.length;C<I;C++)for(var D in w=arguments[C])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(C[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(C[I[D]]=v[I[D]])}return C}function s(){var v=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,v),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function v(){}return v.prototype.observe=function(){},v.prototype.unobserve=function(){},v.prototype.disconnect=function(){},v}(),u=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(v,w){w===void 0&&(w=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var P,F,k,H=t.useRef(new u((P=function(R){d&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,E=[],h=0;h<arguments.length;h++)E[h]=arguments[h];clearTimeout(k),k=window.setTimeout(function(){return P.apply(R,E)},F)})));return t.useEffect(function(){var R=H.current;if(w){var E=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),E&&d&&R.unobserve(E)}}R.disconnect()},[v,H]),I}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},p,v)}function y(v){var w=v.riveLoaded,C=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,P=v.options,F=P===void 0?{}:P,k=v.onCanvasHasResized,H=v.artboardBounds,R=b(F),E=t.useState({height:0,width:0}),h=E[0],$=h.height,A=h.width,j=E[1],W=t.useState({height:0,width:0}),U=W[0],J=U.height,B=U.width,L=W[1],ne=t.useState(!0),G=ne[0],Y=ne[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,X=m(D,ce),ie=function(){var Ee=s(),_e=t.useState(Ee),Ae=_e[0],$e=_e[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var ke=function(){var it=s();$e(it)},De=window.matchMedia("screen and (resolution: ".concat(Ae,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",ke):De.addListener(ke),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",ke):De.removeListener(ke)}}},[Ae]),Ae}(),ee=H??{},oe=ee.maxX,re=ee.maxY,pe=t.useCallback(function(){var Ee,_e,Ae,$e,ke=(_e=(Ee=D.current)===null||Ee===void 0?void 0:Ee.clientWidth)!==null&&_e!==void 0?_e:0,De=($e=(Ae=D.current)===null||Ae===void 0?void 0:Ae.clientHeight)!==null&&$e!==void 0?$e:0;return Z&&H?{width:ke,height:ke*(H.maxY/H.maxX)}:{width:ke,height:De}},[D,Z,oe,re]);t.useEffect(function(){if(ce&&D.current&&C){var Ee=pe(),_e=Ee.width,Ae=Ee.height,$e=!1;if(I.current){var ke=_e!==A||Ae!==$;if(R.fitCanvasToArtboardHeight&&ke&&(D.current.style.height=Ae+"px",$e=!0),R.useDevicePixelRatio){if(ke||_e*ie!==B||Ae*ie!==J){var De=ie*_e,it=ie*Ae;I.current.width=De,I.current.height=it,I.current.style.width=_e+"px",I.current.style.height=Ae+"px",L({width:De,height:it}),$e=!0}}else ke&&(I.current.width=_e,I.current.height=Ae,L({width:_e,height:Ae}),$e=!0);j({width:_e,height:Ae})}k&&(G||$e)&&k&&k(),G&&Y(!1)}},[I,D,X,ie,pe,G,Y,J,B,$,A,k,ce,Z,z,C])}function T(v){var w=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,P=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),H=i({width:"100%",height:"100%"},P);return o.default.createElement("div",i({ref:w,className:D},!D&&{style:H}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,w){w===void 0&&(w={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),P=D[0],F=D[1],k=!!v,H=b(w),R=t.useCallback(function(){P&&(P.startRendering(),P.resizeToCanvas())},[P]);y({riveLoaded:!!P,canvasRef:C,containerRef:I,options:H,onCanvasHasResized:R,artboardBounds:P==null?void 0:P.bounds});var E=t.useCallback(function(j){if(j&&v&&k){var W=H.useOffscreenRenderer,U=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));U.on(n.EventType.Load,function(){C.current?F(U):U.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),h=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?P&&P.startRendering():P&&P.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[P]),t.useEffect(function(){return function(){P&&(P.cleanup(),F(null))}},[P]);var $=v==null?void 0:v.animations;t.useEffect(function(){P&&$&&(P.isPlaying?(P.stop(P.animationNames),P.play($)):P.isPaused&&(P.stop(P.animationNames),P.pause($)))},[$,P]);var A=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:h,setCanvasRef:E},j))},[E,h]);return{canvas:C.current,container:I.current,setCanvasRef:E,setContainerRef:h,rive:P,RiveComponent:A}}e.default=function(v){var w=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,P=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,H=v.shouldDisableRiveListeners,R=H!==void 0&&H,E=v.shouldResizeCanvasToContainer,h=E===void 0||E,$=v.children,A=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:w,artboard:C,animations:I,layout:P,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:h}).RiveComponent;return o.default.createElement(j,i({},A),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,w,C,I){var D=t.useState(null),P=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&C||F(null),v&&w&&C){var H=v.stateMachineInputs(w);if(H){var R=H.find(function(E){return E.name===C});I!==void 0&&R&&(R.value=I),F(R||null)}}else F(null)}k(),v&&v.on(n.EventType.Play,function(){k()})},[v]),P},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(og);const KT=yh(og),El=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(et,{width:t,height:n,style:r,children:M.jsx(KT,{src:e,...o})});El.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ag=({isLoading:e,className:t,width:n,height:r,onClose:o,src:i,noScroll:a="noscroll",...s})=>(l.useEffect(()=>(e?document.body.classList.add(a):document.body.classList.remove(a),()=>{document.body.classList.remove(a)}),[e,a]),e?M.jsx(et,{className:t,"data-test-id":s["data-testid-backdrop"],onClick:o,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:M.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:M.jsx(El,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ag.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var qT=ot({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const XT=({color:e,size:t,...n})=>M.jsx(et,{...n,className:Oe(qT({color:e,size:t}))});function GT(e){return class extends l.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?l.Children.map(n,o=>{const i=l.Children.toArray(o.children||o.props.children);return i&&i[0]&&i[0].props.value}):[]},this.onChange=(n,r,o)=>{const i=this.getValue().concat();i[n]=r,o&&o(i,n)},this.onValueChange=(n,r)=>{this.onChange(n,r,this.props.onValueChange)},this.onScrollChange=(n,r)=>{this.onChange(n,r,this.props.onScrollChange)}}render(){return M.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var ZT="_1ypj0tt5",QT="_1ypj0tt4",JT="_1ypj0tt3",Wp="_1ypj0tt1",eI="_1ypj0tt0",tI="_1ypj0tt2";const nI=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:o})=>{const i=n==null?void 0:n(),a=l.Children.map(t,(s,c)=>l.cloneElement(s,{selectedValue:i==null?void 0:i[c],onValueChange:(...u)=>o==null?void 0:o(c,...u),onScrollChange:(...u)=>r==null?void 0:r(c,...u)}));return M.jsx(et,{className:Oe(ZT,e),children:a})},sg=GT(nI),rI=e=>null;function oI(e){var t;const n=(r,o,i)=>{const a=Math.round(r/o);return Math.min(a,i-1)};return t=class extends l.Component{constructor(){super(...arguments),this.selectByIndex=(r,o,i)=>{r<0||r>=l.Children.count(this.props.children)||!o||i(r*o)},this.doScrollingComplete=(r,o,i)=>{const a=l.Children.toArray(this.props.children),s=n(r,o,a.length),c=a[s];c?i(c.props.value):console.warn&&console.warn("child not found",a,s)},this.select=(r,o,i)=>{const a=l.Children.toArray(this.props.children);for(let s=0,c=a.length;s<c;s+=1)if(a[s].props.value===r){this.selectByIndex(s,o,i);return}this.selectByIndex(0,o,i)}}render(){return M.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=rI,t}const iI=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:o,doScrollingComplete:i,onValueChange:a,computeChildIndex:s,disabled:c,className:u}=e,d=l.useRef(null),f=l.useRef(null),m=l.useRef(null),p=l.useRef(0),b=l.useRef(0),y=l.useMemo(()=>{if(n||r)return n||r;const k=l.Children.toArray(t);return k&&k[0]&&k[0].props.value},[t,r,n]),[T,S]=l.useState(y),v=(()=>{let k=-1,H=0,R=0,E=!1,h=!1;const $=(L,ne)=>{L.transform=ne},A=(L,ne)=>{L.transition=ne},j=(L,ne,G=.3)=>{var Y,Z;k!==ne&&(k=ne,A((Y=f.current)==null?void 0:Y.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-ne}px,0)`),setTimeout(()=>{P(),f.current&&A(f.current.style,"")},+G*1e3))},W=((L=30,ne=100)=>{let G=0,Y=0,Z=0;const ce={record:z=>{const X=+new Date;Z=(z-Y)/(X-G),X-G>=L&&(Z=X-G<=ne?Z:0,Y=z,G=X)},getVelocity:z=>(z!==Y&&ce.record(z),Z)};return ce})(),U=()=>{h=!1;let L=k;const ne=(t.length-1)*p.current;let G=.3;const Y=W.getVelocity(L)*4;Y&&(L=Y*40+L,G=Math.abs(Y)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>ne&&(L=ne),j(0,L,G<.3?.3:G),D()},J=L=>{E||(h=!0,R=L,H=k)},B=L=>{var ne;E||!h||(k=H-L+R,W.record(k),D(),$((ne=f.current)==null?void 0:ne.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>J(L.touches[0].pageY),mousedown:L=>J(L.pageY),touchmove:L=>{L.preventDefault(),B(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),B(L.pageY)},touchend:()=>U(),touchcancel:()=>U(),mouseup:()=>U(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{E=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),C=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==T&&("selectedValue"in e||S(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const H=l.Children.toArray(t),R=s(k,p.current,H.length);if(b.current!==R){b.current=R;const E=H[R];E&&e.onScrollChange?e.onScrollChange(E.props.value):!H&&console.warn&&console.warn("child not found",t,R)}}},P=()=>{const k=v.getValue();k>=0&&i(k,p.current,I)},F=()=>{const k=`${Wp} ${tI}`,H=E=>{const{className:h="",style:$,value:A}=E.props,j=T===A;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Wp} ${h}`,children:E.props.children},A)};return l.Children?l.Children.map(t,H):[].concat(t).map(H)};return l.useEffect(()=>{var E,h,$;const k=((E=d.current)==null?void 0:E.getBoundingClientRect().height)??0,H=((h=m.current)==null?void 0:h.getBoundingClientRect().height)??0;p.current=(($=m.current)==null?void 0:$.getBoundingClientRect().height)??0;let R=Math.floor(k/H);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${H*R}px 0`,m.current.style.top=`${H*R}px`,v.setDisabled(c),o(T,p.current,w),Object.keys(v).forEach(A=>{var j;if(A.indexOf("touch")===0||A.indexOf("mouse")===0){const W=A.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(A,v[A],W)}}),()=>{Object.keys(v).forEach(A=>{var j;(A.indexOf("touch")===0||A.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(A,v[A]))})}},[c,v,w,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,p.current,C)},[C,o,T]),M.jsxs("div",{className:Oe(eI,u),ref:d,children:[M.jsx("div",{className:Oe(JT,u),ref:m}),M.jsx("div",{className:QT,ref:f,children:F()})]})},au=oI(iI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const Ka=24*60*60*1e3,aI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),hc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),sI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},zp=(e,t,n)=>{if(n){const r=e.getHours();let o=t;o=r>=12?t+12:t,o=o>=24?0:o,e.setHours(o)}else e.setHours(t)},Up=(e,t)=>{t===0?e.setTime(+e-Ka/2):e.setTime(+e+Ka/2)},Yp=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),cI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],uI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=aI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[p,b]=l.useState(t||n),y=l.useRef(new Date(-1)),T=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const S=()=>$(p||y.current),v=()=>E().getFullYear(),w=()=>h().getFullYear(),C=()=>E().getMonth(),I=()=>h().getMonth(),D=()=>E().getDate(),P=()=>h().getDate(),F=()=>E().getHours(),k=()=>h().getHours(),H=()=>E().getMinutes(),R=()=>h().getMinutes(),E=()=>u||y.current,h=()=>d||T.current,$=G=>{const Y=E(),Z=h();if(o===Mt.DATE_TIME){if(G<Y)return Sr(Y);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+Ka<=Y)return Sr(Y);if(G>=+Z+Ka)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),X=Y.getHours(),ie=Y.getMinutes(),ee=G.getHours(),oe=G.getMinutes();if(ee<X||ee===X&&oe<ie)return Sr(Y);if(ee>ce||ee===ce&&oe>z)return Sr(Z)}return G},A=(G,Y)=>{const Z=parseInt(G[Y],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(Y){case 0:ce.setDate(Z);break;case 1:sI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:zp(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Up(ce,Z);break}else if(o===Mt.TIME)switch(Y){case 0:zp(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Up(ce,Z);break}return $(ce)},j=(G,Y)=>{const Z=A(G,Y);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,Y)},W=(G,Y)=>{if(e.onScrollChange){const Z=A(G,Y);e.onScrollChange(Z,G,Y)}},U=()=>{const G=S(),Y=G.getFullYear(),Z=G.getMonth(),ce=v(),z=w(),X=C(),ie=I(),ee=D(),oe=P(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const pe={key:"year",props:{children:re}};if(o===Mt.YEAR)return[pe];const Ee=[];let _e=0,Ae=11;ce===Y&&(_e=X),z===Y&&(Ae=ie);for(let ze=_e;ze<=Ae;ze+=1){const xt=m?m(ze,G):cI(ze);Ee.push({value:`${ze}`,label:xt})}const $e={key:"month",props:{children:Ee}};if(o===Mt.MONTH)return[$e,pe];const ke=[];let De=1,it=cg(G);ce===Y&&X===Z&&(De=ee),z===Y&&ie===Z&&(it=oe);for(let ze=De;ze<=it;ze+=1){const xt=f?f(ze,G):`${ze}`;ke.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:ke}},$e,pe]},J=G=>{let{minHour:Y=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const X=H(),ie=R(),ee=F(),oe=k(),re=G.getHours();if(o===Mt.DATE_TIME){const $e=G.getFullYear(),ke=G.getMonth(),De=G.getDate(),it=v(),ze=w(),xt=C(),Xe=I(),Pt=D(),Se=P();it===$e&&xt===ke&&Pt===De&&(Y=ee,ee===re&&(ce=X)),ze===$e&&Xe===ke&&Se===De&&(Z=oe,oe===re&&(z=ie))}else Y=ee,ee===re&&(ce=X),Z=oe,oe===re&&(z=ie);const pe=[];Y===0&&Z===0||Y!==0&&Z!==0?Y=Yp(Y):Y===0&&c&&(Y=1,pe.push({value:"0",label:"12"})),Z=Yp(Z);for(let $e=Y;$e<=Z;$e+=1)pe.push({value:`${$e}`,label:hc($e)});const Ee=[],_e=G.getMinutes();for(let $e=ce;$e<=z;$e+=s)Ee.push({value:`${$e}`,label:hc($e)}),_e>$e&&_e<$e+s&&Ee.push({value:`${_e}`,label:hc(_e)});return{cols:[{key:"hours",props:{children:pe}},{key:"minutes",props:{children:Ee}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:_e}},B=()=>{const G=S();let Y=[],Z=[];if(o===Mt.YEAR)return{cols:U(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:U(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(Y=U(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=J(G);Y=Y.concat(ce.cols);const z=G.getHours();let X=[`${z}`,`${ce.selMinute}`],ie=z;c&&(ie=z>12?z-12:z,X=[`${ie}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(X)}return{value:Z,cols:Y}},{value:L,cols:ne}=B();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:ne.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(Y=>M.jsx(au.Item,{value:Y.value,children:Y.label},Y.value))},G.key))})};var su={exports:{}},yt={};/** @license React v17.0.2
161
161
  * react-is.production.min.js
162
162
  *
163
163
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -171,4 +171,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var qp;function dI(){return qp||(qp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,p=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),p=S("react.server.block"),b=S("react.fundamental"),S("react.scope"),S("react.opaque.id"),y=S("react.debug_trace_mode"),S("react.offscreen"),T=S("react.legacy_hidden")}var v=!1;function w(oe){return!!(typeof oe=="string"||typeof oe=="function"||oe===n||oe===o||oe===y||oe===r||oe===c||oe===u||oe===T||v||typeof oe=="object"&&oe!==null&&(oe.$$typeof===f||oe.$$typeof===d||oe.$$typeof===i||oe.$$typeof===a||oe.$$typeof===s||oe.$$typeof===b||oe.$$typeof===m||oe[0]===p))}function C(oe){if(typeof oe=="object"&&oe!==null){var re=oe.$$typeof;switch(re){case e:var pe=oe.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var Ee=pe&&pe.$$typeof;switch(Ee){case a:case s:case f:case d:case i:return Ee;default:return re}}case t:return re}}}var I=a,D=i,P=e,F=s,k=n,H=f,R=d,E=t,h=o,$=r,A=c,j=!1,W=!1;function U(oe){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(oe){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(oe){return C(oe)===a}function L(oe){return C(oe)===i}function ne(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===e}function G(oe){return C(oe)===s}function Y(oe){return C(oe)===n}function Z(oe){return C(oe)===f}function ce(oe){return C(oe)===d}function z(oe){return C(oe)===t}function X(oe){return C(oe)===o}function ie(oe){return C(oe)===r}function ee(oe){return C(oe)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=P,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=H,bt.Memo=R,bt.Portal=E,bt.Profiler=h,bt.StrictMode=$,bt.Suspense=A,bt.isAsyncMode=U,bt.isConcurrentMode=J,bt.isContextConsumer=B,bt.isContextProvider=L,bt.isElement=ne,bt.isForwardRef=G,bt.isFragment=Y,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=X,bt.isStrictMode=ie,bt.isSuspense=ee,bt.isValidElementType=w,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=lI():su.exports=dI();var Xp=su.exports;let Gp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zp=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Zp(n.overflowY,t)||Zp(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},ca=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,fI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var pI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:$=>$!==f;if(!Gp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Gp(T)&&p(T);){if(T=fI(T),T===b){y.push(T);break}T!=null&&T===document.body&&vc(T)&&!vc(document.documentElement)||T!=null&&vc(T,m)&&y.push(T)}let S=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:P,right:F,bottom:k,left:H}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?P:u==="end"?k:P+I/2,E=d==="center"?H+D/2:d==="end"?F:H,h=[];for(let $=0;$<y.length;$++){let A=y[$],{height:j,width:W,top:U,right:J,bottom:B,left:L}=A.getBoundingClientRect();if(c==="if-needed"&&P>=0&&H>=0&&k<=v&&F<=S&&P>=U&&k<=B&&H>=L&&F<=J)return h;let ne=getComputedStyle(A),G=parseInt(ne.borderLeftWidth,10),Y=parseInt(ne.borderTopWidth,10),Z=parseInt(ne.borderRightWidth,10),ce=parseInt(ne.borderBottomWidth,10),z=0,X=0,ie="offsetWidth"in A?A.offsetWidth-A.clientWidth-G-Z:0,ee="offsetHeight"in A?A.offsetHeight-A.clientHeight-Y-ce:0,oe="offsetWidth"in A?A.offsetWidth===0?0:W/A.offsetWidth:0,re="offsetHeight"in A?A.offsetHeight===0?0:j/A.offsetHeight:0;if(b===A)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ca(C,C+v,v,Y,ce,C+R,C+R+I,I):R-v/2,X=d==="start"?E:d==="center"?E-S/2:d==="end"?E-S:ca(w,w+S,S,G,Z,w+E,w+E+D,D),z=Math.max(0,z+C),X=Math.max(0,X+w);else{z=u==="start"?R-U-Y:u==="end"?R-B+ce+ee:u==="nearest"?ca(U,B,j,Y,ce+ee,R,R+I,I):R-(U+j/2)+ee/2,X=d==="start"?E-L-G:d==="center"?E-(L+W/2)+ie/2:d==="end"?E-J+Z+ie:ca(L,J,W,G,Z+ie,E,E+D,D);let{scrollLeft:pe,scrollTop:Ee}=A;z=Math.max(0,Math.min(Ee+z/re,A.scrollHeight-j/re+ee)),X=Math.max(0,Math.min(pe+X/oe,A.scrollWidth-W/oe+ie)),R+=Ee-z,E+=pe-X}h.push({el:A,top:z,left:X})}return h},hI=0;function Qp(e){return typeof e=="function"?e:dn}function dn(){}function ug(e,t){if(e){var n=pI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Jp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function xl(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function Rt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function lg(){return String(hI++)}function dg(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function eh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(e){return e.props}function vI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var mI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ua(e){e===void 0&&(e={});var t={};return mI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function _i(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=qa(t,r)?t[r]:e[r],n},{})}function qa(e,t){return e[t]!==void 0}function Si(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function gI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pr(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jp(o,e,n)||r&&Jp(o,n.document.activeElement,n))})}var _l=dn;process.env.NODE_ENV!=="production"&&(_l=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var yI=xl(function(e){hg(e).textContent=""},500);function Sl(e,t){var n=hg(t);e&&(n.textContent=e,yI(t))}function hg(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,bI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:xa,keyDownArrowDown:_a,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),wI=["refKey","ref"],EI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],xI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],_I=["refKey","ref"],SI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],CI=function(){var e=function(t){Nu(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},w);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ua(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,C){w=ua(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),C)},i.selectItemAtIndex=function(v,w,C){var I=i.items[v];I!=null&&i.selectItem(I,w,C)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var C,I,D={},P=typeof v=="function";return!P&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=P?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var H={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(H[R]=k[R]))}),P&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),H},function(){Qp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),C&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=sn(I,wI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=P,i.getRootProps.suppressRefError=E;var h=i.getState(),$=h.isOpen;return ae((C={},C[P]=pr(F,i.rootRef),C.role="combobox",C["aria-expanded"]=$,C["aria-haspopup"]="listbox",C["aria-owns"]=$?i.menuId:null,C["aria-labelledby"]=i.labelId,C),k)},i.keyDownHandlers={ArrowDown:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Pr(1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:_a})}})},ArrowUp:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Pr(-1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:xa})}})},Enter:function(w){if(w.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){w.preventDefault();var P=this.items[D],F=this.getItemNodeFromIndex(D);if(P==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Vr(1,0,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Vr(-1,P-1,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,C=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,P=w.onBlur,F=sn(w,EI),k=i.getState(),H=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(P,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":H?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Rf(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:cu}):i.internalSetTimeout(function(){return i.toggleMenu({type:cu})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,C=w.onKeyDown,I=w.onBlur,D=w.onChange,P=w.onInput;w.onChangeText;var F=sn(w,xI),k,H={};k="onChange";var R=i.getState(),E=R.inputValue,h=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var A;H=(A={},A[k]=Rt(D,P,i.inputHandleChange),A.onKeyDown=Rt(C,i.inputHandleKeyDown),A.onBlur=Rt(I,i.inputHandleBlur),A)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},H,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Rf(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=sn(I,_I),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=P,i.getMenuProps.suppressRefError=E,ae((C={},C[P]=pr(F,i.menuRef),C.role="listbox",C["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,C.id=i.menuId,C),k)},i.getItemProps=function(v){var w,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,P=C.onClick;C.onPress;var F=C.index,k=C.item,H=k===void 0?process.env.NODE_ENV==="production"?void 0:vI("getItemProps","item"):k,R=sn(C,SI);F===void 0?(i.items.push(H),F=i.items.indexOf(H)):i.items[F]=H;var E="onClick",h=P,$=(w={onMouseMove:Rt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Rt(D,function(j){j.preventDefault()})},w[E]=Rt(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),A=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},A,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(C){var I=C.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(C){var I=C.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var C=i.getState(),I=C.isOpen,D=C.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Qp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=xl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:w},v));i.previousResultCount=C,Sl(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,f=a.initialIsOpen,m=f===void 0?d:f,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,T=y===void 0?null:y,S=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:T});return S.selectedItem!=null&&i.props.initialInputValue===void 0&&(S.inputValue=i.props.itemToString(S.selectedItem)),i.state=S,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),_i(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),d=u.highlightedIndex;if(c>0){var f=Pr(i,d,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,w=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,P=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,H=this.clearItems,R=this.reset,E=this.setItemCount,h=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:w,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:P,setHighlightedIndex:F,clearSelection:k,clearItems:H,setItemCount:E,unsetItemCount:h,setState:$,itemToString:d,id:f,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},d=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",a),f.addEventListener("mouseup",s),f.addEventListener("touchstart",c),f.addEventListener("touchmove",u),f.addEventListener("touchend",d),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),f.removeEventListener("mousedown",a),f.removeEventListener("mouseup",s),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",u),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,d=u.highlightedIndex,f=c&&this.getState().isOpen&&!i.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(_l(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=eh(this.props.children,dn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=eh(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&$I(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(pg(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:dg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&gI(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:dn,onInputValueChange:dn,onUserAction:dn,onChange:dn,onSelect:dn,onOuterClick:dn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},e.stateChangeTypes=bI,e}();process.env.NODE_ENV!=="production"&&(CI.propTypes={children:q.func,defaultHighlightedIndex:q.number,defaultIsOpen:q.bool,initialHighlightedIndex:q.number,initialSelectedItem:q.any,initialInputValue:q.string,initialIsOpen:q.bool,getA11yStatusMessage:q.func,itemToString:q.func,onChange:q.func,onSelect:q.func,onStateChange:q.func,onInputValueChange:q.func,onUserAction:q.func,onOuterClick:q.func,selectedItemChanged:q.func,stateReducer:q.func,itemCount:q.number,id:q.string,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})}),suppressRefError:q.bool,scrollIntoView:q.func,selectedItem:q.any,isOpen:q.bool,inputValue:q.string,highlightedIndex:q.number,labelId:q.string,inputId:q.string,menuId:q.string,getItemId:q.func});function th(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function $I(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!Xp.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Xp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var TI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function II(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){RI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function RI(e,t,n,r){var o=t.props,i=t.type,a="on"+Cl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function OI(e,t){return t.changes}function PI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var AI=xl(function(e,t){Sl(e(),t)},200),DI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function NI(e){var t=e.id,n=t===void 0?"downshift-"+lg():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function Og(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function kI(e){return e?String(e):""}function Cl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function $l(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=_i(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=$l(n),d=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),f=o.current;return l.useEffect(function(){f&&r.current&&r.current!==s&&II(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function MI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:kI,stateReducer:OI,getA11ySelectionMessage:PI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Cl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Cl(t)];return o!==void 0?o:Pn(e,t,n)}function jI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function LI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(f){o.current.isMouseDown=!1,e&&!Xa(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(f){e&&!o.current.isTouchMove&&!Xa(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var Tl=function(){return dn};process.env.NODE_ENV!=="production"&&(Tl=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!u&&console.error('downshift: The ref prop "'+d+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,d){i.current[s]={suppressRefError:c,refKey:u,elementRef:d}},[]);return a});function nh(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=sn(n,TI);l.useEffect(function(){r||AI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function FI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return DI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Il=dn;process.env.NODE_ENV!=="production"&&(Il=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(_l(o,i.current,r),i.current=r)},[o,r,n])});function rh(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Pn(e,"isOpen"),highlightedIndex:Pn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function VI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Pn(o,"highlightedIndex"),isOpen:Pn(o,"isOpen"),selectedItem:Pn(o,"selectedItem"),inputValue:Pn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}q.array.isRequired,q.func,q.func,q.func,q.number,q.number,q.number,q.bool,q.bool,q.bool,q.any,q.any,q.any,q.string,q.string,q.string,q.func,q.string,q.func,q.func,q.func,q.func,q.func,q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})});function BI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}En(En({},ri),{getA11yStatusMessage:BI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Al=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,kl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Ml=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,jl=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,Ll=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Fl=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Vl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Bl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Rl,InputKeyDownArrowUp:Ol,InputKeyDownEscape:Pl,InputKeyDownHome:Al,InputKeyDownEnd:Dl,InputKeyDownPageUp:Nl,InputKeyDownPageDown:kl,InputKeyDownEnter:Ml,InputChange:jl,InputBlur:Ga,InputFocus:Ll,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Fl,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Vl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Bl});function HI(e){var t=jI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var WI={items:q.array.isRequired,itemToString:q.func,selectedItemChanged:q.func,getA11yStatusMessage:q.func,getA11ySelectionMessage:q.func,highlightedIndex:q.number,defaultHighlightedIndex:q.number,initialHighlightedIndex:q.number,isOpen:q.bool,defaultIsOpen:q.bool,initialIsOpen:q.bool,selectedItem:q.any,initialSelectedItem:q.any,defaultSelectedItem:q.any,inputValue:q.string,defaultInputValue:q.string,initialInputValue:q.string,id:q.string,labelId:q.string,menuId:q.string,getItemId:q.func,inputId:q.string,toggleButtonId:q.string,stateReducer:q.func,onSelectedItemChange:q.func,onHighlightedIndexChange:q.func,onStateChange:q.func,onIsOpenChange:q.func,onInputValueChange:q.func,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})})};function zI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Bl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Hg=dn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){q.checkPropTypes(WI,t,"prop",n.name)});var UI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function YI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Fl:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Rl:e.isOpen?a={highlightedIndex:Pr(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ol:e.isOpen?i?a=rh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ml:a=rh(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case jl:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case Ll:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Vl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Bl:a={inputValue:t.inputValue};break;default:return VI(e,t,Bg)}return ae({},e,a)}var KI=["onMouseLeave","refKey","ref"],qI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],XI=["onClick","onPress","refKey","ref"],GI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);var t=ae({},UI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=HI(t),f=zI(YI,d,t),m=f[0],p=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),w=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),P=NI(t),F=l.useRef(),k=$l({state:m,props:t}),H=l.useCallback(function(z){return w.current[P.getItemId(z)]},[P]);nh(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),nh(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=FI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:H});Il({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=LI(b,[C,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var X;C==null||(X=C.current)==null||X.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(X){X.preventDefault(),p({type:Rl,altKey:X.altKey,getItemNodeFromIndex:H})},ArrowUp:function(X){X.preventDefault(),p({type:Ol,altKey:X.altKey,getItemNodeFromIndex:H})},Home:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Al,getItemNodeFromIndex:H}))},End:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Dl,getItemNodeFromIndex:H}))},Escape:function(X){var ie=k.current.state;(ie.isOpen||ie.inputValue||ie.selectedItem||ie.highlightedIndex>-1)&&(X.preventDefault(),p({type:Pl}))},Enter:function(X){var ie=k.current.state;!ie.isOpen||X.which===229||(X.preventDefault(),p({type:Ml,getItemNodeFromIndex:H}))},PageUp:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Nl,getItemNodeFromIndex:H}))},PageDown:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:kl,getItemNodeFromIndex:H}))}}},[p,k,H]),A=l.useCallback(function(z){return ae({id:P.labelId,htmlFor:P.inputId},z)},[P]),j=l.useCallback(function(z,X){var ie,ee=z===void 0?{}:z,oe=ee.onMouseLeave,re=ee.refKey,pe=re===void 0?"ref":re,Ee=ee.ref,_e=sn(ee,KI),Ae=X===void 0?{}:X,$e=Ae.suppressRefError,ke=$e===void 0?!1:$e;return h("getMenuProps",ke,pe,v),ae((ie={},ie[pe]=pr(Ee,function(De){v.current=De}),ie.id=P.menuId,ie.role="listbox",ie["aria-labelledby"]=_e&&_e["aria-label"]?void 0:""+P.labelId,ie.onMouseLeave=Rt(oe,function(){p({type:Ag})}),ie),_e)},[p,h,P]),W=l.useCallback(function(z){var X,ie,ee=z===void 0?{}:z,oe=ee.item,re=ee.index,pe=ee.refKey,Ee=pe===void 0?"ref":pe,_e=ee.ref,Ae=ee.onMouseMove,$e=ee.onMouseDown,ke=ee.onClick;ee.onPress;var De=ee.disabled,it=sn(ee,qI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Og(oe,re,xt.items,"Pass either item or index to getItemProps!"),Se=Pt[1],ut="onClick",Le=ke,Zt=function(){Se!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:Se,disabled:De}))},St=function(){p({type:Fl,index:Se})},tt=function(gt){return gt.preventDefault()};return ae((X={},X[Ee]=pr(_e,function(Ve){Ve&&(w.current[P.getItemId(Se)]=Ve)}),X.disabled=De,X.role="option",X["aria-selected"]=""+(Se===Xe.highlightedIndex),X.id=P.getItemId(Se),X),!De&&(ie={},ie[ut]=Rt(Le,St),ie),{onMouseMove:Rt(Ae,Zt),onMouseDown:Rt($e,tt)},it)},[p,k,R,P]),U=l.useCallback(function(z){var X,ie=z===void 0?{}:z,ee=ie.onClick;ie.onPress;var oe=ie.refKey,re=oe===void 0?"ref":oe,pe=ie.ref,Ee=sn(ie,XI),_e=k.current.state,Ae=function(){p({type:Ng})};return ae((X={},X[re]=pr(pe,function($e){I.current=$e}),X["aria-controls"]=P.menuId,X["aria-expanded"]=_e.isOpen,X.id=P.toggleButtonId,X.tabIndex=-1,X),!Ee.disabled&&ae({},{onClick:Rt(ee,Ae)}),Ee)},[p,k,P]),J=l.useCallback(function(z,X){var ie,ee=z===void 0?{}:z,oe=ee.onKeyDown,re=ee.onChange,pe=ee.onInput,Ee=ee.onFocus,_e=ee.onBlur;ee.onChangeText;var Ae=ee.refKey,$e=Ae===void 0?"ref":Ae,ke=ee.ref,De=sn(ee,GI),it=X===void 0?{}:X,ze=it.suppressRefError,xt=ze===void 0?!1:ze;h("getInputProps",xt,$e,C);var Xe=k.current.state,Pt=function(gt){var rn=Si(gt);rn&&$[rn]&&$[rn](gt)},Se=function(gt){p({type:jl,inputValue:gt.target.value})},ut=function(gt){if(Xe.isOpen&&!E.current.isMouseDown){var rn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!rn})}},Le=function(){Xe.isOpen||p({type:Ll})},Zt="onChange",St={};if(!De.disabled){var tt;St=(tt={},tt[Zt]=Rt(re,pe,Se),tt.onKeyDown=Rt(oe,Pt),tt.onBlur=Rt(_e,ut),tt.onFocus=Rt(Ee,Le),tt)}return ae((ie={},ie[$e]=pr(ke,function(Ve){C.current=Ve}),ie["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?P.getItemId(Xe.highlightedIndex):"",ie["aria-autocomplete"]="list",ie["aria-controls"]=P.menuId,ie["aria-expanded"]=Xe.isOpen,ie["aria-labelledby"]=De&&De["aria-label"]?void 0:""+P.labelId,ie.autoComplete="off",ie.id=P.inputId,ie.role="combobox",ie.value=Xe.inputValue,ie),St,De)},[h,k,P,$,p,E,a]),B=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),ne=l.useCallback(function(){p({type:Mg})},[p]),G=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),Y=l.useCallback(function(z){p({type:Vl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:W,getLabelProps:A,getMenuProps:j,getInputProps:J,getToggleButtonProps:U,toggleMenu:B,openMenu:ne,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:Y,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Wg={activeIndex:-1,selectedItems:[]};function oh(e,t){return zo(e,t,Wg)}function ih(e,t){return Pn(e,t,Wg)}function ZI(e){var t=oh(e,"activeIndex"),n=oh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ah(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function QI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var JI={selectedItems:q.array,initialSelectedItems:q.array,defaultSelectedItems:q.array,itemToString:q.func,getA11yRemovalMessage:q.func,stateReducer:q.func,activeIndex:q.number,initialActiveIndex:q.number,defaultActiveIndex:q.number,onActiveIndexChange:q.func,onSelectedItemsChange:q.func,keyNavigationNext:q.string,keyNavigationPrevious:q.string,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})})},eR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:QI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=dn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){q.checkPropTypes(JI,t,"prop",n.name)});var Hl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Yl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,ql=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Xl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Gl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Zl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ql=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Jl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,ed=process.env.NODE_ENV!=="production"?"__function_reset__":12,tR=Object.freeze({__proto__:null,SelectedItemClick:Hl,SelectedItemKeyDownDelete:Wl,SelectedItemKeyDownBackspace:zl,SelectedItemKeyDownNavigationNext:Ul,SelectedItemKeyDownNavigationPrevious:Yl,DropdownKeyDownNavigationPrevious:Kl,DropdownKeyDownBackspace:ql,DropdownClick:Xl,FunctionAddSelectedItem:Gl,FunctionRemoveSelectedItem:Zl,FunctionSetSelectedItems:Ql,FunctionSetActiveIndex:Jl,FunctionReset:ed});function nR(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Hl:c={activeIndex:r};break;case Yl:c={activeIndex:a-1<0?0:a-1};break;case Ul:c={activeIndex:a+1>=s.length?-1:a+1};break;case zl:case Wl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case Kl:c={activeIndex:s.length-1};break;case ql:c={selectedItems:s.slice(0,s.length-1)};break;case Gl:c={selectedItems:[].concat(s,[i])};break;case Xl:c={activeIndex:-1};break;case Zl:{var d=a,f=s.indexOf(i);if(f<0)break;s.length===1?d=-1:f===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,f),s.slice(f+1)),activeIndex:d};break}case Ql:{var m=t.selectedItems;c={selectedItems:m};break}case Jl:{var p=t.activeIndex;c={activeIndex:p};break}case ed:c={activeIndex:ih(o,"activeIndex"),selectedItems:ih(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var rR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],oR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];td.stateChangeTypes=tR;function td(e){e===void 0&&(e={}),zg(e,td);var t=ae({},eR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=MI(nR,ZI(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(f),y=l.useRef();y.current=[];var T=$l({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(E){return f.indexOf(E)<0});Sl(n({itemToString:r,resultCount:f.length,removedSelectedItem:R,activeIndex:d,activeSelectedItem:f[d]}),o.document)}b.current=f}},[f.length]),l.useEffect(function(){m.current||(d===-1&&p.current?p.current.focus():y.current[d]&&y.current[d].focus())},[d]),Il({isInitialMount:m.current,props:t,state:c});var S=Tl("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Yl})},R[i]=function(){u({type:Ul})},R.Delete=function(){u({type:Wl})},R.Backspace=function(){u({type:zl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){ah(E)&&u({type:Kl})},R.Backspace=function(h){ah(h)&&u({type:ql})},R},[u,a]),C=l.useCallback(function(R){var E,h=R===void 0?{}:R,$=h.refKey,A=$===void 0?"ref":$,j=h.ref,W=h.onClick,U=h.onKeyDown,J=h.selectedItem,B=h.index,L=sn(h,rR),ne=T.current.state,G=Og(J,B,ne.selectedItems,"Pass either item or index to getSelectedItemProps!"),Y=G[1],Z=Y>-1&&Y===ne.activeIndex,ce=function(){u({type:Hl,index:Y})},z=function(ie){var ee=Si(ie);ee&&v[ee]&&v[ee](ie)};return ae((E={},E[A]=pr(j,function(X){X&&y.current.push(X)}),E.tabIndex=Z?0:-1,E.onClick=Rt(W,ce),E.onKeyDown=Rt(U,z),E),L)},[u,T,v]),I=l.useCallback(function(R,E){var h,$=R===void 0?{}:R,A=$.refKey,j=A===void 0?"ref":A,W=$.ref,U=$.onKeyDown,J=$.onClick,B=$.preventKeyAction,L=B===void 0?!1:B,ne=sn($,oR),G=E===void 0?{}:E,Y=G.suppressRefError,Z=Y===void 0?!1:Y;S("getDropdownProps",Z,j,p);var ce=function(ie){var ee=Si(ie);ee&&w[ee]&&w[ee](ie)},z=function(){u({type:Xl})};return ae((h={},h[j]=pr(W,function(X){X&&(p.current=X)}),h),!L&&{onKeyDown:Rt(U,ce),onClick:Rt(J,z)},ne)},[u,w,S]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),P=l.useCallback(function(R){u({type:Zl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Ql,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Jl,activeIndex:R})},[u]),H=l.useCallback(function(){u({type:ed})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:P,setSelectedItems:F,setActiveIndex:k,reset:H,selectedItems:f,activeIndex:d}}var iR="jbnkvn0",sh=ot({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),ch=ot({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),aR="jbnkvn6",mc=ot({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),sR=ot({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),cR="jbnkvnc",uh="jbnkvnp";const Ug=l.createContext(void 0),uR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),nd=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=nd();return t?t({children:e,defaultClassName:ch,innerProps:n()}):M.jsx("div",{className:ch({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=nd(),d=a===n,f=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sh({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:d,isSelected:f,isChecked:m}):M.jsxs("div",{className:sh({highlighted:d,selected:f,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:Ct.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i,isDropdown:a}=nd(),s=a?16:24;if(e)return e({innerProps:o(),defaultClassName:uh,isOpen:r});const c=n==="disabled"?Ct.theme.colors.black:Ct.theme.colors.grey1;return M.jsx("div",{className:uh,"data-test-id":t["data-test-id"],"data-disabled":i,children:r?M.jsx(xu,{color:c,size:s}):M.jsx(si,{color:c,size:s})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:d,onClickItem:f,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:T,helperTextLeft:S,helperTextRight:v,isError:w,errorMessage:C,isDisabled:I,isValid:D,isRounded:P,className:F}=p,[k,H]=l.useState(e),R=Du({isError:w,isDisabled:I,isValid:D}),E=l.useRef(null),h=u||m,$=P||m,{removeSelectedItem:A,selectedItems:j,addSelectedItem:W,getDropdownProps:U}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),J=l.useMemo(()=>j.length,[j]),B=l.useCallback(pe=>{let Ee=pe;(c&&!d||h)&&(Ee="");const _e=new RegExp(Ee.toLowerCase());return e.filter(Ae=>_e.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:ne,getLabelProps:G,getMenuProps:Y,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:X,openMenu:ie,closeMenu:ee,setHighlightedIndex:oe}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{H(B(pe||""))},onIsOpenChange:pe=>{var Ee;if(pe.isOpen&&pe.selectedItem){const _e=k.findIndex(Ae=>{var $e;return Ae.value===(($e=pe.selectedItem)==null?void 0:$e.value)});oe(_e)}else pe.isOpen||((Ee=E.current)==null||Ee.blur(),oe(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var Ee;c||(r(pe.selectedItem),h&&((Ee=E.current)==null||Ee.blur()),ee())},stateReducer:(pe,Ee)=>{const{changes:_e,type:Ae}=Ee,$e=k.find((ke,De)=>De===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let ke=J;return j.includes($e)?(ke-=1,A($e)):(ke+=1,W($e)),{..._e,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!d&&ke>0?`${ke} items selected`:""}}return{..._e,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:_e.inputValue};case Or.stateChangeTypes.InputFocus:return{..._e,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let ke=_e.inputValue;return c&&!d&&(J>0?ke=`${J} items selected`:ke=""),{..._e,inputValue:ke}}default:return _e}}});l.useImperativeHandle(b,()=>E.current);const re={isOpen:L,formState:R,selectedItem:X,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:J,highlightedIndex:ce,getMenuProps:Y,getItemProps:z,getToggleButtonProps:ne,onClickItem:f,isDropdown:m,openMenu:ie,closeMenu:ee};return M.jsx(uR,{contextValue:re,children:M.jsxs(et,{position:"relative",w:"$full",className:F,...ne({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:T,helperTextLeft:S,helperTextRight:v,isError:w,errorMessage:C,isDisabled:I,isValid:D,inputAreaClassName:Oe(iR,mc({isRounded:$})),className:mc({isRounded:$,isDisabled:!!I}),children:[M.jsxs("div",{className:aR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(U({preventKeyAction:L,ref:E,placeholder:n,readOnly:h,disabled:I,className:sR({isMobile:d,isReadOnly:h,isDropdown:m})}))}),d&&c&&M.jsx("div",{className:cR,children:J>0?`${J} items selected`:""}),d&&M.jsx(Di,{isSelect:!0,isError:w,isDisabled:I,required:a,className:mc({isRounded:$}),...G(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,Ee)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:Ee,item:pe}))})]})})});uo.displayName="Select";uo.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0,isRounded:!1};const Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},lR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],dR=Za.map(e=>({label:e,value:e,isDisabled:!1})),fR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},gc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),lh=(e,t)=>new Date(e,ii(t)+1,0).getDate(),pR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=lh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lh(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[d,f]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),T=()=>{f(void 0),p(void 0),y(void 0)},S=l.useMemo(()=>{if(a){if(d)return d;if(r)return gc("date",r)}},[r,d,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),C=l.useMemo(()=>S||v||w?pR({date:S?Number(S==null?void 0:S.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[S,v,w,t]),I=S&&v&&!w&&!C,D=S&&!v&&w&&!C,P=!S&&v&&w&&!C,F=S&&v&&w&&!C;return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),T()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(et,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Ht,{px:"$16",py:"$8",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(nn,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Ht,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:S,isMobile:n,options:lR,onChange:f,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:dR,onChange:p,isError:P||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:fR(t),onChange:y,isError:P||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||P||D||I)&&M.jsx(nn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(S==null?void 0:S.value))),T()},isDisabled:!w||!v||!S||!C,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var hR=ot({defaultClassName:"_1uehowr0",variantClassNames:{isActive:{true:"_1uehowr1",false:"_1uehowr2"},variant:{solid:"_1uehowr3",outline:"_1uehowr4"}},defaultVariants:{isActive:!1,variant:"solid"},compoundVariants:[[{variant:"solid",isActive:!0},"_1uehowr5"],[{variant:"solid",isActive:!1},"_1uehowr6"],[{variant:"outline",isActive:!0},"_1uehowr7"],[{variant:"outline",isActive:!1},"_1uehowr8"]]});const Zg=l.forwardRef(({isActive:e,variant:t,className:n,children:r,as:o,...i},a)=>{const s=o||"span";return M.jsx(s,{ref:a,as:"span",className:Oe(hR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const yc="rovingFocusGroup.onEntryFocus",vR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,mR]=Qa(rd),[gR,Jg]=mn(rd,[mR]),[yR,bR]=gR(rd),wR=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(ER,ae({},e,{ref:t}))))),ER=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=l.useRef(null),m=ct(t,f),p=Ja(i),[b=null,y]=_n({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),w=Qg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(yc,v),()=>P.removeEventListener(yc,v)},[v]),l.createElement(yR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(P=>y(P),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>D(P=>P-1),[])},l.createElement(Ue.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{C.current=!0}),onFocus:Ne(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!T){const k=new CustomEvent(yc,vR);if(P.currentTarget.dispatchEvent(k),!k.defaultPrevented){const H=w().filter(A=>A.focusable),R=H.find(A=>A.active),E=H.find(A=>A.id===b),$=[R,E,...H].filter(Boolean).map(A=>A.ref.current);ey($)}}C.current=!1}),onBlur:Ne(e.onBlur,()=>S(!1))})))}),xR="RovingFocusGroupItem",_R=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=bR(xR,n),d=u.currentTabStopId===c,f=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(uu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=$R(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let S=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const v=S.indexOf(b.currentTarget);S=u.loop?TR(S,v+1):S.slice(v+1)}setTimeout(()=>ey(S))}})})))}),SR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $R(e,t,n){const r=CR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function TR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const IR=wR,RR=_R,ty="Radio",[OR,ny]=mn(ty),[PR,AR]=OR(ty),DR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[d,f]=l.useState(null),m=ct(t,y=>f(y)),p=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(PR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(MR,{control:d,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),NR="RadioIndicator",kR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=AR(NR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),MR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ry(e){return e?"checked":"unchecked"}const jR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[LR,NP]=mn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[FR,VR]=LR(oy),BR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=iy(n),b=Ja(u),[y,T]=_n({prop:i,defaultProp:o,onChange:f});return l.createElement(FR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(IR,ae({asChild:!0},p,{orientation:c,dir:b,loop:d}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),HR="RadioGroupItem",WR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=VR(HR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),d=ct(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{jR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(RR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(DR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),zR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(kR,ae({},o,r,{ref:t}))}),UR=BR,YR=WR,KR=zR;var qR=ot({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),XR="d6umgr1",GR=ot({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),ZR="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Ht,{alignItems:"center",children:[M.jsx(YR,{...r,disabled:n,className:Oe(t,ZR),id:o,children:M.jsx(KR,{className:Oe("radio-indicator",GR({disabled:n}))})}),e&&M.jsx("label",{className:Oe("radio-label",qR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const QR=({className:e,children:t,...n})=>M.jsx(UR,{...n,className:Oe(e,XR),children:t});var JR="_846x3h2",eO="_846x3h0",tO="_846x3h1",nO=ot({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,...c},u)=>{const[d,f]=l.useState(!1),m=T=>{i==null||i(T),f(!0)},p=T=>{a==null||a(T),f(!1)},b=()=>{o==null||o(),f(!1)},y=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Oe(eO),children:M.jsx(I0,{size:24})}),M.jsx("input",{className:Oe(nO({size:t,isHasIcon:y,isDisabled:n})),ref:u,value:e,"data-test-id":c["data-test-id"],onFocus:m,onBlur:p,disabled:n,type:"search",...c}),y&&M.jsx(et,{className:Oe(tO),children:r&&(!d||d&&!e)?r:M.jsx(et,{className:Oe(JR),onMouseDown:b,children:M.jsx(rs,{"data-test-id":"icon-close-search",onMouseDown:b,cursor:"pointer",size:24})})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[rO,kP]=mn(cy),[oO,iO]=rO(cy),aO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),p=ct(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=_n({prop:o,defaultProp:i,onChange:u});return l.createElement(oO,{scope:n,checked:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":uy(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:p,onClick:Ne(e.onClick,v=>{S(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(uO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),sO="SwitchThumb",cO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=iO(sO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),uO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uy(e){return e?"checked":"unchecked"}const lO=aO,dO=cO;var fO="b7c0j12",pO="b7c0j10",hO="b7c0j11";const ly=l.forwardRef((e,t)=>M.jsx(lO,{ref:t,className:pO,...e,children:M.jsx(dO,{className:hO,children:M.jsx(Eu,{className:fO,size:16})})}));ly.displayName="Switch";const dy=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?M.jsxs(Ht,{flexDirection:"column","data-test-id":r,children:[M.jsx(xu,{size:10,color:o&&i?"white":"grey"}),M.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};dy.defaultProps={sortable:!1,"data-test-id":""};var vO="_94c6vs1",mO="_94c6vs3",dh="_94c6vs2",gO="_94c6vs0";const fy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,p=f.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=f=>typeof f=="object"?"":f,d=l.useCallback((f,m)=>{const p=[...f];return m.order==="ASC"?p.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,T)=>String(y[m.by]).localeCompare(String(T[m.by]))):[...f]},[]);return l.useEffect(()=>{const f=t.map(b=>({...b,sortable:b.sortable??!1}));r(f);const p=d(e,{by:a.by,order:a.order}).map(b=>f.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(p)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},py=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:o,...i},a)=>{const s=t||"table",{rows:c,headers:u,handleHeaderClick:d,sortColumn:f}=fy({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),M.jsxs(s,{ref:a,as:t,className:gO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:mO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:dh,onClick:()=>d(m),children:M.jsxs(Ht,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),M.jsx(dy,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),M.jsx("tbody",{children:c.map((m,p)=>M.jsx("tr",{className:vO,children:m.map((b,y)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${p}-col${y}`,className:dh,w:"33%",children:b.CellRenderer??b.value}))}))})]})});py.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var yO=ot({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var bO=ot({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const id=l.createContext({index:0,setIndex:()=>null}),ad=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,...s},c)=>{const[u,d]=l.useState(o??0),f=l.useMemo(()=>l.Children.map(t,(b,y)=>l.cloneElement(b,{"data-index":y})),[t]);l.useEffect(()=>d(r??0),[r]);const m=l.useMemo(()=>({index:u,setIndex:y=>{d(y),a==null||a(y)}}),[u,a]),p=e||"ul";return M.jsx(p,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Oe(bO({withShadow:n,align:i})),...s,children:M.jsx(id.Provider,{value:m,children:f})})});ad.displayName="Tabs";ad.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const sd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(id),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Oe(yO({isActive:s})),...n,children:M.jsx(nn,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const hy="ToastProvider",[cd,wO,EO]=Qa("Toast"),[vy,MP]=mn("Toast",[EO]),[xO,Os]=vy(hy),my=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,d]=l.useState(0),f=l.useRef(!1),m=l.useRef(!1);return l.createElement(cd.Provider,{scope:t},l.createElement(xO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(p=>p+1),[]),onToastRemove:l.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},a))};my.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${hy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const _O="ToastViewport",SO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",CO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=SO,label:o="Notifications ({hotkey})",...i}=e,a=Os(_O,n),s=wO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=ct(t,f,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const T=S=>{var v;r.every(C=>S[C]||S.code===C)&&((v=f.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{const T=c.current,S=f.current;if(b&&T&&S){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&w()},I=()=>{T.contains(document.activeElement)||w()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(w=>{const C=w.ref.current,I=[C,...VO(C)];return T==="forwards"?I:I.reverse()});return(T==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const T=f.current;if(T){const S=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===T&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),h=E.findIndex($=>$===F);if(bc(E.slice(h+1)))v.preventDefault();else{var D,P;k?(D=u.current)===null||D===void 0||D.focus():(P=d.current)===null||P===void 0||P.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(Z0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fh,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});bc(T)}}),l.createElement(cd.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(fh,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),$O="ToastFocusProxy",fh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os($O,n);return l.createElement(ls,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Ps="Toast",TO="toast.swipeStart",IO="toast.swipeMove",RO="toast.swipeCancel",OO="toast.swipeEnd",PO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=_n({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(gy,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:cn(e.onPause),onResume:cn(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ne(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ne(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[AO,DO]=vy(Ps,{onClose(){}}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=ct(t,$=>S($)),w=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),P=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:H}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),E=l.useCallback($=>{!$||$===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,$))},[R]);l.useEffect(()=>{const $=y.viewport;if($){const A=()=>{E(P.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;P.current=P.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,A),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,A)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>H()),[k,H]);const h=l.useMemo(()=>T?by(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(NO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(AO,{scope:n,onClose:R},pn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(G0,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ne(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ne(e.onPointerMove,$=>{if(!w.current)return;const A=$.clientX-w.current.x,j=$.clientY-w.current.y,W=!!C.current,U=["left","right"].includes(y.swipeDirection),J=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=U?J(0,A):0,L=U?0:J(0,j),ne=$.pointerType==="touch"?10:2,G={x:B,y:L},Y={originalEvent:$,delta:G};W?(C.current=G,la(IO,f,Y,{discrete:!1})):ph(G,y.swipeDirection,ne)?(C.current=G,la(TO,d,Y,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(A)>ne||Math.abs(j)>ne)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,$=>{const A=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,w.current=null,A){const W=$.currentTarget,U={originalEvent:$,delta:A};ph(A,y.swipeDirection,y.swipeThreshold)?la(OO,p,U,{discrete:!0}):la(RO,m,U,{discrete:!0}),W.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})))),y.viewport))):null});gy.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Ps}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const NO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return LO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ls,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},kO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(yy,{altText:n,asChild:!0},l.createElement(jO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${kO}\``)}};const MO="ToastClose",jO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=DO(MO,n);return l.createElement(yy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),yy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function by(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),FO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...by(r))}}),t}function la(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Eh(o,i):o.dispatchEvent(i)}const ph=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function LO(e=()=>{}){const t=cn(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function FO(e){return e.nodeType===e.ELEMENT_NODE}function VO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const BO=my,wy=CO,Ey=PO,HO=ud;var WO="_10z4js29",zO=ot({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),UO="_10z4js28",YO="_10z4js2a";const xy=BO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(wy,{ref:n,className:Oe(YO,e),...t}));ld.displayName=wy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(Ey,{ref:r,className:Oe(zO({color:t}),e),...n}));As.displayName=Ey.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const dd=l.forwardRef(({className:e,...t},n)=>M.jsx(ud,{ref:n,className:Oe(e),...t}));dd.displayName=HO.displayName;const KO=1,qO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function XO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hh=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},qO);Ec.set(e,t)};function _y(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,KO)};case qn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case qn.DISMISS_TOAST:{const{toastId:n}=t;return n?hh(n):e.toasts.forEach(r=>{hh(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case qn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Sa=[];let Ca={toasts:[]};function ai(e){Ca=_y(Ca,e),Sa.forEach(t=>{t(Ca)})}function Sy({...e}){const t=XO(),n=o=>ai({type:qn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:qn.DISMISS_TOAST,toastId:t});return ai({type:qn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Cy(){const[e,t]=l.useState(Ca);return l.useEffect(()=>(Sa.push(t),()=>{const n=Sa.indexOf(t);n>-1&&Sa.splice(n,1)}),[e]),{...e,toast:Sy,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const fd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Cy();return M.jsx(xy,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:d="foreground",color:f="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,...y})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[M.jsx(et,{"data-test-id":`toast-${y["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:M.jsx(nn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:UO,children:i})}),!a&&c&&s?M.jsx(dd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:Oe(WO,p),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[Ds,jP]=mn("Tooltip",[cs]),Ns=cs(),GO="TooltipProvider",ZO=700,fu="tooltip.open",[QO,pd]=Ds(GO),JO=e=>{const{__scopeTooltip:t,delayDuration:n=ZO,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.createElement(QO,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(d=>{c.current=d},[]),disableHoverableContent:o},i)},hd="Tooltip",[eP,ks]=Ds(hd),tP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=pd(hd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=_n({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(P)}}),w=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(p.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(eP,{scope:t,contentId:m,open:S,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},vh="TooltipTrigger",nP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vh,n),i=pd(vh,n),a=Ns(n),s=l.useRef(null),c=ct(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),rP="TooltipPortal",[LP,oP]=Ds(rP,{forceMount:void 0}),Ci="TooltipContent",iP=l.forwardRef((e,t)=>{const n=oP(Ci,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=ks(Ci,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement($y,ae({side:o},i,{ref:t})):l.createElement(aP,ae({side:o},i,{ref:t})))}),aP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=pd(Ci,e.__scopeTooltip),o=l.useRef(null),i=ct(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=l.useCallback(()=>{s(null),f(!1)},[f]),p=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=dP(S,T.getBoundingClientRect()),w=fP(S,v),C=pP(y.getBoundingClientRect()),I=vP([...w,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>p(T,d),y=T=>p(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,p,m]),l.useEffect(()=>{if(a){const b=y=>{const T=y.target,S={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains(T))||(d==null?void 0:d.contains(T)),w=!hP(S,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement($y,ae({},e,{ref:i}))}),[sP,cP]=Ds(hd,{isInside:!1}),$y=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=ks(Ci,n),u=Ns(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(fu,d),()=>document.removeEventListener(fu,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Jh,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(wh,null,r),l.createElement(sP,{scope:n,isInside:!0},l.createElement(r1,{id:c.contentId,role:"tooltip"},o||r))))}),uP="TooltipArrow",lP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return cP(uP,n).isInside?null:l.createElement(t1,ae({},o,r,{ref:t}))});function dP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function hP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,d=t[a].y;c>r!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(o=!o)}return o}function vP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mP(t)}function mP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const gP=JO,yP=tP,bP=nP,wP=iP,EP=lP;function mh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function xP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function Ty(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=Ty(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function _P(e,t){var n={};if(typeof t=="object"){var r=e;Ty(t,(a,s)=>{var c=xP(r,s);n[mh(c)]=String(a)})}else{var o=e;for(var i in o)n[mh(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var SP="var(--_4goys34)",CP="_4goys35",$P="_4goys36";const vd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:d,position:f,positionOffset:m,withIcon:p,...b},y)=>{const T=Ct.atoms.commonAtoms({color:r,bgColor:o}).className,S=Ct.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs(yP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(bP,{asChild:!0,ref:y,children:n}),M.jsx(vs,{children:M.jsxs(wP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Oe($P,T,S),children:[M.jsxs(Ht,{gap:"$6",children:[p&&M.jsx(Ht,{width:"$24",children:M.jsx(A0,{size:24})}),i]}),M.jsx(EP,{className:CP,style:_P({[SP]:Ct.theme.colors[w]})})]})})]})});vd.displayName="Tooltip";vd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const md=({children:e})=>M.jsxs(gP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Ct.theme.fonts.poppins},className:Oe(t??Ct.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Nb;exports.AccordionContent=h0;exports.AccordionItem=v0;exports.AccordionTrigger=F0;exports.Alert=Ph;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=H$;exports.Box=et;exports.Button=mo;exports.Card=yu;exports.Checkbox=Gm;exports.Chip=ul;exports.CloseButton=Wr;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=MT;exports.Container=bu;exports.DatePicker=uI;exports.Dialog=dl;exports.Divider=pl;exports.Flex=Ht;exports.FullLoader=ag;exports.Grid=wu;exports.IconButton=gl;exports.Image=yl;exports.Input=vl;exports.Link=rg;exports.List=bl;exports.ListItem=wl;exports.Loader=XT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Ts;exports.ModalFooter=Is;exports.ModalHeader=Rs;exports.MultiPicker=sg;exports.Overlay=XE;exports.Picker=au;exports.Pills=Zg;exports.Portal=vs;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=QR;exports.RadixProvider=md;exports.Search=od;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=ly;exports.TabItem=sd;exports.Table=py;exports.Tabs=ad;exports.TabsContext=id;exports.Text=nn;exports.Textarea=ml;exports.Toast=As;exports.ToastAction=dd;exports.ToastProvider=xy;exports.ToastViewport=ld;exports.Toaster=fd;exports.Tooltip=vd;exports.linkRecipe=ng;exports.reducer=_y;exports.toast=Sy;exports.useDialog=jT;exports.useIndeterminate=sT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=fy;exports.useToast=Cy;
174
+ */var qp;function dI(){return qp||(qp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,p=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),p=S("react.server.block"),b=S("react.fundamental"),S("react.scope"),S("react.opaque.id"),y=S("react.debug_trace_mode"),S("react.offscreen"),T=S("react.legacy_hidden")}var v=!1;function w(oe){return!!(typeof oe=="string"||typeof oe=="function"||oe===n||oe===o||oe===y||oe===r||oe===c||oe===u||oe===T||v||typeof oe=="object"&&oe!==null&&(oe.$$typeof===f||oe.$$typeof===d||oe.$$typeof===i||oe.$$typeof===a||oe.$$typeof===s||oe.$$typeof===b||oe.$$typeof===m||oe[0]===p))}function C(oe){if(typeof oe=="object"&&oe!==null){var re=oe.$$typeof;switch(re){case e:var pe=oe.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var Ee=pe&&pe.$$typeof;switch(Ee){case a:case s:case f:case d:case i:return Ee;default:return re}}case t:return re}}}var I=a,D=i,P=e,F=s,k=n,H=f,R=d,E=t,h=o,$=r,A=c,j=!1,W=!1;function U(oe){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(oe){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(oe){return C(oe)===a}function L(oe){return C(oe)===i}function ne(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===e}function G(oe){return C(oe)===s}function Y(oe){return C(oe)===n}function Z(oe){return C(oe)===f}function ce(oe){return C(oe)===d}function z(oe){return C(oe)===t}function X(oe){return C(oe)===o}function ie(oe){return C(oe)===r}function ee(oe){return C(oe)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=P,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=H,bt.Memo=R,bt.Portal=E,bt.Profiler=h,bt.StrictMode=$,bt.Suspense=A,bt.isAsyncMode=U,bt.isConcurrentMode=J,bt.isContextConsumer=B,bt.isContextProvider=L,bt.isElement=ne,bt.isForwardRef=G,bt.isFragment=Y,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=X,bt.isStrictMode=ie,bt.isSuspense=ee,bt.isValidElementType=w,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=lI():su.exports=dI();var Xp=su.exports;let Gp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zp=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Zp(n.overflowY,t)||Zp(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},ca=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,fI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var pI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:$=>$!==f;if(!Gp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Gp(T)&&p(T);){if(T=fI(T),T===b){y.push(T);break}T!=null&&T===document.body&&vc(T)&&!vc(document.documentElement)||T!=null&&vc(T,m)&&y.push(T)}let S=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:P,right:F,bottom:k,left:H}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?P:u==="end"?k:P+I/2,E=d==="center"?H+D/2:d==="end"?F:H,h=[];for(let $=0;$<y.length;$++){let A=y[$],{height:j,width:W,top:U,right:J,bottom:B,left:L}=A.getBoundingClientRect();if(c==="if-needed"&&P>=0&&H>=0&&k<=v&&F<=S&&P>=U&&k<=B&&H>=L&&F<=J)return h;let ne=getComputedStyle(A),G=parseInt(ne.borderLeftWidth,10),Y=parseInt(ne.borderTopWidth,10),Z=parseInt(ne.borderRightWidth,10),ce=parseInt(ne.borderBottomWidth,10),z=0,X=0,ie="offsetWidth"in A?A.offsetWidth-A.clientWidth-G-Z:0,ee="offsetHeight"in A?A.offsetHeight-A.clientHeight-Y-ce:0,oe="offsetWidth"in A?A.offsetWidth===0?0:W/A.offsetWidth:0,re="offsetHeight"in A?A.offsetHeight===0?0:j/A.offsetHeight:0;if(b===A)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ca(C,C+v,v,Y,ce,C+R,C+R+I,I):R-v/2,X=d==="start"?E:d==="center"?E-S/2:d==="end"?E-S:ca(w,w+S,S,G,Z,w+E,w+E+D,D),z=Math.max(0,z+C),X=Math.max(0,X+w);else{z=u==="start"?R-U-Y:u==="end"?R-B+ce+ee:u==="nearest"?ca(U,B,j,Y,ce+ee,R,R+I,I):R-(U+j/2)+ee/2,X=d==="start"?E-L-G:d==="center"?E-(L+W/2)+ie/2:d==="end"?E-J+Z+ie:ca(L,J,W,G,Z+ie,E,E+D,D);let{scrollLeft:pe,scrollTop:Ee}=A;z=Math.max(0,Math.min(Ee+z/re,A.scrollHeight-j/re+ee)),X=Math.max(0,Math.min(pe+X/oe,A.scrollWidth-W/oe+ie)),R+=Ee-z,E+=pe-X}h.push({el:A,top:z,left:X})}return h},hI=0;function Qp(e){return typeof e=="function"?e:dn}function dn(){}function ug(e,t){if(e){var n=pI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Jp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function xl(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function Rt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function lg(){return String(hI++)}function dg(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function eh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(e){return e.props}function vI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var mI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ua(e){e===void 0&&(e={});var t={};return mI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function _i(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=qa(t,r)?t[r]:e[r],n},{})}function qa(e,t){return e[t]!==void 0}function Si(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function gI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pr(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jp(o,e,n)||r&&Jp(o,n.document.activeElement,n))})}var _l=dn;process.env.NODE_ENV!=="production"&&(_l=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var yI=xl(function(e){hg(e).textContent=""},500);function Sl(e,t){var n=hg(t);e&&(n.textContent=e,yI(t))}function hg(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,bI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:xa,keyDownArrowDown:_a,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),wI=["refKey","ref"],EI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],xI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],_I=["refKey","ref"],SI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],CI=function(){var e=function(t){Nu(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},w);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ua(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,C){w=ua(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),C)},i.selectItemAtIndex=function(v,w,C){var I=i.items[v];I!=null&&i.selectItem(I,w,C)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var C,I,D={},P=typeof v=="function";return!P&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=P?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var H={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(H[R]=k[R]))}),P&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),H},function(){Qp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),C&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=sn(I,wI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=P,i.getRootProps.suppressRefError=E;var h=i.getState(),$=h.isOpen;return ae((C={},C[P]=pr(F,i.rootRef),C.role="combobox",C["aria-expanded"]=$,C["aria-haspopup"]="listbox",C["aria-owns"]=$?i.menuId:null,C["aria-labelledby"]=i.labelId,C),k)},i.keyDownHandlers={ArrowDown:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Pr(1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:_a})}})},ArrowUp:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Pr(-1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:xa})}})},Enter:function(w){if(w.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){w.preventDefault();var P=this.items[D],F=this.getItemNodeFromIndex(D);if(P==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Vr(1,0,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Vr(-1,P-1,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,C=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,P=w.onBlur,F=sn(w,EI),k=i.getState(),H=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(P,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":H?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Rf(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:cu}):i.internalSetTimeout(function(){return i.toggleMenu({type:cu})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,C=w.onKeyDown,I=w.onBlur,D=w.onChange,P=w.onInput;w.onChangeText;var F=sn(w,xI),k,H={};k="onChange";var R=i.getState(),E=R.inputValue,h=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var A;H=(A={},A[k]=Rt(D,P,i.inputHandleChange),A.onKeyDown=Rt(C,i.inputHandleKeyDown),A.onBlur=Rt(I,i.inputHandleBlur),A)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},H,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Rf(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=sn(I,_I),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=P,i.getMenuProps.suppressRefError=E,ae((C={},C[P]=pr(F,i.menuRef),C.role="listbox",C["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,C.id=i.menuId,C),k)},i.getItemProps=function(v){var w,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,P=C.onClick;C.onPress;var F=C.index,k=C.item,H=k===void 0?process.env.NODE_ENV==="production"?void 0:vI("getItemProps","item"):k,R=sn(C,SI);F===void 0?(i.items.push(H),F=i.items.indexOf(H)):i.items[F]=H;var E="onClick",h=P,$=(w={onMouseMove:Rt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Rt(D,function(j){j.preventDefault()})},w[E]=Rt(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),A=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},A,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(C){var I=C.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(C){var I=C.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var C=i.getState(),I=C.isOpen,D=C.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Qp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=xl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:w},v));i.previousResultCount=C,Sl(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,f=a.initialIsOpen,m=f===void 0?d:f,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,T=y===void 0?null:y,S=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:T});return S.selectedItem!=null&&i.props.initialInputValue===void 0&&(S.inputValue=i.props.itemToString(S.selectedItem)),i.state=S,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),_i(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),d=u.highlightedIndex;if(c>0){var f=Pr(i,d,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,w=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,P=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,H=this.clearItems,R=this.reset,E=this.setItemCount,h=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:w,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:P,setHighlightedIndex:F,clearSelection:k,clearItems:H,setItemCount:E,unsetItemCount:h,setState:$,itemToString:d,id:f,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},d=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",a),f.addEventListener("mouseup",s),f.addEventListener("touchstart",c),f.addEventListener("touchmove",u),f.addEventListener("touchend",d),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),f.removeEventListener("mousedown",a),f.removeEventListener("mouseup",s),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",u),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,d=u.highlightedIndex,f=c&&this.getState().isOpen&&!i.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(_l(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=eh(this.props.children,dn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=eh(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&$I(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(pg(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:dg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&gI(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:dn,onInputValueChange:dn,onUserAction:dn,onChange:dn,onSelect:dn,onOuterClick:dn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},e.stateChangeTypes=bI,e}();process.env.NODE_ENV!=="production"&&(CI.propTypes={children:q.func,defaultHighlightedIndex:q.number,defaultIsOpen:q.bool,initialHighlightedIndex:q.number,initialSelectedItem:q.any,initialInputValue:q.string,initialIsOpen:q.bool,getA11yStatusMessage:q.func,itemToString:q.func,onChange:q.func,onSelect:q.func,onStateChange:q.func,onInputValueChange:q.func,onUserAction:q.func,onOuterClick:q.func,selectedItemChanged:q.func,stateReducer:q.func,itemCount:q.number,id:q.string,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})}),suppressRefError:q.bool,scrollIntoView:q.func,selectedItem:q.any,isOpen:q.bool,inputValue:q.string,highlightedIndex:q.number,labelId:q.string,inputId:q.string,menuId:q.string,getItemId:q.func});function th(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function $I(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!Xp.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Xp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var TI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function II(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){RI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function RI(e,t,n,r){var o=t.props,i=t.type,a="on"+Cl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function OI(e,t){return t.changes}function PI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var AI=xl(function(e,t){Sl(e(),t)},200),DI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function NI(e){var t=e.id,n=t===void 0?"downshift-"+lg():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function Og(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function kI(e){return e?String(e):""}function Cl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function $l(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=_i(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=$l(n),d=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),f=o.current;return l.useEffect(function(){f&&r.current&&r.current!==s&&II(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function MI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:kI,stateReducer:OI,getA11ySelectionMessage:PI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Cl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Cl(t)];return o!==void 0?o:Pn(e,t,n)}function jI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function LI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(f){o.current.isMouseDown=!1,e&&!Xa(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(f){e&&!o.current.isTouchMove&&!Xa(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var Tl=function(){return dn};process.env.NODE_ENV!=="production"&&(Tl=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!u&&console.error('downshift: The ref prop "'+d+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,d){i.current[s]={suppressRefError:c,refKey:u,elementRef:d}},[]);return a});function nh(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=sn(n,TI);l.useEffect(function(){r||AI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function FI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return DI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Il=dn;process.env.NODE_ENV!=="production"&&(Il=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(_l(o,i.current,r),i.current=r)},[o,r,n])});function rh(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Pn(e,"isOpen"),highlightedIndex:Pn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function VI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Pn(o,"highlightedIndex"),isOpen:Pn(o,"isOpen"),selectedItem:Pn(o,"selectedItem"),inputValue:Pn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}q.array.isRequired,q.func,q.func,q.func,q.number,q.number,q.number,q.bool,q.bool,q.bool,q.any,q.any,q.any,q.string,q.string,q.string,q.func,q.string,q.func,q.func,q.func,q.func,q.func,q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})});function BI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}En(En({},ri),{getA11yStatusMessage:BI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Al=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,kl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Ml=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,jl=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,Ll=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Fl=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Vl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Bl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Rl,InputKeyDownArrowUp:Ol,InputKeyDownEscape:Pl,InputKeyDownHome:Al,InputKeyDownEnd:Dl,InputKeyDownPageUp:Nl,InputKeyDownPageDown:kl,InputKeyDownEnter:Ml,InputChange:jl,InputBlur:Ga,InputFocus:Ll,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Fl,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Vl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Bl});function HI(e){var t=jI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var WI={items:q.array.isRequired,itemToString:q.func,selectedItemChanged:q.func,getA11yStatusMessage:q.func,getA11ySelectionMessage:q.func,highlightedIndex:q.number,defaultHighlightedIndex:q.number,initialHighlightedIndex:q.number,isOpen:q.bool,defaultIsOpen:q.bool,initialIsOpen:q.bool,selectedItem:q.any,initialSelectedItem:q.any,defaultSelectedItem:q.any,inputValue:q.string,defaultInputValue:q.string,initialInputValue:q.string,id:q.string,labelId:q.string,menuId:q.string,getItemId:q.func,inputId:q.string,toggleButtonId:q.string,stateReducer:q.func,onSelectedItemChange:q.func,onHighlightedIndexChange:q.func,onStateChange:q.func,onIsOpenChange:q.func,onInputValueChange:q.func,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})})};function zI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Bl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Hg=dn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){q.checkPropTypes(WI,t,"prop",n.name)});var UI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function YI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Fl:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Rl:e.isOpen?a={highlightedIndex:Pr(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ol:e.isOpen?i?a=rh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ml:a=rh(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case jl:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case Ll:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Vl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Bl:a={inputValue:t.inputValue};break;default:return VI(e,t,Bg)}return ae({},e,a)}var KI=["onMouseLeave","refKey","ref"],qI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],XI=["onClick","onPress","refKey","ref"],GI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);var t=ae({},UI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=HI(t),f=zI(YI,d,t),m=f[0],p=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),w=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),P=NI(t),F=l.useRef(),k=$l({state:m,props:t}),H=l.useCallback(function(z){return w.current[P.getItemId(z)]},[P]);nh(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),nh(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=FI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:H});Il({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=LI(b,[C,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var X;C==null||(X=C.current)==null||X.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(X){X.preventDefault(),p({type:Rl,altKey:X.altKey,getItemNodeFromIndex:H})},ArrowUp:function(X){X.preventDefault(),p({type:Ol,altKey:X.altKey,getItemNodeFromIndex:H})},Home:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Al,getItemNodeFromIndex:H}))},End:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Dl,getItemNodeFromIndex:H}))},Escape:function(X){var ie=k.current.state;(ie.isOpen||ie.inputValue||ie.selectedItem||ie.highlightedIndex>-1)&&(X.preventDefault(),p({type:Pl}))},Enter:function(X){var ie=k.current.state;!ie.isOpen||X.which===229||(X.preventDefault(),p({type:Ml,getItemNodeFromIndex:H}))},PageUp:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:Nl,getItemNodeFromIndex:H}))},PageDown:function(X){k.current.state.isOpen&&(X.preventDefault(),p({type:kl,getItemNodeFromIndex:H}))}}},[p,k,H]),A=l.useCallback(function(z){return ae({id:P.labelId,htmlFor:P.inputId},z)},[P]),j=l.useCallback(function(z,X){var ie,ee=z===void 0?{}:z,oe=ee.onMouseLeave,re=ee.refKey,pe=re===void 0?"ref":re,Ee=ee.ref,_e=sn(ee,KI),Ae=X===void 0?{}:X,$e=Ae.suppressRefError,ke=$e===void 0?!1:$e;return h("getMenuProps",ke,pe,v),ae((ie={},ie[pe]=pr(Ee,function(De){v.current=De}),ie.id=P.menuId,ie.role="listbox",ie["aria-labelledby"]=_e&&_e["aria-label"]?void 0:""+P.labelId,ie.onMouseLeave=Rt(oe,function(){p({type:Ag})}),ie),_e)},[p,h,P]),W=l.useCallback(function(z){var X,ie,ee=z===void 0?{}:z,oe=ee.item,re=ee.index,pe=ee.refKey,Ee=pe===void 0?"ref":pe,_e=ee.ref,Ae=ee.onMouseMove,$e=ee.onMouseDown,ke=ee.onClick;ee.onPress;var De=ee.disabled,it=sn(ee,qI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Og(oe,re,xt.items,"Pass either item or index to getItemProps!"),Se=Pt[1],ut="onClick",Le=ke,Qt=function(){Se!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:Se,disabled:De}))},St=function(){p({type:Fl,index:Se})},tt=function(gt){return gt.preventDefault()};return ae((X={},X[Ee]=pr(_e,function(Ve){Ve&&(w.current[P.getItemId(Se)]=Ve)}),X.disabled=De,X.role="option",X["aria-selected"]=""+(Se===Xe.highlightedIndex),X.id=P.getItemId(Se),X),!De&&(ie={},ie[ut]=Rt(Le,St),ie),{onMouseMove:Rt(Ae,Qt),onMouseDown:Rt($e,tt)},it)},[p,k,R,P]),U=l.useCallback(function(z){var X,ie=z===void 0?{}:z,ee=ie.onClick;ie.onPress;var oe=ie.refKey,re=oe===void 0?"ref":oe,pe=ie.ref,Ee=sn(ie,XI),_e=k.current.state,Ae=function(){p({type:Ng})};return ae((X={},X[re]=pr(pe,function($e){I.current=$e}),X["aria-controls"]=P.menuId,X["aria-expanded"]=_e.isOpen,X.id=P.toggleButtonId,X.tabIndex=-1,X),!Ee.disabled&&ae({},{onClick:Rt(ee,Ae)}),Ee)},[p,k,P]),J=l.useCallback(function(z,X){var ie,ee=z===void 0?{}:z,oe=ee.onKeyDown,re=ee.onChange,pe=ee.onInput,Ee=ee.onFocus,_e=ee.onBlur;ee.onChangeText;var Ae=ee.refKey,$e=Ae===void 0?"ref":Ae,ke=ee.ref,De=sn(ee,GI),it=X===void 0?{}:X,ze=it.suppressRefError,xt=ze===void 0?!1:ze;h("getInputProps",xt,$e,C);var Xe=k.current.state,Pt=function(gt){var rn=Si(gt);rn&&$[rn]&&$[rn](gt)},Se=function(gt){p({type:jl,inputValue:gt.target.value})},ut=function(gt){if(Xe.isOpen&&!E.current.isMouseDown){var rn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!rn})}},Le=function(){Xe.isOpen||p({type:Ll})},Qt="onChange",St={};if(!De.disabled){var tt;St=(tt={},tt[Qt]=Rt(re,pe,Se),tt.onKeyDown=Rt(oe,Pt),tt.onBlur=Rt(_e,ut),tt.onFocus=Rt(Ee,Le),tt)}return ae((ie={},ie[$e]=pr(ke,function(Ve){C.current=Ve}),ie["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?P.getItemId(Xe.highlightedIndex):"",ie["aria-autocomplete"]="list",ie["aria-controls"]=P.menuId,ie["aria-expanded"]=Xe.isOpen,ie["aria-labelledby"]=De&&De["aria-label"]?void 0:""+P.labelId,ie.autoComplete="off",ie.id=P.inputId,ie.role="combobox",ie.value=Xe.inputValue,ie),St,De)},[h,k,P,$,p,E,a]),B=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),ne=l.useCallback(function(){p({type:Mg})},[p]),G=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),Y=l.useCallback(function(z){p({type:Vl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:W,getLabelProps:A,getMenuProps:j,getInputProps:J,getToggleButtonProps:U,toggleMenu:B,openMenu:ne,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:Y,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Wg={activeIndex:-1,selectedItems:[]};function oh(e,t){return zo(e,t,Wg)}function ih(e,t){return Pn(e,t,Wg)}function ZI(e){var t=oh(e,"activeIndex"),n=oh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ah(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function QI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var JI={selectedItems:q.array,initialSelectedItems:q.array,defaultSelectedItems:q.array,itemToString:q.func,getA11yRemovalMessage:q.func,stateReducer:q.func,activeIndex:q.number,initialActiveIndex:q.number,defaultActiveIndex:q.number,onActiveIndexChange:q.func,onSelectedItemsChange:q.func,keyNavigationNext:q.string,keyNavigationPrevious:q.string,environment:q.shape({addEventListener:q.func,removeEventListener:q.func,document:q.shape({getElementById:q.func,activeElement:q.any,body:q.any})})},eR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:QI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=dn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){q.checkPropTypes(JI,t,"prop",n.name)});var Hl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Yl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,ql=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Xl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Gl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Zl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ql=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Jl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,ed=process.env.NODE_ENV!=="production"?"__function_reset__":12,tR=Object.freeze({__proto__:null,SelectedItemClick:Hl,SelectedItemKeyDownDelete:Wl,SelectedItemKeyDownBackspace:zl,SelectedItemKeyDownNavigationNext:Ul,SelectedItemKeyDownNavigationPrevious:Yl,DropdownKeyDownNavigationPrevious:Kl,DropdownKeyDownBackspace:ql,DropdownClick:Xl,FunctionAddSelectedItem:Gl,FunctionRemoveSelectedItem:Zl,FunctionSetSelectedItems:Ql,FunctionSetActiveIndex:Jl,FunctionReset:ed});function nR(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Hl:c={activeIndex:r};break;case Yl:c={activeIndex:a-1<0?0:a-1};break;case Ul:c={activeIndex:a+1>=s.length?-1:a+1};break;case zl:case Wl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case Kl:c={activeIndex:s.length-1};break;case ql:c={selectedItems:s.slice(0,s.length-1)};break;case Gl:c={selectedItems:[].concat(s,[i])};break;case Xl:c={activeIndex:-1};break;case Zl:{var d=a,f=s.indexOf(i);if(f<0)break;s.length===1?d=-1:f===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,f),s.slice(f+1)),activeIndex:d};break}case Ql:{var m=t.selectedItems;c={selectedItems:m};break}case Jl:{var p=t.activeIndex;c={activeIndex:p};break}case ed:c={activeIndex:ih(o,"activeIndex"),selectedItems:ih(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var rR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],oR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];td.stateChangeTypes=tR;function td(e){e===void 0&&(e={}),zg(e,td);var t=ae({},eR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=MI(nR,ZI(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(f),y=l.useRef();y.current=[];var T=$l({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(E){return f.indexOf(E)<0});Sl(n({itemToString:r,resultCount:f.length,removedSelectedItem:R,activeIndex:d,activeSelectedItem:f[d]}),o.document)}b.current=f}},[f.length]),l.useEffect(function(){m.current||(d===-1&&p.current?p.current.focus():y.current[d]&&y.current[d].focus())},[d]),Il({isInitialMount:m.current,props:t,state:c});var S=Tl("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Yl})},R[i]=function(){u({type:Ul})},R.Delete=function(){u({type:Wl})},R.Backspace=function(){u({type:zl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){ah(E)&&u({type:Kl})},R.Backspace=function(h){ah(h)&&u({type:ql})},R},[u,a]),C=l.useCallback(function(R){var E,h=R===void 0?{}:R,$=h.refKey,A=$===void 0?"ref":$,j=h.ref,W=h.onClick,U=h.onKeyDown,J=h.selectedItem,B=h.index,L=sn(h,rR),ne=T.current.state,G=Og(J,B,ne.selectedItems,"Pass either item or index to getSelectedItemProps!"),Y=G[1],Z=Y>-1&&Y===ne.activeIndex,ce=function(){u({type:Hl,index:Y})},z=function(ie){var ee=Si(ie);ee&&v[ee]&&v[ee](ie)};return ae((E={},E[A]=pr(j,function(X){X&&y.current.push(X)}),E.tabIndex=Z?0:-1,E.onClick=Rt(W,ce),E.onKeyDown=Rt(U,z),E),L)},[u,T,v]),I=l.useCallback(function(R,E){var h,$=R===void 0?{}:R,A=$.refKey,j=A===void 0?"ref":A,W=$.ref,U=$.onKeyDown,J=$.onClick,B=$.preventKeyAction,L=B===void 0?!1:B,ne=sn($,oR),G=E===void 0?{}:E,Y=G.suppressRefError,Z=Y===void 0?!1:Y;S("getDropdownProps",Z,j,p);var ce=function(ie){var ee=Si(ie);ee&&w[ee]&&w[ee](ie)},z=function(){u({type:Xl})};return ae((h={},h[j]=pr(W,function(X){X&&(p.current=X)}),h),!L&&{onKeyDown:Rt(U,ce),onClick:Rt(J,z)},ne)},[u,w,S]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),P=l.useCallback(function(R){u({type:Zl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Ql,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Jl,activeIndex:R})},[u]),H=l.useCallback(function(){u({type:ed})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:P,setSelectedItems:F,setActiveIndex:k,reset:H,selectedItems:f,activeIndex:d}}var iR="jbnkvn0",sh=ot({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),ch=ot({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),aR="jbnkvn6",mc=ot({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),sR=ot({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),cR="jbnkvnc",uh="jbnkvnp";const Ug=l.createContext(void 0),uR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),nd=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=nd();return t?t({children:e,defaultClassName:ch,innerProps:n()}):M.jsx("div",{className:ch({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=nd(),d=a===n,f=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sh({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:d,isSelected:f,isChecked:m}):M.jsxs("div",{className:sh({highlighted:d,selected:f,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:Ct.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i,isDropdown:a}=nd(),s=a?16:24;if(e)return e({innerProps:o(),defaultClassName:uh,isOpen:r});const c=n==="disabled"?Ct.theme.colors.black:Ct.theme.colors.grey1;return M.jsx("div",{className:uh,"data-test-id":t["data-test-id"],"data-disabled":i,children:r?M.jsx(xu,{color:c,size:s}):M.jsx(si,{color:c,size:s})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:d,onClickItem:f,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:T,helperTextLeft:S,helperTextRight:v,isError:w,errorMessage:C,isDisabled:I,isValid:D,isRounded:P,className:F}=p,[k,H]=l.useState(e),R=Du({isError:w,isDisabled:I,isValid:D}),E=l.useRef(null),h=u||m,$=P||m,{removeSelectedItem:A,selectedItems:j,addSelectedItem:W,getDropdownProps:U}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),J=l.useMemo(()=>j.length,[j]),B=l.useCallback(pe=>{let Ee=pe;(c&&!d||h)&&(Ee="");const _e=new RegExp(Ee.toLowerCase());return e.filter(Ae=>_e.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:ne,getLabelProps:G,getMenuProps:Y,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:X,openMenu:ie,closeMenu:ee,setHighlightedIndex:oe}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{H(B(pe||""))},onIsOpenChange:pe=>{var Ee;if(pe.isOpen&&pe.selectedItem){const _e=k.findIndex(Ae=>{var $e;return Ae.value===(($e=pe.selectedItem)==null?void 0:$e.value)});oe(_e)}else pe.isOpen||((Ee=E.current)==null||Ee.blur(),oe(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var Ee;c||(r(pe.selectedItem),h&&((Ee=E.current)==null||Ee.blur()),ee())},stateReducer:(pe,Ee)=>{const{changes:_e,type:Ae}=Ee,$e=k.find((ke,De)=>De===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let ke=J;return j.includes($e)?(ke-=1,A($e)):(ke+=1,W($e)),{..._e,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!d&&ke>0?`${ke} items selected`:""}}return{..._e,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:_e.inputValue};case Or.stateChangeTypes.InputFocus:return{..._e,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let ke=_e.inputValue;return c&&!d&&(J>0?ke=`${J} items selected`:ke=""),{..._e,inputValue:ke}}default:return _e}}});l.useImperativeHandle(b,()=>E.current);const re={isOpen:L,formState:R,selectedItem:X,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:J,highlightedIndex:ce,getMenuProps:Y,getItemProps:z,getToggleButtonProps:ne,onClickItem:f,isDropdown:m,openMenu:ie,closeMenu:ee};return M.jsx(uR,{contextValue:re,children:M.jsxs(et,{position:"relative",w:"$full",className:F,...ne({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:T,helperTextLeft:S,helperTextRight:v,isError:w,errorMessage:C,isDisabled:I,isValid:D,inputAreaClassName:Oe(iR,mc({isRounded:$})),className:mc({isRounded:$,isDisabled:!!I}),children:[M.jsxs("div",{className:aR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(U({preventKeyAction:L,ref:E,placeholder:n,readOnly:h,disabled:I,className:sR({isMobile:d,isReadOnly:h,isDropdown:m})}))}),d&&c&&M.jsx("div",{className:cR,children:J>0?`${J} items selected`:""}),d&&M.jsx(Di,{isSelect:!0,isError:w,isDisabled:I,required:a,className:mc({isRounded:$}),...G(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,Ee)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:Ee,item:pe}))})]})})});uo.displayName="Select";uo.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0,isRounded:!1};const Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},lR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],dR=Za.map(e=>({label:e,value:e,isDisabled:!1})),fR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},gc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),lh=(e,t)=>new Date(e,ii(t)+1,0).getDate(),pR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=lh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lh(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[d,f]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),T=()=>{f(void 0),p(void 0),y(void 0)},S=l.useMemo(()=>{if(a){if(d)return d;if(r)return gc("date",r)}},[r,d,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),C=l.useMemo(()=>S||v||w?pR({date:S?Number(S==null?void 0:S.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[S,v,w,t]),I=S&&v&&!w&&!C,D=S&&!v&&w&&!C,P=!S&&v&&w&&!C,F=S&&v&&w&&!C;return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),T()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(et,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Ht,{px:"$16",py:"$8",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(Gt,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Ht,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:S,isMobile:n,options:lR,onChange:f,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:dR,onChange:p,isError:P||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:fR(t),onChange:y,isError:P||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||P||D||I)&&M.jsx(Gt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(S==null?void 0:S.value))),T()},isDisabled:!w||!v||!S||!C,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var hR=ot({defaultClassName:"_1uehowr0",variantClassNames:{isActive:{true:"_1uehowr1",false:"_1uehowr2"},variant:{solid:"_1uehowr3",outline:"_1uehowr4"}},defaultVariants:{isActive:!1,variant:"solid"},compoundVariants:[[{variant:"solid",isActive:!0},"_1uehowr5"],[{variant:"solid",isActive:!1},"_1uehowr6"],[{variant:"outline",isActive:!0},"_1uehowr7"],[{variant:"outline",isActive:!1},"_1uehowr8"]]});const Zg=l.forwardRef(({isActive:e,variant:t,className:n,children:r,as:o,...i},a)=>{const s=o||"span";return M.jsx(s,{ref:a,as:"span",className:Oe(hR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const yc="rovingFocusGroup.onEntryFocus",vR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,mR]=Qa(rd),[gR,Jg]=mn(rd,[mR]),[yR,bR]=gR(rd),wR=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(ER,ae({},e,{ref:t}))))),ER=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=l.useRef(null),m=ct(t,f),p=Ja(i),[b=null,y]=_n({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),w=Qg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(yc,v),()=>P.removeEventListener(yc,v)},[v]),l.createElement(yR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(P=>y(P),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>D(P=>P-1),[])},l.createElement(Ue.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{C.current=!0}),onFocus:Ne(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!T){const k=new CustomEvent(yc,vR);if(P.currentTarget.dispatchEvent(k),!k.defaultPrevented){const H=w().filter(A=>A.focusable),R=H.find(A=>A.active),E=H.find(A=>A.id===b),$=[R,E,...H].filter(Boolean).map(A=>A.ref.current);ey($)}}C.current=!1}),onBlur:Ne(e.onBlur,()=>S(!1))})))}),xR="RovingFocusGroupItem",_R=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=bR(xR,n),d=u.currentTabStopId===c,f=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(uu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=$R(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let S=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const v=S.indexOf(b.currentTarget);S=u.loop?TR(S,v+1):S.slice(v+1)}setTimeout(()=>ey(S))}})})))}),SR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $R(e,t,n){const r=CR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function TR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const IR=wR,RR=_R,ty="Radio",[OR,ny]=mn(ty),[PR,AR]=OR(ty),DR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[d,f]=l.useState(null),m=ct(t,y=>f(y)),p=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(PR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(MR,{control:d,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),NR="RadioIndicator",kR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=AR(NR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),MR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ry(e){return e?"checked":"unchecked"}const jR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[LR,NP]=mn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[FR,VR]=LR(oy),BR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...m}=e,p=iy(n),b=Ja(u),[y,T]=_n({prop:i,defaultProp:o,onChange:f});return l.createElement(FR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(IR,ae({asChild:!0},p,{orientation:c,dir:b,loop:d}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),HR="RadioGroupItem",WR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=VR(HR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),d=ct(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{jR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(RR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(DR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),zR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(kR,ae({},o,r,{ref:t}))}),UR=BR,YR=WR,KR=zR;var qR=ot({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),XR="d6umgr1",GR=ot({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),ZR="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Ht,{alignItems:"center",children:[M.jsx(YR,{...r,disabled:n,className:Oe(t,ZR),id:o,children:M.jsx(KR,{className:Oe("radio-indicator",GR({disabled:n}))})}),e&&M.jsx("label",{className:Oe("radio-label",qR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const QR=({className:e,children:t,...n})=>M.jsx(UR,{...n,className:Oe(e,XR),children:t});var JR="_846x3h2",eO="_846x3h0",tO="_846x3h1",nO=ot({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,...c},u)=>{const[d,f]=l.useState(!1),m=T=>{i==null||i(T),f(!0)},p=T=>{a==null||a(T),f(!1)},b=()=>{o==null||o(),f(!1)},y=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Oe(eO),children:M.jsx(I0,{size:24})}),M.jsx("input",{className:Oe(nO({size:t,isHasIcon:y,isDisabled:n})),ref:u,value:e,"data-test-id":c["data-test-id"],onFocus:m,onBlur:p,disabled:n,type:"search",...c}),y&&M.jsx(et,{className:Oe(tO),children:r&&(!d||d&&!e)?r:M.jsx(et,{className:Oe(JR),onMouseDown:b,children:M.jsx(rs,{"data-test-id":"icon-close-search",onMouseDown:b,cursor:"pointer",size:24})})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[rO,kP]=mn(cy),[oO,iO]=rO(cy),aO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),p=ct(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=_n({prop:o,defaultProp:i,onChange:u});return l.createElement(oO,{scope:n,checked:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":uy(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:p,onClick:Ne(e.onClick,v=>{S(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(uO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),sO="SwitchThumb",cO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=iO(sO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),uO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uy(e){return e?"checked":"unchecked"}const lO=aO,dO=cO;var fO="b7c0j12",pO="b7c0j10",hO="b7c0j11";const ly=l.forwardRef((e,t)=>M.jsx(lO,{ref:t,className:pO,...e,children:M.jsx(dO,{className:hO,children:M.jsx(Eu,{className:fO,size:16})})}));ly.displayName="Switch";const dy=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?M.jsxs(Ht,{flexDirection:"column","data-test-id":r,children:[M.jsx(xu,{size:10,color:o&&i?"white":"grey"}),M.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};dy.defaultProps={sortable:!1,"data-test-id":""};var vO="_94c6vs1",mO="_94c6vs3",dh="_94c6vs2",gO="_94c6vs0";const fy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,p=f.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=f=>typeof f=="object"?"":f,d=l.useCallback((f,m)=>{const p=[...f];return m.order==="ASC"?p.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,T)=>String(y[m.by]).localeCompare(String(T[m.by]))):[...f]},[]);return l.useEffect(()=>{const f=t.map(b=>({...b,sortable:b.sortable??!1}));r(f);const p=d(e,{by:a.by,order:a.order}).map(b=>f.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(p)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},py=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:o,...i},a)=>{const s=t||"table",{rows:c,headers:u,handleHeaderClick:d,sortColumn:f}=fy({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),M.jsxs(s,{ref:a,as:t,className:gO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:mO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:dh,onClick:()=>d(m),children:M.jsxs(Ht,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),M.jsx(dy,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),M.jsx("tbody",{children:c.map((m,p)=>M.jsx("tr",{className:vO,children:m.map((b,y)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${p}-col${y}`,className:dh,w:"33%",children:b.CellRenderer??b.value}))}))})]})});py.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var yO=ot({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var bO=ot({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const id=l.createContext({index:0,setIndex:()=>null}),ad=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,...s},c)=>{const[u,d]=l.useState(o??0),f=l.useMemo(()=>l.Children.map(t,(b,y)=>l.cloneElement(b,{"data-index":y})),[t]);l.useEffect(()=>d(r??0),[r]);const m=l.useMemo(()=>({index:u,setIndex:y=>{d(y),a==null||a(y)}}),[u,a]),p=e||"ul";return M.jsx(p,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Oe(bO({withShadow:n,align:i})),...s,children:M.jsx(id.Provider,{value:m,children:f})})});ad.displayName="Tabs";ad.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const sd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(id),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Oe(yO({isActive:s})),...n,children:M.jsx(Gt,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const hy="ToastProvider",[cd,wO,EO]=Qa("Toast"),[vy,MP]=mn("Toast",[EO]),[xO,Os]=vy(hy),my=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,d]=l.useState(0),f=l.useRef(!1),m=l.useRef(!1);return l.createElement(cd.Provider,{scope:t},l.createElement(xO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(p=>p+1),[]),onToastRemove:l.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},a))};my.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${hy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const _O="ToastViewport",SO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",CO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=SO,label:o="Notifications ({hotkey})",...i}=e,a=Os(_O,n),s=wO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=ct(t,f,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const T=S=>{var v;r.every(C=>S[C]||S.code===C)&&((v=f.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{const T=c.current,S=f.current;if(b&&T&&S){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&w()},I=()=>{T.contains(document.activeElement)||w()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(w=>{const C=w.ref.current,I=[C,...VO(C)];return T==="forwards"?I:I.reverse()});return(T==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const T=f.current;if(T){const S=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===T&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),h=E.findIndex($=>$===F);if(bc(E.slice(h+1)))v.preventDefault();else{var D,P;k?(D=u.current)===null||D===void 0||D.focus():(P=d.current)===null||P===void 0||P.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(Z0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fh,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});bc(T)}}),l.createElement(cd.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(fh,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),$O="ToastFocusProxy",fh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os($O,n);return l.createElement(ls,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Ps="Toast",TO="toast.swipeStart",IO="toast.swipeMove",RO="toast.swipeCancel",OO="toast.swipeEnd",PO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=_n({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(gy,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:cn(e.onPause),onResume:cn(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ne(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ne(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[AO,DO]=vy(Ps,{onClose(){}}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=ct(t,$=>S($)),w=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),P=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:H}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),E=l.useCallback($=>{!$||$===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,$))},[R]);l.useEffect(()=>{const $=y.viewport;if($){const A=()=>{E(P.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;P.current=P.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,A),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,A)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>H()),[k,H]);const h=l.useMemo(()=>T?by(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(NO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(AO,{scope:n,onClose:R},pn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(G0,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ne(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ne(e.onPointerMove,$=>{if(!w.current)return;const A=$.clientX-w.current.x,j=$.clientY-w.current.y,W=!!C.current,U=["left","right"].includes(y.swipeDirection),J=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=U?J(0,A):0,L=U?0:J(0,j),ne=$.pointerType==="touch"?10:2,G={x:B,y:L},Y={originalEvent:$,delta:G};W?(C.current=G,la(IO,f,Y,{discrete:!1})):ph(G,y.swipeDirection,ne)?(C.current=G,la(TO,d,Y,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(A)>ne||Math.abs(j)>ne)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,$=>{const A=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,w.current=null,A){const W=$.currentTarget,U={originalEvent:$,delta:A};ph(A,y.swipeDirection,y.swipeThreshold)?la(OO,p,U,{discrete:!0}):la(RO,m,U,{discrete:!0}),W.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})))),y.viewport))):null});gy.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Ps}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const NO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return LO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ls,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},kO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(yy,{altText:n,asChild:!0},l.createElement(jO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${kO}\``)}};const MO="ToastClose",jO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=DO(MO,n);return l.createElement(yy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),yy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function by(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),FO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...by(r))}}),t}function la(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Eh(o,i):o.dispatchEvent(i)}const ph=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function LO(e=()=>{}){const t=cn(e);Zt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function FO(e){return e.nodeType===e.ELEMENT_NODE}function VO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const BO=my,wy=CO,Ey=PO,HO=ud;var WO="_10z4js29",zO=ot({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),UO="_10z4js28",YO="_10z4js2a";const xy=BO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(wy,{ref:n,className:Oe(YO,e),...t}));ld.displayName=wy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(Ey,{ref:r,className:Oe(zO({color:t}),e),...n}));As.displayName=Ey.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const dd=l.forwardRef(({className:e,...t},n)=>M.jsx(ud,{ref:n,className:Oe(e),...t}));dd.displayName=HO.displayName;const KO=1,qO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function XO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hh=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},qO);Ec.set(e,t)};function _y(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,KO)};case qn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case qn.DISMISS_TOAST:{const{toastId:n}=t;return n?hh(n):e.toasts.forEach(r=>{hh(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case qn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Sa=[];let Ca={toasts:[]};function ai(e){Ca=_y(Ca,e),Sa.forEach(t=>{t(Ca)})}function Sy({...e}){const t=XO(),n=o=>ai({type:qn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:qn.DISMISS_TOAST,toastId:t});return ai({type:qn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Cy(){const[e,t]=l.useState(Ca);return l.useEffect(()=>(Sa.push(t),()=>{const n=Sa.indexOf(t);n>-1&&Sa.splice(n,1)}),[e]),{...e,toast:Sy,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const fd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Cy();return M.jsx(xy,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:d="foreground",color:f="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,...y})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[M.jsx(et,{"data-test-id":`toast-${y["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:M.jsx(Gt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:UO,children:i})}),!a&&c&&s?M.jsx(dd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:Oe(WO,p),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[Ds,jP]=mn("Tooltip",[cs]),Ns=cs(),GO="TooltipProvider",ZO=700,fu="tooltip.open",[QO,pd]=Ds(GO),JO=e=>{const{__scopeTooltip:t,delayDuration:n=ZO,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.createElement(QO,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(d=>{c.current=d},[]),disableHoverableContent:o},i)},hd="Tooltip",[eP,ks]=Ds(hd),tP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=pd(hd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=_n({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(P)}}),w=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(p.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(eP,{scope:t,contentId:m,open:S,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},vh="TooltipTrigger",nP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vh,n),i=pd(vh,n),a=Ns(n),s=l.useRef(null),c=ct(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),rP="TooltipPortal",[LP,oP]=Ds(rP,{forceMount:void 0}),Ci="TooltipContent",iP=l.forwardRef((e,t)=>{const n=oP(Ci,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=ks(Ci,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement($y,ae({side:o},i,{ref:t})):l.createElement(aP,ae({side:o},i,{ref:t})))}),aP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=pd(Ci,e.__scopeTooltip),o=l.useRef(null),i=ct(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=l.useCallback(()=>{s(null),f(!1)},[f]),p=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=dP(S,T.getBoundingClientRect()),w=fP(S,v),C=pP(y.getBoundingClientRect()),I=vP([...w,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>p(T,d),y=T=>p(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,p,m]),l.useEffect(()=>{if(a){const b=y=>{const T=y.target,S={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains(T))||(d==null?void 0:d.contains(T)),w=!hP(S,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement($y,ae({},e,{ref:i}))}),[sP,cP]=Ds(hd,{isInside:!1}),$y=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=ks(Ci,n),u=Ns(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(fu,d),()=>document.removeEventListener(fu,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Jh,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(wh,null,r),l.createElement(sP,{scope:n,isInside:!0},l.createElement(r1,{id:c.contentId,role:"tooltip"},o||r))))}),uP="TooltipArrow",lP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return cP(uP,n).isInside?null:l.createElement(t1,ae({},o,r,{ref:t}))});function dP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function pP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function hP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,d=t[a].y;c>r!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(o=!o)}return o}function vP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mP(t)}function mP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const gP=JO,yP=tP,bP=nP,wP=iP,EP=lP;function mh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function xP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function Ty(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=Ty(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function _P(e,t){var n={};if(typeof t=="object"){var r=e;Ty(t,(a,s)=>{var c=xP(r,s);n[mh(c)]=String(a)})}else{var o=e;for(var i in o)n[mh(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var SP="var(--_4goys34)",CP="_4goys35",$P="_4goys36";const vd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:d,position:f,positionOffset:m,withIcon:p,...b},y)=>{const T=Ct.atoms.commonAtoms({color:r,bgColor:o}).className,S=Ct.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs(yP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(bP,{asChild:!0,ref:y,children:n}),M.jsx(vs,{children:M.jsxs(wP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Oe($P,T,S),children:[M.jsxs(Ht,{gap:"$6",children:[p&&M.jsx(Ht,{width:"$24",children:M.jsx(A0,{size:24})}),i]}),M.jsx(EP,{className:CP,style:_P({[SP]:Ct.theme.colors[w]})})]})})]})});vd.displayName="Tooltip";vd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const md=({children:e})=>M.jsxs(gP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Ct.theme.fonts.poppins},className:Oe(t??Ct.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Nb;exports.AccordionContent=h0;exports.AccordionItem=v0;exports.AccordionTrigger=F0;exports.Alert=Ph;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=H$;exports.Box=et;exports.Button=mo;exports.Card=yu;exports.Checkbox=Gm;exports.Chip=ul;exports.CloseButton=Wr;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=MT;exports.Container=bu;exports.DatePicker=uI;exports.Dialog=dl;exports.Divider=pl;exports.Flex=Ht;exports.FullLoader=ag;exports.Grid=wu;exports.IconButton=gl;exports.Image=yl;exports.Input=vl;exports.Link=rg;exports.List=bl;exports.ListItem=wl;exports.Loader=XT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Ts;exports.ModalFooter=Is;exports.ModalHeader=Rs;exports.MultiPicker=sg;exports.Overlay=XE;exports.Picker=au;exports.Pills=Zg;exports.Portal=vs;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=QR;exports.RadixProvider=md;exports.Search=od;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=ly;exports.TabItem=sd;exports.Table=py;exports.Tabs=ad;exports.TabsContext=id;exports.Text=Gt;exports.Textarea=ml;exports.Toast=As;exports.ToastAction=dd;exports.ToastProvider=xy;exports.ToastViewport=ld;exports.Toaster=fd;exports.Tooltip=vd;exports.linkRecipe=ng;exports.reducer=_y;exports.toast=Sy;exports.useDialog=jT;exports.useIndeterminate=sT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=fy;exports.useToast=Cy;