@ctlyst.id/voila-ui 1.34.2 → 1.34.4
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 +25 -25
- package/dist/index.mjs +553 -567
- package/dist/style.css +1 -1
- package/dist/types/components/modal/modal.d.ts +5 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Dd;function Yy(){return Dd||(Dd=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function
|
|
17
|
+
*/var Dd;function Yy(){return Dd||(Dd=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||A||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,J){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?J+"("+_e+")":J}function w(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return w(V)+".Consumer";case a:var J=x;return w(J._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Re=_e._payload,Ee=_e._init;try{return p(Ee(Re))}catch{return null}}}return null}var $=Object.assign,P=0,j,W,Y,ne,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(P===0){j=console.log,W=console.info,Y=console.warn,ne=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}P++}}function Z(){{if(P--,P===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:j}),info:$({},x,{value:W}),warn:$({},x,{value:Y}),error:$({},x,{value:ne}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}P<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,z;function U(x,V,J){{if(z===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);z=fe&&fe[1]||""}return`
|
|
18
18
|
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=ce.current,ce.current=null,K();try{if(V){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(qe){fe=qe}Reflect.construct(x,[],Ee)}else{try{Ee.call()}catch(qe){fe=qe}x.call(Ee.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
|
-
`),
|
|
20
|
-
`),Le=we.length-1,Be=
|
|
21
|
-
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function
|
|
19
|
+
`),tt=fe.stack.split(`
|
|
20
|
+
`),Le=we.length-1,Be=tt.length-1;Le>=1&&Be>=0&&we[Le]!==tt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(we[Le]!==tt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||we[Le]!==tt[Be]){var Ge=`
|
|
21
|
+
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function rt(x,V,J,fe,_e){{var Re=Function.call.bind(Ne);for(var Ee in x)if(Re(x,Ee)){var we=void 0;try{if(typeof x[Ee]!="function"){var tt=Error((fe||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw tt.name="Invariant Violation",tt}we=x[Ee](V,Ee,fe,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){we=Le}we&&!(we instanceof Error)&&(De(_e),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",J,Ee,typeof we),De(null)),we instanceof Error&&!(we.message in Oe)&&(Oe[we.message]=!0,De(_e),v("Failed %s type: %s",J,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,J=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return J}}function Pt(x){try{return xe(x),!1}catch{return!0}}function xe(x){return""+x}function ct(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)),xe(x)}var je=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},Ct,et,Fe;Fe={};function gt(x){if(Ne.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function nn(x){if(Ne.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function rn(x,V){if(typeof x.ref=="string"&&je.current&&V&&je.current.stateNode!==V){var J=p(je.current.type);Fe[J]||(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',p(je.current.type),x.ref),Fe[J]=!0)}}function Qt(x,V){{var J=function(){Ct||(Ct=!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))};J.isReactWarning=!0,Object.defineProperty(x,"key",{get:J,configurable:!0})}}function he(x,V){{var J=function(){et||(et=!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))};J.isReactWarning=!0,Object.defineProperty(x,"ref",{get:J,configurable:!0})}}var Ye=function(x,V,J,fe,_e,Re,Ee){var we={$$typeof:t,type:x,key:V,ref:J,props:Ee,_owner:Re};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:_e}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,J,fe,_e){{var Re,Ee={},we=null,tt=null;J!==void 0&&(ct(J),we=""+J),nn(V)&&(ct(V.key),we=""+V.key),gt(V)&&(tt=V.ref,rn(V,_e));for(Re in V)Ne.call(V,Re)&&!Zt.hasOwnProperty(Re)&&(Ee[Re]=V[Re]);if(x&&x.defaultProps){var Le=x.defaultProps;for(Re in Le)Ee[Re]===void 0&&(Ee[Re]=Le[Re])}if(we||tt){var Be=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(Ee,Be),tt&&he(Ee,Be)}return Ye(x,we,tt,_e,fe,je.current,Ee)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(J)}else Jt.setExtraStackFrame(null)}var yn;yn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=p(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(/^.*[\\\/]/,""),J=x.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+V+":"+J+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var J=typeof x=="string"?x:x.displayName||x.name;J&&(V=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=B(x);if(!Ee){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(_e);nt?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Le=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",Le,we)}var Be=kt(x,V,J,_e,Re);if(Be==null)return Be;if(Ee){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(Be):Nn(Be),Be}}function kn(x,V,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,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:h,...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},h)}function d(f,m){const h=(m==null?void 0:m[e][c])||s,b=l.useContext(h);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 bp(...e){return t=>e.forEach(n=>qy(n,t))}function st(...e){return l.useCallback(bp(...e),e)}const uo=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)});uo.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?bp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wp=({children:e})=>l.createElement(l.Fragment,null,e);function Xy(e){return l.isValidElement(e)&&e.type===wp}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 Ja(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:b,children:y}=h,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((h,b)=>{const{scope:y,children:T}=h,S=i(s,y),v=st(b,S.collectionRef);return l.createElement(uo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((h,b)=>{const{scope:y,children:T,...S}=h,v=l.useRef(null),E=st(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(uo,{[d]:"",ref:E},T)});function m(h){const b=i(e+"CollectionConsumer",h);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 Ae(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 Sn({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?uo: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 Ep(e,t){e&&hn.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=st(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=Bi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=Bi(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=f=>{const h=Bi(r.current).includes(f.animationName);f.target===t&&h&&hn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Bi(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 Bi(e){return(e==null?void 0:e.animationName)||"none"}const tb=$e["useId".toString()]||(()=>{});let nb=0;function Xn(e){const[t,n]=$e.useState(tb());return Gt(()=>{e||n(r=>r??String(nb++))},[e]),e||(t?`radix-${t}`:"")}const xp="Collapsible",[rb,_p]=mn(xp),[ob,hu]=rb(xp),ib=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Sn({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":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ab="CollapsibleTrigger",sb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hu(ab,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),Sp="CollapsibleContent",cb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hu(Sp,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=hu(Sp,n),[s,c]=l.useState(r),u=l.useRef(null),d=st(t,u),f=l.useRef(0),m=f.current,h=l.useRef(0),b=h.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 E=v.getBoundingClientRect();f.current=E.height,h.current=E.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":pu(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 pu(e){return e?"open":"closed"}const lb=ib,db=sb,fb=cb,hb=l.createContext(void 0);function es(e){const t=l.useContext(hb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,vb,mb]=Ja(br),[ts,RP]=mn(br,[mb,_p]),mu=_p(),Cp=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})))});Cp.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[$p,gb]=ts(br),[Tp,yb]=ts(br,{collapsible:!1}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Sn({prop:n,defaultProp:r,onChange:o});return l.createElement($p,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Tp,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ip,ae({},a,{ref:t}))))}),wb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Sn({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($p,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Tp,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ip,ae({},i,{ref:t}))))}),[Eb,ns]=ts(br),Ip=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=st(s,t),u=vb(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!pb.includes(h.key))return;const y=h.target,T=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;h.preventDefault();let E=S;const C=0,I=v-1,D=()=>{E=S+1,E>I&&(E=C)},A=()=>{E=S-1,E<C&&(E=I)};switch(h.key){case"Home":E=C;break;case"End":E=I;break;case"ArrowRight":i==="horizontal"&&(f?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=E%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]=ts(Sc),_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(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":Rp(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=ns(br,n),i=gu(Sb,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rp(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",$b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(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=ns(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 Rp(e){return e?"open":"closed"}const Rb=Cp,Ob=_b,Pb=Cb,Ab=$b,Db=Ib;function Op(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=Op(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ie(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Op(e))&&(r&&(r+=" "),r+=t);return r}const Nb=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:Ie("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},rs=(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}=$t.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}=rs({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:Ie(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}=$t.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}=rs({flexAtoms:Ub,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:Ie("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}=$t.atoms,Yt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=rs({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:Ie(s,n),style:u,...c,children:t})});Yt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Yt.displayName="Flex";const{gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0}=$t.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=$t.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=rs({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:Ie(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,Pr=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(Yt,{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})});Pr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Pr.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},dt=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=dt({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 sn=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(et,{as:e,ref:a,className:Ie(s0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var c0="_13vyt6x7",u0="_13vyt6x5",l0="_13vyt6x6",d0="_13vyt6x2",f0="_13vyt6x3",h0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Db,{className:Ie(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:Ie(d0,t),...n,ref:r,children:e}));var Cc={exports:{}},Io={};/**
|
|
27
|
+
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);rt(J,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=H(x);if(!Ee){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 tt=tr(_e);tt?we+=tt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Le=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",Le,we)}var Be=kt(x,V,J,_e,Re);if(Be==null)return Be;if(Ee){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(Be):Nn(Be),Be}}function kn(x,V,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,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:h,...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},h)}function d(f,m){const h=(m==null?void 0:m[e][c])||s,b=l.useContext(h);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 bp(...e){return t=>e.forEach(n=>qy(n,t))}function st(...e){return l.useCallback(bp(...e),e)}const uo=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)});uo.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?bp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wp=({children:e})=>l.createElement(l.Fragment,null,e);function Xy(e){return l.isValidElement(e)&&e.type===wp}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 Ja(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:b,children:y}=h,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((h,b)=>{const{scope:y,children:T}=h,S=i(s,y),v=st(b,S.collectionRef);return l.createElement(uo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((h,b)=>{const{scope:y,children:T,...S}=h,v=l.useRef(null),E=st(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(uo,{[d]:"",ref:E},T)});function m(h){const b=i(e+"CollectionConsumer",h);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 Ae(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 Sn({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?uo: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 Ep(e,t){e&&hn.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=st(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=Bi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=Bi(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=f=>{const h=Bi(r.current).includes(f.animationName);f.target===t&&h&&hn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Bi(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 Bi(e){return(e==null?void 0:e.animationName)||"none"}const tb=$e["useId".toString()]||(()=>{});let nb=0;function Xn(e){const[t,n]=$e.useState(tb());return Gt(()=>{e||n(r=>r??String(nb++))},[e]),e||(t?`radix-${t}`:"")}const xp="Collapsible",[rb,_p]=mn(xp),[ob,hu]=rb(xp),ib=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Sn({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":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ab="CollapsibleTrigger",sb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hu(ab,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),Sp="CollapsibleContent",cb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hu(Sp,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=hu(Sp,n),[s,c]=l.useState(r),u=l.useRef(null),d=st(t,u),f=l.useRef(0),m=f.current,h=l.useRef(0),b=h.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 E=v.getBoundingClientRect();f.current=E.height,h.current=E.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":pu(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 pu(e){return e?"open":"closed"}const lb=ib,db=sb,fb=cb,hb=l.createContext(void 0);function es(e){const t=l.useContext(hb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,vb,mb]=Ja(br),[ts,RP]=mn(br,[mb,_p]),mu=_p(),Cp=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})))});Cp.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[$p,gb]=ts(br),[Tp,yb]=ts(br,{collapsible:!1}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Sn({prop:n,defaultProp:r,onChange:o});return l.createElement($p,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Tp,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ip,ae({},a,{ref:t}))))}),wb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Sn({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($p,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Tp,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ip,ae({},i,{ref:t}))))}),[Eb,ns]=ts(br),Ip=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=st(s,t),u=vb(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!pb.includes(h.key))return;const y=h.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;h.preventDefault();let E=S;const C=0,I=v-1,D=()=>{E=S+1,E>I&&(E=C)},A=()=>{E=S-1,E<C&&(E=I)};switch(h.key){case"Home":E=C;break;case"End":E=I;break;case"ArrowRight":i==="horizontal"&&(f?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=E%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]=ts(Sc),_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(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":Rp(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=ns(br,n),i=gu(Sb,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rp(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Nd="AccordionTrigger",$b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(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=ns(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 Rp(e){return e?"open":"closed"}const Rb=Cp,Ob=_b,Pb=Cb,Ab=$b,Db=Ib;function Op(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=Op(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ie(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Op(e))&&(r&&(r+=" "),r+=t);return r}const Nb=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:Ie("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},rs=(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}=$t.atoms,at=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}=rs({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:Ie(d,n),disabled:r,style:m,...f,children:t})});at.displayName="Box";at.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(at,{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}=$t.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}=rs({flexAtoms:Ub,sizesAtoms:jd,spaceAtoms:Ld,commonAtoms:Fd},o,[a,s,c]);return M.jsx("div",{className:Ie("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}=$t.atoms,Yt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Vd({display:"flex"}),{className:s,otherProps:c,style:u}=rs({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:Ie(s,n),style:u,...c,children:t})});Yt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Yt.displayName="Flex";const{gridAtoms:Zb,commonAtoms:Qb,spaceAtoms:Jb,sizesAtoms:e0,radiiAtoms:t0}=$t.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=$t.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=rs({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:Ie(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,Pr=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(Yt,{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})});Pr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Pr.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},dt=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=dt({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 sn=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(at,{as:e,ref:a,className:Ie(s0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var c0="_13vyt6x7",u0="_13vyt6x5",l0="_13vyt6x6",d0="_13vyt6x2",f0="_13vyt6x3",h0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Db,{className:Ie(u0,t),...n,ref:r,children:M.jsx(at,{className:l0,children:e})})),v0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:Ie(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
|
*
|
|
@@ -40,17 +40,17 @@ Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(
|
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var Ud;function g0(){return Ud||(Ud=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function
|
|
43
|
+
*/var Ud;function g0(){return Ud||(Ud=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||A||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,J){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?J+"("+_e+")":J}function w(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return w(V)+".Consumer";case a:var J=x;return w(J._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Re=_e._payload,Ee=_e._init;try{return p(Ee(Re))}catch{return null}}}return null}var $=Object.assign,P=0,j,W,Y,ne,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(P===0){j=console.log,W=console.info,Y=console.warn,ne=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}P++}}function Z(){{if(P--,P===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:j}),info:$({},x,{value:W}),warn:$({},x,{value:Y}),error:$({},x,{value:ne}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}P<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,z;function U(x,V,J){{if(z===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);z=fe&&fe[1]||""}return`
|
|
44
44
|
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=ce.current,ce.current=null,K();try{if(V){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(qe){fe=qe}Reflect.construct(x,[],Ee)}else{try{Ee.call()}catch(qe){fe=qe}x.call(Ee.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
|
-
`),
|
|
46
|
-
`),Le=we.length-1,Be=
|
|
47
|
-
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function
|
|
45
|
+
`),tt=fe.stack.split(`
|
|
46
|
+
`),Le=we.length-1,Be=tt.length-1;Le>=1&&Be>=0&&we[Le]!==tt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(we[Le]!==tt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||we[Le]!==tt[Be]){var Ge=`
|
|
47
|
+
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function rt(x,V,J,fe,_e){{var Re=Function.call.bind(Ne);for(var Ee in x)if(Re(x,Ee)){var we=void 0;try{if(typeof x[Ee]!="function"){var tt=Error((fe||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw tt.name="Invariant Violation",tt}we=x[Ee](V,Ee,fe,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){we=Le}we&&!(we instanceof Error)&&(De(_e),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",J,Ee,typeof we),De(null)),we instanceof Error&&!(we.message in Oe)&&(Oe[we.message]=!0,De(_e),v("Failed %s type: %s",J,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,J=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return J}}function Pt(x){try{return xe(x),!1}catch{return!0}}function xe(x){return""+x}function ct(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)),xe(x)}var je=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},Ct,et,Fe;Fe={};function gt(x){if(Ne.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function nn(x){if(Ne.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function rn(x,V){if(typeof x.ref=="string"&&je.current&&V&&je.current.stateNode!==V){var J=p(je.current.type);Fe[J]||(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',p(je.current.type),x.ref),Fe[J]=!0)}}function Qt(x,V){{var J=function(){Ct||(Ct=!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))};J.isReactWarning=!0,Object.defineProperty(x,"key",{get:J,configurable:!0})}}function he(x,V){{var J=function(){et||(et=!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))};J.isReactWarning=!0,Object.defineProperty(x,"ref",{get:J,configurable:!0})}}var Ye=function(x,V,J,fe,_e,Re,Ee){var we={$$typeof:t,type:x,key:V,ref:J,props:Ee,_owner:Re};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:_e}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,J,fe,_e){{var Re,Ee={},we=null,tt=null;J!==void 0&&(ct(J),we=""+J),nn(V)&&(ct(V.key),we=""+V.key),gt(V)&&(tt=V.ref,rn(V,_e));for(Re in V)Ne.call(V,Re)&&!Zt.hasOwnProperty(Re)&&(Ee[Re]=V[Re]);if(x&&x.defaultProps){var Le=x.defaultProps;for(Re in Le)Ee[Re]===void 0&&(Ee[Re]=Le[Re])}if(we||tt){var Be=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(Ee,Be),tt&&he(Ee,Be)}return Ye(x,we,tt,_e,fe,je.current,Ee)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(J)}else Jt.setExtraStackFrame(null)}var yn;yn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=p(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(/^.*[\\\/]/,""),J=x.lineNumber;return`
|
|
50
50
|
|
|
51
51
|
Check your code at `+V+":"+J+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var J=typeof x=="string"?x:x.displayName||x.name;J&&(V=`
|
|
52
52
|
|
|
53
|
-
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=B(x);if(!Ee){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(_e);nt?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Le=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",Le,we)}var Be=kt(x,V,J,_e,Re);if(Be==null)return Be;if(Ee){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(Be):Nn(Be),Be}}function kn(x,V,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}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?$t.theme.colors[e.color]?$t.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}},gn=y0,b0=e=>{const{color:t,...n}=gn(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}=gn(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}=gn(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}=gn(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}=gn(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})})},os=S0,C0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=gn(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})})},I0=T0,R0=e=>{const{color:t,...n}=gn(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})})},O0=R0,P0=e=>{const{color:t,...n}=gn(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})})},A0=P0,D0=e=>{const{color:t,...n}=gn(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})})},N0=D0,k0=e=>{const{color:t,...n}=gn(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})})},M0=k0,j0=e=>{const{color:t,...n}=gn(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})})},L0=j0,F0=e=>{const{color:t,...n}=gn(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})})},V0=F0,B0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Pb,{className:"accordion-header",children:M.jsxs(Ab,{className:Ie(f0,t),...n,ref:r,children:[M.jsx(et,{className:h0,children:e}),M.jsx(si,{className:c0,size:24,color:$t.theme.colors.black})]})}));var H0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},W0=dt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Pp=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 A0;case"warning":return V0;case"success":return L0;default:return M0}})();return M.jsxs(c,{ref:s,className:Ie(W0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Yt,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:$t.theme.space[24],children:M.jsx(d,{size:24,color:H0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Pr,{gap:"$8",children:[t&&M.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Yt,{pl:"$16",pt:"$4",children:M.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:$t.theme.colors.black,size:16})})]})});Pp.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const z0=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(z0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var U0=dt({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:Ie(U0({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 Y0(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",K0="dismissableLayer.pointerDownOutside",q0="dismissableLayer.focusOutside";let Kd;const Ap=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),is=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(Ap),[f,m]=l.useState(null),h=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=st(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),E=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=E>=v,D=G0(F=>{const k=F.target,B=[...d.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},h),A=Z0(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())},h);return Y0(F=>{E===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),qd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Kd)}},[f,h,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:Ae(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),X0=l.forwardRef((e,t)=>{const n=l.useContext(Ap),r=l.useRef(null),o=st(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 G0(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(){Dp(K0,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 Z0(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&&Dp(q0,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 Dp(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?Ep(o,i):o.dispatchEvent(i)}const Q0=is,J0=X0;let Ws=0;function Np(){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},kp=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=st(t,y=>c(y)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(E){if(h.paused||!s)return;const C=E.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(E){if(h.paused||!s)return;const C=E.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(E){const C=document.activeElement;for(const I of E)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,h.paused]),l.useEffect(()=>{if(s){Qd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Gd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(ew(iw(Mp(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(h)},0)}}},[s,u,d,h]);const b=l.useCallback(y=>{if(!n&&!r||h.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[E,C]=tw(v);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,h.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function ew(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function tw(e){const t=Mp(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mp(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(!nw(n,{upTo:t}))return n}function nw(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 rw(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&&rw(e)&&t&&e.select()}}const Qd=ow();function ow(){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 iw(e){return e.filter(t=>t.tagName!=="A")}const aw=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),sw={left:"right",right:"left",bottom:"top",top:"bottom"},cw={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 mo(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Tu(e){return Cu(go(e))}function uw(e,t,n){n===void 0&&(n=!1);const r=mo(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=Ia(a)),[a,Ia(a)]}function lw(e){const t=Ia(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>cw[t])}function dw(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 fw(e,t,n,r){const o=mo(e);let i=dw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>sw[t])}function hw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jp(e){return typeof e!="number"?hw(e):{top:e,right:e,bottom:e,left:e}}function Ra(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=go(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 h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(mo(t)){case"start":h[a]-=m*(n&&u?-1:1);break;case"end":h[a]+=m*(n&&u?-1:1);break}return h}const pw=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,h={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:E,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=E??f,h={...h,[T]:{...h[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:h}};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:h=0}=Gn(t,e),b=jp(h),T=s[m?f==="floating"?"reference":"floating":f],S=Ra(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,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:E,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=jp(u),f={x:n,y:r},m=Tu(o),h=$u(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[m]-f[m]-i.floating[h],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[h]);const A=E/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),B=vr(d[S],F),R=k,w=D-b[h]-B,p=D/2-b[h]/2+A,$=Tc(R,p,w),j=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:B)-b[h]/2<0?p<R?R-p:w-p:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:p-$+j}}}}),vw=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:h="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)),E=f||(S||!b?[Ia(a)]:lw(a));!f&&h!=="none"&&E.push(...fw(a,b,h,v));const C=[a,...E],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=uw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,w=C[R];if(w)return{data:{index:R,overflows:A},reset:{placement:w}};let p=(k=A.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var B;const $=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}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 aw.some(t=>e[t]>=0)}const mw=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 gw(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=mo(n),c=go(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const yw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await gw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},bw=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=go(Zn(o)),m=Cu(f);let h=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=h+d[T],E=h-d[S];h=Tc(v,h,E)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],E=b-d[S];b=Tc(v,b,E)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},ww=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=go(o),m=Cu(f);let h=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 E=m==="y"?"height":"width",C=i.reference[m]-i.floating[E]+T.mainAxis,I=i.reference[m]+i.reference[E]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const E=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[E]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[E]+(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]:h,[f]:b}}}},Ew=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=mo(n),f=go(n)==="y",{width:m,height:h}=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=h-c[b],S=m-c[y],v=!t.middlewareData.shift;let E=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=h-c.top-c.bottom;E=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),A=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||A!==0?D+A:fn(c.left,c.right)):E=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:E});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lp(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=(Lp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lp(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}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xw(e){return["table","td","th"].includes(gr(e))}function Iu(e){const t=Ru(),n=Cn(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 _w(e){let t=lo(e);for(;Vn(t)&&!as(t);){if(Iu(t))return t;t=lo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function as(e){return["html","body","#document"].includes(gr(e))}function Cn(e){return vn(e).getComputedStyle(e)}function ss(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lo(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 Fp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Fp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=Fp(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,Oa(r))}function Vp(e){const t=Cn(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=Ta(n)!==i||Ta(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Ou(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vp(t);let a=(i?Ta(n.width):n.width)/r,s=(i?Ta(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Sw=mr(0);function Bp(e){const t=vn(e);return!Ru()||!t.visualViewport?Sw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function kr(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=ro(r)):a=ro(e));const s=Cw(i,n,r)?Bp(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),h=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&h!==m;){const y=ro(b),T=b.getBoundingClientRect(),S=Cn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,E=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=E,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function $w(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=ss(n)),Vn(n))){const u=kr(n);s=ro(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 Tw(e){return Array.from(e.getClientRects())}function Hp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function Iw(e){const t=Jn(e),n=ss(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+Hp(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Rw(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 Ow(e,t){const n=kr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?ro(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=Rw(e,n);else if(t==="document")r=Iw(Jn(e));else if(Qn(t))r=Ow(t,n);else{const o=Bp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Wp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Wp(n,t)}function Pw(e,t){const n=t.get(e);if(n)return n;let r=Oa(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?lo(e):e;for(;Qn(a)&&!as(a);){const s=Cn(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&&Wp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function Aw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pw(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 Dw(e){return Vp(e)}function Nw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=kr(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=ss(t)),r){const u=kr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hp(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)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zp(e,t){const n=vn(e);if(!Vn(e))return n;let r=sf(e,t);for(;r&&xw(r)&&Cn(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!Iu(r))?n:r||_w(e)||n}const kw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zp,i=this.getDimensions;return{reference:Nw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Mw(e){return Cn(e).direction==="rtl"}const jw={convertOffsetParentRelativeRectToViewportRelativeRect:$w,getDocumentElement:Jn,getClippingRect:Aw,getOffsetParent:zp,getElementRects:kw,getClientRects:Tw,getDimensions:Dw,getScale:ro,isElement:Qn,isRTL:Mw};function Lw(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 h=Wi(d),b=Wi(o.clientWidth-(u+f)),y=Wi(o.clientHeight-(d+m)),T=Wi(u),v={rootMargin:-h+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let E=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!E)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Fw(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?Oa(u):[],...Oa(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Lw(u,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,y=c?kr(e):null;c&&T();function T(){const S=kr(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(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const Vw=(e,t,n)=>{const r=new Map,o={platform:jw,...n},i={...o.platform,_c:r};return pw(e,t,{...o,platform:i})},Bw=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 fa=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pa(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(!Pa(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)&&!Pa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Up(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Up(e);return Math.round(t*n)/n}function uf(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function Hw(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]=$e.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=$e.useState(r);Pa(m,r)||h(r);const[b,y]=$e.useState(null),[T,S]=$e.useState(null),v=$e.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),E=$e.useCallback(j=>{j!==A.current&&(A.current=j,S(j))},[S]),C=i||b,I=a||T,D=$e.useRef(null),A=$e.useRef(null),F=$e.useRef(d),k=uf(c),B=uf(o),R=$e.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};B.current&&(j.platform=B.current),Vw(D.current,A.current,j).then(W=>{const Y={...W,isPositioned:!0};w.current&&!Pa(F.current,Y)&&(F.current=Y,Wy.flushSync(()=>{f(Y)}))})},[m,t,n,B]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const w=$e.useRef(!1);fa(()=>(w.current=!0,()=>{w.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(A.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const p=$e.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:E}),[v,E]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),P=$e.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=cf($.floating,d.x),Y=cf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+Y+"px)",...Up($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:Y}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:P}),[d,R,p,$,P])}const Ww=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"}))}),zw=Ww;function cs(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 Yp="Popper",[Kp,us]=mn(Yp),[Uw,qp]=Kp(Yp),Yw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Uw,{scope:t,anchor:r,onAnchorChange:o},n)},Kw="PopperAnchor",qw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qp(Kw,n),a=l.useRef(null),s=st(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}))}),Xp="PopperContent",[Xw,Gw]=Kp(Xp),Zw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:h="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:E=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,A=qp(Xp,d),[F,k]=l.useState(null),B=st(t,Te=>k(Te)),[R,w]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,P=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,j=f+(h!=="center"?"-"+h:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Y=Array.isArray(T)?T:[T],ne=Y.length>0,H={padding:W,boundary:Y.filter(t1),altBoundary:ne},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=Hw({strategy:"fixed",placement:j,whileElementsMounted:Fw,elements:{reference:A.anchor},middleware:[yw({mainAxis:m+P,alignmentAxis:b}),C&&bw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?ww():void 0,...H}),C&&vw({...H}),Ew({...H,apply:({elements:Te,rects:Pe,availableWidth:Ne,availableHeight:Oe})=>{const{width:We,height:De}=Pe.reference,ot=Te.floating.style;ot.setProperty("--radix-popper-available-width",`${Ne}px`),ot.setProperty("--radix-popper-available-height",`${Oe}px`),ot.setProperty("--radix-popper-anchor-width",`${We}px`),ot.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Bw({element:R,padding:y}),n1({arrowWidth:$,arrowHeight:P}),E&&mw({strategy:"referenceHidden"})]}),[ce,z]=Gp(G),U=cn(I);Gt(()=>{K&&(U==null||U())},[K,U]);const ee=(o=Z.arrow)===null||o===void 0?void 0:o.x,Q=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,me]=l.useState();return Gt(()=>{F&&me(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:K?oe.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(Xw,{scope:d,placedSide:ce,onArrowChange:w,arrowX:ee,arrowY:Q,shouldHideArrow:ie},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:B,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Qw="PopperArrow",Jw={top:"bottom",right:"left",bottom:"top",left:"right"},e1=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Gw(Qw,r),a=Jw[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(zw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function t1(e){return e!==null}const n1=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,h=f?0:e.arrowHeight,[b,y]=Gp(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)+h/2;let E="",C="";return b==="bottom"?(E=f?T:`${S}px`,C=`${-h}px`):b==="top"?(E=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(E=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(E=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:E,y:C}}}});function Gp(e){const[t,n="center"]=e.split("-");return[t,n]}const Zp=Yw,Qp=qw,Jp=Zw,r1=e1,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?hn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),o1=ev;function ls(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 ds=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}}))),i1=ds;var a1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wr=new WeakMap,zi=new WeakMap,Ui={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},s1=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})},c1=function(e,t,n,r){var o=s1(t,Array.isArray(e)?e:[e]);Ui[n]||(Ui[n]=new WeakMap);var i=Ui[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 h=m.getAttribute(r),b=h!==null&&h!=="false",y=(Wr.get(m)||0)+1,T=(i.get(m)||0)+1;Wr.set(m,y),i.set(m,T),a.push(m),y===1&&b&&zi.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=Wr.get(f)-1,h=i.get(f)-1;Wr.set(f,m),i.set(f,h),m||(zi.has(f)||f.removeAttribute(r),zi.delete(f)),h||f.removeAttribute(n)}),Ys--,Ys||(Wr=new WeakMap,Wr=new WeakMap,zi=new WeakMap,Ui={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||a1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),c1(r,o,n,"aria-hidden")):function(){return null}},xn=function(){return xn=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},xn.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 u1(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 ha="right-scroll-bar-position",pa="width-before-scroll-bar",l1="with-scroll-bars-hidden",d1="--removed-body-scroll-bar-size";function f1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function h1(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 p1(e,t){return h1(t||null,function(n){return e.forEach(function(r){return f1(r,n)})})}function v1(e){return e}function m1(e,t){t===void 0&&(t=v1);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 g1(e){e===void 0&&(e={});var t=m1(null);return t.options=xn({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 $e.createElement(r,xn({},n))};ov.isSideCarExport=!0;function y1(e,t){return e.useMedium(t),ov}var iv=g1(),Ks=function(){},fs=$e.forwardRef(function(e,t){var n=$e.useRef(null),r=$e.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,h=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"]),E=m,C=p1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(E,{sideCar:iv,removeScrollBar:u,shards:f,noIsolation:h,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?$e.cloneElement($e.Children.only(s),xn(xn({},I),{ref:C})):$e.createElement(S,xn({},I,{className:c,ref:C}),s))});fs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fs.classNames={fullWidth:pa,zeroRight:ha};var lf,b1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function w1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b1();return t&&e.setAttribute("nonce",t),e}function E1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function x1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=w1())&&(E1(t,n),x1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},S1=function(){var e=_1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=S1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},C1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},$1=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)]},T1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return C1;var t=$1(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])}},I1=av(),R1=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 <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);rt(J,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=H(x);if(!Ee){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 tt=tr(_e);tt?we+=tt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Le=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",Le,we)}var Be=kt(x,V,J,_e,Re);if(Be==null)return Be;if(Ee){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(Be):Nn(Be),Be}}function kn(x,V,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}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?$t.theme.colors[e.color]?$t.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}},gn=y0,b0=e=>{const{color:t,...n}=gn(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}=gn(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}=gn(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}=gn(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}=gn(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})})},os=S0,C0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=gn(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})})},I0=T0,R0=e=>{const{color:t,...n}=gn(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})})},O0=R0,P0=e=>{const{color:t,...n}=gn(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})})},A0=P0,D0=e=>{const{color:t,...n}=gn(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})})},N0=D0,k0=e=>{const{color:t,...n}=gn(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})})},M0=k0,j0=e=>{const{color:t,...n}=gn(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})})},L0=j0,F0=e=>{const{color:t,...n}=gn(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})})},V0=F0,B0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Pb,{className:"accordion-header",children:M.jsxs(Ab,{className:Ie(f0,t),...n,ref:r,children:[M.jsx(at,{className:h0,children:e}),M.jsx(si,{className:c0,size:24,color:$t.theme.colors.black})]})}));var H0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},W0=dt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Pp=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 A0;case"warning":return V0;case"success":return L0;default:return M0}})();return M.jsxs(c,{ref:s,className:Ie(W0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Yt,{gap:"$16",children:[M.jsx(at,{display:"flex",minW:$t.theme.space[24],children:M.jsx(d,{size:24,color:H0[o||"neutral"]})}),M.jsx(at,{pt:"$2",children:M.jsxs(Pr,{gap:"$8",children:[t&&M.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(at,{children:n})]})})]}),r&&M.jsx(Yt,{pl:"$16",pt:"$4",children:M.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:$t.theme.colors.black,size:16})})]})});Pp.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const z0=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(z0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var U0=dt({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:Ie(U0({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 Y0(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",K0="dismissableLayer.pointerDownOutside",q0="dismissableLayer.focusOutside";let Kd;const Ap=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),is=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(Ap),[f,m]=l.useState(null),h=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=st(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),E=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=E>=v,D=G0(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())},h),A=Z0(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())},h);return Y0(F=>{E===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),qd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Kd)}},[f,h,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:Ae(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),X0=l.forwardRef((e,t)=>{const n=l.useContext(Ap),r=l.useRef(null),o=st(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 G0(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(){Dp(K0,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 Z0(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&&Dp(q0,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 Dp(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?Ep(o,i):o.dispatchEvent(i)}const Q0=is,J0=X0;let Ws=0;function Np(){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},kp=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=st(t,y=>c(y)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(E){if(h.paused||!s)return;const C=E.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(E){if(h.paused||!s)return;const C=E.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(E){const C=document.activeElement;for(const I of E)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,h.paused]),l.useEffect(()=>{if(s){Qd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Gd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(ew(iw(Mp(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(h)},0)}}},[s,u,d,h]);const b=l.useCallback(y=>{if(!n&&!r||h.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[E,C]=tw(v);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,h.paused]);return l.createElement(Ue.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function ew(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function tw(e){const t=Mp(e),n=Zd(t,e),r=Zd(t.reverse(),e);return[n,r]}function Mp(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(!nw(n,{upTo:t}))return n}function nw(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 rw(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&&rw(e)&&t&&e.select()}}const Qd=ow();function ow(){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 iw(e){return e.filter(t=>t.tagName!=="A")}const aw=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),sw={left:"right",right:"left",bottom:"top",top:"bottom"},cw={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 mo(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Tu(e){return Cu(go(e))}function uw(e,t,n){n===void 0&&(n=!1);const r=mo(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=Ia(a)),[a,Ia(a)]}function lw(e){const t=Ia(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>cw[t])}function dw(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 fw(e,t,n,r){const o=mo(e);let i=dw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>sw[t])}function hw(e){return{top:0,right:0,bottom:0,left:0,...e}}function jp(e){return typeof e!="number"?hw(e):{top:e,right:e,bottom:e,left:e}}function Ra(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=go(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 h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(mo(t)){case"start":h[a]-=m*(n&&u?-1:1);break;case"end":h[a]+=m*(n&&u?-1:1);break}return h}const pw=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,h={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:E,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=E??f,h={...h,[T]:{...h[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:h}};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:h=0}=Gn(t,e),b=jp(h),T=s[m?f==="floating"?"reference":"floating":f],S=Ra(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,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:E,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=jp(u),f={x:n,y:r},m=Tu(o),h=$u(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[m]-f[m]-i.floating[h],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[h]);const A=E/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),H=vr(d[S],F),R=k,w=D-b[h]-H,p=D/2-b[h]/2+A,$=Tc(R,p,w),j=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:H)-b[h]/2<0?p<R?R-p:w-p:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:p-$+j}}}}),vw=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:h="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)),E=f||(S||!b?[Ia(a)]:lw(a));!f&&h!=="none"&&E.push(...fw(a,b,h,v));const C=[a,...E],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=uw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,w=C[R];if(w)return{data:{index:R,overflows:A},reset:{placement:w}};let p=(k=A.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var H;const $=(H=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:H[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}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 aw.some(t=>e[t]>=0)}const mw=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 gw(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=mo(n),c=go(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const yw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await gw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},bw=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=go(Zn(o)),m=Cu(f);let h=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=h+d[T],E=h-d[S];h=Tc(v,h,E)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],E=b-d[S];b=Tc(v,b,E)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},ww=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=go(o),m=Cu(f);let h=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 E=m==="y"?"height":"width",C=i.reference[m]-i.floating[E]+T.mainAxis,I=i.reference[m]+i.reference[E]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const E=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[E]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[E]+(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]:h,[f]:b}}}},Ew=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=mo(n),f=go(n)==="y",{width:m,height:h}=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=h-c[b],S=m-c[y],v=!t.middlewareData.shift;let E=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=h-c.top-c.bottom;E=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),A=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||A!==0?D+A:fn(c.left,c.right)):E=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:E});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lp(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=(Lp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lp(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}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xw(e){return["table","td","th"].includes(gr(e))}function Iu(e){const t=Ru(),n=Cn(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 _w(e){let t=lo(e);for(;Vn(t)&&!as(t);){if(Iu(t))return t;t=lo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function as(e){return["html","body","#document"].includes(gr(e))}function Cn(e){return vn(e).getComputedStyle(e)}function ss(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lo(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 Fp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Fp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=Fp(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,Oa(r))}function Vp(e){const t=Cn(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=Ta(n)!==i||Ta(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Ou(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vp(t);let a=(i?Ta(n.width):n.width)/r,s=(i?Ta(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Sw=mr(0);function Bp(e){const t=vn(e);return!Ru()||!t.visualViewport?Sw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function kr(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=ro(r)):a=ro(e));const s=Cw(i,n,r)?Bp(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),h=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&h!==m;){const y=ro(b),T=b.getBoundingClientRect(),S=Cn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,E=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=E,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function $w(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=ss(n)),Vn(n))){const u=kr(n);s=ro(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 Tw(e){return Array.from(e.getClientRects())}function Hp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function Iw(e){const t=Jn(e),n=ss(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+Hp(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Rw(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 Ow(e,t){const n=kr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?ro(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=Rw(e,n);else if(t==="document")r=Iw(Jn(e));else if(Qn(t))r=Ow(t,n);else{const o=Bp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Wp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Wp(n,t)}function Pw(e,t){const n=t.get(e);if(n)return n;let r=Oa(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?lo(e):e;for(;Qn(a)&&!as(a);){const s=Cn(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&&Wp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function Aw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Pw(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 Dw(e){return Vp(e)}function Nw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=kr(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=ss(t)),r){const u=kr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hp(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)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zp(e,t){const n=vn(e);if(!Vn(e))return n;let r=sf(e,t);for(;r&&xw(r)&&Cn(r).position==="static";)r=sf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!Iu(r))?n:r||_w(e)||n}const kw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zp,i=this.getDimensions;return{reference:Nw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Mw(e){return Cn(e).direction==="rtl"}const jw={convertOffsetParentRelativeRectToViewportRelativeRect:$w,getDocumentElement:Jn,getClippingRect:Aw,getOffsetParent:zp,getElementRects:kw,getClientRects:Tw,getDimensions:Dw,getScale:ro,isElement:Qn,isRTL:Mw};function Lw(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 h=Wi(d),b=Wi(o.clientWidth-(u+f)),y=Wi(o.clientHeight-(d+m)),T=Wi(u),v={rootMargin:-h+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let E=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!E)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Fw(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?Oa(u):[],...Oa(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Lw(u,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,y=c?kr(e):null;c&&T();function T(){const S=kr(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(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const Vw=(e,t,n)=>{const r=new Map,o={platform:jw,...n},i={...o.platform,_c:r};return pw(e,t,{...o,platform:i})},Bw=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 fa=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pa(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(!Pa(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)&&!Pa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Up(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cf(e,t){const n=Up(e);return Math.round(t*n)/n}function uf(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function Hw(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]=$e.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=$e.useState(r);Pa(m,r)||h(r);const[b,y]=$e.useState(null),[T,S]=$e.useState(null),v=$e.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),E=$e.useCallback(j=>{j!==A.current&&(A.current=j,S(j))},[S]),C=i||b,I=a||T,D=$e.useRef(null),A=$e.useRef(null),F=$e.useRef(d),k=uf(c),H=uf(o),R=$e.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};H.current&&(j.platform=H.current),Vw(D.current,A.current,j).then(W=>{const Y={...W,isPositioned:!0};w.current&&!Pa(F.current,Y)&&(F.current=Y,Wy.flushSync(()=>{f(Y)}))})},[m,t,n,H]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const w=$e.useRef(!1);fa(()=>(w.current=!0,()=>{w.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(A.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const p=$e.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:E}),[v,E]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),P=$e.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=cf($.floating,d.x),Y=cf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+Y+"px)",...Up($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:Y}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:P}),[d,R,p,$,P])}const Ww=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"}))}),zw=Ww;function cs(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 Yp="Popper",[Kp,us]=mn(Yp),[Uw,qp]=Kp(Yp),Yw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Uw,{scope:t,anchor:r,onAnchorChange:o},n)},Kw="PopperAnchor",qw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qp(Kw,n),a=l.useRef(null),s=st(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}))}),Xp="PopperContent",[Xw,Gw]=Kp(Xp),Zw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:h="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:E=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,A=qp(Xp,d),[F,k]=l.useState(null),H=st(t,Te=>k(Te)),[R,w]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,P=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,j=f+(h!=="center"?"-"+h:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Y=Array.isArray(T)?T:[T],ne=Y.length>0,B={padding:W,boundary:Y.filter(t1),altBoundary:ne},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=Hw({strategy:"fixed",placement:j,whileElementsMounted:Fw,elements:{reference:A.anchor},middleware:[yw({mainAxis:m+P,alignmentAxis:b}),C&&bw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?ww():void 0,...B}),C&&vw({...B}),Ew({...B,apply:({elements:Te,rects:Pe,availableWidth:Ne,availableHeight:Oe})=>{const{width:We,height:De}=Pe.reference,rt=Te.floating.style;rt.setProperty("--radix-popper-available-width",`${Ne}px`),rt.setProperty("--radix-popper-available-height",`${Oe}px`),rt.setProperty("--radix-popper-anchor-width",`${We}px`),rt.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Bw({element:R,padding:y}),n1({arrowWidth:$,arrowHeight:P}),E&&mw({strategy:"referenceHidden"})]}),[ce,z]=Gp(G),U=cn(I);Gt(()=>{K&&(U==null||U())},[K,U]);const ee=(o=Z.arrow)===null||o===void 0?void 0:o.x,Q=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,me]=l.useState();return Gt(()=>{F&&me(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:K?oe.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(Xw,{scope:d,placedSide:ce,onArrowChange:w,arrowX:ee,arrowY:Q,shouldHideArrow:ie},l.createElement(Ue.div,ae({"data-side":ce,"data-align":z},D,{ref:H,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Qw="PopperArrow",Jw={top:"bottom",right:"left",bottom:"top",left:"right"},e1=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Gw(Qw,r),a=Jw[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(zw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function t1(e){return e!==null}const n1=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,h=f?0:e.arrowHeight,[b,y]=Gp(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)+h/2;let E="",C="";return b==="bottom"?(E=f?T:`${S}px`,C=`${-h}px`):b==="top"?(E=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(E=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(E=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:E,y:C}}}});function Gp(e){const[t,n="center"]=e.split("-");return[t,n]}const Zp=Yw,Qp=qw,Jp=Zw,r1=e1,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?hn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),o1=ev;function ls(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 ds=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}}))),i1=ds;var a1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wr=new WeakMap,zi=new WeakMap,Ui={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},s1=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})},c1=function(e,t,n,r){var o=s1(t,Array.isArray(e)?e:[e]);Ui[n]||(Ui[n]=new WeakMap);var i=Ui[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 h=m.getAttribute(r),b=h!==null&&h!=="false",y=(Wr.get(m)||0)+1,T=(i.get(m)||0)+1;Wr.set(m,y),i.set(m,T),a.push(m),y===1&&b&&zi.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=Wr.get(f)-1,h=i.get(f)-1;Wr.set(f,m),i.set(f,h),m||(zi.has(f)||f.removeAttribute(r),zi.delete(f)),h||f.removeAttribute(n)}),Ys--,Ys||(Wr=new WeakMap,Wr=new WeakMap,zi=new WeakMap,Ui={})}},nv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||a1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),c1(r,o,n,"aria-hidden")):function(){return null}},xn=function(){return xn=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},xn.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 u1(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 ha="right-scroll-bar-position",pa="width-before-scroll-bar",l1="with-scroll-bars-hidden",d1="--removed-body-scroll-bar-size";function f1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function h1(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 p1(e,t){return h1(t||null,function(n){return e.forEach(function(r){return f1(r,n)})})}function v1(e){return e}function m1(e,t){t===void 0&&(t=v1);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 g1(e){e===void 0&&(e={});var t=m1(null);return t.options=xn({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 $e.createElement(r,xn({},n))};ov.isSideCarExport=!0;function y1(e,t){return e.useMedium(t),ov}var iv=g1(),Ks=function(){},fs=$e.forwardRef(function(e,t){var n=$e.useRef(null),r=$e.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,h=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"]),E=m,C=p1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(E,{sideCar:iv,removeScrollBar:u,shards:f,noIsolation:h,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?$e.cloneElement($e.Children.only(s),xn(xn({},I),{ref:C})):$e.createElement(S,xn({},I,{className:c,ref:C}),s))});fs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fs.classNames={fullWidth:pa,zeroRight:ha};var lf,b1=function(){if(lf)return lf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function w1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b1();return t&&e.setAttribute("nonce",t),e}function E1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function x1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=w1())&&(E1(t,n),x1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},S1=function(){var e=_1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=function(){var e=S1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},C1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},$1=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)]},T1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return C1;var t=$1(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])}},I1=av(),R1=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(l1,` {
|
|
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 <`+J+">.")}return V}}function Ht(x,V){{if(
|
|
|
90
90
|
`)},O1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=$e.useMemo(function(){return T1(o)},[o]);return $e.createElement(I1,{styles:R1(i,!t,o,n?"":"!important")})},Rc=!1;if(typeof window<"u")try{var Yi=Object.defineProperty({},"passive",{get:function(){return Rc=!0,!0}});window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Rc=!1}var zr=Rc?{passive:!1}:!1,P1=function(e){return e.tagName==="TEXTAREA"},sv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!P1(e)&&n[t]==="visible")},A1=function(e){return sv(e,"overflowY")},D1=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},N1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},k1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cv=function(e,t){return e==="v"?A1(t):D1(t)},uv=function(e,t){return e==="v"?N1(t):k1(t)},M1=function(e,t){return e==="h"&&t==="rtl"?-1:1},j1=function(e,t,n,r,o){var i=M1(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 h=uv(e,s),b=h[0],y=h[1],T=h[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},Ki=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ff=function(e){return[e.deltaX,e.deltaY]},hf=function(e){return e&&"current"in e?e.current:e},L1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F1=function(e){return`
|
|
91
91
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
92
92
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
93
|
-
`)},V1=0,Ur=[];function B1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(V1++)[0],i=$e.useState(function(){return av()})[0],a=$e.useRef(e);$e.useEffect(function(){a.current=e},[e]),$e.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=u1([e.lockRef.current],(e.shards||[]).map(hf),!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=$e.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Ki(y),v=n.current,E="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,A=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=df(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=df(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(E||C)&&(r.current=I),!I)return!0;var k=r.current||I;return j1(k,T,y,k==="h"?E:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?ff(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&L1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var E=(a.current.shards||[]).map(hf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=E.length>0?s(T,E[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var E={name:y,delta:T,target:S,should:v};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=$e.useCallback(function(y){u(y.type,Ki(y),y.target,s(y,e.lockRef.current))},[]);$e.useEffect(function(){return Ur.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",d,zr),function(){Ur=Ur.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",d,zr)}},[]);var h=e.removeScrollBar,b=e.inert;return $e.createElement($e.Fragment,null,b?$e.createElement(i,{styles:F1(o)}):null,h?$e.createElement(O1,{gapMode:"margin"}):null)}const H1=y1(iv,B1);var lv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:H1}))});lv.classNames=fs.classNames;const dv=lv,W1=[" ","Enter","ArrowUp","ArrowDown"],z1=[" ","Enter"],hs="Select",[ps,vs,U1]=Ja(hs),[yo,OP]=mn(hs,[U1,us]),Pu=us(),[Y1,Vr]=yo(hs),[K1,q1]=yo(hs),X1=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:h}=e,b=Pu(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[E,C]=l.useState(!1),I=es(u),[D=!1,A]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[w,p]=l.useState(new Set),$=Array.from(w).map(P=>P.props.value).join(";");return l.createElement(Zp,b,l.createElement(Y1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:B,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(K1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{p(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{p(j=>{const W=new Set(j);return W.delete(P),W})},[])},n)),R?l.createElement(pv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(w)):null))},G1="SelectTrigger",Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Vr(G1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(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)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qp,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:Ae(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ae(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(h(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ae(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&W1.includes(b.key)&&(h(),b.preventDefault())})})))}),Q1="SelectValue",J1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(Q1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=st(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)}),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),fo="SelectContent",tE=l.forwardRef((e,t)=>{const n=Vr(fo,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?hn.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(nE,ae({},e,{ref:t}))}),Yn=10,[fv,Br]=yo(fo),nE=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:h,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Vr(fo,n),[E,C]=l.useState(null),[I,D]=l.useState(null),A=st(t,z=>C(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),w=vs(n),[p,$]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(E)return nv(E)},[E]),Np();const j=l.useCallback(z=>{const[U,...ee]=w().map(re=>re.ref.current),[Q]=ee.slice(-1),ie=document.activeElement;for(const re of z)if(re===ie||(re==null||re.scrollIntoView({block:"nearest"}),re===U&&I&&(I.scrollTop=0),re===Q&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==ie))return},[w,I]),W=l.useCallback(()=>j([F,E]),[j,F,E]);l.useEffect(()=>{p&&W()},[p,W]);const{onOpenChange:Y,triggerPointerDownPosRef:ne}=v;l.useEffect(()=>{if(E){let z={x:0,y:0};const U=Q=>{var ie,re,me,Te;z={x:Math.abs(Math.round(Q.pageX)-((ie=(re=ne.current)===null||re===void 0?void 0:re.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(Q.pageY)-((me=(Te=ne.current)===null||Te===void 0?void 0:Te.y)!==null&&me!==void 0?me:0))}},ee=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():E.contains(Q.target)||Y(!1),document.removeEventListener("pointermove",U),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[E,Y,ne]),l.useEffect(()=>{const z=()=>Y(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[Y]);const[H,L]=vv(z=>{const U=w().filter(ie=>!ie.disabled),ee=U.find(ie=>ie.ref.current===document.activeElement),Q=mv(U,z,ee);Q&&setTimeout(()=>Q.ref.current.focus())}),oe=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&(k(z),Q&&(P.current=!0))},[v.value]),G=l.useCallback(()=>E==null?void 0:E.focus(),[E]),K=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&R(z)},[v.value]),Z=r==="popper"?pf:rE,ce=Z===pf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(fv,{scope:n,content:E,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:W,selectedItemText:B,position:r,isPositioned:p,searchRef:H},l.createElement(dv,{as:uo,allowPinchZoom:!0},l.createElement(kp,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ae(o,z=>{var U;(U=v.trigger)===null||U===void 0||U.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(is,{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:A,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,z=>{const U=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!U&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,re=Q.indexOf(ie);Q=Q.slice(re+1)}setTimeout(()=>j(Q)),z.preventDefault()}})}))))))}),rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Vr(fo,n),a=Br(fo,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=st(t,A=>d(A)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,E=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,re=k.left-ie,me=A.left-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Yd(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.left=Oe+"px"}else{const ie=F.right-B.right,re=window.innerWidth-k.right-ie,me=window.innerWidth-A.right-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Yd(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.right=Oe+"px"}const R=m(),w=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),P=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),ne=P+j+p+Y+W,H=Math.min(T.offsetHeight*5,ne),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Yn,Z=w-K,ce=T.offsetHeight/2,z=T.offsetTop+ce,U=P+j+z,ee=ne-U;if(U<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,me=Math.max(Z,ce+(ie?G:0)+re+W),Te=U+me;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const me=Math.max(K,P+y.offsetTop+(ie?oe:0)+ce)+ee;s.style.height=me+"px",y.scrollTop=U-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=w+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>E(),[E]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(E(),v==null||v(),b.current=!1)},[E,v]);return l.createElement(oE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,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}}))))}),pf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Pu(n);return l.createElement(Jp,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)"}}))}),[oE,Au]=yo(fo,{}),vf="SelectViewport",iE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(vf,n),i=Au(vf,n),a=st(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:Ae(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 h=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<h){const S=T+m,v=Math.min(h,S),E=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),aE="SelectGroup";yo(aE);const Oc="SelectItem",[sE,cE]=yo(Oc),uE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Oc,n),c=Br(Oc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,h]=l.useState(!1),b=st(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(sE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var E;return v||((E=S==null?void 0:S.textContent)!==null&&E!==void 0?E:"").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:Ae(a.onFocus,()=>h(!0)),onBlur:Ae(a.onBlur,()=>h(!1)),onPointerUp:Ae(a.onPointerUp,T),onPointerMove:Ae(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ae(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(z1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",lE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=cE(qi,n),u=q1(qi,n),[d,f]=l.useState(null),m=st(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)}),h=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{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?hn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",dE=l.forwardRef((e,t)=>{const n=Br(mf,e.__scopeSelect),r=Au(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(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(hv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",fE=l.forwardRef((e,t)=>{const n=Br(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(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(hv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),hv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Br("SelectScrollButton",n),a=l.useRef(null),s=vs(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:Ae(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ae(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ae(o.onPointerLeave,()=>{c()})}))}),pv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=st(t,o),a=ls(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(ds,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});pv.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=hE(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 hE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const pE=X1,vE=Z1,mE=J1,gE=eE,yE=tE,bE=iE,wE=uE,EE=lE,xE=dE,_E=fE;var SE=dt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var CE=dt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var $E=dt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),TE="_1kg30950";var IE="ldkv8w2",RE="ldkv8w1",OE="ldkv8w0",PE="ldkv8w3";var AE="yihd6a0",DE=dt({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"]]}),NE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Ie(SE({state:e,place:t})),children:M.jsx(sn,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",bo=({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:h})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,E=!!r,C=!!i,I=!!a,D=!!s,A=Du({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Ie(TE),onClick:h,children:[M.jsx("div",{className:Ie($E({state:A}),f),children:M.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),C&&i,M.jsx("div",{className:Ie(AE,m),children:e}),I&&a,E&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(S||D)&&M.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(sn,{textStyle:"caption",children:n}):n]})]})};bo.displayName="Field";bo.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 an(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:{}},Xi={exports:{}},ht={};/** @license React v16.13.1
|
|
93
|
+
`)},V1=0,Ur=[];function B1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(V1++)[0],i=$e.useState(function(){return av()})[0],a=$e.useRef(e);$e.useEffect(function(){a.current=e},[e]),$e.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=u1([e.lockRef.current],(e.shards||[]).map(hf),!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=$e.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Ki(y),v=n.current,E="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,A=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=df(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=df(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(E||C)&&(r.current=I),!I)return!0;var k=r.current||I;return j1(k,T,y,k==="h"?E:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?ff(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&L1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var E=(a.current.shards||[]).map(hf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=E.length>0?s(T,E[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var E={name:y,delta:T,target:S,should:v};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,ff(y),y.target,s(y,e.lockRef.current))},[]),m=$e.useCallback(function(y){u(y.type,Ki(y),y.target,s(y,e.lockRef.current))},[]);$e.useEffect(function(){return Ur.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",d,zr),function(){Ur=Ur.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",d,zr)}},[]);var h=e.removeScrollBar,b=e.inert;return $e.createElement($e.Fragment,null,b?$e.createElement(i,{styles:F1(o)}):null,h?$e.createElement(O1,{gapMode:"margin"}):null)}const H1=y1(iv,B1);var lv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:H1}))});lv.classNames=fs.classNames;const dv=lv,W1=[" ","Enter","ArrowUp","ArrowDown"],z1=[" ","Enter"],hs="Select",[ps,vs,U1]=Ja(hs),[yo,OP]=mn(hs,[U1,us]),Pu=us(),[Y1,Vr]=yo(hs),[K1,q1]=yo(hs),X1=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:h}=e,b=Pu(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[E,C]=l.useState(!1),I=es(u),[D=!1,A]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),H=l.useRef(null),R=y?!!y.closest("form"):!0,[w,p]=l.useState(new Set),$=Array.from(w).map(P=>P.props.value).join(";");return l.createElement(Zp,b,l.createElement(Y1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:H,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(K1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{p(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{p(j=>{const W=new Set(j);return W.delete(P),W})},[])},n)),R?l.createElement(pv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(w)):null))},G1="SelectTrigger",Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Vr(G1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(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)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qp,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:Ae(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ae(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(h(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ae(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&W1.includes(b.key)&&(h(),b.preventDefault())})})))}),Q1="SelectValue",J1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(Q1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=st(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)}),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),fo="SelectContent",tE=l.forwardRef((e,t)=>{const n=Vr(fo,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?hn.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(nE,ae({},e,{ref:t}))}),Yn=10,[fv,Br]=yo(fo),nE=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:h,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Vr(fo,n),[E,C]=l.useState(null),[I,D]=l.useState(null),A=st(t,z=>C(z)),[F,k]=l.useState(null),[H,R]=l.useState(null),w=vs(n),[p,$]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(E)return nv(E)},[E]),Np();const j=l.useCallback(z=>{const[U,...ee]=w().map(re=>re.ref.current),[Q]=ee.slice(-1),ie=document.activeElement;for(const re of z)if(re===ie||(re==null||re.scrollIntoView({block:"nearest"}),re===U&&I&&(I.scrollTop=0),re===Q&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==ie))return},[w,I]),W=l.useCallback(()=>j([F,E]),[j,F,E]);l.useEffect(()=>{p&&W()},[p,W]);const{onOpenChange:Y,triggerPointerDownPosRef:ne}=v;l.useEffect(()=>{if(E){let z={x:0,y:0};const U=Q=>{var ie,re,me,Te;z={x:Math.abs(Math.round(Q.pageX)-((ie=(re=ne.current)===null||re===void 0?void 0:re.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(Q.pageY)-((me=(Te=ne.current)===null||Te===void 0?void 0:Te.y)!==null&&me!==void 0?me:0))}},ee=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():E.contains(Q.target)||Y(!1),document.removeEventListener("pointermove",U),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[E,Y,ne]),l.useEffect(()=>{const z=()=>Y(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[Y]);const[B,L]=vv(z=>{const U=w().filter(ie=>!ie.disabled),ee=U.find(ie=>ie.ref.current===document.activeElement),Q=mv(U,z,ee);Q&&setTimeout(()=>Q.ref.current.focus())}),oe=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&(k(z),Q&&(P.current=!0))},[v.value]),G=l.useCallback(()=>E==null?void 0:E.focus(),[E]),K=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&R(z)},[v.value]),Z=r==="popper"?pf:rE,ce=Z===pf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(fv,{scope:n,content:E,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:W,selectedItemText:H,position:r,isPositioned:p,searchRef:B},l.createElement(dv,{as:uo,allowPinchZoom:!0},l.createElement(kp,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ae(o,z=>{var U;(U=v.trigger)===null||U===void 0||U.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(is,{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:A,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,z=>{const U=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!U&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,re=Q.indexOf(ie);Q=Q.slice(re+1)}setTimeout(()=>j(Q)),z.preventDefault()}})}))))))}),rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Vr(fo,n),a=Br(fo,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=st(t,A=>d(A)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,E=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=H.left-F.left,re=k.left-ie,me=A.left-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Yd(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.left=Oe+"px"}else{const ie=F.right-H.right,re=window.innerWidth-k.right-ie,me=window.innerWidth-A.right-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Yd(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.right=Oe+"px"}const R=m(),w=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),P=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),ne=P+j+p+Y+W,B=Math.min(T.offsetHeight*5,ne),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Yn,Z=w-K,ce=T.offsetHeight/2,z=T.offsetTop+ce,U=P+j+z,ee=ne-U;if(U<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,me=Math.max(Z,ce+(ie?G:0)+re+W),Te=U+me;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const me=Math.max(K,P+y.offsetTop+(ie?oe:0)+ce)+ee;s.style.height=me+"px",y.scrollTop=U-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=w+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>E(),[E]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(E(),v==null||v(),b.current=!1)},[E,v]);return l.createElement(oE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,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}}))))}),pf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Pu(n);return l.createElement(Jp,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)"}}))}),[oE,Au]=yo(fo,{}),vf="SelectViewport",iE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(vf,n),i=Au(vf,n),a=st(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:Ae(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 h=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<h){const S=T+m,v=Math.min(h,S),E=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),aE="SelectGroup";yo(aE);const Oc="SelectItem",[sE,cE]=yo(Oc),uE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Oc,n),c=Br(Oc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,h]=l.useState(!1),b=st(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(sE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var E;return v||((E=S==null?void 0:S.textContent)!==null&&E!==void 0?E:"").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:Ae(a.onFocus,()=>h(!0)),onBlur:Ae(a.onBlur,()=>h(!1)),onPointerUp:Ae(a.onPointerUp,T),onPointerMove:Ae(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ae(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(z1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",lE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=cE(qi,n),u=q1(qi,n),[d,f]=l.useState(null),m=st(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)}),h=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{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?hn.createPortal(i.children,a.valueNode):null)}),mf="SelectScrollUpButton",dE=l.forwardRef((e,t)=>{const n=Br(mf,e.__scopeSelect),r=Au(mf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(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(hv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),gf="SelectScrollDownButton",fE=l.forwardRef((e,t)=>{const n=Br(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(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(hv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),hv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Br("SelectScrollButton",n),a=l.useRef(null),s=vs(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:Ae(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ae(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ae(o.onPointerLeave,()=>{c()})}))}),pv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=st(t,o),a=ls(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(ds,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});pv.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=hE(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 hE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const pE=X1,vE=Z1,mE=J1,gE=eE,yE=tE,bE=iE,wE=uE,EE=lE,xE=dE,_E=fE;var SE=dt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var CE=dt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var $E=dt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),TE="_1kg30950";var IE="ldkv8w2",RE="ldkv8w1",OE="ldkv8w0",PE="ldkv8w3";var AE="yihd6a0",DE=dt({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"]]}),NE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Ie(SE({state:e,place:t})),children:M.jsx(sn,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",bo=({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:h})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,E=!!r,C=!!i,I=!!a,D=!!s,A=Du({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Ie(TE),onClick:h,children:[M.jsx("div",{className:Ie($E({state:A}),f),children:M.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),C&&i,M.jsx("div",{className:Ie(AE,m),children:e}),I&&a,E&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(S||D)&&M.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(sn,{textStyle:"caption",children:n}):n]})]})};bo.displayName="Field";bo.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 an(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:{}},Xi={exports:{}},ht={};/** @license React v16.13.1
|
|
94
94
|
* react-is.production.min.js
|
|
95
95
|
*
|
|
96
96
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -104,12 +104,12 @@ Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(
|
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/var bf;function ME(){return bf||(bf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function E(re){return typeof re=="string"||typeof re=="function"||re===r||re===u||re===i||re===o||re===f||re===m||typeof re=="object"&&re!==null&&(re.$$typeof===b||re.$$typeof===h||re.$$typeof===a||re.$$typeof===s||re.$$typeof===d||re.$$typeof===T||re.$$typeof===S||re.$$typeof===v||re.$$typeof===y)}function C(re){if(typeof re=="object"&&re!==null){var me=re.$$typeof;switch(me){case t:var Te=re.type;switch(Te){case c:case u:case r:case i:case o:case f:return Te;default:var Pe=Te&&Te.$$typeof;switch(Pe){case s:case d:case b:case h:case a:return Pe;default:return me}}case n:return me}}}var I=c,D=u,A=s,F=a,k=t,
|
|
107
|
+
*/var bf;function ME(){return bf||(bf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function E(re){return typeof re=="string"||typeof re=="function"||re===r||re===u||re===i||re===o||re===f||re===m||typeof re=="object"&&re!==null&&(re.$$typeof===b||re.$$typeof===h||re.$$typeof===a||re.$$typeof===s||re.$$typeof===d||re.$$typeof===T||re.$$typeof===S||re.$$typeof===v||re.$$typeof===y)}function C(re){if(typeof re=="object"&&re!==null){var me=re.$$typeof;switch(me){case t:var Te=re.type;switch(Te){case c:case u:case r:case i:case o:case f:return Te;default:var Pe=Te&&Te.$$typeof;switch(Pe){case s:case d:case b:case h:case a:return Pe;default:return me}}case n:return me}}}var I=c,D=u,A=s,F=a,k=t,H=d,R=r,w=b,p=h,$=n,P=i,j=o,W=f,Y=!1;function ne(re){return Y||(Y=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(re)||C(re)===c}function B(re){return C(re)===u}function L(re){return C(re)===s}function oe(re){return C(re)===a}function G(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function K(re){return C(re)===d}function Z(re){return C(re)===r}function ce(re){return C(re)===b}function z(re){return C(re)===h}function U(re){return C(re)===n}function ee(re){return C(re)===i}function Q(re){return C(re)===o}function ie(re){return C(re)===f}pt.AsyncMode=I,pt.ConcurrentMode=D,pt.ContextConsumer=A,pt.ContextProvider=F,pt.Element=k,pt.ForwardRef=H,pt.Fragment=R,pt.Lazy=w,pt.Memo=p,pt.Portal=$,pt.Profiler=P,pt.StrictMode=j,pt.Suspense=W,pt.isAsyncMode=ne,pt.isConcurrentMode=B,pt.isContextConsumer=L,pt.isContextProvider=oe,pt.isElement=G,pt.isForwardRef=K,pt.isFragment=Z,pt.isLazy=ce,pt.isMemo=z,pt.isPortal=U,pt.isProfiler=ee,pt.isStrictMode=Q,pt.isSuspense=ie,pt.isValidElementType=E,pt.typeOf=C}()),pt}var wf;function gv(){return wf||(wf=1,process.env.NODE_ENV==="production"?Xi.exports=kE():Xi.exports=ME()),Xi.exports}/*
|
|
108
108
|
object-assign
|
|
109
109
|
(c) Sindre Sorhus
|
|
110
110
|
@license MIT
|
|
111
|
-
*/var Xs,Ef;function jE(){if(Ef)return Xs;Ef=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xs=o()?Object.assign:function(i,a){for(var s,c=r(i),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){u=e(s);for(var m=0;m<u.length;m++)n.call(s,u[m])&&(c[u[m]]=s[u[m]])}}return c},Xs}var Gs,xf;function ku(){if(xf)return Gs;xf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gs=e,Gs}var Zs,_f;function yv(){return _f||(_f=1,Zs=Function.call.bind(Object.prototype.hasOwnProperty)),Zs}var Qs,Sf;function LE(){if(Sf)return Qs;Sf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ku(),n={},r=yv();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var m=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=i[d](a,d,c,s,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qs=o,Qs}var Js,Cf;function FE(){if(Cf)return Js;Cf=1;var e=gv(),t=jE(),n=ku(),r=yv(),o=LE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Js=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(
|
|
112
|
-
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var re=ie(z,Q,K,Z,ce+"."+Q,n);if(re)return re}return null}return T(L)}function $(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every($);if(H===null||s(H))return!0;var L=f(H);if(L){var oe=L.call(H),G;if(L!==H.entries){for(;!(G=oe.next()).done;)if(!$(G.value))return!1}else for(;!(G=oe.next()).done;){var K=G.value;if(K&&!$(K[1]))return!1}}else return!1;return!0;default:return!1}}function P(H,L){return H==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function j(H){var L=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":P(L,H)?"symbol":L}function W(H){if(typeof H>"u"||H===null)return""+H;var L=j(H);if(L==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return L}function Y(H){var L=W(H);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ne(H){return!H.constructor||!H.constructor.name?m:H.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,$f;function VE(){if($f)return ec;$f=1;var e=ku();function t(){}function n(){}return n.resetWarningCache=t,ec=function(){function r(a,s,c,u,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ec}if(process.env.NODE_ENV!=="production"){var BE=gv(),HE=!0;Dc.exports=FE()(BE.isElement,HE)}else Dc.exports=VE()();var WE=Dc.exports;const X=yp(WE);function zE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function UE(e,t){e.classList?e.classList.add(t):zE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Tf(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function YE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Tf(e.className,t):e.setAttribute("class",Tf(e.className&&e.className.baseVal||"",t))}const If={disabled:!1};var KE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,qE=process.env.NODE_ENV!=="production"?X.oneOfType([X.string,X.shape({enter:X.string,exit:X.string,active:X.string}),X.shape({enter:X.string,enterDone:X.string,enterActive:X.string,exit:X.string,exitDone:X.string,exitActive:X.string})]):null;const bv=l.createContext(null);var wv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Nc="exiting",er=function(e){Nu(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Cr,i.appearStatus=$r):c=Jr:r.unmountOnExit||r.mountOnEnter?c=jo:c=Cr,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===jo?{status:Cr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==$r&&a!==Jr&&(i=$r):(a===$r||a===Jr)&&(i=Nc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===$r){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this);a&&wv(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cr&&this.setState({status:jo})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[hn.findDOMNode(this),s],u=c[0],d=c[1],f=this.getTimeouts(),m=s?f.appear:f.enter;if(!o&&!a||If.disabled){this.safeSetState({status:Jr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:$r},function(){i.props.onEntering(u,d),i.onTransitionEnd(m,function(){i.safeSetState({status:Jr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:hn.findDOMNode(this);if(!i||If.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Nc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Cr},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===jo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=an(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(bv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=bv;er.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:X.shape({current:typeof Element>"u"?X.any:function(e,t,n,r,o,i){var a=e[t];return X.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:X.oneOfType([X.func.isRequired,X.element.isRequired]).isRequired,in:X.bool,mountOnEnter:X.bool,unmountOnExit:X.bool,appear:X.bool,enter:X.bool,exit:X.bool,timeout:function(t){var n=KE;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:X.func,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}:{};function Yr(){}er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yr,onEntering:Yr,onEntered:Yr,onExit:Yr,onExiting:Yr,onExited:Yr};er.UNMOUNTED=jo;er.EXITED=Cr;er.ENTERING=$r;er.ENTERED=Jr;er.EXITING=Nc;const Ev=er;var XE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return UE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return YE(t,r)})},Mu=function(e){Nu(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,u=typeof c=="string",d=u&&c?c+"-":"",f=u?""+d+s:c[s],m=u?f+"-active":c[s+"Active"],h=u?f+"-done":c[s+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&wv(o),s&&(this.appliedClasses[i][a]=s,XE(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,u=a.done;this.appliedClasses[i]={},s&&tc(o,s),c&&tc(o,c),u&&tc(o,u)},n.render=function(){var o=this.props;o.classNames;var i=an(o,["classNames"]);return l.createElement(Ev,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);Mu.defaultProps={classNames:""};Mu.propTypes=process.env.NODE_ENV!=="production"?ae({},Ev.propTypes,{classNames:qE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const GE=Mu;function Rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=dt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const ZE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return M.jsx(GE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Ie(Gi({animate:"in"})),enterDone:Ie(Gi({animate:"in"})),exit:Ie(Gi({animate:"out"})),exitDone:Ie(Gi({animate:"out"}))},children:M.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),xv=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return xv(()=>{r(!0)}),n?M.jsx(o1,{...t,children:e}):null};var QE="_185nehu0",JE=dt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const ex=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(wE,{...n,ref:r,className:Ie(QE),children:M.jsx(EE,{children:e})})),ju=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>M.jsx(bo,{children:M.jsxs(pE,{...r,children:[M.jsxs(vE,{ref:o,className:Ie(JE()),"data-test-id":r["data-test-id"],children:[M.jsx(mE,{placeholder:n}),M.jsx(gE,{className:"SelectIcon",children:M.jsx(si,{})})]}),M.jsx(ms,{children:M.jsxs(yE,{position:t,style:{overflow:"hidden",backgroundColor:"white",borderRadius:" 6px",width:"100%",boxShadow:" 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},children:[M.jsx(xE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:M.jsx(xu,{height:15,width:15})}),M.jsx(bE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>M.jsx(ex,{value:a,children:i},a))}),M.jsx(_E,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:M.jsx(si,{height:15,width:15})})]})})]})}));ju.displayName="BaseSelect";ju.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};/**
|
|
111
|
+
*/var Xs,Ef;function jE(){if(Ef)return Xs;Ef=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xs=o()?Object.assign:function(i,a){for(var s,c=r(i),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){u=e(s);for(var m=0;m<u.length;m++)n.call(s,u[m])&&(c[u[m]]=s[u[m]])}}return c},Xs}var Gs,xf;function ku(){if(xf)return Gs;xf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gs=e,Gs}var Zs,_f;function yv(){return _f||(_f=1,Zs=Function.call.bind(Object.prototype.hasOwnProperty)),Zs}var Qs,Sf;function LE(){if(Sf)return Qs;Sf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ku(),n={},r=yv();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var m=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=i[d](a,d,c,s,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qs=o,Qs}var Js,Cf;function FE(){if(Cf)return Js;Cf=1;var e=gv(),t=jE(),n=ku(),r=yv(),o=LE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Js=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(B){var L=B&&(u&&B[u]||B[d]);if(typeof L=="function")return L}var m="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:v(),arrayOf:E,element:C(),elementType:I(),instanceOf:D,node:H(),objectOf:F,oneOf:A,oneOfType:k,shape:w,exact:p};function b(B,L){return B===L?B!==0||1/B===1/L:B!==B&&L!==L}function y(B,L){this.message=B,this.data=L&&typeof L=="object"?L:{},this.stack=""}y.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var L={},oe=0;function G(Z,ce,z,U,ee,Q,ie){if(U=U||m,Q=Q||z,ie!==n){if(c){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=U+":"+z;!L[me]&&oe<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[me]=!0,oe++)}}return ce[z]==null?Z?ce[z]===null?new y("The "+ee+" `"+Q+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new y("The "+ee+" `"+Q+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:B(ce,z,U,ee,Q)}var K=G.bind(null,!1);return K.isRequired=G.bind(null,!0),K}function S(B){function L(oe,G,K,Z,ce,z){var U=oe[G],ee=j(U);if(ee!==B){var Q=W(U);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Q+"` supplied to `"+K+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(L)}function v(){return T(a)}function E(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var z=oe[G];if(!Array.isArray(z)){var U=j(z);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an array."))}for(var ee=0;ee<z.length;ee++){var Q=B(z,ee,K,Z,ce+"["+ee+"]",n);if(Q instanceof Error)return Q}return null}return T(L)}function C(){function B(L,oe,G,K,Z){var ce=L[oe];if(!s(ce)){var z=j(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+z+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return T(B)}function I(){function B(L,oe,G,K,Z){var ce=L[oe];if(!e.isValidElementType(ce)){var z=j(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+z+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return T(B)}function D(B){function L(oe,G,K,Z,ce){if(!(oe[G]instanceof B)){var z=B.name||m,U=ne(oe[G]);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected ")+("instance of `"+z+"`."))}return null}return T(L)}function A(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function L(oe,G,K,Z,ce){for(var z=oe[G],U=0;U<B.length;U++)if(b(z,B[U]))return null;var ee=JSON.stringify(B,function(ie,re){var me=W(re);return me==="symbol"?String(re):re});return new y("Invalid "+Z+" `"+ce+"` of value `"+String(z)+"` "+("supplied to `"+K+"`, expected one of "+ee+"."))}return T(L)}function F(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an object."));for(var ee in z)if(r(z,ee)){var Q=B(z,ee,K,Z,ce+"."+ee,n);if(Q instanceof Error)return Q}return null}return T(L)}function k(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<B.length;L++){var oe=B[L];if(typeof oe!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(oe)+" at index "+L+"."),a}function G(K,Z,ce,z,U){for(var ee=[],Q=0;Q<B.length;Q++){var ie=B[Q],re=ie(K,Z,ce,z,U,n);if(re==null)return null;re.data&&r(re.data,"expectedType")&&ee.push(re.data.expectedType)}var me=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new y("Invalid "+z+" `"+U+"` supplied to "+("`"+ce+"`"+me+"."))}return T(G)}function H(){function B(L,oe,G,K,Z){return $(L[oe])?null:new y("Invalid "+K+" `"+Z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return T(B)}function R(B,L,oe,G,K){return new y((B||"React class")+": "+L+" type `"+oe+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function w(B){function L(oe,G,K,Z,ce){var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));for(var ee in B){var Q=B[ee];if(typeof Q!="function")return R(K,Z,ce,ee,W(Q));var ie=Q(z,ee,K,Z,ce+"."+ee,n);if(ie)return ie}return null}return T(L)}function p(B){function L(oe,G,K,Z,ce){var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));var ee=t({},oe[G],B);for(var Q in ee){var ie=B[Q];if(r(B,Q)&&typeof ie!="function")return R(K,Z,ce,Q,W(ie));if(!ie)return new y("Invalid "+Z+" `"+ce+"` key `"+Q+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(oe[G],null," ")+`
|
|
112
|
+
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var re=ie(z,Q,K,Z,ce+"."+Q,n);if(re)return re}return null}return T(L)}function $(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every($);if(B===null||s(B))return!0;var L=f(B);if(L){var oe=L.call(B),G;if(L!==B.entries){for(;!(G=oe.next()).done;)if(!$(G.value))return!1}else for(;!(G=oe.next()).done;){var K=G.value;if(K&&!$(K[1]))return!1}}else return!1;return!0;default:return!1}}function P(B,L){return B==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function j(B){var L=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":P(L,B)?"symbol":L}function W(B){if(typeof B>"u"||B===null)return""+B;var L=j(B);if(L==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return L}function Y(B){var L=W(B);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ne(B){return!B.constructor||!B.constructor.name?m:B.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,$f;function VE(){if($f)return ec;$f=1;var e=ku();function t(){}function n(){}return n.resetWarningCache=t,ec=function(){function r(a,s,c,u,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ec}if(process.env.NODE_ENV!=="production"){var BE=gv(),HE=!0;Dc.exports=FE()(BE.isElement,HE)}else Dc.exports=VE()();var WE=Dc.exports;const X=yp(WE);function zE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function UE(e,t){e.classList?e.classList.add(t):zE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Tf(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function YE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Tf(e.className,t):e.setAttribute("class",Tf(e.className&&e.className.baseVal||"",t))}const If={disabled:!1};var KE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,qE=process.env.NODE_ENV!=="production"?X.oneOfType([X.string,X.shape({enter:X.string,exit:X.string,active:X.string}),X.shape({enter:X.string,enterDone:X.string,enterActive:X.string,exit:X.string,exitDone:X.string,exitActive:X.string})]):null;const bv=l.createContext(null);var wv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Nc="exiting",er=function(e){Nu(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Cr,i.appearStatus=$r):c=Jr:r.unmountOnExit||r.mountOnEnter?c=jo:c=Cr,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===jo?{status:Cr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==$r&&a!==Jr&&(i=$r):(a===$r||a===Jr)&&(i=Nc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===$r){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this);a&&wv(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cr&&this.setState({status:jo})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[hn.findDOMNode(this),s],u=c[0],d=c[1],f=this.getTimeouts(),m=s?f.appear:f.enter;if(!o&&!a||If.disabled){this.safeSetState({status:Jr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:$r},function(){i.props.onEntering(u,d),i.onTransitionEnd(m,function(){i.safeSetState({status:Jr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:hn.findDOMNode(this);if(!i||If.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Nc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Cr},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===jo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=an(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(bv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=bv;er.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:X.shape({current:typeof Element>"u"?X.any:function(e,t,n,r,o,i){var a=e[t];return X.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:X.oneOfType([X.func.isRequired,X.element.isRequired]).isRequired,in:X.bool,mountOnEnter:X.bool,unmountOnExit:X.bool,appear:X.bool,enter:X.bool,exit:X.bool,timeout:function(t){var n=KE;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:X.func,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}:{};function Yr(){}er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yr,onEntering:Yr,onEntered:Yr,onExit:Yr,onExiting:Yr,onExited:Yr};er.UNMOUNTED=jo;er.EXITED=Cr;er.ENTERING=$r;er.ENTERED=Jr;er.EXITING=Nc;const Ev=er;var XE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return UE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return YE(t,r)})},Mu=function(e){Nu(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,u=typeof c=="string",d=u&&c?c+"-":"",f=u?""+d+s:c[s],m=u?f+"-active":c[s+"Active"],h=u?f+"-done":c[s+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&wv(o),s&&(this.appliedClasses[i][a]=s,XE(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,u=a.done;this.appliedClasses[i]={},s&&tc(o,s),c&&tc(o,c),u&&tc(o,u)},n.render=function(){var o=this.props;o.classNames;var i=an(o,["classNames"]);return l.createElement(Ev,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);Mu.defaultProps={classNames:""};Mu.propTypes=process.env.NODE_ENV!=="production"?ae({},Ev.propTypes,{classNames:qE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const GE=Mu;function Rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=dt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const ZE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return M.jsx(GE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Ie(Gi({animate:"in"})),enterDone:Ie(Gi({animate:"in"})),exit:Ie(Gi({animate:"out"})),exitDone:Ie(Gi({animate:"out"}))},children:M.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),xv=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return xv(()=>{r(!0)}),n?M.jsx(o1,{...t,children:e}):null};var QE="_185nehu0",JE=dt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const ex=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(wE,{...n,ref:r,className:Ie(QE),children:M.jsx(EE,{children:e})})),ju=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>M.jsx(bo,{children:M.jsxs(pE,{...r,children:[M.jsxs(vE,{ref:o,className:Ie(JE()),"data-test-id":r["data-test-id"],children:[M.jsx(mE,{placeholder:n}),M.jsx(gE,{className:"SelectIcon",children:M.jsx(si,{})})]}),M.jsx(ms,{children:M.jsxs(yE,{position:t,style:{overflow:"hidden",backgroundColor:"white",borderRadius:" 6px",width:"100%",boxShadow:" 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},children:[M.jsx(xE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:M.jsx(xu,{height:15,width:15})}),M.jsx(bE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>M.jsx(ex,{value:a,children:i},a))}),M.jsx(_E,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:M.jsx(si,{height:15,width:15})})]})})]})}));ju.displayName="BaseSelect";ju.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};/**
|
|
113
113
|
* @reach/utils v0.18.0
|
|
114
114
|
*
|
|
115
115
|
* Copyright (c) 2018-2022, React Training LLC
|
|
@@ -131,19 +131,19 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
131
131
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
132
132
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
133
133
|
PERFORMANCE OF THIS SOFTWARE.
|
|
134
|
-
***************************************************************************** */var be=function(){return be=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},be.apply(this,arguments)};function Lu(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 Ze(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 it(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 St(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 wt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var kc=wt.Start,Fu=wt.Stop,Ti=wt.Raise,gs=wt.Send,Sv=wt.Cancel,ix=wt.NullEvent,Vu=wt.Assign;wt.After;wt.DoneState;var Cv=wt.Log,ax=wt.Init,Mc=wt.Invoke;wt.ErrorExecution;var Of=wt.ErrorPlatform,sx=wt.ErrorCustom,$v=wt.Update,cx=wt.Choose,ux=wt.Pure,Tv=".",Pf={},jc="xstate.guard",lx="",jt=process.env.NODE_ENV==="production",Zi;function Bu(e,t,n){n===void 0&&(n=Tv);var r=Uo(e,n),o=Uo(t,n);return at(o)?at(r)?o===r:!1:at(r)?r in o:Object.keys(r).every(function(i){return i in o?Bu(r[i],o[i]):!1})}function Iv(e){try{return at(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Lc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function dx(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(dx(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=Lc(e,t);return Aa(n)}function Aa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Af(e,t,n){var r,o,i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var fx=function(e){return function(t){var n,r,o=t;try{for(var i=Ze(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function hx(e,t){return function(n){var r,o,i=n;try{for(var a=Ze(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function va(e){if(!e)return[[]];if(at(e))return[[e]];var t=It(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:va(e[n]).map(function(o){return[n].concat(o)})}));return t}function It(e){var t;return(t=[]).concat.apply(t,St([],it(e),!1))}function Rv(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:Rv(e)}function Da(e,t,n){var r,o;if(lt(e))return e(t,n.data);var i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];lt(u)?i[c]=u(t,n.data):i[c]=u}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function px(e){return/^(done|error)\./.test(e)}function Df(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&<(e.then))}function vx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function mx(e,t){var n,r,o=it([[],[]],2),i=o[0],a=o[1];try{for(var s=Ze(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]}function Ov(e,t){return Lo(e.states,function(n,r){if(n){var o=(at(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Ov(n,o)}}})}function gx(e,t){return{current:t,states:Ov(e,t)}}function Nf(e,t,n,r){jt||Ut(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,d={state:r,action:a,_event:t},f={};if(lt(u))f=u(i,t.data,d);else try{for(var m=Ze(Object.keys(u)),h=m.next();!h.done;h=m.next()){var b=h.value,y=u[b];f[b]=lt(y)?y(i,t.data,d):y}}catch(T){s={error:T}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return o}var Ut=function(){};jt||(Ut=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function wo(e){return Array.isArray(e)}function lt(e){return typeof e=="function"}function at(e){return typeof e=="string"}function Pv(e,t){if(e)return at(e)?{type:jc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:jc,name:e.name,predicate:e}:e}function yx(e){try{return"subscribe"in e&<(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Zi={},Zi[sr]=function(){return this},Zi[Symbol.observable]=function(){return this};function Mr(e){return!!e&&"__xstatenode"in e}function bx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return at(e)||typeof e=="number"?be({type:e},t):e}function zt(e,t){if(!at(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=Rv(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function wx(e){if(!(e===void 0||e===lx))return In(e)}function Ex(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Av(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===jc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Dv(e){return typeof e=="string"?{type:e}:e}function ma(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Qi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Fc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:ax});function Vc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(at(e)||typeof e=="number"){var r=Vc(e,t);lt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(lt(e))n={type:e.name||e.toString(),exec:e};else{var r=Vc(e.type,t);if(lt(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=wo(e)?e:[e];return n.map(function(r){return ui(r,t)})};function Hu(e){var t=ui(e);return be(be({id:at(e)?e:t.id},t),{type:t.type})}function xx(e,t){return{type:Ti,event:typeof e=="function"?e:ys(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function _x(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;return be(be({},e),{type:Ti,_event:i,delay:a})}function Sx(e,t){return{to:t?t.to:void 0,type:gs,event:lt(e)?e:ys(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:lt(e)?e.name:Iv(e)}}function Cx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;var c=lt(e.to)?e.to(t,n.data,o):e.to;return be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var $x=function(e,t,n){return be(be({},e),{value:at(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Tx=function(e){return{type:Sv,sendId:e}};function Ix(e){var t=Hu(e);return{type:wt.Start,activity:t,exec:void 0}}function Rx(e){var t=lt(e)?e:Hu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Ox(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Px=function(e){return{type:Vu,assignment:e}};function Ax(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Dx=function(e){var t,n,r=[];try{for(var o=Ze(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Vu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Na(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:Dx(o),c=s.length?Nf(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=_x(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=Cx(y,c,r,e.options.delays);if(!jt){var E=y.delay;Ut(!at(E)||typeof v.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case Cv:{var C=$x(y,c,r);return i==null||i(C,c,r),C}case cx:{var I=y,D=(T=I.conds.find(function(W){var Y=Pv(W.cond,e.options.guards);return!Y||Av(e,Y,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var A=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case ux:{var D=y.get(c,r.data);if(!D)return[];var B=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=B[0],w=B[1];return c=w,u==null||u.push(c),R}case Fu:{var C=Ox(y,c,r);return i==null||i(C,n,r),C}case Vu:{c=Nf(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var p=ui(y,e.options.actions),$=p.exec;if(i)i(p,c,r);else if($&&u){var P=u.length-1,j=be(be({},p),{exec:function(W){for(var Y=[],ne=1;ne<arguments.length;ne++)Y[ne-1]=arguments[ne];$.apply(void 0,St([u[P]],it(Y),!1))}});p=j}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),E=v.next();!E.done;E=v.next()){var C=E.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{E&&!E.done&&(T=v.return)&&T.call(v)}finally{if(y)throw y.error}}return d.forEach(function(D){i(D,c,r)}),d.length=0,S}var h=It(o.map(m));return[h,c]}var kf=[],eo=function(e,t){kf.push(e);var n=t(e);return kf.pop(),n};function Nv(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function Nx(e,t,n,r){var o,i=Dv(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Da(e.data,n,r):void 0,c=a?kv(a,e.id,s):Nv(e.id);return c.meta=e,c}function kv(e,t,n){var r=Nv(t);if(r.deferred=!0,Mr(e)){var o=r.state=eo(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function kx(e){try{return typeof e.send=="function"}catch{return!1}}function Mx(e){return kx(e)&&"id"in e}function jx(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var ka=function(e){return e.type==="atomic"||e.type==="final"};function Mv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return Mv(e).filter(function(t){return t.type!=="history"})}function jv(e){var t=[e];return ka(e)?t:t.concat(It(li(e).map(jv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Bc(d),m=new Set(t);try{for(var h=Ze(m),b=h.next();!b.done;b=h.next())for(var y=b.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var S=Bc(m);try{for(var v=Ze(m),E=v.next();!E.done;E=v.next()){var y=E.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(B){return m.add(B)}):y.initialStateNodes.forEach(function(B){return m.add(B)});else if(y.type==="parallel")try{for(var C=(a=void 0,Ze(li(y))),I=C.next();!I.done;I=C.next()){var D=I.value;m.has(D)||(m.add(D),f.get(D)?f.get(D).forEach(function(B){return m.add(B)}):D.initialStateNodes.forEach(function(B){return m.add(B)}))}}catch(B){a={error:B}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Ze(m),F=A.next();!F.done;F=A.next())for(var y=F.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function Lv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(ka(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=Lv(i,t)}),o}function Bc(e){var t,n,r=new Map;try{for(var o=Ze(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Lx(e,t){var n=Vo([e],t);return Lv(e,Bc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Fx(e){return St([],it(new Set(It(St([],it(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ya(e,t){return t.type==="compound"?li(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?li(t).every(function(n){return ya(e,n)}):!1}function Vx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Mf(e){return new Set(It(e.map(function(t){return t.tags})))}function Fv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(at(e)||at(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return Fv(e[o],t[o])})}function Bx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Hx(e,t){var n=e.exec,r=be(be({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var wn=function(){function e(t){var n=this,r;this.actions=[],this.activities=Pf,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Pf,this.meta=Vx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Fx(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=oo;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=oo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),at(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],it(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=Lu(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Bu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Ut(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Wx={deferEvents:!1},jf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Wx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),nc=new Map,zx=0,Ro={bookId:function(){return"x:".concat(zx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Wu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function Ux(){var e=Wu();if(e&&"__xstate__"in e)return e.__xstate__}function Yx(e){if(Wu()){var t=Ux();t&&t.register(e)}}function Kx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(d){return d.next(n)})}i=!1}},s=jx({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,d,f){var m=ma(u,d,f);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var qx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Xx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(d,f){if(wo(d))return r.batch(d),r.state;var m=zt(ys(d,f));if(r.status===Vt.Stopped)return jt||Ut(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
|
|
134
|
+
***************************************************************************** */var be=function(){return be=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},be.apply(this,arguments)};function Lu(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 Ze(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 ot(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 St(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 wt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var kc=wt.Start,Fu=wt.Stop,Ti=wt.Raise,gs=wt.Send,Sv=wt.Cancel,ix=wt.NullEvent,Vu=wt.Assign;wt.After;wt.DoneState;var Cv=wt.Log,ax=wt.Init,Mc=wt.Invoke;wt.ErrorExecution;var Of=wt.ErrorPlatform,sx=wt.ErrorCustom,$v=wt.Update,cx=wt.Choose,ux=wt.Pure,Tv=".",Pf={},jc="xstate.guard",lx="",jt=process.env.NODE_ENV==="production",Zi;function Bu(e,t,n){n===void 0&&(n=Tv);var r=Uo(e,n),o=Uo(t,n);return it(o)?it(r)?o===r:!1:it(r)?r in o:Object.keys(r).every(function(i){return i in o?Bu(r[i],o[i]):!1})}function Iv(e){try{return it(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Lc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function dx(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(dx(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=Lc(e,t);return Aa(n)}function Aa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Af(e,t,n){var r,o,i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var fx=function(e){return function(t){var n,r,o=t;try{for(var i=Ze(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function hx(e,t){return function(n){var r,o,i=n;try{for(var a=Ze(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function va(e){if(!e)return[[]];if(it(e))return[[e]];var t=It(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:va(e[n]).map(function(o){return[n].concat(o)})}));return t}function It(e){var t;return(t=[]).concat.apply(t,St([],ot(e),!1))}function Rv(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:Rv(e)}function Da(e,t,n){var r,o;if(lt(e))return e(t,n.data);var i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];lt(u)?i[c]=u(t,n.data):i[c]=u}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function px(e){return/^(done|error)\./.test(e)}function Df(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&<(e.then))}function vx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function mx(e,t){var n,r,o=ot([[],[]],2),i=o[0],a=o[1];try{for(var s=Ze(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]}function Ov(e,t){return Lo(e.states,function(n,r){if(n){var o=(it(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Ov(n,o)}}})}function gx(e,t){return{current:t,states:Ov(e,t)}}function Nf(e,t,n,r){jt||Ut(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,d={state:r,action:a,_event:t},f={};if(lt(u))f=u(i,t.data,d);else try{for(var m=Ze(Object.keys(u)),h=m.next();!h.done;h=m.next()){var b=h.value,y=u[b];f[b]=lt(y)?y(i,t.data,d):y}}catch(T){s={error:T}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return o}var Ut=function(){};jt||(Ut=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function wo(e){return Array.isArray(e)}function lt(e){return typeof e=="function"}function it(e){return typeof e=="string"}function Pv(e,t){if(e)return it(e)?{type:jc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:jc,name:e.name,predicate:e}:e}function yx(e){try{return"subscribe"in e&<(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Zi={},Zi[sr]=function(){return this},Zi[Symbol.observable]=function(){return this};function Mr(e){return!!e&&"__xstatenode"in e}function bx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return it(e)||typeof e=="number"?be({type:e},t):e}function zt(e,t){if(!it(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=Rv(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function wx(e){if(!(e===void 0||e===lx))return In(e)}function Ex(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Av(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===jc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Dv(e){return typeof e=="string"?{type:e}:e}function ma(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Qi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Fc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:ax});function Vc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(it(e)||typeof e=="number"){var r=Vc(e,t);lt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(lt(e))n={type:e.name||e.toString(),exec:e};else{var r=Vc(e.type,t);if(lt(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=wo(e)?e:[e];return n.map(function(r){return ui(r,t)})};function Hu(e){var t=ui(e);return be(be({id:it(e)?e:t.id},t),{type:t.type})}function xx(e,t){return{type:Ti,event:typeof e=="function"?e:ys(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function _x(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(it(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;return be(be({},e),{type:Ti,_event:i,delay:a})}function Sx(e,t){return{to:t?t.to:void 0,type:gs,event:lt(e)?e:ys(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:lt(e)?e.name:Iv(e)}}function Cx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(it(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;var c=lt(e.to)?e.to(t,n.data,o):e.to;return be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var $x=function(e,t,n){return be(be({},e),{value:it(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Tx=function(e){return{type:Sv,sendId:e}};function Ix(e){var t=Hu(e);return{type:wt.Start,activity:t,exec:void 0}}function Rx(e){var t=lt(e)?e:Hu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Ox(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Px=function(e){return{type:Vu,assignment:e}};function Ax(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Dx=function(e){var t,n,r=[];try{for(var o=Ze(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Vu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Na(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:Dx(o),c=s.length?Nf(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=_x(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=Cx(y,c,r,e.options.delays);if(!jt){var E=y.delay;Ut(!it(E)||typeof v.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case Cv:{var C=$x(y,c,r);return i==null||i(C,c,r),C}case cx:{var I=y,D=(T=I.conds.find(function(W){var Y=Pv(W.cond,e.options.guards);return!Y||Av(e,Y,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var A=ot(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case ux:{var D=y.get(c,r.data);if(!D)return[];var H=ot(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=H[0],w=H[1];return c=w,u==null||u.push(c),R}case Fu:{var C=Ox(y,c,r);return i==null||i(C,n,r),C}case Vu:{c=Nf(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var p=ui(y,e.options.actions),$=p.exec;if(i)i(p,c,r);else if($&&u){var P=u.length-1,j=be(be({},p),{exec:function(W){for(var Y=[],ne=1;ne<arguments.length;ne++)Y[ne-1]=arguments[ne];$.apply(void 0,St([u[P]],ot(Y),!1))}});p=j}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),E=v.next();!E.done;E=v.next()){var C=E.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{E&&!E.done&&(T=v.return)&&T.call(v)}finally{if(y)throw y.error}}return d.forEach(function(D){i(D,c,r)}),d.length=0,S}var h=It(o.map(m));return[h,c]}var kf=[],eo=function(e,t){kf.push(e);var n=t(e);return kf.pop(),n};function Nv(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function Nx(e,t,n,r){var o,i=Dv(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Da(e.data,n,r):void 0,c=a?kv(a,e.id,s):Nv(e.id);return c.meta=e,c}function kv(e,t,n){var r=Nv(t);if(r.deferred=!0,Mr(e)){var o=r.state=eo(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function kx(e){try{return typeof e.send=="function"}catch{return!1}}function Mx(e){return kx(e)&&"id"in e}function jx(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var ka=function(e){return e.type==="atomic"||e.type==="final"};function Mv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return Mv(e).filter(function(t){return t.type!=="history"})}function jv(e){var t=[e];return ka(e)?t:t.concat(It(li(e).map(jv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Bc(d),m=new Set(t);try{for(var h=Ze(m),b=h.next();!b.done;b=h.next())for(var y=b.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var S=Bc(m);try{for(var v=Ze(m),E=v.next();!E.done;E=v.next()){var y=E.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(H){return m.add(H)}):y.initialStateNodes.forEach(function(H){return m.add(H)});else if(y.type==="parallel")try{for(var C=(a=void 0,Ze(li(y))),I=C.next();!I.done;I=C.next()){var D=I.value;m.has(D)||(m.add(D),f.get(D)?f.get(D).forEach(function(H){return m.add(H)}):D.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Ze(m),F=A.next();!F.done;F=A.next())for(var y=F.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function Lv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(ka(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=Lv(i,t)}),o}function Bc(e){var t,n,r=new Map;try{for(var o=Ze(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Lx(e,t){var n=Vo([e],t);return Lv(e,Bc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Fx(e){return St([],ot(new Set(It(St([],ot(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ya(e,t){return t.type==="compound"?li(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?li(t).every(function(n){return ya(e,n)}):!1}function Vx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Mf(e){return new Set(It(e.map(function(t){return t.tags})))}function Fv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(it(e)||it(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return Fv(e[o],t[o])})}function Bx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Hx(e,t){var n=e.exec,r=be(be({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var wn=function(){function e(t){var n=this,r;this.actions=[],this.activities=Pf,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Pf,this.meta=Vx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Fx(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=oo;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=oo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),it(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],ot(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=Lu(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Bu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Ut(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Wx={deferEvents:!1},jf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Wx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),nc=new Map,zx=0,Ro={bookId:function(){return"x:".concat(zx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Wu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function Ux(){var e=Wu();if(e&&"__xstate__"in e)return e.__xstate__}function Yx(e){if(Wu()){var t=Ux();t&&t.register(e)}}function Kx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(d){return d.next(n)})}i=!1}},s=jx({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,d,f){var m=ma(u,d,f);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var qx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Xx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(d,f){if(wo(d))return r.batch(d),r.state;var m=zt(ys(d,f));if(r.status===Vt.Stopped)return jt||Ut(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
|
|
135
135
|
Event: `).concat(JSON.stringify(m.data))),r.state;if(r.status!==Vt.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
136
|
-
Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var h=r._nextState(m);r.update(h,m)}),r._state},this.sendTo=function(d,f,m){var h=r.parent&&(f===ho.Parent||r.parent.id===f),b=h?r.parent:
|
|
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(h){var b=zt(h);n.forward(b),a=eo(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],it(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Hx(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(h){o={error:h}}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,zt(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=zt(t);if(o.name.indexOf(Of)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Of)===0}))throw o.data.data;var i=eo(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),lt(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(lt(t))return this.spawnCallback(t,n);if(Mx(t))return this.spawnActor(t,n);if(yx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(vx(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({},qx),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(zt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Kx(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(zt(ga(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(zt(u,{origin:n}))}catch(d){Ex(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=ma(c,u,d),m=!1;return t.then(function(h){m||(f.next(h),!m&&f.complete())},function(h){m||f.error(h)}),{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(h){return h(m)}),!i&&o.send(zt(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(h){return h(m)})},subscribe:function(m){var h=ma(m);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,lt(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(zt(c,{origin:n}))},function(c){o.removeChild(n),o.send(zt(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(zt(ga(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||Ut(!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)}Yx(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 Xx(e,t);return n}function Gx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(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:Gx(e.src)})}})}var to="",Hc="#",Oo="*",qr={},Xr=function(e){return e[0]===Hc},Zx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Qx=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(at(i.target)||Mr(i.target))}),o=t===to?"the transient event":"event '".concat(t,"'");Ut(!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.")},Jx=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(Zx(),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||St([this.machine.key],it(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||Ut(!("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}):qr;var s=0;function c(u){var d,f;u.order=s++;try{for(var m=Ze(Mv(u)),h=m.next();!h.done;h=m.next()){var b=h.value;c(b)}}catch(y){d={error:y}}finally{try{h&&!h.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===to}):to 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(Mr(u)){var h=Qi(i.id,d);return i.machine.options.services=be((f={},f[h]=u,f),i.machine.options.services),ea({src:h,id:h})}else if(at(u.src)){var h=u.id||Qi(i.id,d);return ea(be(be({},u),{id:h,src:u.src}))}else if(Mr(u.src)||lt(u.src)){var h=u.id||Qi(i.id,d);return i.machine.options.services=be((m={},m[h]=u.src,m),i.machine.options.services),ea(be(be({id:h},u),{src:h}))}else{var b=u.src;return ea(be(be({id:Qi(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 lt(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===to,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=lt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=Ax(s,t.id);return t.onEntry.push(Sx(c,{delay:i})),t.onExit.push(Tx(c)),c},o=wo(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=at(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 wn?t.value:Uo(t,this.delimiter);if(at(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,St([],it(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 wn?t:wn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new wn(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ya(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 h=Object.keys(a).map(function(S){return a[S]}),b=It(h.map(function(S){return S.transitions})),y=h.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(h.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 at(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,zt(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,h=m.cond,b=m.in,y=t.context,T=b?at(b)&&Xr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Bu(Uo(b,this.delimiter),fx(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Av(this.machine,h,y,n,t)}catch(C){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
138
|
-
`).concat(C.message))}if(S&&T){m.target!==void 0&&(c=m.target),s.push.apply(s,St([],it(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)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]: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,h=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Ze(Array.from(t).sort(function(R,w){return R.order-w.order})),T=y.next();!T.done;T=y.next()){var S=T.value;(!Bo(h,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(h),E=v.next();!E.done;E=v.next()){var S=E.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{E&&!E.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,w){return w.order-R.order});var C=Array.from(b).sort(function(R,w){return R.order-w.order}),I=new Set(r.exitSet),D=It(C.map(function(R){var w=[];if(R.type!=="final")return w;var p=R.parent;if(!p.parent)return w;w.push(Ji(R.id,R.doneData),Ji(p.id,R.doneData?Da(R.doneData,o,i):void 0));var $=p.parent;return $.type==="parallel"&&li($).every(function(P){return ya(r.configuration,P)})&&w.push(Ji($.id)),w})),A=C.map(function(R){var w=R.onEntry,p=R.activities.map(function($){return Ix($)});return{type:"entry",actions:cr(s?St(St([],it(w),!1),it(p),!1):St(St([],it(p),!1),it(w),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return xx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],it(R.onExit),!1),it(R.activities.map(function(w){return Rx(w)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(A);if(n){var B=cr(It(St([],it(t),!1).sort(function(R,w){return w.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:B})}return k},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var i=zt(n),a;if(t instanceof wn)a=r===void 0?t:this.resolveState(wn.from(t,r));else{var s=at(t)?this.resolve(Aa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(wn.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)&&!px(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=St([],it(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,St([],it(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,d=this;i===void 0&&(i=oo);var f=t.configuration,m=!n||t.transitions.length>0,h=m?t.configuration:n?n.configuration:[],b=ya(h,this),y=m?Lx(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(h),b,t,r,i,n,o),v=n?be({},n.activities):{};try{for(var E=Ze(S),C=E.next();!C.done;C=E.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),A=D.next();!A.done;A=D.next()){var F=A.value;F.type===kc?v[F.activity.id||F.activity.type]=F:F.type===Fu&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{A&&!A.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var k=it(Na(this,n,r,i,S,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),B=k[0],R=k[1],w=it(mx(B,Fc),2),p=w[0],$=w[1],P=B.filter(function(K){var Z;return K.type===kc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===Mc}),j=P.reduce(function(K,Z){return K[Z.activity.id]=Nx(Z.activity,d.machine,R,i),K},n?be({},n.children):{}),W=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?gx(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:h,transitions:t.transitions,children:j,done:b,tags:Mf(h),machine:this}),Y=r!==R;W.changed=i.name===$v||Y;var ne=W.history;ne&&delete ne.history;var H=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!H||i.name===to))return W;var L=W;if(!b)for(H&&(L=this.resolveRaisedTransition(L,{type:ix},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(ne?!!L.actions.length||Y||typeof ne.value!=typeof L.value||!Fv(L.value,ne.value):void 0);return L.changed=G,L.history=ne,L},e.prototype.getStateNode=function(t){if(Xr(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=Xr(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"&&Xr(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||qr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):qr});case"compound":if(at(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):qr}):this.initialStateValue||{};default:return t||qr}},e.prototype.getResolvedPath=function(t){if(Xr(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||qr},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=ka(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;at(n.target)?t=Xr(n.target)?Aa(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(ka(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Ut(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=va(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=it(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=at(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(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=hx(r.path,"states")(t).current;return at(i)?[r.getStateNode(i)]:It(va(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 h=m.value;a.add("".concat(h))}}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(!at(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=wx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return at(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===to&&Ut(!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 E=Kr(v,u[v]);return jt||Qx(r,v,E),E}).concat(Kr(Oo,c)))}var d=this.config.always?Kr("",this.config.always):[],f=this.config.onDone?Kr(String(Ji(this.id)),this.config.onDone):[];jt||Ut(!(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 E=[];return v.onDone&&E.push.apply(E,St([],it(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&E.push.apply(E,St([],it(Kr(String(Fo(v.id)),v.onError)),!1)),E})),h=this.after,b=It(St(St(St(St([],it(f),!1),it(m),!1),it(o),!1),it(d),!1).map(function(v){return In(v).map(function(E){return r.formatTransition(E)})}));try{for(var y=Ze(h),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 e_(e,t,n){return n===void 0&&(n=e.context),new Jx(e,t,n)}var t_=Px,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function Lf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var n_=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},r_=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 o_(e,t){var n,r,o=n_([[],[]],2),i=o[0],a=o[1];try{for(var s=r_(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 i_(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(o_(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)},a_=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},s_=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 c_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function u_(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=s_(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,h=a_(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},h))});return Yo(function(){var y;return n&&(y=b.subscribe(c_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?wn.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]),i_(b),b}var l_=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 d_(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=u_(e,t,n),o=l_(l.useState(function(){var s=r.machine.initialState;return t.state?wn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var f_=Object.defineProperty,h_=(e,t)=>{for(var n in t)f_(e,n,{get:t[n],enumerable:!0})},An={};h_(An,{assign:()=>m_,colors:()=>pr,createStringInterpolator:()=>Gu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Zu});var zu=Ri(),He=e=>Ii(e,zu),Uu=Ri();He.write=e=>Ii(e,Uu);var bs=Ri();He.onStart=e=>Ii(e,bs);var Yu=Ri();He.onFrame=e=>Ii(e,Yu);var Ku=Ri();He.onFinish=e=>Ii(e,Ku);var io=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=io.findIndex(a=>a.cancel==r);~i&&io.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return io.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),Yu.delete(e),Ku.delete(e),zu.delete(e),Uu.delete(e)};He.sync=e=>{zc=!0,He.batchedUpdates(e),zc=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,He.onStart(n)}return r.handler=e,r.cancel=()=>{bs.delete(n),t=null},r};var qu=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>qu=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.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,He.frameLoop!=="demand"&&qu(Wv))}function p_(){lr=-1}function Wv(){~lr&&(qu(Wv),He.batchedUpdates(zv))}function zv(){const e=lr;lr=He.now();const t=Bv(lr);if(t&&(Uv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){p_();return}bs.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){He.catch(r)}})}function Uc(){}var v_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ve={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(ve.arr(e)){if(!ve.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(ve.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 pn=e=>ve.und(e)?[]:ve.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,pr=null,Kv=!1,Zu=Uc,m_=e=>{e.to&&(Yv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Gu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,_n=[],rc=[],Ma=0,ws={get idle(){return!Xo.size&&!_n.length},start(e){Ma>e.priority?(Xo.add(e),He.onStart(g_)):(qv(e),He(Yc))},advance:Yc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),Xv(e))}},clear(){_n=[],Xo.clear()}};function g_(){Xo.forEach(qv),Xo.clear(),He(Yc)}function qv(e){_n.includes(e)||Xv(e)}function Xv(e){_n.splice(y_(_n,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Zu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function y_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var b_=(e,t,n)=>Math.min(Math.max(n,e),t),w_={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+",ja=On+"%";function Es(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var E_=new RegExp("rgb"+Es(On,On,On)),x_=new RegExp("rgba"+Es(On,On,On,On)),__=new RegExp("hsl"+Es(On,ja,ja)),S_=new RegExp("hsla"+Es(On,ja,ja,On)),C_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T_=/^#([0-9a-fA-F]{6})$/,I_=/^#([0-9a-fA-F]{8})$/;function R_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=E_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=x_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Wf(t[4]))>>>0:(t=C_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=I_.exec(e))?parseInt(t[1],16)>>>0:(t=$_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=__.exec(e))?(Bf(Hf(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=S_.exec(e))?(Bf(Hf(t[1]),ta(t[2]),ta(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 Gr(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 ta(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zf(e){let t=R_(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(ve.fun(e))return e;if(ve.arr(e))return di({range:e,output:t,extrapolate:n});if(ve.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=P_(u,i);return O_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function O_(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 P_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var A_=(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 b_(0,1,o/e)},La=1.70158,na=La*1.525,Uf=La+1,Yf=2*Math.PI/3,Kf=2*Math.PI/4.5,ra=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,D_={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-La*e*e,easeOutBack:e=>1+Uf*Math.pow(e-1,3)+La*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((na+1)*2*e-na)/2:(Math.pow(2*e-2,2)*((na+1)*(e*2-2)+na)+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-ra(1-e),easeOutBounce:ra,easeInOutBounce:e=>e<.5?(1-ra(1-2*e))/2:(1+ra(2*e-1))/2,steps:A_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,qf=e=>e[po]||null;function N_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{N_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");k_(this,e)}},k_=(e,t)=>Zv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||Zv(e,po,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function pi(e,t){const n=e[po];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[po]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,M_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Xf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),j_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=L_(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&&xs.test(n))return Qv(n);if(n)return n}return e},L_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,F_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Jv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Qv).replace(M_,zf).replace(ic,zf)),n=t.map(i=>i.match(ba).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(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(j_,F_)}},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)}},V_=em(console.warn);function B_(){V_(`${Qu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var H_=em(console.warn);function W_(){H_(`${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 _s(e){return ve.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xu()&&xs.test(e)||e in(pr||{}))}var Ju=Xu()?l.useEffect:l.useLayoutEffect,z_=()=>{const e=l.useRef(!1);return Ju(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){const e=l.useState()[1],t=z_();return()=>{t.current&&e(Math.random())}}function U_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&Y_(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 Y_(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,K_),K_=[];function Gf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),q_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],el=(e,t)=>v_(e,vi,t),Ss=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,ve.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 ve.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,ve.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(ve.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()}},Fa={dependencies:null},Cs=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{q_(n)?t[r]=n.getValue(e):En(n)?t[r]=on(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){Fa.dependencies&&En(e)&&Fa.dependencies.add(e);const t=Ss(e);t&&Qe(t,n=>this.add(n))}},om=class extends Cs{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(X_)),!0)}};function X_(e){return(_s(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?om:_s(e)?mi:Oi}var Zf=(e,t)=>{const n=!ve.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=Q_(o,b)},[o]),[s,c]=Z_(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 G_(d,c),m=l.useRef();Ju(()=>(m.current=f,Qe(c,b=>Eo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>pi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(d,[]),nm(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},G_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function Z_(e,t){const n=new Set;return Fa.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Cs(e),Fa.dependencies=null,[e,n]}function Q_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Qf=Symbol.for("AnimatedComponent"),J_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Cs(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Jf(a)||"Anonymous";return ve.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)=>{ve.arr(e)&&(s=Jf(a)),i[s]=i(a)}),{animated:i}},Jf=e=>ve.str(e)?e:e&&ve.str(e.displayName)?e.displayName:ve.fun(e)&&e.name||null;function Ir(e,...t){return ve.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(ve.fun(e)?e(t):pn(e).includes(t))),im=(e,t)=>ve.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,eS=e=>e,tl=(e,t=eS)=>{let n=tS;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);ve.und(i)||(r[o]=i)}return r},tS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],nS={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 rS(e){const t={};let n=0;if(Bn(e,(r,o)=>{nS[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=rS(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=on(e),ve.arr(e)?e.map(gi):_s(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oS(e){for(const t in e)return!0;return!1}function qc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function iS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function aS(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:D_.linear,clamp:!1},sS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function cS(e,t,n){n&&(n={...n},eh(n,t),t={...n,...t}),eh(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 ve.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 eh(e,t){if(!ve.und(t.decay))e.duration=void 0;else{const n=!ve.und(t.tension)||!ve.und(t.friction);(n||!ve.und(t.frequency)||!ve.und(t.damping)||!ve.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var th=[],uS=class{constructor(){this.changed=!1,this.values=th,this.toValues=null,this.fromValues=th,this.config=new sS,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)h();else{ve.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-He.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=He.setTimeout(h,c),o.pauseQueue.add(f),o.timeouts.add(u)):h()}function h(){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)?ao(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}),ao=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)),h=T=>{const S=o<=(n.cancelId||0)&&ao(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new nh,E=new rh;return(async()=>{if(An.skipAnimation)throw yi(n),E.result=Rn(r,!1),f(E),E;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,A)=>{ve.und(C[A])&&(C[A]=D)});const I=await r.start(C);return h(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;ve.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 nh)y=T.result;else if(T instanceof rh)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 ve.fun(a)&&He.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 nh=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.")}},rh=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof rl,lS=1,rl=class extends Gv{constructor(){super(...arguments),this.id=lS++,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 B_(),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){hi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ws.sort(this),hi(this,{type:"priority",parent:this,priority:e})}},jr=Symbol.for("SpringPhase"),fm=1,Zc=2,Qc=4,ac=e=>(e[jr]&fm)>0,ir=e=>(e[jr]&Zc)>0,Ao=e=>(e[jr]&Qc)>0,oh=(e,t)=>t?e[jr]|=Zc|fm:e[jr]&=~Zc,ih=(e,t)=>t?e[jr]|=Qc:e[jr]&=~Qc,dS=class extends rl{constructor(e,t){if(super(),this.animation=new uS,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,!ve.und(e)||!ve.und(t)){const n=ve.obj(e)?{...e}:{...t,from:e};ve.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return on(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=Ss(r.to);!a&&En(r.to)&&(o=pn(on(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,h=f;if(!m){if(h=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=ve.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(ve.und(i.duration))if(i.decay){const E=i.decay===!0?.998:i.decay,C=Math.exp(-(1-E)*b);h=y+T/(1-E)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const E=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let A,F=!1;const k=1,B=Math.ceil(e/k);for(let R=0;R<B&&(A=Math.abs(S)>E,!(!A&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const w=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(w+p)/i.mass;S=S+$*k,h=h+S*k}}else{let E=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)),E=(i.progress||0)+b/this._memoizedDuration,E=E>1?1:E<0?0:E,u.durationProgress=E),h=y+i.easing(E)*(f-y),S=(h-u.lastPosition)/e,m=E==1}u.lastVelocity=S,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(h,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=on(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 He.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;He.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 ve.und(e)?(n=this.queue||[],this.queue=[]):n=[ve.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),He.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=ve.obj(n)?n[t]:n,(n==null||qc(n))&&(n=void 0),r=ve.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=on(r),ve.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)),sh(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)||(ih(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ih(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=hm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ao(this));const r=!ve.und(e.to),o=!ve.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ao(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||ve.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=on(f);const h=!Kn(d,c);h&&this._focus(d);const b=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&cS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||ve.und(d))return n(Rn(this,!0));const E=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=E?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Kc(d);if(R!==v.constructor)if(A)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=En(d),B=!1;if(!k){const R=E||!ac(this)&&m;(h||R)&&(B=Kn(gi(C),I),k=!B),(!Kn(s.immediate,A)&&!A||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(B&&ir(this)&&(s.changed&&!E?k=!0:k||this._stop(c)),!b&&((k||En(c))&&(s.values=v.getPayload(),s.toValues=En(d)?null:F==mi?[1]:pn(I)),s.immediate!=A&&(s.immediate=A,!A&&!E&&this._set(c)),k)){const{onRest:R}=s;Qe(hS,p=>sh(this,t,p));const w=Rn(this,Do(this,c));Ho(this._pendingCalls,w),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!E,R==null||R(w,this),E?Ir(a.onRest,w):(p=s.onStart)==null||p.call(s,w,this)})}E&&this._set(C),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?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;En(t)&&(Eo(t,this),Gc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;En(e)&&pi(e,this)}_set(e,t=!0){const n=on(e);if(!ve.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&&He.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(on(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(oh(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){oh(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hi(this,{type:"idle",parent:this});const r=t?ao(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 hm(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 ve.obj(t)&&ah(t,r),ve.obj(n)&&ah(n,r),e.keys=r.size?Array.from(r):null,e}function fS(e){const t=bi(e);return ve.und(t.default)&&(t.default=tl(t)),t}function ah(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var hS=["onStart","onRest","onChange","onPause","onResume"];function sh(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 pS=["onStart","onChange","onRest"],vS=1,mS=class{constructor(t,n){this.id=vS++,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];ve.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=pn(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(pn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ve.und(t))this.start({pause:!0});else{const n=this.springs;Qe(pn(t),r=>n[r].pause())}return this}resume(t){if(ve.und(t))this.start({pause:!1});else{const n=this.springs;Qe(pn(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;He.onFrame(this._onFrame)}};function Jc(e,t){return Promise.all(t.map(n=>pm(e,n))).then(n=>nl(e,n))}async function pm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=ve.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=ve.arr(o)||ve.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(pS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:E})=>{const C=S.get(T);C?(v||(C.finished=!1),E&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:E||!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)),h=t.cancel===!0||am(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(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=hm(t,a,o);if(y)return ym(e,[y]),pm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function ch(e,t){const n={...e.springs};return t&&Qe(pn(t),r=>{ve.und(r.keys)&&(r=bi(r)),ve.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,Eo(n,e))})}function mm(e,t){const n=new dS;return n.key=e,t&&Eo(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 $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=U_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=gS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function gS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var yS=()=>{const e=[],t=function(r){W_();const o=[];return Qe(e,(i,a)=>{if(ve.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=ve.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(ve.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 ve.fun(r)?r(i,o):r};return t._getProps=n,t};function bS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?yS():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const E=ch(S,v);return i.current>0&&!s.queue.length&&!Object.keys(E).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{vm(S,E),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=>{iS(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 E=S;E<v;E++){const C=c.current[E]||(c.current[E]=new mS(null,s.flush)),I=r?r(E,C):t[E];I&&(u[E]=fS(I))}}const m=c.current.map((S,v)=>ch(S,u[v])),h=l.useContext($s),b=Gf(h),y=h!==b&&oS(h);Ju(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,E)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[E];C&&(aS(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 wS(e,t){const n=ve.fun(e),[[r],o]=bS(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&&uh(this._active)&&sc(this)}_get(){const e=ve.arr(this.source)?this.source.map(on):pn(on(this.source));return this.calc(...e)}_start(){this.idle&&!uh(this._active)&&(this.idle=!1,Qe(Ss(this),e=>{e.done=!1}),An.skipAnimation?(He.batchedUpdates(()=>this.advance()),sc(this)):ws.start(this))}_attach(){let e=1;Qe(pn(this.source),t=>{En(t)&&Eo(t,this),Gc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(pn(this.source),e=>{En(e)&&pi(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=pn(this.source).reduce((t,n)=>Math.max(t,(Gc(n)?n.priority:0)+1),0))}};function ES(e){return e.idle!==!1}function uh(e){return!e.size||Array.from(e).every(ES)}function sc(e){e.idle||(e.idle=!0,Qe(Ss(e),t=>{t.done=!0}),hi(e,{type:"idle",parent:e}))}var Zr=(e,...t)=>new bm(e,t);An.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function xS(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 lh={};function _S(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:lh[f]||(lh[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=xS(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},SS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),CS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(CS.forEach(n=>e[SS(n,t)]=e[t]),e),Zo);var $S=/^(matrix|translate|scale|rotate|skew)/,TS=/^(translate)/,IS=/^(rotate|skew)/,cc=(e,t)=>ve.num(e)&&e!==0?e+t:e,wa=(e,t)=>ve.arr(e)?e.every(n=>wa(n,t)):ve.num(e)?e===t:parseFloat(e)===t,RS=class extends Cs{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(",")})`,wa(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if($S.test(s)){if(delete r[s],ve.und(a))return;const c=TS.test(s)?"px":IS.test(s)?"deg":"";o.push(pn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,wa(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,wa(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new OS(o,i)),super(r)}},OS=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=on(n[0]),[i,a]=this.transforms[r](ve.arr(o)?o:n.map(on));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&Eo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&pi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),hi(this,e)}},PS=["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:hn.unstable_batchedUpdates,createStringInterpolator:Jv,colors:w_});var AS=J_(PS,{applyAnimatedValues:_S,createAnimatedStyle:e=>new RS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),DS=AS.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 NS(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 kS(e,t,n){return Math.max(t,Math.min(e,n))}function MS(e,t){return Math.pow(e,t*5)}function dh(e,t,n){return t===0||Math.abs(t)===1/0?MS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?kS(e,t,n):e<t?-dh(t-e,n-t,r)+t:e>n?+dh(e-n,n-t,r)+n:e}function fh(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 jS(e,t,n){return t&&fh(e.prototype,t),n&&fh(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 LS(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 FS(e,t){if(e){if(typeof e=="string")return hh(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 hh(e,t)}}function hh(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 Ts(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=FS(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=Ts(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 ph(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 VS(){try{return"constructor"in GestureEvent}catch{return!1}}function Sm(){return typeof window<"u"&&"ontouchstart"in window}function BS(){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 vh(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 HS=function(t){return t};function mh(e,t){t===void 0&&(t=HS);var n=Cm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var WS=180,zS=.15,US=.5,YS=50,KS=250,qS={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(zS);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({},qS,{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]]}}),XS=typeof window<"u"&&window.document&&window.document.createElement,GS={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=XS?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},ZS=tn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),r=BS();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=US),ur(t)},swipeDistance:function(t){return t===void 0&&(t=YS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=KS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return WS;case!1:return 0;default:return t}}});function QS(e){return e===void 0&&(e={}),il(e,GS)}function JS(e){return e===void 0&&(e={}),il(e,ZS)}function eC(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=LS(e,["domTarget","eventOptions","window","enabled"]),a=QS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=JS(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,tC=function(t){return t},nC=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,h=this.getInternalMovement(r,this.state),b=u[0]===!1?gh(h[0],m[0]):u[0],y=u[1]===!1?gh(h[1],m[1]):u[1],T=this.checkIntentionality([b,y],h);if(T._blocked)return tn({},T,{_movement:h,delta:[0,0]});var S=T._intentional,v=h,E=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=eu(E,d),I=c?o:[0,0];return E=yh(a,eu(E,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:E,values:r,offset:yh(a,C,I),delta:ol(E,f)})},t.clean=function(){this.clearTimeout()},jS(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||tC}}]),e}();function gh(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function yh(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 rC(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,h=i.threshold,b=ol(c(h),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:ph(f,y),_bounds:ph(m,y)})}var oC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),this.supportsGestureEvents=VS(),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=Ts(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(h){Ln(a,h,function(b){return n.nativeRefs[h](tn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?lC(n,a):dC(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),sC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function iC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function aC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(t).forEach(function(n){return e.touchIds.delete(n)})}function sC(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 cC(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 uC(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 lC(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 dC(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=Ts(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=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function fC(e,t,n){n===void 0&&(n={});var r=pC(e),o=l.useMemo(function(){return new oC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?hC:o.bind}function hC(){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 pC(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 vC=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,NS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(nC),mC=3;function bh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var gC=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){bh(o),uC(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,bh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=mh(o,r.transform);r.updateSharedState(vh(o)),r.updateGestureState(tn({},rC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){iC(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=mh(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=vh(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=mC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(aC(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,h=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,E=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>E&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),cC(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}(vC);function yC(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 Ea(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(!Ea(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(!Ea(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)&&!Ea(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function bC(e,t){try{return Ea(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 wC(e,t){t===void 0&&(t={}),Tr.set("drag",gC);var n=l.useRef();return n.current||(n.current=yC(eC,bC)),fC({drag:e},n.current(t))}var EC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return M.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Ie(EC,n),disabled:o,style:r,...i,children:M.jsx(os,{size:16,color:o?$t.theme.colors.grey1:$t.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};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(Yt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(x0,{cursor:"pointer",onClick:t,size:18,color:$t.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(xo,{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 xC({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}/*!
|
|
136
|
+
Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var h=r._nextState(m);r.update(h,m)}),r._state},this.sendTo=function(d,f,m){var h=r.parent&&(f===ho.Parent||r.parent.id===f),b=h?r.parent:it(f)?f===ho.Internal?r:r.children.get(f)||Ro.get(f):bx(f)?f:void 0;if(!b){if(!h)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(r.id,"'."));jt||Ut(!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===sx?"".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,h){h===void 0&&(h=r.machine.options.actions);var b=d.exec||Vc(d.type,h),y=lt(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 gs:var S=d;if(typeof S.delay=="number"){r.defer(S);return}else S.to?r.sendTo(S._event,S.to,m===oo):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 E=Dv(v.src),C=r.machine.options.services?r.machine.options.services[E.type]:void 0,I=v.id,D=v.data;jt||Ut(!("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 A="autoForward"in v?v.autoForward:!!v.forward;if(!C){jt||Ut(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(r.machine.id,"'."));return}var F=D?Da(D,f,m):void 0;if(typeof C=="string")return;var k=lt(C)?C(f,m.data,{data:F,src:E,meta:v.meta}):C;if(!k)return;var H=void 0;Mr(k)&&(k=F?k.withContext(F):k,H={autoForward:A}),r.spawn(k,I,H)}else r.spawnActivity(v);break}case Fu:{r.stopChild(d.activity.id);break}case Cv:var R=d,w=R.label,p=R.value;w?r.logger(w,p):r.logger(p);break;default:jt||Ut(!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:eo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return jt||Ut(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===oo)&&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 h=Ze(this.eventListeners),b=h.next();!b.done;b=h.next()){var y=b.value;y(t.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(o=h.return)&&o.call(h)}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),E=v.next();!E.done;E=v.next()){var C=E.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{E&&!E.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?Da(I.doneData,t.context,n):void 0;this._doneEvent=ga(this.id,D);try{for(var A=Ze(this.doneListeners),F=A.next();!F.done;F=A.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(d=A.return)&&d.call(A)}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=ma(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:eo(this,function(){return Bx(t)?n.machine.resolveState(t):n.machine.resolveState(wn.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,oo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){lt(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 h=m.value;this.listeners.delete(h)}}catch(A){t={error:A}}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 h=y.value;h(),this.stopListeners.delete(h)}}catch(A){r={error:A}}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 h=S.value;this.contextListeners.delete(h)}}catch(A){i={error:A}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.doneListeners),E=v.next();!E.done;E=v.next()){var h=E.value;this.doneListeners.delete(h)}}catch(A){s={error:A}}finally{try{E&&!E.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(A){u={error:A}}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=zt({type:"xstate.stop"}),o=eo(t,function(){var i=It(St([],ot(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=ot(Na(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 wn({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||Ut(!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
|
+
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(h){var b=zt(h);n.forward(b),a=eo(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],ot(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Hx(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(h){o={error:h}}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,zt(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=zt(t);if(o.name.indexOf(Of)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Of)===0}))throw o.data.data;var i=eo(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),lt(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(lt(t))return this.spawnCallback(t,n);if(Mx(t))return this.spawnActor(t,n);if(yx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(vx(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({},qx),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(zt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Kx(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(zt(ga(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(zt(u,{origin:n}))}catch(d){Ex(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=ma(c,u,d),m=!1;return t.then(function(h){m||(f.next(h),!m&&f.complete())},function(h){m||f.error(h)}),{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(h){return h(m)}),!i&&o.send(zt(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(h){return h(m)})},subscribe:function(m){var h=ma(m);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,lt(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(zt(c,{origin:n}))},function(c){o.removeChild(n),o.send(zt(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(zt(ga(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||Ut(!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)}Yx(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 Xx(e,t);return n}function Gx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(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:Gx(e.src)})}})}var to="",Hc="#",Oo="*",qr={},Xr=function(e){return e[0]===Hc},Zx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Qx=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(it(i.target)||Mr(i.target))}),o=t===to?"the transient event":"event '".concat(t,"'");Ut(!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.")},Jx=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(Zx(),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||St([this.machine.key],ot(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||Ut(!("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}):qr;var s=0;function c(u){var d,f;u.order=s++;try{for(var m=Ze(Mv(u)),h=m.next();!h.done;h=m.next()){var b=h.value;c(b)}}catch(y){d={error:y}}finally{try{h&&!h.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===to}):to 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(Mr(u)){var h=Qi(i.id,d);return i.machine.options.services=be((f={},f[h]=u,f),i.machine.options.services),ea({src:h,id:h})}else if(it(u.src)){var h=u.id||Qi(i.id,d);return ea(be(be({},u),{id:h,src:u.src}))}else if(Mr(u.src)||lt(u.src)){var h=u.id||Qi(i.id,d);return i.machine.options.services=be((m={},m[h]=u.src,m),i.machine.options.services),ea(be(be({id:h},u),{src:h}))}else{var b=u.src;return ea(be(be({id:Qi(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 lt(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===to,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=lt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=Ax(s,t.id);return t.onEntry.push(Sx(c,{delay:i})),t.onExit.push(Tx(c)),c},o=wo(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=it(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 wn?t.value:Uo(t,this.delimiter);if(it(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,St([],ot(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 wn?t:wn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new wn(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ya(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 h=Object.keys(a).map(function(S){return a[S]}),b=It(h.map(function(S){return S.transitions})),y=h.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(h.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 it(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,zt(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,h=m.cond,b=m.in,y=t.context,T=b?it(b)&&Xr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Bu(Uo(b,this.delimiter),fx(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Av(this.machine,h,y,n,t)}catch(C){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
138
|
+
`).concat(C.message))}if(S&&T){m.target!==void 0&&(c=m.target),s.push.apply(s,St([],ot(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)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]: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,h=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Ze(Array.from(t).sort(function(R,w){return R.order-w.order})),T=y.next();!T.done;T=y.next()){var S=T.value;(!Bo(h,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(h),E=v.next();!E.done;E=v.next()){var S=E.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{E&&!E.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,w){return w.order-R.order});var C=Array.from(b).sort(function(R,w){return R.order-w.order}),I=new Set(r.exitSet),D=It(C.map(function(R){var w=[];if(R.type!=="final")return w;var p=R.parent;if(!p.parent)return w;w.push(Ji(R.id,R.doneData),Ji(p.id,R.doneData?Da(R.doneData,o,i):void 0));var $=p.parent;return $.type==="parallel"&&li($).every(function(P){return ya(r.configuration,P)})&&w.push(Ji($.id)),w})),A=C.map(function(R){var w=R.onEntry,p=R.activities.map(function($){return Ix($)});return{type:"entry",actions:cr(s?St(St([],ot(w),!1),ot(p),!1):St(St([],ot(p),!1),ot(w),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return xx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],ot(R.onExit),!1),ot(R.activities.map(function(w){return Rx(w)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(A);if(n){var H=cr(It(St([],ot(t),!1).sort(function(R,w){return w.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=zt(n),a;if(t instanceof wn)a=r===void 0?t:this.resolveState(wn.from(t,r));else{var s=it(t)?this.resolve(Aa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(wn.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)&&!px(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=St([],ot(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,St([],ot(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,d=this;i===void 0&&(i=oo);var f=t.configuration,m=!n||t.transitions.length>0,h=m?t.configuration:n?n.configuration:[],b=ya(h,this),y=m?Lx(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(h),b,t,r,i,n,o),v=n?be({},n.activities):{};try{for(var E=Ze(S),C=E.next();!C.done;C=E.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),A=D.next();!A.done;A=D.next()){var F=A.value;F.type===kc?v[F.activity.id||F.activity.type]=F:F.type===Fu&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{A&&!A.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var k=ot(Na(this,n,r,i,S,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],R=k[1],w=ot(mx(H,Fc),2),p=w[0],$=w[1],P=H.filter(function(K){var Z;return K.type===kc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===Mc}),j=P.reduce(function(K,Z){return K[Z.activity.id]=Nx(Z.activity,d.machine,R,i),K},n?be({},n.children):{}),W=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?gx(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:h,transitions:t.transitions,children:j,done:b,tags:Mf(h),machine:this}),Y=r!==R;W.changed=i.name===$v||Y;var ne=W.history;ne&&delete ne.history;var B=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!B||i.name===to))return W;var L=W;if(!b)for(B&&(L=this.resolveRaisedTransition(L,{type:ix},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(ne?!!L.actions.length||Y||typeof ne.value!=typeof L.value||!Fv(L.value,ne.value):void 0);return L.changed=G,L.history=ne,L},e.prototype.getStateNode=function(t){if(Xr(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=Xr(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"&&Xr(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||qr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):qr});case"compound":if(it(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):qr}):this.initialStateValue||{};default:return t||qr}},e.prototype.getResolvedPath=function(t){if(Xr(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||qr},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=ka(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;it(n.target)?t=Xr(n.target)?Aa(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(ka(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Ut(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=va(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=ot(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=it(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(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=hx(r.path,"states")(t).current;return it(i)?[r.getStateNode(i)]:It(va(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 h=m.value;a.add("".concat(h))}}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(!it(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=wx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return it(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===to&&Ut(!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 E=Kr(v,u[v]);return jt||Qx(r,v,E),E}).concat(Kr(Oo,c)))}var d=this.config.always?Kr("",this.config.always):[],f=this.config.onDone?Kr(String(Ji(this.id)),this.config.onDone):[];jt||Ut(!(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 E=[];return v.onDone&&E.push.apply(E,St([],ot(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&E.push.apply(E,St([],ot(Kr(String(Fo(v.id)),v.onError)),!1)),E})),h=this.after,b=It(St(St(St(St([],ot(f),!1),ot(m),!1),ot(o),!1),ot(d),!1).map(function(v){return In(v).map(function(E){return r.formatTransition(E)})}));try{for(var y=Ze(h),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 e_(e,t,n){return n===void 0&&(n=e.context),new Jx(e,t,n)}var t_=Px,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function Lf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var n_=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},r_=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 o_(e,t){var n,r,o=n_([[],[]],2),i=o[0],a=o[1];try{for(var s=r_(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 i_(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(o_(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)},a_=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},s_=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 c_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function u_(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=s_(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,h=a_(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},h))});return Yo(function(){var y;return n&&(y=b.subscribe(c_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?wn.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]),i_(b),b}var l_=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 d_(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=u_(e,t,n),o=l_(l.useState(function(){var s=r.machine.initialState;return t.state?wn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var f_=Object.defineProperty,h_=(e,t)=>{for(var n in t)f_(e,n,{get:t[n],enumerable:!0})},An={};h_(An,{assign:()=>m_,colors:()=>pr,createStringInterpolator:()=>Gu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Zu});var zu=Ri(),He=e=>Ii(e,zu),Uu=Ri();He.write=e=>Ii(e,Uu);var bs=Ri();He.onStart=e=>Ii(e,bs);var Yu=Ri();He.onFrame=e=>Ii(e,Yu);var Ku=Ri();He.onFinish=e=>Ii(e,Ku);var io=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=io.findIndex(a=>a.cancel==r);~i&&io.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return io.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),Yu.delete(e),Ku.delete(e),zu.delete(e),Uu.delete(e)};He.sync=e=>{zc=!0,He.batchedUpdates(e),zc=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,He.onStart(n)}return r.handler=e,r.cancel=()=>{bs.delete(n),t=null},r};var qu=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>qu=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.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,He.frameLoop!=="demand"&&qu(Wv))}function p_(){lr=-1}function Wv(){~lr&&(qu(Wv),He.batchedUpdates(zv))}function zv(){const e=lr;lr=He.now();const t=Bv(lr);if(t&&(Uv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){p_();return}bs.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){He.catch(r)}})}function Uc(){}var v_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ve={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(ve.arr(e)){if(!ve.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(ve.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 pn=e=>ve.und(e)?[]:ve.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,pr=null,Kv=!1,Zu=Uc,m_=e=>{e.to&&(Yv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Gu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,_n=[],rc=[],Ma=0,ws={get idle(){return!Xo.size&&!_n.length},start(e){Ma>e.priority?(Xo.add(e),He.onStart(g_)):(qv(e),He(Yc))},advance:Yc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),Xv(e))}},clear(){_n=[],Xo.clear()}};function g_(){Xo.forEach(qv),Xo.clear(),He(Yc)}function qv(e){_n.includes(e)||Xv(e)}function Xv(e){_n.splice(y_(_n,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Zu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function y_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var b_=(e,t,n)=>Math.min(Math.max(n,e),t),w_={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+",ja=On+"%";function Es(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var E_=new RegExp("rgb"+Es(On,On,On)),x_=new RegExp("rgba"+Es(On,On,On,On)),__=new RegExp("hsl"+Es(On,ja,ja)),S_=new RegExp("hsla"+Es(On,ja,ja,On)),C_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T_=/^#([0-9a-fA-F]{6})$/,I_=/^#([0-9a-fA-F]{8})$/;function R_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=E_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=x_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Wf(t[4]))>>>0:(t=C_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=I_.exec(e))?parseInt(t[1],16)>>>0:(t=$_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=__.exec(e))?(Bf(Hf(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=S_.exec(e))?(Bf(Hf(t[1]),ta(t[2]),ta(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 Gr(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 ta(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zf(e){let t=R_(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(ve.fun(e))return e;if(ve.arr(e))return di({range:e,output:t,extrapolate:n});if(ve.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=P_(u,i);return O_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function O_(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 P_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var A_=(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 b_(0,1,o/e)},La=1.70158,na=La*1.525,Uf=La+1,Yf=2*Math.PI/3,Kf=2*Math.PI/4.5,ra=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,D_={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-La*e*e,easeOutBack:e=>1+Uf*Math.pow(e-1,3)+La*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((na+1)*2*e-na)/2:(Math.pow(2*e-2,2)*((na+1)*(e*2-2)+na)+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-ra(1-e),easeOutBounce:ra,easeInOutBounce:e=>e<.5?(1-ra(1-2*e))/2:(1+ra(2*e-1))/2,steps:A_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,qf=e=>e[po]||null;function N_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{N_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");k_(this,e)}},k_=(e,t)=>Zv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||Zv(e,po,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function pi(e,t){const n=e[po];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[po]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,M_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Xf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),j_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=L_(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&&xs.test(n))return Qv(n);if(n)return n}return e},L_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,F_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Jv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Qv).replace(M_,zf).replace(ic,zf)),n=t.map(i=>i.match(ba).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(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(j_,F_)}},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)}},V_=em(console.warn);function B_(){V_(`${Qu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var H_=em(console.warn);function W_(){H_(`${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 _s(e){return ve.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xu()&&xs.test(e)||e in(pr||{}))}var Ju=Xu()?l.useEffect:l.useLayoutEffect,z_=()=>{const e=l.useRef(!1);return Ju(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){const e=l.useState()[1],t=z_();return()=>{t.current&&e(Math.random())}}function U_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&Y_(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 Y_(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,K_),K_=[];function Gf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),q_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],el=(e,t)=>v_(e,vi,t),Ss=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,ve.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 ve.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,ve.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(ve.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()}},Fa={dependencies:null},Cs=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{q_(n)?t[r]=n.getValue(e):En(n)?t[r]=on(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){Fa.dependencies&&En(e)&&Fa.dependencies.add(e);const t=Ss(e);t&&Qe(t,n=>this.add(n))}},om=class extends Cs{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(X_)),!0)}};function X_(e){return(_s(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?om:_s(e)?mi:Oi}var Zf=(e,t)=>{const n=!ve.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=Q_(o,b)},[o]),[s,c]=Z_(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 G_(d,c),m=l.useRef();Ju(()=>(m.current=f,Qe(c,b=>Eo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>pi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(d,[]),nm(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},G_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function Z_(e,t){const n=new Set;return Fa.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Cs(e),Fa.dependencies=null,[e,n]}function Q_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Qf=Symbol.for("AnimatedComponent"),J_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Cs(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Jf(a)||"Anonymous";return ve.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)=>{ve.arr(e)&&(s=Jf(a)),i[s]=i(a)}),{animated:i}},Jf=e=>ve.str(e)?e:e&&ve.str(e.displayName)?e.displayName:ve.fun(e)&&e.name||null;function Ir(e,...t){return ve.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(ve.fun(e)?e(t):pn(e).includes(t))),im=(e,t)=>ve.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,eS=e=>e,tl=(e,t=eS)=>{let n=tS;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);ve.und(i)||(r[o]=i)}return r},tS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],nS={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 rS(e){const t={};let n=0;if(Bn(e,(r,o)=>{nS[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=rS(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=on(e),ve.arr(e)?e.map(gi):_s(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function oS(e){for(const t in e)return!0;return!1}function qc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function iS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function aS(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:D_.linear,clamp:!1},sS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function cS(e,t,n){n&&(n={...n},eh(n,t),t={...n,...t}),eh(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 ve.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 eh(e,t){if(!ve.und(t.decay))e.duration=void 0;else{const n=!ve.und(t.tension)||!ve.und(t.friction);(n||!ve.und(t.frequency)||!ve.und(t.damping)||!ve.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var th=[],uS=class{constructor(){this.changed=!1,this.values=th,this.toValues=null,this.fromValues=th,this.config=new sS,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)h();else{ve.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-He.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=He.setTimeout(h,c),o.pauseQueue.add(f),o.timeouts.add(u)):h()}function h(){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)?ao(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}),ao=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)),h=T=>{const S=o<=(n.cancelId||0)&&ao(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new nh,E=new rh;return(async()=>{if(An.skipAnimation)throw yi(n),E.result=Rn(r,!1),f(E),E;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,A)=>{ve.und(C[A])&&(C[A]=D)});const I=await r.start(C);return h(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;ve.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 nh)y=T.result;else if(T instanceof rh)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 ve.fun(a)&&He.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 nh=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.")}},rh=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof rl,lS=1,rl=class extends Gv{constructor(){super(...arguments),this.id=lS++,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 B_(),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){hi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ws.sort(this),hi(this,{type:"priority",parent:this,priority:e})}},jr=Symbol.for("SpringPhase"),fm=1,Zc=2,Qc=4,ac=e=>(e[jr]&fm)>0,ir=e=>(e[jr]&Zc)>0,Ao=e=>(e[jr]&Qc)>0,oh=(e,t)=>t?e[jr]|=Zc|fm:e[jr]&=~Zc,ih=(e,t)=>t?e[jr]|=Qc:e[jr]&=~Qc,dS=class extends rl{constructor(e,t){if(super(),this.animation=new uS,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,!ve.und(e)||!ve.und(t)){const n=ve.obj(e)?{...e}:{...t,from:e};ve.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return on(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=Ss(r.to);!a&&En(r.to)&&(o=pn(on(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,h=f;if(!m){if(h=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=ve.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(ve.und(i.duration))if(i.decay){const E=i.decay===!0?.998:i.decay,C=Math.exp(-(1-E)*b);h=y+T/(1-E)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const E=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let A,F=!1;const k=1,H=Math.ceil(e/k);for(let R=0;R<H&&(A=Math.abs(S)>E,!(!A&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const w=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(w+p)/i.mass;S=S+$*k,h=h+S*k}}else{let E=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)),E=(i.progress||0)+b/this._memoizedDuration,E=E>1?1:E<0?0:E,u.durationProgress=E),h=y+i.easing(E)*(f-y),S=(h-u.lastPosition)/e,m=E==1}u.lastVelocity=S,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(h,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=on(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 He.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;He.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 ve.und(e)?(n=this.queue||[],this.queue=[]):n=[ve.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),He.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=ve.obj(n)?n[t]:n,(n==null||qc(n))&&(n=void 0),r=ve.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=on(r),ve.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)),sh(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)||(ih(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ih(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=hm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ao(this));const r=!ve.und(e.to),o=!ve.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ao(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||ve.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=on(f);const h=!Kn(d,c);h&&this._focus(d);const b=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&cS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||ve.und(d))return n(Rn(this,!0));const E=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=E?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Kc(d);if(R!==v.constructor)if(A)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=En(d),H=!1;if(!k){const R=E||!ac(this)&&m;(h||R)&&(H=Kn(gi(C),I),k=!H),(!Kn(s.immediate,A)&&!A||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(H&&ir(this)&&(s.changed&&!E?k=!0:k||this._stop(c)),!b&&((k||En(c))&&(s.values=v.getPayload(),s.toValues=En(d)?null:F==mi?[1]:pn(I)),s.immediate!=A&&(s.immediate=A,!A&&!E&&this._set(c)),k)){const{onRest:R}=s;Qe(hS,p=>sh(this,t,p));const w=Rn(this,Do(this,c));Ho(this._pendingCalls,w),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!E,R==null||R(w,this),E?Ir(a.onRest,w):(p=s.onStart)==null||p.call(s,w,this)})}E&&this._set(C),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?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;En(t)&&(Eo(t,this),Gc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;En(e)&&pi(e,this)}_set(e,t=!0){const n=on(e);if(!ve.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&&He.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(on(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(oh(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){oh(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hi(this,{type:"idle",parent:this});const r=t?ao(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 hm(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 ve.obj(t)&&ah(t,r),ve.obj(n)&&ah(n,r),e.keys=r.size?Array.from(r):null,e}function fS(e){const t=bi(e);return ve.und(t.default)&&(t.default=tl(t)),t}function ah(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var hS=["onStart","onRest","onChange","onPause","onResume"];function sh(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 pS=["onStart","onChange","onRest"],vS=1,mS=class{constructor(t,n){this.id=vS++,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];ve.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=pn(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(pn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ve.und(t))this.start({pause:!0});else{const n=this.springs;Qe(pn(t),r=>n[r].pause())}return this}resume(t){if(ve.und(t))this.start({pause:!1});else{const n=this.springs;Qe(pn(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;He.onFrame(this._onFrame)}};function Jc(e,t){return Promise.all(t.map(n=>pm(e,n))).then(n=>nl(e,n))}async function pm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=ve.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=ve.arr(o)||ve.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(pS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:E})=>{const C=S.get(T);C?(v||(C.finished=!1),E&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:E||!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)),h=t.cancel===!0||am(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(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=hm(t,a,o);if(y)return ym(e,[y]),pm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function ch(e,t){const n={...e.springs};return t&&Qe(pn(t),r=>{ve.und(r.keys)&&(r=bi(r)),ve.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,Eo(n,e))})}function mm(e,t){const n=new dS;return n.key=e,t&&Eo(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 $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=U_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=gS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function gS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var yS=()=>{const e=[],t=function(r){W_();const o=[];return Qe(e,(i,a)=>{if(ve.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=ve.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(ve.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 ve.fun(r)?r(i,o):r};return t._getProps=n,t};function bS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?yS():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const E=ch(S,v);return i.current>0&&!s.queue.length&&!Object.keys(E).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{vm(S,E),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=>{iS(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 E=S;E<v;E++){const C=c.current[E]||(c.current[E]=new mS(null,s.flush)),I=r?r(E,C):t[E];I&&(u[E]=fS(I))}}const m=c.current.map((S,v)=>ch(S,u[v])),h=l.useContext($s),b=Gf(h),y=h!==b&&oS(h);Ju(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,E)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[E];C&&(aS(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 wS(e,t){const n=ve.fun(e),[[r],o]=bS(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&&uh(this._active)&&sc(this)}_get(){const e=ve.arr(this.source)?this.source.map(on):pn(on(this.source));return this.calc(...e)}_start(){this.idle&&!uh(this._active)&&(this.idle=!1,Qe(Ss(this),e=>{e.done=!1}),An.skipAnimation?(He.batchedUpdates(()=>this.advance()),sc(this)):ws.start(this))}_attach(){let e=1;Qe(pn(this.source),t=>{En(t)&&Eo(t,this),Gc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(pn(this.source),e=>{En(e)&&pi(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=pn(this.source).reduce((t,n)=>Math.max(t,(Gc(n)?n.priority:0)+1),0))}};function ES(e){return e.idle!==!1}function uh(e){return!e.size||Array.from(e).every(ES)}function sc(e){e.idle||(e.idle=!0,Qe(Ss(e),t=>{t.done=!0}),hi(e,{type:"idle",parent:e}))}var Zr=(e,...t)=>new bm(e,t);An.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function xS(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 lh={};function _S(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:lh[f]||(lh[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=xS(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},SS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),CS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(CS.forEach(n=>e[SS(n,t)]=e[t]),e),Zo);var $S=/^(matrix|translate|scale|rotate|skew)/,TS=/^(translate)/,IS=/^(rotate|skew)/,cc=(e,t)=>ve.num(e)&&e!==0?e+t:e,wa=(e,t)=>ve.arr(e)?e.every(n=>wa(n,t)):ve.num(e)?e===t:parseFloat(e)===t,RS=class extends Cs{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(",")})`,wa(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if($S.test(s)){if(delete r[s],ve.und(a))return;const c=TS.test(s)?"px":IS.test(s)?"deg":"";o.push(pn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,wa(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,wa(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new OS(o,i)),super(r)}},OS=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=on(n[0]),[i,a]=this.transforms[r](ve.arr(o)?o:n.map(on));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&Eo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&pi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),hi(this,e)}},PS=["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:hn.unstable_batchedUpdates,createStringInterpolator:Jv,colors:w_});var AS=J_(PS,{applyAnimatedValues:_S,createAnimatedStyle:e=>new RS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),DS=AS.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 NS(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 kS(e,t,n){return Math.max(t,Math.min(e,n))}function MS(e,t){return Math.pow(e,t*5)}function dh(e,t,n){return t===0||Math.abs(t)===1/0?MS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?kS(e,t,n):e<t?-dh(t-e,n-t,r)+t:e>n?+dh(e-n,n-t,r)+n:e}function fh(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 jS(e,t,n){return t&&fh(e.prototype,t),n&&fh(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 LS(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 FS(e,t){if(e){if(typeof e=="string")return hh(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 hh(e,t)}}function hh(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 Ts(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=FS(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=Ts(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 ph(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 VS(){try{return"constructor"in GestureEvent}catch{return!1}}function Sm(){return typeof window<"u"&&"ontouchstart"in window}function BS(){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 vh(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 HS=function(t){return t};function mh(e,t){t===void 0&&(t=HS);var n=Cm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var WS=180,zS=.15,US=.5,YS=50,KS=250,qS={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(zS);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({},qS,{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]]}}),XS=typeof window<"u"&&window.document&&window.document.createElement,GS={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=XS?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},ZS=tn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),r=BS();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=US),ur(t)},swipeDistance:function(t){return t===void 0&&(t=YS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=KS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return WS;case!1:return 0;default:return t}}});function QS(e){return e===void 0&&(e={}),il(e,GS)}function JS(e){return e===void 0&&(e={}),il(e,ZS)}function eC(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=LS(e,["domTarget","eventOptions","window","enabled"]),a=QS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=JS(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,tC=function(t){return t},nC=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,h=this.getInternalMovement(r,this.state),b=u[0]===!1?gh(h[0],m[0]):u[0],y=u[1]===!1?gh(h[1],m[1]):u[1],T=this.checkIntentionality([b,y],h);if(T._blocked)return tn({},T,{_movement:h,delta:[0,0]});var S=T._intentional,v=h,E=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=eu(E,d),I=c?o:[0,0];return E=yh(a,eu(E,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:E,values:r,offset:yh(a,C,I),delta:ol(E,f)})},t.clean=function(){this.clearTimeout()},jS(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||tC}}]),e}();function gh(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function yh(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 rC(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,h=i.threshold,b=ol(c(h),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:ph(f,y),_bounds:ph(m,y)})}var oC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),this.supportsGestureEvents=VS(),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=Ts(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(h){Ln(a,h,function(b){return n.nativeRefs[h](tn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?lC(n,a):dC(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),sC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function iC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function aC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(t).forEach(function(n){return e.touchIds.delete(n)})}function sC(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 cC(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 uC(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 lC(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 dC(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=Ts(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=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function fC(e,t,n){n===void 0&&(n={});var r=pC(e),o=l.useMemo(function(){return new oC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?hC:o.bind}function hC(){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 pC(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 vC=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,NS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(nC),mC=3;function bh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var gC=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){bh(o),uC(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,bh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=mh(o,r.transform);r.updateSharedState(vh(o)),r.updateGestureState(tn({},rC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){iC(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=mh(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=vh(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=mC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(aC(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,h=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,E=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>E&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),cC(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}(vC);function yC(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 Ea(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(!Ea(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(!Ea(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)&&!Ea(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function bC(e,t){try{return Ea(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 wC(e,t){t===void 0&&(t={}),Tr.set("drag",gC);var n=l.useRef();return n.current||(n.current=yC(eC,bC)),fC({drag:e},n.current(t))}var EC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return M.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Ie(EC,n),disabled:o,style:r,...i,children:M.jsx(os,{size:16,color:o?$t.theme.colors.grey1:$t.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};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(at,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||M.jsxs(Yt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(x0,{cursor:"pointer",onClick:t,size:18,color:$t.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(xo,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):M.jsx(at,{"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 xC({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])"],Ba=Dm.join(","),Nm=typeof Element>"u",Lr=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!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},Wa=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},_C=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(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Lr.call(t,Ba)&&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(!Wa(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=Lr.call(a,Ba);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}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)||_C(t))&&!jm(t)?0:t.tabIndex},SC=function(t,n){var r=Rr(t);return r<0&&n&&!jm(t)?0:r},CC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lm=function(t){return t.tagName==="INPUT"},$C=function(t){return Lm(t)&&t.type==="hidden"},TC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},IC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},RC=function(t){if(!t.name)return!0;var n=t.form||Ha(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=IC(o,t.form);return!i||i===t},OC=function(t){return Lm(t)&&t.type==="radio"},PC=function(t){return OC(t)&&!RC(t)},AC=function(t){var n,r=t&&Ha(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=Ha(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},wh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},DC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lr.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=Ha(t);if(c&&!c.shadowRoot&&o(c)===!0)return wh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(AC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wh(t);return!1},NC=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 Lr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},za=function(t,n){return!(n.disabled||Wa(n)||$C(n)||DC(n,t)||TC(n)||NC(n))},ru=function(t,n){return!(PC(n)||Rr(n)<0||!za(t,n))},kC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},MC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=SC(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(CC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},jC=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:kC}):r=km(t,n.includeContainer,ru.bind(null,n)),MC(r)},LC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=km(t,n.includeContainer,za.bind(null,n)),r},Qr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,Ba)===!1?!1:ru(n,t)},FC=Dm.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,FC)===!1?!1:za(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 Eh(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 xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eh(Object(n),!0).forEach(function(r){VC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VC(e,t,n){return t=HC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(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 HC(e){var t=BC(e,"string");return typeof t=="symbol"?t:String(t)}var _h={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()}},WC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},zC=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},UC=function(t){return Jo(t)&&!t.shiftKey},YC=function(t){return Jo(t)&&t.shiftKey},Sh=function(t){return setTimeout(t,0)},Ch=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},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},KC=[],qC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||KC,i=xh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:UC,isKeyBackward:YC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!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 w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||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 w=jC(R,i.tabbableOptions),p=LC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[oe+(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.")},h=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,WC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Ch(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Ch(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(zC(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 w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _h.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sh(function(){h(f())}):h(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",E,{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",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):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 w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=xh({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(),_h.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){Sh(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function XC({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=qC(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 GC(){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 ZC(){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 QC(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 $h={get passive(){al=!0}};window.addEventListener("testPassive",null,$h),window.removeEventListener("testPassive",null,$h)}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=[],Ua=!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))})},Ya=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},JC=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")},e$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},t$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},n$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||t$(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},r$=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(QC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&n$(o,t)},Ua||(document.addEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!0)):JC(n)}},o$=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,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!1)):fr.length||e$()};function i$({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,r$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,o$(o))}}},[t,e,n]),r}var Ar=[],a$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},s$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Th="ResizeObserver loop completed with undelivered notifications.",c$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Th}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Th),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 Dr=function(e){return Object.freeze(e)},u$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(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,Dr(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)},Ih=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)},l$=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:{},ia=new WeakMap,Rh=/auto|scroll/,d$=/^tb|vertical/,f$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new u$((n?t:e)||0,(n?e:t)||0)},Oh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Wm(e))return ia.set(e,Oh),Oh;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!f$&&n.boxSizing==="border-box",i=d$.test(n.writingMode||""),a=!r&&Rh.test(n.overflowY||""),s=!r&&Rh.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),h=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+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Hm(f,c,F,k)});return ia.set(e,w),w},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}},h$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([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},p$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new h$(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},Ph=function(e){Ar.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))})})},v$=function(){var e=0;for(Ph(e);a$();)e=p$(),Ph(e);return s$()&&c$(),e>0},dc,Km=[],m$=function(){return Km.splice(0).forEach(function(e){return e()})},g$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return m$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},y$=function(e){g$(function(){requestAnimationFrame(e)})},xa=0,b$=function(){return!!xa},w$=250,E$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ah=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dh=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,x$=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=w$),!fc){fc=!0;var r=Dh(t);y$(function(){var o=!1;try{o=v$()}finally{if(fc=!1,t=r-Dh(),!b$())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,E$)};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(),Ah.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ah.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new x$,Nh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},_$=function(e){return!sl(e)&&!l$(e)&&getComputedStyle(e).display==="inline"},S$=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 _$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),C$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,kh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new C$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;kh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new S$(n,r&&r.box)),Nh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=kh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Nh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),$$=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.");sa.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(!Ih(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.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(!Ih(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.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 Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function T$(e,t){const r=[].concat(e).map(Ka).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 I$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,R$={box:"border-box"};function hc(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 $$(a);return s.observe(e.current,R$),()=>s.disconnect()},[e,a,n]),n?o:0}function O$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ka(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(Ka(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 P$({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=O$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(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-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function A$({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:h,minHeight:b,headerHeight:y,footerHeight:T}=P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=T$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function D$(){return wS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function N$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([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,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([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 k$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},M$=({initialState:e})=>e==="OPEN",j$=({initialState:e})=>e==="CLOSED",L$=e_({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:{...Mh,...jh}}}},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:{...Mh,...jh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...k$},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:[t_({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:j$,initiallyOpen:M$}}),{tension:F$,friction:ca}=cm.default,V$=["closed","opening","open","closing","dragging","snapping","resizing"];function B$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function H$({minHeight:e}){return e}const W$=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=B$,snapPoints:h=H$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=GC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=D$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=ZC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=i$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=xC({targetRef:K,enabled:j&&b}),ot=XC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=A$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.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:F$,friction:Math.max(ca,ca+(ca-ca*Ye))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=d_(L$,{devTools:I$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ye;return(Ye=H.current)==null?void 0:Ye.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"RESIZE",source:ie.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:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.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:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ye=Zt.current(he.y);Q.current=Ye,c.current=Ye,await tt({y:Ye,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ye,source:kt}})},get height(){return Q.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 rn=wC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.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 Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ye?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=N$({spring:oe});return M.jsxs(DS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":V$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),z$=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(W$,{...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 U$=({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},Y$=U$;process.env.NODE_ENV;var K$=dt({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"]]}),q$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},X$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var G$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=Y$({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,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:q$[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:G$,style:{...i}},a))},vo=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},h)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(K$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?X$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lh[r||"primary"]:Lh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[Z$,AP]=mn(qm),[Q$,J$]=Z$(qm),eT=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),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(Q$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(rT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),tT="CheckboxIndicator",nT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=J$(tT,n);return l.createElement(yr,{present:r||Nr(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}})))}),rT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Xm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const oT=eT,iT=nT;var aT="glci2q0",Fh="glci2q3",sT="glci2q4",Vh={disabled:"glci2q1",enabled:"glci2q2"},cT=dt({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:aT,children:[M.jsx(oT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:cT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(iT,{className:sT,children:[u==="indeterminate"&&M.jsx(I0,{color:"white",className:Fh}),u===!0&&M.jsx(Eu,{color:"white",className:Fh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vh.disabled:Vh.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const uT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var lT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),dT="_5046e76";const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(lT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx($0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:dT,isDisabled:c})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};ul.displayName="Chips";const Zm="Dialog",[Qm,DP]=mn(Zm),[fT,wr]=Qm(Zm),hT=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]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(fT,{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)},pT="DialogTrigger",vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(pT,n),i=st(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:Ae(e.onClick,o.onOpenToggle)}))}),mT="DialogPortal",[NP,Jm]=Qm(mT,{forceMount:void 0}),iu="DialogOverlay",gT=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(yT,ae({},o,{ref:t}))):null}),yT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:uo,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",bT=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(wT,ae({},o,{ref:t})):l.createElement(ET,ae({},o,{ref:t})))}),wT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(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:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),ET=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=st(t,c);return Np(),l.createElement(l.Fragment,null,l.createElement(kp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,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)}),xT="DialogClose",_T=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(xT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ST=hT,CT=vT,$T=gT,TT=bT,IT=_T;var RT="_1jc0z8o4",OT="_1jc0z8o0",PT=dt({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:[]}),AT="_1jc0z8o1",DT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),NT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(TT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const kT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx($T,{className:t,ref:r,...n,children:e})),MT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),jT=({children:e,...t})=>M.jsx(ST,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(CT,{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},h)=>!n&&i?null:M.jsx(jT,{open:n,onOpenChange:r,children:M.jsxs(MT,{children:[M.jsx(kT,{className:Ie(NT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(PT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx(IT,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:RT,"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};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,ref:o,className:OT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=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:AT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=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:DT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var LT="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(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:LT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"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({}),FT=({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]})},VT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var BT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:HT}=$t.atoms,hl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=HT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(BT({variant:n}),u,r),style:o,...a,children:e})});hl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};hl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(CE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(DE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.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:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:OE,children:[M.jsx("input",{ref:k,type:t,className:Ie(RE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(PE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:v,className:Ie(s&&!i&&!F&&IE),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.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,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(NE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var WT=dt({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"]]}),Bh={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 h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(WT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bh[r||"primary"]:Bh.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 zT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const UT=({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},h)=>{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),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(UT,{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:h,className:Ie(zT({fit:E})),...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=dt({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:Ie(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var YT="_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:Ie(YT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var KT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hh="xw6nfa2",qT="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:Ie(KT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:qT,children:[t,M.jsx("div",{className:Hh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hh,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 h=m,b,y;h.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(),q&&q.nb()}let g=0,O=0,N=new Map,q=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)),q=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),q=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,Ve,Ke){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ke),ye.compileShader(Ve),Ke=ye.getShaderInfoLog(Ve),0<Ke.length)throw Ke;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))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)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
146
|
+
*/function Eh(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 xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eh(Object(n),!0).forEach(function(r){VC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VC(e,t,n){return t=HC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(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 HC(e){var t=BC(e,"string");return typeof t=="symbol"?t:String(t)}var _h={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()}},WC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},zC=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},UC=function(t){return Jo(t)&&!t.shiftKey},YC=function(t){return Jo(t)&&t.shiftKey},Sh=function(t){return setTimeout(t,0)},Ch=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},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},KC=[],qC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||KC,i=xh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:UC,isKeyBackward:YC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!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 w=a.tabbableGroups[0],p=w&&w.firstTabbableNode;R=p||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 w=jC(R,i.tabbableOptions),p=LC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(B);return oe<0?L?p.slice(p.indexOf(B)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(B)).reverse().find(function(G){return Qr(G)}):w[oe+(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.")},h=function H(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){H(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,WC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Ch(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var B=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[B];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Ch(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(B){return Rr(B)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(zC(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 w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return _h.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Sh(function(){h(f())}):h(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",E,{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",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):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 w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=xh({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(),_h.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){Sh(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function XC({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=qC(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 GC(){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 ZC(){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 QC(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 $h={get passive(){al=!0}};window.addEventListener("testPassive",null,$h),window.removeEventListener("testPassive",null,$h)}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=[],Ua=!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))})},Ya=function(t){var n=t||window.event;return Bm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},JC=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")},e$=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},t$=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},n$=function(t,n){var r=t.targetTouches[0].clientY-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||t$(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},r$=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(QC(fr),[r]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&n$(o,t)},Ua||(document.addEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!0)):JC(n)}},o$=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,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,al?{passive:!1}:void 0),Ua=!1)):fr.length||e$()};function i$({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,r$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,o$(o))}}},[t,e,n]),r}var Ar=[],a$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},s$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Th="ResizeObserver loop completed with undelivered notifications.",c$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Th}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Th),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 Dr=function(e){return Object.freeze(e)},u$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(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,Dr(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)},Ih=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)},l$=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:{},ia=new WeakMap,Rh=/auto|scroll/,d$=/^tb|vertical/,f$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new u$((n?t:e)||0,(n?e:t)||0)},Oh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Wm(e))return ia.set(e,Oh),Oh;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!f$&&n.boxSizing==="border-box",i=d$.test(n.writingMode||""),a=!r&&Rh.test(n.overflowY||""),s=!r&&Rh.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),h=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+h,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,H=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(H,R,i),contentBoxSize:so(F,k,i),contentRect:new Hm(f,c,F,k)});return ia.set(e,w),w},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}},h$=function(){function e(t){var n=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([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},p$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new h$(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},Ph=function(e){Ar.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))})})},v$=function(){var e=0;for(Ph(e);a$();)e=p$(),Ph(e);return s$()&&c$(),e>0},dc,Km=[],m$=function(){return Km.splice(0).forEach(function(e){return e()})},g$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return m$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Km.push(e),dc()},y$=function(e){g$(function(){requestAnimationFrame(e)})},xa=0,b$=function(){return!!xa},w$=250,E$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ah=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Dh=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,x$=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=w$),!fc){fc=!0;var r=Dh(t);y$(function(){var o=!1;try{o=v$()}finally{if(fc=!1,t=r-Dh(),!b$())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,E$)};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(),Ah.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ah.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new x$,Nh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},_$=function(e){return!sl(e)&&!l$(e)&&getComputedStyle(e).display==="inline"},S$=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 _$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),C$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,kh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new C$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;kh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new S$(n,r&&r.box)),Nh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=kh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Nh(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),$$=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.");sa.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(!Ih(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.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(!Ih(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.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 Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function T$(e,t){const r=[].concat(e).map(Ka).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 I$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,R$={box:"border-box"};function hc(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 $$(a);return s.observe(e.current,R$),()=>s.disconnect()},[e,a,n]),n?o:0}function O$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.75,[i,a]=l.useState(()=>Ka(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(Ka(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 P$({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=O$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(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-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function A$({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:h,minHeight:b,headerHeight:y,footerHeight:T}=P$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=T$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function D$(){return wS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function N$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([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,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([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 k$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Mh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},jh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},M$=({initialState:e})=>e==="OPEN",j$=({initialState:e})=>e==="CLOSED",L$=e_({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:{...Mh,...jh}}}},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:{...Mh,...jh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...k$},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:[t_({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:j$,initiallyOpen:M$}}),{tension:F$,friction:ca}=cm.default,V$=["closed","opening","open","closing","dragging","snapping","resizing"];function B$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function H$({minHeight:e}){return e}const W$=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=B$,snapPoints:h=H$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:H=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=GC(),Y=l.useRef(!1),ne=l.useRef(S),B=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,B.current=v,L.current=E},[v,S,E]);const[oe,G]=D$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=ZC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=i$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=xC({targetRef:K,enabled:j&&b}),rt=XC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=A$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const et=l.useCallback(({onRest:he,config:{velocity:Ye=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ye,...kt,mass:1,tension:F$,friction:Math.max(ca,ca+(ca-ca*Ye))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=d_(L$,{devTools:I$,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:ie.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:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ye)=>{var kt;return(kt=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ye.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"RESIZE",source:ie.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:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await et({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[et]),activate:l.useCallback(async()=>{Y.current=!0,await Promise.all([We.current.activate(),rt.current.activate(),De.current.activate()])},[De,rt,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),rt.current.deactivate(),De.current.deactivate(),Y.current=!1},[De,rt,We]),openImmediately:l.useCallback(async()=>{Q.current=Ct.current,await et({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[et]),openSmoothly:l.useCallback(async()=>{await et({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),Q.current=Ct.current,await et({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[et,me]),snapSmoothly:l.useCallback(async he=>{const Ye=Zt.current(he.y);Q.current=Ye,c.current=Ye,await et({y:Ye,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[et,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await et({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[et,c,me]),closeSmoothly:l.useCallback(async()=>{et({minSnap:Q.current,immediate:!0}),Q.current=0,await et({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await et({ready:0,immediate:!0})},[et,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),rt.current.deactivate(),De.current.deactivate()},[De,rt,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ye=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ye,source:kt}})},get height(){return Q.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 rn=wC(({args:[{closeOnTap:he=!1,isContentDragging:Ye=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!Y.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 Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ye?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=N$({spring:oe});return M.jsxs(DS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":V$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":w,children:[n,b&&M.jsx(at,{"data-rsbs-backdrop":!0,...rn({closeOnTap:H})},"backdrop"),M.jsxs(at,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Am,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(at,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(at,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(at,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),z$=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(W$,{...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 U$=({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},Y$=U$;process.env.NODE_ENV;var K$=dt({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"]]}),q$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},X$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Lh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var G$="p9dczu0";const cl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=Y$({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,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?$t.theme.colors.primary:q$[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:G$,style:{...i}},a))},vo=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},h)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(K$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?X$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Lh[r||"primary"]:Lh.white}):M.jsxs(M.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[Z$,AP]=mn(qm),[Q$,J$]=Z$(qm),eT=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),h=st(t,E=>m(E)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(Q$,{scope:n,state:T,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Xm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(rT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),tT="CheckboxIndicator",nT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=J$(tT,n);return l.createElement(yr,{present:r||Nr(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}})))}),rT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Xm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const oT=eT,iT=nT;var aT="glci2q0",Fh="glci2q3",sT="glci2q4",Vh={disabled:"glci2q1",enabled:"glci2q2"},cT=dt({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:aT,children:[M.jsx(oT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:cT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(iT,{className:sT,children:[u==="indeterminate"&&M.jsx(I0,{color:"white",className:Fh}),u===!0&&M.jsx(Eu,{color:"white",className:Fh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Vh.disabled:Vh.enabled,children:e})]})});Gm.defaultProps={"data-test-id":"base"};const uT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var lT=dt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),dT="_5046e76";const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(lT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx($0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:dT,isDisabled:c})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};ul.displayName="Chips";const Zm="Dialog",[Qm,DP]=mn(Zm),[fT,wr]=Qm(Zm),hT=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]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(fT,{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)},pT="DialogTrigger",vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(pT,n),i=st(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:Ae(e.onClick,o.onOpenToggle)}))}),mT="DialogPortal",[NP,Jm]=Qm(mT,{forceMount:void 0}),iu="DialogOverlay",gT=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(yT,ae({},o,{ref:t}))):null}),yT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:uo,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",bT=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(wT,ae({},o,{ref:t})):l.createElement(ET,ae({},o,{ref:t})))}),wT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(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:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),ET=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=st(t,c);return Np(),l.createElement(l.Fragment,null,l.createElement(kp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,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)}),xT="DialogClose",_T=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(xT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const ST=hT,CT=vT,$T=gT,TT=bT,IT=_T;var RT="_1jc0z8o4",OT="_1jc0z8o0",PT=dt({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:[]}),AT="_1jc0z8o1",DT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),NT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(TT,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const kT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx($T,{className:t,ref:r,...n,children:e})),MT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),jT=({children:e,...t})=>M.jsx(ST,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(CT,{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},h)=>!n&&i?null:M.jsx(jT,{open:n,onOpenChange:r,children:M.jsxs(MT,{children:[M.jsx(kT,{className:Ie(NT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(PT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx(IT,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:RT,"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 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,ref:o,className:OT,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=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:AT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=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:DT({bold:t}),...o,children:M.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var LT="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(at,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:LT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"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({}),FT=({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]})},VT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var BT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:HT}=$t.atoms,hl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=HT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(BT({variant:n}),u,r),style:o,...a,children:e})});hl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};hl.displayName="Divider";const pl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(CE({isDisabled:t}),n),children:e});pl.displayName="ActionIcon";pl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(DE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.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:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[H,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(H){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:OE,children:[M.jsx("input",{ref:k,type:t,className:Ie(RE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(PE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(pl,{isDisabled:v,className:Ie(s&&!i&&!F&&IE),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.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,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(NE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var WT=dt({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"]]}),Bh={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 h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(WT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Bh[r||"primary"]:Bh.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 zT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const UT=({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},h)=>{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),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(at,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(UT,{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:h,className:Ie(zT({fit:E})),...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=dt({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:Ie(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var YT="_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:Ie(YT,n),...r,children:e})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul"};var KT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Hh="xw6nfa2",qT="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:Ie(KT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:qT,children:[t,M.jsx("div",{className:Hh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Hh,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 h=m,b,y;h.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(),q&&q.nb()}let g=0,O=0,N=new Map,q=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)),q=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),q=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,Ve,Ke){if(Ve=ye.createShader(Ve),ye.shaderSource(Ve,Ke),ye.compileShader(Ve),Ke=ye.getShaderInfoLog(Ve),0<Ke.length)throw Ke;ye.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))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)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
147
147
|
attribute vec2 uv;
|
|
148
148
|
uniform vec4 mat;
|
|
149
149
|
uniform vec2 translate;
|
|
@@ -156,19 +156,19 @@ 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(Ce,0,"vertex"),ye.bindAttribLocation(Ce,1,"uv"),ye.linkProgram(Ce),Me=ye.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ye.getUniformLocation(Ce,"mat"),te=ye.getUniformLocation(Ce,"translate"),ye.useProgram(Ce),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(Ce,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ce){if(!_())return null;const Me=g.createTexture();return g.bindTexture(g.TEXTURE_2D,Me),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ce),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),Me};const de=new S(8),le=new S(8),ge=new S(10),Se=new S(10);this.kb=function(Ce,Me,ye,Et,Dt){if(_()){var Ve=de.push(Ce),Ke=le.push(Me);(g.canvas.width!=Ve||g.canvas.height!=Ke)&&(g.canvas.width=Ve,g.canvas.height=Ke),g.viewport(0,Ke-Me,Ce,Me),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),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,ln.Xa),Ve+=4*ln.Xa.length;console.assert(Ve==8*Et),Ve=Se.push(Dt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),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,Ve=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-Me,Ce,Me),ln=!1),ye=2/Ce;const or=-2/Me;g.uniform4f(q,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,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Ve+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Ve==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};h.onRuntimeInitialized=function(){function _(pe){switch(pe){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(pe){return"rgba("+((16711680&pe)>>>16)+","+((65280&pe)>>>8)+","+((255&pe)>>>0)+","+((4278190080&pe)>>>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 pe of Ve){for(const ke of pe.da)ke();pe.da=[]}Ve.clear()}var N=h.RenderPaintStyle;const q=h.RenderPath,te=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,ge=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ye=h.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=Me,Me=Me+1&2147483647||1},decode:function(pe){let ke=Bs;ke.total++;var vt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(vt.ab=ut,vt.cb=v.gb(ut),vt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const mt=ke.ready;mt&&(mt(),ke.ready=null)}}}}),Et=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,ke,vt,ut,mt,Tt,rt){var ft=this.ia,bn=ft.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=vt,Ft.c=ut,Ft.d=mt,Ft.e=Tt,Ft.f=rt,bn.call(ft,pe,Ft)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,ke){this.ia.moveTo(pe,ke)},lineTo:function(pe,ke){this.ia.lineTo(pe,ke)},cubicTo:function(pe,ke,vt,ut,mt,Tt){this.ia.bezierCurveTo(pe,ke,vt,ut,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.extend("CanvasRenderPaint",{color:function(pe){this.Ha=g(pe)},thickness:function(pe){this.eb=pe},join:function(pe){switch(pe){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(pe){switch(pe){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(pe){this.bb=pe},blendMode:function(pe){this.$a=_(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,vt){let ut=this.bb;var mt=this.Ha,Tt=this.qa;if(pe.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var rt=Tt.Wa;const bn=Tt.La;var ft=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=bn-mt,ft-=rt,mt=pe.createRadialGradient(mt,rt,0,mt,rt,Math.sqrt(Tt*Tt+ft*ft))):mt=pe.createLinearGradient(mt,rt,bn,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(ut){case Se:pe.strokeStyle=mt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case ge:pe.fillStyle=mt,pe.fill(ke,vt)}}});const Ve=new Set;let Ke=null,Nt=[],ln=0,zn=0;var Je=h.CanvasRenderer=ue.extend("Renderer",{__construct:function(pe){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=pe.getContext("2d"),this.Fa=pe,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 pe=this.ha.length-6;if(6>pe)throw"restore() called without matching save().";this.ha.splice(pe),this.da.push(this.ba.restore.bind(this.ba))},transform:function(pe,ke,vt,ut,mt,Tt){const rt=this.ha,ft=rt.length-6;rt.splice(ft,6,rt[ft]*pe+rt[ft+2]*ke,rt[ft+1]*pe+rt[ft+3]*ke,rt[ft]*vt+rt[ft+2]*ut,rt[ft+1]*vt+rt[ft+3]*ut,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,pe,ke,vt,ut,mt,Tt))},rotate:function(pe){const ke=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,ke,-ke,pe,0,0)},_drawPath:function(pe,ke){this.da.push(ke.draw.bind(ke,this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},drawImage:function(pe,...ke){var vt=this.ba;this.da.push(function(){vt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,vt){var ut=pe.ab;if(ut){var mt=this.ba,Tt=_(ke);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(ut,0,0),mt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,vt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[vt+ut]},_drawImageMesh:function(pe,ke,vt,ut,mt,Tt,rt,ft,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Id=bn-rt,Rd=Ft-ft;rt=Math.max(rt,0),ft=Math.max(ft,0),bn=Math.min(bn,Mn),Ft=Math.min(Ft,Bt);const So=bn-rt,Co=Ft-ft;if(console.assert(So<=Math.min(Id,Mn)),console.assert(Co<=Math.min(Rd,Bt)),!(0>=So||0>=Co)){bn=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 h.DynamicRectanizer(Bt),Ke.reset(512,512)),Bt=Ke.addRect(xr,_r),0>Bt&&(O(),Ve.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:pe,Ia:Od,Ja:Pd,xb:rt,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=Tt.length;var Hr=this.ba,Hy=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=Hy,Hr.globalAlpha=vt,Hr.drawImage(v.canvas(),Od,Pd,xr,_r,rt,ft,So,Co),Hr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,ke){this.transform(1,0,0,1,pe,ke)}});h.makeRenderer=function(pe){return new Je(pe)},h.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let vt=null;Bs={total:0,loaded:0,ready:function(){ke(vt)}},vt=or(pe),Bs.total==0&&ke(vt)})},N=new T,h.requestAnimationFrame=N.requestAnimationFrame.bind(N),h.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),h.enableFPSCounter=N.lb.bind(N),h.disableFPSCounter=N.ib,N.Qa=O,h.cleanup=function(){Ke&&Ke.delete()}};var E=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),f&&(A=f),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",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 B=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,E),E=null,h.thisProgram&&(C=h.thisProgram);var w;h.wasmBinary&&(w=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,P,j,W,Y,ne,H,L,oe;function G(){var _=p.buffer;h.HEAP8=P=new Int8Array(_),h.HEAP16=W=new Int16Array(_),h.HEAP32=ne=new Int32Array(_),h.HEAPU8=j=new Uint8Array(_),h.HEAPU16=Y=new Uint16Array(_),h.HEAPU32=H=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],z=[];function U(){var _=h.preRun.shift();Z.unshift(_)}var ee=0,Q=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var me;if(me="canvas_advanced.wasm",!re(me)){var Te=me;me=h.locateFile?h.locateFile(Te,A):A+Te}function Pe(_){if(_==me&&w)return new Uint8Array(w);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!w&&(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(()=>Pe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Pe(_))}function Oe(_,g,O){return Ne(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function We(_,g){var O=me;return w||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?Oe(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Oe(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(h)};function ot(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=ot(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function xe(_){throw new Pt(_)}var ct=_=>(_||xe("Cannot use deleted val. handle = "+_),Xe.get(_).value),je=_=>{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 Ct=void 0,tt=void 0;function Fe(_){for(var g="";j[_];)g+=tt[j[_++]];return g}var gt=[];function nn(){for(;gt.length;){var _=gt.pop();_.W.na=!1,_.delete()}}var rn=void 0,Qt={};function he(_,g){for(g===void 0&&xe("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ye={};function kt(_){_=$d(_);var g=Fe(_);return Wn(_),g}function At(_,g){var O=Ye[_];return O===void 0&&xe(g+" has unknown type "+kt(_)),O}function Jt(){}var Ot=!1;function yn(_){--_.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 Ht(_,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=>{yn(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(ne[_>>2])}var kn={},nr={};function Wt(_,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 q=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{Ye.hasOwnProperty(se)?q[de]=Ye[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ye[se],++ue,ue===te.length&&N(q)}))}),te.length===0&&N(q)}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(_||xe(`type "${N}" must have a positive integer typeid pointer`),Ye.hasOwnProperty(_)){if(O.tb)return;xe(`Cannot register type '${N}' twice`)}Ye[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(q=>q()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function J(_){xe(_.W.Z.X.name+" instance already deleted")}function fe(){}function _e(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||xe(`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 Re(_,g,O){h.hasOwnProperty(_)?((O===void 0||h[_].aa!==void 0&&h[_].aa[O]!==void 0)&&xe(`Cannot register public name '${_}' twice`),_e(h,_,_),h.hasOwnProperty(O)&&xe(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),h[_].aa[O]=g):(h[_]=g,O!==void 0&&(h[_].Hb=O))}function Ee(_,g,O,N,q,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,g,O){for(;g!==O;)g.ra||xe(`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&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Le(_,g){if(g===null){if(this.Aa&&xe(`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||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&xe(`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&&xe("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:xe(`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,je(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:xe("Unsupporting sharing policy")}return O}function Be(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&xe(`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=Le:(this.toWireType=N?nt:Be,this.ea=null)}function qt(_,g,O){h.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),h[_].aa!==void 0&&O!==void 0?h[_].aa[O]=g:(h[_]=g,h[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=h["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=K.get(g).apply(null,O);return N}};function qe(_,g){_=Fe(_);var O=_.includes("j")?Er(_,g):K.get(g);return typeof O!="function"&&xe(`unknown function pointer with signature ${_}: ${g}`),O}var yd=void 0;function Hn(_,g){function O(te){q[te]||Ye[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new yd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var te=g.length;2>te&&xe("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),Se=[],Ce=[];return function(){if(arguments.length!==le&&xe(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ce.length=0,Se.length=ue?2:1,Se[0]=q,ue){var Me=g[1].toWireType(Ce,this);Se[1]=Me}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ce,arguments[ye]),Se.push(ge[ye]);if(ye=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ye):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(H[g+4*N>>2]);return O}function bd(_,g,O){return _ instanceof Object||xe(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||xe(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||xe(`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?P:j)[N])};case 1:return function(N){return this.fromWireType((O?W:Y)[N>>1])};case 2:return function(N){return this.fromWireType((O?ne:H)[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(oe[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Oy(_,g,O){switch(g){case 0:return O?function(N){return P[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return Y[N>>1]};case 2:return O?function(N){return ne[N>>2]}:function(N){return H[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 q=_[g++];if(q&128){var te=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<12|ue<<6|_[g++]&63,65536>q?N+=String.fromCharCode(q):(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else N+=String.fromCharCode(q)}return N},xd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Py=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&Y[O];)++O;if(O<<=1,32<O-_&&xd)return xd.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=W[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}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 q=0;q<O;++q)W[g>>1]=_.charCodeAt(q),g+=2;return W[g>>1]=0,g-N},Dy=_=>2*_.length,Ny=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=ne[_+4*O>>2];if(q==0)break;++O,65536<=q?(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023)):N+=String.fromCharCode(q)}return N},ky=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<_.length;++q){var te=_.charCodeAt(q);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(ne[g>>2]=te,g+=4,g+4>O)break}return ne[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 ji(_){var g=jy[_];return g===void 0?Fe(_):g}var Li=[];function Ly(_){var g=Li.length;return Li.push(_),g}function Fy(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(H[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=h.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,h.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},Ct=h.PureVirtualError=Zt("PureVirtualError");for(var Cd=Array(256),Fi=0;256>Fi;++Fi)Cd[Fi]=String.fromCharCode(Fi);tt=Cd,h.getInheritedInstanceCount=function(){return Object.keys(Qt).length},h.getLiveInheritedInstances=function(){var _=[],g;for(g in Qt)Qt.hasOwnProperty(g)&&_.push(Qt[g]);return _},h.flushPendingDeletes=nn,h.setDelayFunction=function(_){rn=_,gt.length&&rn&&rn(nn)},un=h.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||J(this),this.W.pa)return this.W.count.value+=1,this;var _=en,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return _=_(O.call(g,N,{W:{value:{count:q.count,na:q.na,pa:q.pa,Y:q.Y,Z:q.Z,ca:q.ca,fa:q.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),Jt(this),yn(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||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),gt.push(this),gt.length===1&&rn&&rn(nn),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?Ht(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Ht(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 q=Lt(O,this.X,N.X);return q===null?g.call(this):this.ua?Ht(N.X.ga,{Z:N,Y:q,fa:this,ca:_}):Ht(N.X.ga,{Z:N,Y:q})},yd=h.UnboundTypeError=Zt("UnboundTypeError");var By={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,te=q.ga,ue=q.$.ga,se=q.$.constructor;_=ze(_,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new Ct(`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&&xe("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(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},te.__destruct=function(){this===te&&xe("Pass correct 'this' to __destruct"),Jt(this);var le=this.W.Y;le=he(q,le),Qt.hasOwnProperty(le)?delete Qt[le]:xe(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(te);for(var de in O)_.prototype[de]=O[de];return je(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,q=g.Na,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ke=[];ye(Et,Dt,Me.toWireType(Ke,Ve)),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 Se=O();for(ge in se)se[ge].write(Se,le[ge]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var te=rr(O);g=Fe(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:q},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=P;else if(O===2)se=W;else if(O===4)se=ne;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,q,te,ue,se,de,le,ge,Se,Ce){ge=Fe(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=ot(ge);Re(Me,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)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 Ve=Object.create(Dt,{constructor:{value:ye}});ye.prototype=Ve;var Ke=new Ee(ge,ye,Ve,Ce,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(Me,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,q,te,ue){var se=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],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 Se=de.X.constructor;return Se[g]===void 0?(le.ma=O-1,Se[g]=le):(_e(Se,g,ge),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(ge,[Ce[0],null].concat(Ce.slice(1)),null,te,ue),Se[g].aa===void 0?(Ce.ma=O-1,Se[g]=Ce):Se[g].aa[O-1]=Ce,de.X.sa)for(const Me of de.X.sa)Me.constructor.hasOwnProperty(g)||(Me.constructor[g]=Ce);return[]}),[]})},s:function(_,g,O,N,q,te,ue,se){g=Fe(g),te=qe(q,te),Wt([],[_],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])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ye=[];se(N,Se.toWireType(ye,Me)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,te){var ue=Mi(g,O);q=qe(N,q),Wt([],[_],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)},Wt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=ki(de,le,null,q,te),[]}),[]})},a:function(_,g,O,N,q,te,ue,se){var de=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(le){function ge(){Hn(`Cannot call ${Se} due to unbound types`,de)}le=le[0];var Se=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ce=le.X.ga,Me=Ce[g];return Me===void 0||Me.aa===void 0&&Me.className!==le.name&&Me.ma===O-2?(ge.ma=O-2,ge.className=le.name,Ce[g]=ge):(_e(Ce,g,Se),Ce[g].aa[O-2]=ge),Wt([],de,function(ye){return ye=ki(Se,ye,le,te,ue),Ce[g].aa===void 0?(ye.ma=O-2,Ce[g]=ye):Ce[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,q,te,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(ge){ge=ge[0];var Se=`${ge.name}.${g}`,Ce={get(){Hn(`Cannot access ${Se} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ce.set=de?()=>{Hn(`Cannot access ${Se} due to unbound types`,[O,ue])}:()=>{xe(Se+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ye=Me[0],Et={get(){var Ve=bd(this,ge,Se+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ke=bd(this,ge,Se+" setter"),Nt=[];de(le,Ke,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(ge.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Fe(g),V(_,{name:g,fromWireType:function(O){var N=ct(O);return Ms(O),N},toWireType:function(O,N){return je(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function q(){}O=rr(O),g=Fe(g),q.values={},V(_,{name:g,constructor:q,fromWireType:function(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Iy(g,O,N),ea:null}),Re(g,q)},c:function(_,g,O){var N=At(_,"enum");g=Fe(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=Fe(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:Ry(g,O),ea:null})},q:function(_,g,O,N,q,te){var ue=Mi(g,O);_=Fe(_),q=qe(N,q),Re(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),Wt([],ue,function(se){return qt(_,ki(_,[se[0],null].concat(se.slice(1)),null,q,te),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=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,q,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=H;return new q(ue.buffer,ue[te+1],ue[te])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Fe(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Fe(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var q=H[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=q;++se){var de=te+se;if(se==q||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(q),se=0;se<q;++se)le[se]=String.fromCharCode(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var te,ue=typeof q=="string";ue||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||xe("Cannot pass non-string to std::string");var se;if(O&&ue)for(te=se=0;te<q.length;++te){var de=q.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=q.length;if(te=se,se=Vs(4+te+1),de=se+4,H[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var ge=q.charCodeAt(le);if(55296<=ge&&57343>=ge){var Se=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Se&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=q.charCodeAt(ue),255<le&&(Wn(de),xe("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]=q[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Fe(O),g===2)var N=Py,q=Ay,te=Dy,ue=()=>Y,se=1;else g===4&&(N=Ny,q=ky,te=My,ue=()=>H,se=2);V(_,{name:O,fromWireType:function(de){for(var le=H[de>>2],ge=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ye=de+4+Me*g;(Me==le||ge[ye>>se]==0)&&(Ce=N(Ce,ye-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ye+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Se=Vs(4+ge+g);return H[Se>>2]=ge>>se,q(le,Se+4,ge+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,te){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(_,g,O,N,q,te,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Fe(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ct(_),g=At(g,"emval::as");var N=[],q=je(N);return H[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var te=[];return H[N>>2]=je(te),_(g,O,te,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(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 q=_d[g];if(q!==void 0)return q;var te=Array(_-1);return q=Ly((ue,se,de,le)=>{for(var ge=0,Se=0;Se<_-1;++Se)te[Se]=O[Se+1].readValueFromPointer(le+ge),ge+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(te[Se]);if(!N.vb)return N.toWireType(de,ue)}),_d[g]=q},p:function(_){return _=ji(_),je(h[_])},K:function(_,g){return _=ct(_),g=ct(g),je(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return je(ji(_))},n:function(_){var g=ct(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),je(_)},b:()=>{ie("")},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 q=Math;N=Math.max(_,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-p.buffer.byteLength+65535>>>16;try{p.grow(q),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,q){var te=g+O;for(q=H[_+4*q>>2]=te,te=0;te<N.length;++te)P[q++>>0]=N.charCodeAt(te);P[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Sd();H[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),H[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=0,te=0;te<O;te++){var ue=H[g>>2],se=H[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Vy[_];le===0||le===10?((_===1?B:R)(Ed(ge,0)),ge.length=0):ge.push(le)}q+=se}return H[N>>2]=q,0}};(function(){function _(O){if(O=O.exports,h.asm=O,p=h.asm.O,G(),K=h.asm.U,ce.unshift(h.asm.P),ee--,h.monitorRunDependencies&&h.monitorRunDependencies(ee),ee==0&&Q){var N=Q;Q=null,N()}return O}var g={a:By};if(ee++,h.monitorRunDependencies&&h.monitorRunDependencies(ee),h.instantiateWasm)try{return h.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return We(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=h.asm.Q).apply(null,arguments)}function Vs(){return(Vs=h.asm.R).apply(null,arguments)}function $d(){return($d=h.asm.S).apply(null,arguments)}h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.T).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.V).apply(null,arguments)};var Vi;Q=function _(){Vi||Td(),Vi||(Q=_)};function Td(){function _(){if(!Vi&&(Vi=!0,h.calledRun=!0,!$)){if(De(ce),b(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var g=h.postRun.shift();z.unshift(g)}De(z)}}if(!(0<ee)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)U();De(Z),0<ee||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),_()},1)):_())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.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 h,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((h=m.touches)===null||h===void 0)&&h.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 h=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,E=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=d(A),B=k.clientX,R=k.clientY;if(!(!B&&!R)){var w=B-F.left,p=R-F.top,$=v.computeAlignment(E,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;$.invert(P);var j=new v.Vec2D(w,p),W=v.mapXY(P,j),Y=W.x(),ne=W.y();switch(W.delete(),P.delete(),j.delete(),$.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var H=0,L=T;H<L.length;H++){var oe=L[H];oe.pointerMove(Y,ne)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(Y,ne)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(Y,ne)}break}}}},D=I.bind(u);return h.addEventListener("mouseover",D),h.addEventListener("mouseout",D),h.addEventListener("mousemove",D),h.addEventListener("mousedown",D),h.addEventListener("mouseup",D),h.addEventListener("touchmove",D),h.addEventListener("touchstart",D),h.addEventListener("touchend",D),function(){h.removeEventListener("mouseover",D),h.removeEventListener("mouseout",D),h.removeEventListener("mousemove",D),h.removeEventListener("mousedown",D),h.removeEventListener("mouseup",D),h.removeEventListener("touchmove",D),h.removeEventListener("touchstart",D),h.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:()=>h,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(w,p,$,P){function j(W){return W instanceof $?W:new $(function(Y){Y(W)})}return new($||($=Promise))(function(W,Y){function ne(oe){try{L(P.next(oe))}catch(G){Y(G)}}function H(oe){try{L(P.throw(oe))}catch(G){Y(G)}}function L(oe){oe.done?W(oe.value):j(oe.value).then(ne,H)}L((P=P.apply(w,p||[])).next())})},d=function(w,p){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},P,j,W,Y;return Y={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ne(L){return function(oe){return H([L,oe])}}function H(L){if(P)throw new TypeError("Generator is already executing.");for(;Y&&(Y=0,L[0]&&($=0)),$;)try{if(P=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=p.call(w,$)}catch(oe){L=[6,oe],j=0}finally{P=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(w){w.Cover="cover",w.Contain="contain",w.Fill="fill",w.FitWidth="fitWidth",w.FitHeight="fitHeight",w.None="none",w.ScaleDown="scaleDown"})(f||(f={}));var m;(function(w){w.Center="center",w.TopLeft="topLeft",w.TopCenter="topCenter",w.TopRight="topRight",w.CenterLeft="centerLeft",w.CenterRight="centerRight",w.BottomLeft="bottomLeft",w.BottomCenter="bottomCenter",w.BottomRight="bottomRight"})(m||(m={}));var h=function(){function w(p){var $,P,j,W,Y,ne;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(P=p==null?void 0:p.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=p==null?void 0:p.minX)!==null&&j!==void 0?j:0,this.minY=(W=p==null?void 0:p.minY)!==null&&W!==void 0?W:0,this.maxX=(Y=p==null?void 0:p.maxX)!==null&&Y!==void 0?Y:0,this.maxY=(ne=p==null?void 0:p.maxY)!==null&&ne!==void 0?ne:0}return w.new=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new w({fit:$,alignment:P,minX:j,minY:W,maxX:Y,maxY:ne})},w.prototype.copyWith=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return new w({fit:$??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:Y??this.maxX,maxY:ne??this.maxY})},w.prototype.runtimeFit=function(p){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=p.Fit.cover:this.fit===f.Contain?$=p.Fit.contain:this.fit===f.Fill?$=p.Fit.fill:this.fit===f.FitWidth?$=p.Fit.fitWidth:this.fit===f.FitHeight?$=p.Fit.fitHeight:this.fit===f.ScaleDown?$=p.Fit.scaleDown:$=p.Fit.none,this.cachedRuntimeFit=$,$},w.prototype.runtimeAlignment=function(p){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=p.Alignment.topLeft:this.alignment===m.TopCenter?$=p.Alignment.topCenter:this.alignment===m.TopRight?$=p.Alignment.topRight:this.alignment===m.CenterLeft?$=p.Alignment.centerLeft:this.alignment===m.CenterRight?$=p.Alignment.centerRight:this.alignment===m.BottomLeft?$=p.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=p.Alignment.bottomCenter:this.alignment===m.BottomRight?$=p.Alignment.bottomRight:$=p.Alignment.center,this.cachedRuntimeAlignment=$,$},w}(),b=function(){function w(){}return w.loadRuntime=function(){a.default({locateFile:function(){return w.wasmURL}}).then(function(p){var $;for(w.runtime=p;w.callBackQueue.length>0;)($=w.callBackQueue.shift())===null||$===void 0||$(w.runtime)})},w.getInstance=function(p){w.isLoading||(w.isLoading=!0,w.loadRuntime()),w.runtime?p(w.runtime):w.callBackQueue.push(p)},w.awaitInstance=function(){return new Promise(function(p){return w.getInstance(function($){return p($)})})},w.setWasmUrl=function(p){w.wasmURL=p},w.isLoading=!1,w.callBackQueue=[],w.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),w}(),y=function(){function w(p,$,P,j){this.animation=p,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(p,$)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},w.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(w.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){this.instance.delete()},w}(),T;(function(w){w[w.Number=56]="Number",w[w.Trigger=58]="Trigger",w[w.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function w(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(w.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),w.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},w}(),v=function(){function w(p,$,P,j){this.stateMachine=p,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(p,j),this.initInputs($)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.instance.advance(p)},w.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var P=this.instance.input($);this.inputs.push(this.mapRuntimeInput(P,p))}},w.prototype.mapRuntimeInput=function(p,$){if(p.type===$.SMIInput.bool)return new S(T.Boolean,p.asBool());if(p.type===$.SMIInput.number)return new S(T.Number,p.asNumber());if(p.type===$.SMIInput.trigger)return new S(T.Trigger,p.asTrigger())},w.prototype.cleanup=function(){this.instance.delete()},w}(),E=function(){function w(p,$,P,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=p,this.artboard=$,this.eventManager=P,this.animations=j,this.stateMachines=W}return w.prototype.add=function(p,$,P){if(P===void 0&&(P=!0),p=B(p),p.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}),Y=0;Y<p.length;Y++){var ne=j.indexOf(p[Y]),H=W.indexOf(p[Y]);if(ne>=0||H>=0)ne>=0?this.animations[ne].playing=$:this.stateMachines[H].playing=$;else{var L=this.artboard.animationByName(p[Y]);if(L){var oe=new y(L,this.artboard,this.runtime,$);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(p[Y]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return P&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},w.prototype.play=function(p){return this.add(p,!0)},w.prototype.pause=function(p){return this.add(p,!1)},w.prototype.scrub=function(p,$){var P=this.animations.filter(function(j){return p.includes(j.name)});return P.forEach(function(j){return j.scrubTo=$}),P.map(function(j){return j.name})},Object.defineProperty(w.prototype,"playing",{get:function(){return this.animations.filter(function(p){return p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"paused",{get:function(){return this.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),w.prototype.stop=function(p){var $=this;p=B(p);var P=[];if(p.length===0)P=this.animations.map(function(Y){return Y.name}).concat(this.stateMachines.map(function(Y){return Y.name})),this.animations.forEach(function(Y){return Y.cleanup()}),this.stateMachines.forEach(function(Y){return Y.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(Y){return p.includes(Y.name)});j.forEach(function(Y){Y.cleanup(),$.animations.splice($.animations.indexOf(Y),1)});var W=this.stateMachines.filter(function(Y){return p.includes(Y.name)});W.forEach(function(Y){Y.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(Y),1)}),P=j.map(function(Y){return Y.name}).concat(W.map(function(Y){return Y.name}))}return this.eventManager.fire({type:C.Stop,data:P}),P},Object.defineProperty(w.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(p,$){return p||$.playing},!1)||this.stateMachines.reduce(function(p,$){return p||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),w.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],p,$)),P},w.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(j){return j.playing});p<$.length;p++){var P=$[p];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},w.prototype.handleStateChanges=function(){for(var p=[],$=0,P=this.stateMachines.filter(function(W){return W.playing});$<P.length;$++){var j=P[$];p.push.apply(p,j.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},w.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},w}(),C;(function(w){w.Load="load",w.LoadError="loaderror",w.Play="play",w.Pause="pause",w.Stop="stop",w.Loop="loop",w.Draw="draw",w.Advance="advance",w.StateChange="statechange"})(C||(C={}));var I;(function(w){w.OneShot="oneshot",w.Loop="loop",w.PingPong="pingpong"})(I||(I={}));var D=function(){function w(p){p===void 0&&(p=[]),this.listeners=p}return w.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},w.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},w.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var P=this.listeners[$];if(P.type===p.type&&P.callback===p.callback){this.listeners.splice($,1);break}}},w.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(P){return P.type===p}).forEach(function(P){return $.remove(P)}):this.listeners.splice(0,this.listeners.length)},w.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(P){return P.callback(p)})},w}(),A=function(){function w(p){this.eventManager=p,this.queue=[]}return w.prototype.add=function(p){this.queue.push(p)},w.prototype.process=function(){for(;this.queue.length>0;){var p=this.queue.shift();p!=null&&p.action&&p.action(),p!=null&&p.event&&this.eventManager.fire(p.event)}},w}(),F=function(){function w(p){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=p.canvas,this.src=p.src,this.buffer=p.buffer,this.layout=($=p.layout)!==null&&$!==void 0?$:new h,this.shouldDisableRiveListeners=!!p.shouldDisableRiveListeners,this.eventManager=new D,p.onLoad&&this.on(C.Load,p.onLoad),p.onLoadError&&this.on(C.LoadError,p.onLoadError),p.onPlay&&this.on(C.Play,p.onPlay),p.onPause&&this.on(C.Pause,p.onPause),p.onStop&&this.on(C.Stop,p.onStop),p.onLoop&&this.on(C.Loop,p.onLoop),p.onStateChange&&this.on(C.StateChange,p.onStateChange),p.onAdvance&&this.on(C.Advance,p.onAdvance),p.onload&&!p.onLoad&&this.on(C.Load,p.onload),p.onloaderror&&!p.onLoadError&&this.on(C.LoadError,p.onloaderror),p.onplay&&!p.onPlay&&this.on(C.Play,p.onplay),p.onpause&&!p.onPause&&this.on(C.Pause,p.onpause),p.onstop&&!p.onStop&&this.on(C.Stop,p.onstop),p.onloop&&!p.onLoop&&this.on(C.Loop,p.onloop),p.onstatechange&&!p.onStateChange&&this.on(C.StateChange,p.onstatechange),this.taskQueue=new A(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:p.autoplay,animations:p.animations,stateMachines:p.stateMachines,artboard:p.artboard,useOffscreenRenderer:p.useOffscreenRenderer})}return w.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new w(p)},w.prototype.init=function(p){var $=this,P=p.src,j=p.buffer,W=p.animations,Y=p.stateMachines,ne=p.artboard,H=p.autoplay,L=H===void 0?!1:H,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(w.missingErrorMessage);var K=B(W),Z=B(Y);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(ne,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},w.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&p.runtime.hasListeners(P.instance)}).map(function(P){return P.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)})}},w.prototype.initData=function(p,$,P,j){var W;return u(this,void 0,void 0,function(){var Y,ne,H;return d(this,function(L){switch(L.label){case 0:return this.src?(Y=this,[4,k(this.src)]):[3,2];case 1:Y.buffer=L.sent(),L.label=2;case 2:return ne=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ne.file=L.sent(),this.file?(this.initArtboard(p,$,P,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()]):(H="Problem loading file; may be corrupt!",console.warn(H),this.eventManager.fire({type:C.LoadError,data:H}),[2,Promise.reject(H)])}})})},w.prototype.initArtboard=function(p,$,P,j){var W=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!W){var Y="Invalid artboard name or no default artboard";console.warn(Y),this.eventManager.fire({type:C.LoadError,data:Y});return}if(this.artboard=W,this.artboard.animationCount()<1){var Y="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:Y}),Y}this.animator=new E(this.runtime,this.artboard,this.eventManager);var ne;$.length>0||P.length>0?(ne=$.concat(P),this.animator.add(ne,j,!1)):ne=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:ne}})},w.prototype.drawFrame=function(){this.startRendering()},w.prototype.draw=function(p,$){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),Y=0,ne=W;Y<ne.length;Y++){var H=ne[Y];H.advance(j),H.instance.didLoop&&(H.loopCount+=1),H.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.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-P);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)},w.prototype.alignRenderer=function(){var p=this,$=p.renderer,P=p.runtime,j=p._layout,W=p.artboard;$.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(w.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(p,$){return p+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){var p,$;this.stopRendering(),this.cleanupInstances(),(p=this.renderer)===null||p===void 0||p.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},w.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},w.prototype.play=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},w.prototype.pause=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},w.prototype.scrub=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},w.prototype.stop=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},w.prototype.reset=function(p){var $,P=p==null?void 0:p.artboard,j=B(p==null?void 0:p.animations),W=B(p==null?void 0:p.stateMachines),Y=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(P,j,W,Y),this.taskQueue.process()},w.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(w.prototype,"layout",{get:function(){return this._layout},set:function(p){this._layout=p,(!p.maxX||!p.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),w.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},w.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,P=p.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(w.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.animationCount();$++)p.push(this.artboard.animationByIndex($).name);return p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.stateMachineCount();$++)p.push(this.artboard.stateMachineByIndex($).name);return p},enumerable:!1,configurable:!0}),w.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(P){return P.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(w.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),w.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},w.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},w.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},w.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},w.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},w.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},w.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)))},w.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},w.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(w.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var P=this.file.artboardByIndex($),j={name:P.name,animations:[],stateMachines:[]},W=0;W<P.animationCount();W++){var Y=P.animationByIndex(W);j.animations.push(Y.name)}for(var ne=0;ne<P.stateMachineCount();ne++){for(var H=P.stateMachineByIndex(ne),L=H.name,oe=new this.runtime.StateMachineInstance(H,P),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}p.artboards.push(j)}return p}},enumerable:!1,configurable:!0}),w.missingErrorMessage="Rive source file or data buffer required",w}(),k=function(w){return u(void 0,void 0,void 0,function(){var p,$,P;return d(this,function(j){switch(j.label){case 0:return p=new Request(w),[4,fetch(p)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},B=function(w){return typeof w=="string"?[w]:w instanceof Array?w:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(ig);var XT=ig.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=XT;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 E,C=1,I=arguments.length;C<I;C++)for(var D in E=arguments[C])Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D]);return v},i.apply(this,arguments)};function a(v,E){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&E.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++)E.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,E){E===void 0&&(E=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&E){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,B=t.useRef(new u((A=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,w=[],p=0;p<arguments.length;p++)w[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,w)},F)})));return t.useEffect(function(){var R=B.current;if(E){var w=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),w&&d&&R.unobserve(w)}}R.disconnect()},[v,B]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var E=v.riveLoaded,C=E!==void 0&&E,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,B=v.artboardBounds,R=b(F),w=t.useState({height:0,width:0}),p=w[0],$=p.height,P=p.width,j=w[1],W=t.useState({height:0,width:0}),Y=W[0],ne=Y.height,H=Y.width,L=W[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,U=m(D,ce),ee=function(){var Te=s(),Pe=t.useState(Te),Ne=Pe[0],Oe=Pe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var ot=s();Oe(ot)},De=window.matchMedia("screen and (resolution: ".concat(Ne,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",We):De.addListener(We),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",We):De.removeListener(We)}}},[Ne]),Ne}(),Q=B??{},ie=Q.maxX,re=Q.maxY,me=t.useCallback(function(){var Te,Pe,Ne,Oe,We=(Pe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Pe!==void 0?Pe:0,De=(Oe=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Oe!==void 0?Oe:0;return Z&&B?{width:We,height:We*(B.maxY/B.maxX)}:{width:We,height:De}},[D,Z,ie,re]);t.useEffect(function(){if(ce&&D.current&&C){var Te=me(),Pe=Te.width,Ne=Te.height,Oe=!1;if(I.current){var We=Pe!==P||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Oe=!0),R.useDevicePixelRatio){if(We||Pe*ee!==H||Ne*ee!==ne){var De=ee*Pe,ot=ee*Ne;I.current.width=De,I.current.height=ot,I.current.style.width=Pe+"px",I.current.style.height=Ne+"px",L({width:De,height:ot}),Oe=!0}}else We&&(I.current.width=Pe,I.current.height=Ne,L({width:Pe,height:Ne}),Oe=!0);j({width:Pe,height:Ne})}k&&(G||Oe)&&k&&k(),G&&K(!1)}},[I,D,U,ee,me,G,K,ne,H,$,P,k,ce,Z,z,C])}function T(v){var E=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,A=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),B=i({width:"100%",height:"100%"},A);return o.default.createElement("div",i({ref:E,className:D},!D&&{style:B}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,E){E===void 0&&(E={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,B=b(E),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:C,containerRef:I,options:B,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var w=t.useCallback(function(j){if(j&&v&&k){var W=B.useOffscreenRenderer,Y=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));Y.on(n.EventType.Load,function(){C.current?F(Y):Y.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),p=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var $=v==null?void 0:v.animations;t.useEffect(function(){A&&$&&(A.isPlaying?(A.stop(A.animationNames),A.play($)):A.isPaused&&(A.stop(A.animationNames),A.pause($)))},[$,A]);var P=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:w},j))},[w,p]);return{canvas:C.current,container:I.current,setCanvasRef:w,setContainerRef:p,rive:A,RiveComponent:P}}e.default=function(v){var E=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,A=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,B=v.shouldDisableRiveListeners,R=B!==void 0&&B,w=v.shouldResizeCanvasToContainer,p=w===void 0||w,$=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:E,artboard:C,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(j,i({},P),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,E,C,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&E&&C||F(null),v&&E&&C){var B=v.stateMachineInputs(E);if(B){var R=B.find(function(w){return w.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]),A},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(og);const GT=yp(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(GT,{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 ZT=dt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const QT=({color:e,size:t,...n})=>M.jsx(et,{...n,className:Ie(ZT({color:e,size:t}))});function JT(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 eI="_1ypj0tt5",tI="_1ypj0tt4",nI="_1ypj0tt3",Wh="_1ypj0tt1",rI="_1ypj0tt0",oI="_1ypj0tt2";const iI=({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:Ie(eI,e),children:a})},sg=JT(iI),aI=e=>null;function sI(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=aI,t}const cI=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),h=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,B=0,R=0,w=!1,p=!1;const $=(L,oe)=>{L.transform=oe},P=(L,oe)=>{L.transition=oe},j=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,P((K=f.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{A(),f.current&&P(f.current.style,"")},+G*1e3))},W=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:z=>{const U=+new Date;Z=(z-K)/(U-G),U-G>=L&&(Z=U-G<=oe?Z:0,K=z,G=U)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),Y=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=W.getVelocity(L)*4;K&&(L=K*40+L,G=Math.abs(K)*.1),L%h.current!==0&&(L=Math.round(L/h.current)*h.current),L<0?L=0:L>oe&&(L=oe),j(0,L,G<.3?.3:G),D()},ne=L=>{w||(p=!0,R=L,B=k)},H=L=>{var oe;w||!p||(k=B-L+R,W.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>ne(L.touches[0].pageY),mousedown:L=>ne(L.pageY),touchmove:L=>{L.preventDefault(),H(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),H(L.pageY)},touchend:()=>Y(),touchcancel:()=>Y(),mouseup:()=>Y(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{w=L}}})(),E=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 B=l.Children.toArray(t),R=s(k,h.current,B.length);if(b.current!==R){b.current=R;const w=B[R];w&&e.onScrollChange?e.onScrollChange(w.props.value):!B&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Wh} ${oI}`,B=w=>{const{className:p="",style:$,value:P}=w.props,j=T===P;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Wh} ${p}`,children:w.props.children},P)};return l.Children?l.Children.map(t,B):[].concat(t).map(B)};return l.useEffect(()=>{var w,p,$;const k=((w=d.current)==null?void 0:w.getBoundingClientRect().height)??0,B=((p=m.current)==null?void 0:p.getBoundingClientRect().height)??0;h.current=(($=m.current)==null?void 0:$.getBoundingClientRect().height)??0;let R=Math.floor(k/B);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${B*R}px 0`,m.current.style.top=`${B*R}px`,v.setDisabled(c),o(T,h.current,E),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const W=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(P,v[P],W)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,E,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,h.current,C)},[C,o,T]),M.jsxs("div",{className:Ie(rI,u),ref:d,children:[M.jsx("div",{className:Ie(nI,u),ref:m}),M.jsx("div",{className:tI,ref:f,children:F()})]})},au=sI(cI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const qa=24*60*60*1e3,uI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),lI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},zh=(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)},Uh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},Yh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),dI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],fI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=uI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[h,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=()=>$(h||y.current),v=()=>w().getFullYear(),E=()=>p().getFullYear(),C=()=>w().getMonth(),I=()=>p().getMonth(),D=()=>w().getDate(),A=()=>p().getDate(),F=()=>w().getHours(),k=()=>p().getHours(),B=()=>w().getMinutes(),R=()=>p().getMinutes(),w=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=w(),Z=p();if(o===Mt.DATE_TIME){if(G<K)return Sr(K);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+qa<=K)return Sr(K);if(G>=+Z+qa)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),U=K.getHours(),ee=K.getMinutes(),Q=G.getHours(),ie=G.getMinutes();if(Q<U||Q===U&&ie<ee)return Sr(K);if(Q>ce||Q===ce&&ie>z)return Sr(Z)}return G},P=(G,K)=>{const Z=parseInt(G[K],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(K){case 0:ce.setDate(Z);break;case 1:lI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:zh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Uh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:zh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Uh(ce,Z);break}return $(ce)},j=(G,K)=>{const Z=P(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},W=(G,K)=>{if(e.onScrollChange){const Z=P(G,K);e.onScrollChange(Z,G,K)}},Y=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),z=E(),U=C(),ee=I(),Q=D(),ie=A(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const me={key:"year",props:{children:re}};if(o===Mt.YEAR)return[me];const Te=[];let Pe=0,Ne=11;ce===K&&(Pe=U),z===K&&(Ne=ee);for(let ze=Pe;ze<=Ne;ze+=1){const xt=m?m(ze,G):dI(ze);Te.push({value:`${ze}`,label:xt})}const Oe={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Oe,me];const We=[];let De=1,ot=cg(G);ce===K&&U===Z&&(De=Q),z===K&&ee===Z&&(ot=ie);for(let ze=De;ze<=ot;ze+=1){const xt=f?f(ze,G):`${ze}`;We.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:We}},Oe,me]},ne=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const U=B(),ee=R(),Q=F(),ie=k(),re=G.getHours();if(o===Mt.DATE_TIME){const Oe=G.getFullYear(),We=G.getMonth(),De=G.getDate(),ot=v(),ze=E(),xt=C(),Xe=I(),Pt=D(),xe=A();ot===Oe&&xt===We&&Pt===De&&(K=Q,Q===re&&(ce=U)),ze===Oe&&Xe===We&&xe===De&&(Z=ie,ie===re&&(z=ee))}else K=Q,Q===re&&(ce=U),Z=ie,ie===re&&(z=ee);const me=[];K===0&&Z===0||K!==0&&Z!==0?K=Yh(K):K===0&&c&&(K=1,me.push({value:"0",label:"12"})),Z=Yh(Z);for(let Oe=K;Oe<=Z;Oe+=1)me.push({value:`${Oe}`,label:pc(Oe)});const Te=[],Pe=G.getMinutes();for(let Oe=ce;Oe<=z;Oe+=s)Te.push({value:`${Oe}`,label:pc(Oe)}),Pe>Oe&&Pe<Oe+s&&Te.push({value:`${Pe}`,label:pc(Pe)});return{cols:[{key:"hours",props:{children:me}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Pe}},H=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:Y(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:Y(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=Y(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=ne(G);K=K.concat(ce.cols);const z=G.getHours();let U=[`${z}`,`${ce.selMinute}`],ee=z;c&&(ee=z>12?z-12:z,U=[`${ee}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(U)}return{value:Z,cols:K}},{value:L,cols:oe}=H();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:oe.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>M.jsx(au.Item,{value:K.value,children:K.label},K.value))},G.key))})};var su={exports:{}},yt={};/** @license React v17.0.2
|
|
159
|
+
}`),ye.bindAttribLocation(Ce,0,"vertex"),ye.bindAttribLocation(Ce,1,"uv"),ye.linkProgram(Ce),Me=ye.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ye.getUniformLocation(Ce,"mat"),te=ye.getUniformLocation(Ce,"translate"),ye.useProgram(Ce),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(Ce,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ce){if(!_())return null;const Me=g.createTexture();return g.bindTexture(g.TEXTURE_2D,Me),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ce),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),Me};const de=new S(8),le=new S(8),ge=new S(10),Se=new S(10);this.kb=function(Ce,Me,ye,Et,Dt){if(_()){var Ve=de.push(Ce),Ke=le.push(Me);(g.canvas.width!=Ve||g.canvas.height!=Ke)&&(g.canvas.width=Ve,g.canvas.height=Ke),g.viewport(0,Ke-Me,Ce,Me),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),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,ln.Xa),Ve+=4*ln.Xa.length;console.assert(Ve==8*Et),Ve=Se.push(Dt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),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,Ve=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-Me,Ce,Me),ln=!1),ye=2/Ce;const or=-2/Me;g.uniform4f(q,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,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Ve+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Ve==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};h.onRuntimeInitialized=function(){function _(pe){switch(pe){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(pe){return"rgba("+((16711680&pe)>>>16)+","+((65280&pe)>>>8)+","+((255&pe)>>>0)+","+((4278190080&pe)>>>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 pe of Ve){for(const ke of pe.da)ke();pe.da=[]}Ve.clear()}var N=h.RenderPaintStyle;const q=h.RenderPath,te=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,ge=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ye=h.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=Me,Me=Me+1&2147483647||1},decode:function(pe){let ke=Bs;ke.total++;var vt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(vt.ab=ut,vt.cb=v.gb(ut),vt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const mt=ke.ready;mt&&(mt(),ke.ready=null)}}}}),Et=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,ke,vt,ut,mt,Tt,nt){var ft=this.ia,bn=ft.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=vt,Ft.c=ut,Ft.d=mt,Ft.e=Tt,Ft.f=nt,bn.call(ft,pe,Ft)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,ke){this.ia.moveTo(pe,ke)},lineTo:function(pe,ke){this.ia.lineTo(pe,ke)},cubicTo:function(pe,ke,vt,ut,mt,Tt){this.ia.bezierCurveTo(pe,ke,vt,ut,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.extend("CanvasRenderPaint",{color:function(pe){this.Ha=g(pe)},thickness:function(pe){this.eb=pe},join:function(pe){switch(pe){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(pe){switch(pe){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(pe){this.bb=pe},blendMode:function(pe){this.$a=_(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,vt){let ut=this.bb;var mt=this.Ha,Tt=this.qa;if(pe.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var nt=Tt.Wa;const bn=Tt.La;var ft=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=bn-mt,ft-=nt,mt=pe.createRadialGradient(mt,nt,0,mt,nt,Math.sqrt(Tt*Tt+ft*ft))):mt=pe.createLinearGradient(mt,nt,bn,ft);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)nt=Ft[Mn],mt.addColorStop(nt.stop,g(nt.color));this.Ha=mt,this.qa=null}switch(ut){case Se:pe.strokeStyle=mt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case ge:pe.fillStyle=mt,pe.fill(ke,vt)}}});const Ve=new Set;let Ke=null,Nt=[],ln=0,zn=0;var Je=h.CanvasRenderer=ue.extend("Renderer",{__construct:function(pe){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=pe.getContext("2d"),this.Fa=pe,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 pe=this.ha.length-6;if(6>pe)throw"restore() called without matching save().";this.ha.splice(pe),this.da.push(this.ba.restore.bind(this.ba))},transform:function(pe,ke,vt,ut,mt,Tt){const nt=this.ha,ft=nt.length-6;nt.splice(ft,6,nt[ft]*pe+nt[ft+2]*ke,nt[ft+1]*pe+nt[ft+3]*ke,nt[ft]*vt+nt[ft+2]*ut,nt[ft+1]*vt+nt[ft+3]*ut,nt[ft]*mt+nt[ft+2]*Tt+nt[ft+4],nt[ft+1]*mt+nt[ft+3]*Tt+nt[ft+5]),this.da.push(this.ba.transform.bind(this.ba,pe,ke,vt,ut,mt,Tt))},rotate:function(pe){const ke=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,ke,-ke,pe,0,0)},_drawPath:function(pe,ke){this.da.push(ke.draw.bind(ke,this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},drawImage:function(pe,...ke){var vt=this.ba;this.da.push(function(){vt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,vt){var ut=pe.ab;if(ut){var mt=this.ba,Tt=_(ke);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(ut,0,0),mt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,vt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[vt+ut]},_drawImageMesh:function(pe,ke,vt,ut,mt,Tt,nt,ft,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Id=bn-nt,Rd=Ft-ft;nt=Math.max(nt,0),ft=Math.max(ft,0),bn=Math.min(bn,Mn),Ft=Math.min(Ft,Bt);const So=bn-nt,Co=Ft-ft;if(console.assert(So<=Math.min(Id,Mn)),console.assert(Co<=Math.min(Rd,Bt)),!(0>=So||0>=Co)){bn=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 h.DynamicRectanizer(Bt),Ke.reset(512,512)),Bt=Ke.addRect(xr,_r),0>Bt&&(O(),Ve.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:pe,Ia:Od,Ja:Pd,xb:nt,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=Tt.length;var Hr=this.ba,Hy=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=Hy,Hr.globalAlpha=vt,Hr.drawImage(v.canvas(),Od,Pd,xr,_r,nt,ft,So,Co),Hr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,ke){this.transform(1,0,0,1,pe,ke)}});h.makeRenderer=function(pe){return new Je(pe)},h.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let vt=null;Bs={total:0,loaded:0,ready:function(){ke(vt)}},vt=or(pe),Bs.total==0&&ke(vt)})},N=new T,h.requestAnimationFrame=N.requestAnimationFrame.bind(N),h.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),h.enableFPSCounter=N.lb.bind(N),h.disableFPSCounter=N.ib,N.Qa=O,h.cleanup=function(){Ke&&Ke.delete()}};var E=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),f&&(A=f),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",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=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,E),E=null,h.thisProgram&&(C=h.thisProgram);var w;h.wasmBinary&&(w=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,P,j,W,Y,ne,B,L,oe;function G(){var _=p.buffer;h.HEAP8=P=new Int8Array(_),h.HEAP16=W=new Int16Array(_),h.HEAP32=ne=new Int32Array(_),h.HEAPU8=j=new Uint8Array(_),h.HEAPU16=Y=new Uint16Array(_),h.HEAPU32=B=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],z=[];function U(){var _=h.preRun.shift();Z.unshift(_)}var ee=0,Q=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var me;if(me="canvas_advanced.wasm",!re(me)){var Te=me;me=h.locateFile?h.locateFile(Te,A):A+Te}function Pe(_){if(_==me&&w)return new Uint8Array(w);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!w&&(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(()=>Pe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Pe(_))}function Oe(_,g,O){return Ne(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function We(_,g){var O=me;return w||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?Oe(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Oe(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(h)};function rt(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=rt(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function xe(_){throw new Pt(_)}var ct=_=>(_||xe("Cannot use deleted val. handle = "+_),Xe.get(_).value),je=_=>{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 Ct=void 0,et=void 0;function Fe(_){for(var g="";j[_];)g+=et[j[_++]];return g}var gt=[];function nn(){for(;gt.length;){var _=gt.pop();_.W.na=!1,_.delete()}}var rn=void 0,Qt={};function he(_,g){for(g===void 0&&xe("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ye={};function kt(_){_=$d(_);var g=Fe(_);return Wn(_),g}function At(_,g){var O=Ye[_];return O===void 0&&xe(g+" has unknown type "+kt(_)),O}function Jt(){}var Ot=!1;function yn(_){--_.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 Ht(_,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=>{yn(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(ne[_>>2])}var kn={},nr={};function Wt(_,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 q=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{Ye.hasOwnProperty(se)?q[de]=Ye[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ye[se],++ue,ue===te.length&&N(q)}))}),te.length===0&&N(q)}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(_||xe(`type "${N}" must have a positive integer typeid pointer`),Ye.hasOwnProperty(_)){if(O.tb)return;xe(`Cannot register type '${N}' twice`)}Ye[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(q=>q()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function J(_){xe(_.W.Z.X.name+" instance already deleted")}function fe(){}function _e(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||xe(`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 Re(_,g,O){h.hasOwnProperty(_)?((O===void 0||h[_].aa!==void 0&&h[_].aa[O]!==void 0)&&xe(`Cannot register public name '${_}' twice`),_e(h,_,_),h.hasOwnProperty(O)&&xe(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),h[_].aa[O]=g):(h[_]=g,O!==void 0&&(h[_].Hb=O))}function Ee(_,g,O,N,q,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,g,O){for(;g!==O;)g.ra||xe(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),_=g.ra(_),g=g.$;return _}function tt(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Le(_,g){if(g===null){if(this.Aa&&xe(`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||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&xe(`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&&xe("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:xe(`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,je(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:xe("Unsupporting sharing policy")}return O}function Be(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&xe(`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=Le:(this.toWireType=N?tt:Be,this.ea=null)}function qt(_,g,O){h.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),h[_].aa!==void 0&&O!==void 0?h[_].aa[O]=g:(h[_]=g,h[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=h["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=K.get(g).apply(null,O);return N}};function qe(_,g){_=Fe(_);var O=_.includes("j")?Er(_,g):K.get(g);return typeof O!="function"&&xe(`unknown function pointer with signature ${_}: ${g}`),O}var yd=void 0;function Hn(_,g){function O(te){q[te]||Ye[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new yd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var te=g.length;2>te&&xe("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),Se=[],Ce=[];return function(){if(arguments.length!==le&&xe(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ce.length=0,Se.length=ue?2:1,Se[0]=q,ue){var Me=g[1].toWireType(Ce,this);Se[1]=Me}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ce,arguments[ye]),Se.push(ge[ye]);if(ye=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ye):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(B[g+4*N>>2]);return O}function bd(_,g,O){return _ instanceof Object||xe(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||xe(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||xe(`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?P:j)[N])};case 1:return function(N){return this.fromWireType((O?W:Y)[N>>1])};case 2:return function(N){return this.fromWireType((O?ne: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(oe[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Oy(_,g,O){switch(g){case 0:return O?function(N){return P[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return Y[N>>1]};case 2:return O?function(N){return ne[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 q=_[g++];if(q&128){var te=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<12|ue<<6|_[g++]&63,65536>q?N+=String.fromCharCode(q):(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else N+=String.fromCharCode(q)}return N},xd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Py=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&Y[O];)++O;if(O<<=1,32<O-_&&xd)return xd.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=W[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}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 q=0;q<O;++q)W[g>>1]=_.charCodeAt(q),g+=2;return W[g>>1]=0,g-N},Dy=_=>2*_.length,Ny=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=ne[_+4*O>>2];if(q==0)break;++O,65536<=q?(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023)):N+=String.fromCharCode(q)}return N},ky=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<_.length;++q){var te=_.charCodeAt(q);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(ne[g>>2]=te,g+=4,g+4>O)break}return ne[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 ji(_){var g=jy[_];return g===void 0?Fe(_):g}var Li=[];function Ly(_){var g=Li.length;return Li.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=h.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,h.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},Ct=h.PureVirtualError=Zt("PureVirtualError");for(var Cd=Array(256),Fi=0;256>Fi;++Fi)Cd[Fi]=String.fromCharCode(Fi);et=Cd,h.getInheritedInstanceCount=function(){return Object.keys(Qt).length},h.getLiveInheritedInstances=function(){var _=[],g;for(g in Qt)Qt.hasOwnProperty(g)&&_.push(Qt[g]);return _},h.flushPendingDeletes=nn,h.setDelayFunction=function(_){rn=_,gt.length&&rn&&rn(nn)},un=h.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||J(this),this.W.pa)return this.W.count.value+=1,this;var _=en,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return _=_(O.call(g,N,{W:{value:{count:q.count,na:q.na,pa:q.pa,Y:q.Y,Z:q.Z,ca:q.ca,fa:q.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),Jt(this),yn(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||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),gt.push(this),gt.length===1&&rn&&rn(nn),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?Ht(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Ht(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 q=Lt(O,this.X,N.X);return q===null?g.call(this):this.ua?Ht(N.X.ga,{Z:N,Y:q,fa:this,ca:_}):Ht(N.X.ga,{Z:N,Y:q})},yd=h.UnboundTypeError=Zt("UnboundTypeError");var By={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,te=q.ga,ue=q.$.ga,se=q.$.constructor;_=ze(_,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new Ct(`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&&xe("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(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},te.__destruct=function(){this===te&&xe("Pass correct 'this' to __destruct"),Jt(this);var le=this.W.Y;le=he(q,le),Qt.hasOwnProperty(le)?delete Qt[le]:xe(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(te);for(var de in O)_.prototype[de]=O[de];return je(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,q=g.Na,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ke=[];ye(Et,Dt,Me.toWireType(Ke,Ve)),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 Se=O();for(ge in se)se[ge].write(Se,le[ge]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var te=rr(O);g=Fe(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:q},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=P;else if(O===2)se=W;else if(O===4)se=ne;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,q,te,ue,se,de,le,ge,Se,Ce){ge=Fe(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=rt(ge);Re(Me,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)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 Ve=Object.create(Dt,{constructor:{value:ye}});ye.prototype=Ve;var Ke=new Ee(ge,ye,Ve,Ce,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(Me,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,q,te,ue){var se=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],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 Se=de.X.constructor;return Se[g]===void 0?(le.ma=O-1,Se[g]=le):(_e(Se,g,ge),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(ge,[Ce[0],null].concat(Ce.slice(1)),null,te,ue),Se[g].aa===void 0?(Ce.ma=O-1,Se[g]=Ce):Se[g].aa[O-1]=Ce,de.X.sa)for(const Me of de.X.sa)Me.constructor.hasOwnProperty(g)||(Me.constructor[g]=Ce);return[]}),[]})},s:function(_,g,O,N,q,te,ue,se){g=Fe(g),te=qe(q,te),Wt([],[_],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])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ye=[];se(N,Se.toWireType(ye,Me)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,te){var ue=Mi(g,O);q=qe(N,q),Wt([],[_],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)},Wt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=ki(de,le,null,q,te),[]}),[]})},a:function(_,g,O,N,q,te,ue,se){var de=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(le){function ge(){Hn(`Cannot call ${Se} due to unbound types`,de)}le=le[0];var Se=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ce=le.X.ga,Me=Ce[g];return Me===void 0||Me.aa===void 0&&Me.className!==le.name&&Me.ma===O-2?(ge.ma=O-2,ge.className=le.name,Ce[g]=ge):(_e(Ce,g,Se),Ce[g].aa[O-2]=ge),Wt([],de,function(ye){return ye=ki(Se,ye,le,te,ue),Ce[g].aa===void 0?(ye.ma=O-2,Ce[g]=ye):Ce[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,q,te,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(ge){ge=ge[0];var Se=`${ge.name}.${g}`,Ce={get(){Hn(`Cannot access ${Se} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ce.set=de?()=>{Hn(`Cannot access ${Se} due to unbound types`,[O,ue])}:()=>{xe(Se+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ye=Me[0],Et={get(){var Ve=bd(this,ge,Se+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ke=bd(this,ge,Se+" setter"),Nt=[];de(le,Ke,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(ge.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Fe(g),V(_,{name:g,fromWireType:function(O){var N=ct(O);return Ms(O),N},toWireType:function(O,N){return je(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function q(){}O=rr(O),g=Fe(g),q.values={},V(_,{name:g,constructor:q,fromWireType:function(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Iy(g,O,N),ea:null}),Re(g,q)},c:function(_,g,O){var N=At(_,"enum");g=Fe(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=Fe(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:Ry(g,O),ea:null})},q:function(_,g,O,N,q,te){var ue=Mi(g,O);_=Fe(_),q=qe(N,q),Re(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),Wt([],ue,function(se){return qt(_,ki(_,[se[0],null].concat(se.slice(1)),null,q,te),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=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,q,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=B;return new q(ue.buffer,ue[te+1],ue[te])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Fe(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Fe(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var q=B[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=q;++se){var de=te+se;if(se==q||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(q),se=0;se<q;++se)le[se]=String.fromCharCode(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var te,ue=typeof q=="string";ue||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||xe("Cannot pass non-string to std::string");var se;if(O&&ue)for(te=se=0;te<q.length;++te){var de=q.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=q.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<q.length;++le){var ge=q.charCodeAt(le);if(55296<=ge&&57343>=ge){var Se=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Se&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=q.charCodeAt(ue),255<le&&(Wn(de),xe("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]=q[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Fe(O),g===2)var N=Py,q=Ay,te=Dy,ue=()=>Y,se=1;else g===4&&(N=Ny,q=ky,te=My,ue=()=>B,se=2);V(_,{name:O,fromWireType:function(de){for(var le=B[de>>2],ge=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ye=de+4+Me*g;(Me==le||ge[ye>>se]==0)&&(Ce=N(Ce,ye-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ye+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Se=Vs(4+ge+g);return B[Se>>2]=ge>>se,q(le,Se+4,ge+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,te){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(_,g,O,N,q,te,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Fe(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ct(_),g=At(g,"emval::as");var N=[],q=je(N);return B[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var te=[];return B[N>>2]=je(te),_(g,O,te,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(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 q=_d[g];if(q!==void 0)return q;var te=Array(_-1);return q=Ly((ue,se,de,le)=>{for(var ge=0,Se=0;Se<_-1;++Se)te[Se]=O[Se+1].readValueFromPointer(le+ge),ge+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(te[Se]);if(!N.vb)return N.toWireType(de,ue)}),_d[g]=q},p:function(_){return _=ji(_),je(h[_])},K:function(_,g){return _=ct(_),g=ct(g),je(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return je(ji(_))},n:function(_){var g=ct(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),je(_)},b:()=>{ie("")},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 q=Math;N=Math.max(_,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-p.buffer.byteLength+65535>>>16;try{p.grow(q),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,q){var te=g+O;for(q=B[_+4*q>>2]=te,te=0;te<N.length;++te)P[q++>>0]=N.charCodeAt(te);P[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Sd();B[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),B[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=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)}q+=se}return B[N>>2]=q,0}};(function(){function _(O){if(O=O.exports,h.asm=O,p=h.asm.O,G(),K=h.asm.U,ce.unshift(h.asm.P),ee--,h.monitorRunDependencies&&h.monitorRunDependencies(ee),ee==0&&Q){var N=Q;Q=null,N()}return O}var g={a:By};if(ee++,h.monitorRunDependencies&&h.monitorRunDependencies(ee),h.instantiateWasm)try{return h.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return We(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=h.asm.Q).apply(null,arguments)}function Vs(){return(Vs=h.asm.R).apply(null,arguments)}function $d(){return($d=h.asm.S).apply(null,arguments)}h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.T).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.V).apply(null,arguments)};var Vi;Q=function _(){Vi||Td(),Vi||(Q=_)};function Td(){function _(){if(!Vi&&(Vi=!0,h.calledRun=!0,!$)){if(De(ce),b(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var g=h.postRun.shift();z.unshift(g)}De(z)}}if(!(0<ee)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)U();De(Z),0<ee||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),_()},1)):_())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.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 h,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((h=m.touches)===null||h===void 0)&&h.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 h=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,E=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=d(A),H=k.clientX,R=k.clientY;if(!(!H&&!R)){var w=H-F.left,p=R-F.top,$=v.computeAlignment(E,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;$.invert(P);var j=new v.Vec2D(w,p),W=v.mapXY(P,j),Y=W.x(),ne=W.y();switch(W.delete(),P.delete(),j.delete(),$.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var B=0,L=T;B<L.length;B++){var oe=L[B];oe.pointerMove(Y,ne)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(Y,ne)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(Y,ne)}break}}}},D=I.bind(u);return h.addEventListener("mouseover",D),h.addEventListener("mouseout",D),h.addEventListener("mousemove",D),h.addEventListener("mousedown",D),h.addEventListener("mouseup",D),h.addEventListener("touchmove",D),h.addEventListener("touchstart",D),h.addEventListener("touchend",D),function(){h.removeEventListener("mouseover",D),h.removeEventListener("mouseout",D),h.removeEventListener("mousemove",D),h.removeEventListener("mousedown",D),h.removeEventListener("mouseup",D),h.removeEventListener("touchmove",D),h.removeEventListener("touchstart",D),h.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:()=>h,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(w,p,$,P){function j(W){return W instanceof $?W:new $(function(Y){Y(W)})}return new($||($=Promise))(function(W,Y){function ne(oe){try{L(P.next(oe))}catch(G){Y(G)}}function B(oe){try{L(P.throw(oe))}catch(G){Y(G)}}function L(oe){oe.done?W(oe.value):j(oe.value).then(ne,B)}L((P=P.apply(w,p||[])).next())})},d=function(w,p){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},P,j,W,Y;return Y={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ne(L){return function(oe){return B([L,oe])}}function B(L){if(P)throw new TypeError("Generator is already executing.");for(;Y&&(Y=0,L[0]&&($=0)),$;)try{if(P=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=p.call(w,$)}catch(oe){L=[6,oe],j=0}finally{P=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(w){w.Cover="cover",w.Contain="contain",w.Fill="fill",w.FitWidth="fitWidth",w.FitHeight="fitHeight",w.None="none",w.ScaleDown="scaleDown"})(f||(f={}));var m;(function(w){w.Center="center",w.TopLeft="topLeft",w.TopCenter="topCenter",w.TopRight="topRight",w.CenterLeft="centerLeft",w.CenterRight="centerRight",w.BottomLeft="bottomLeft",w.BottomCenter="bottomCenter",w.BottomRight="bottomRight"})(m||(m={}));var h=function(){function w(p){var $,P,j,W,Y,ne;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(P=p==null?void 0:p.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=p==null?void 0:p.minX)!==null&&j!==void 0?j:0,this.minY=(W=p==null?void 0:p.minY)!==null&&W!==void 0?W:0,this.maxX=(Y=p==null?void 0:p.maxX)!==null&&Y!==void 0?Y:0,this.maxY=(ne=p==null?void 0:p.maxY)!==null&&ne!==void 0?ne:0}return w.new=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new w({fit:$,alignment:P,minX:j,minY:W,maxX:Y,maxY:ne})},w.prototype.copyWith=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return new w({fit:$??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:Y??this.maxX,maxY:ne??this.maxY})},w.prototype.runtimeFit=function(p){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=p.Fit.cover:this.fit===f.Contain?$=p.Fit.contain:this.fit===f.Fill?$=p.Fit.fill:this.fit===f.FitWidth?$=p.Fit.fitWidth:this.fit===f.FitHeight?$=p.Fit.fitHeight:this.fit===f.ScaleDown?$=p.Fit.scaleDown:$=p.Fit.none,this.cachedRuntimeFit=$,$},w.prototype.runtimeAlignment=function(p){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=p.Alignment.topLeft:this.alignment===m.TopCenter?$=p.Alignment.topCenter:this.alignment===m.TopRight?$=p.Alignment.topRight:this.alignment===m.CenterLeft?$=p.Alignment.centerLeft:this.alignment===m.CenterRight?$=p.Alignment.centerRight:this.alignment===m.BottomLeft?$=p.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=p.Alignment.bottomCenter:this.alignment===m.BottomRight?$=p.Alignment.bottomRight:$=p.Alignment.center,this.cachedRuntimeAlignment=$,$},w}(),b=function(){function w(){}return w.loadRuntime=function(){a.default({locateFile:function(){return w.wasmURL}}).then(function(p){var $;for(w.runtime=p;w.callBackQueue.length>0;)($=w.callBackQueue.shift())===null||$===void 0||$(w.runtime)})},w.getInstance=function(p){w.isLoading||(w.isLoading=!0,w.loadRuntime()),w.runtime?p(w.runtime):w.callBackQueue.push(p)},w.awaitInstance=function(){return new Promise(function(p){return w.getInstance(function($){return p($)})})},w.setWasmUrl=function(p){w.wasmURL=p},w.isLoading=!1,w.callBackQueue=[],w.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),w}(),y=function(){function w(p,$,P,j){this.animation=p,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(p,$)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},w.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(w.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){this.instance.delete()},w}(),T;(function(w){w[w.Number=56]="Number",w[w.Trigger=58]="Trigger",w[w.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function w(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(w.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),w.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},w}(),v=function(){function w(p,$,P,j){this.stateMachine=p,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(p,j),this.initInputs($)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.instance.advance(p)},w.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var P=this.instance.input($);this.inputs.push(this.mapRuntimeInput(P,p))}},w.prototype.mapRuntimeInput=function(p,$){if(p.type===$.SMIInput.bool)return new S(T.Boolean,p.asBool());if(p.type===$.SMIInput.number)return new S(T.Number,p.asNumber());if(p.type===$.SMIInput.trigger)return new S(T.Trigger,p.asTrigger())},w.prototype.cleanup=function(){this.instance.delete()},w}(),E=function(){function w(p,$,P,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=p,this.artboard=$,this.eventManager=P,this.animations=j,this.stateMachines=W}return w.prototype.add=function(p,$,P){if(P===void 0&&(P=!0),p=H(p),p.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}),Y=0;Y<p.length;Y++){var ne=j.indexOf(p[Y]),B=W.indexOf(p[Y]);if(ne>=0||B>=0)ne>=0?this.animations[ne].playing=$:this.stateMachines[B].playing=$;else{var L=this.artboard.animationByName(p[Y]);if(L){var oe=new y(L,this.artboard,this.runtime,$);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(p[Y]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return P&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},w.prototype.play=function(p){return this.add(p,!0)},w.prototype.pause=function(p){return this.add(p,!1)},w.prototype.scrub=function(p,$){var P=this.animations.filter(function(j){return p.includes(j.name)});return P.forEach(function(j){return j.scrubTo=$}),P.map(function(j){return j.name})},Object.defineProperty(w.prototype,"playing",{get:function(){return this.animations.filter(function(p){return p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"paused",{get:function(){return this.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),w.prototype.stop=function(p){var $=this;p=H(p);var P=[];if(p.length===0)P=this.animations.map(function(Y){return Y.name}).concat(this.stateMachines.map(function(Y){return Y.name})),this.animations.forEach(function(Y){return Y.cleanup()}),this.stateMachines.forEach(function(Y){return Y.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(Y){return p.includes(Y.name)});j.forEach(function(Y){Y.cleanup(),$.animations.splice($.animations.indexOf(Y),1)});var W=this.stateMachines.filter(function(Y){return p.includes(Y.name)});W.forEach(function(Y){Y.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(Y),1)}),P=j.map(function(Y){return Y.name}).concat(W.map(function(Y){return Y.name}))}return this.eventManager.fire({type:C.Stop,data:P}),P},Object.defineProperty(w.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(p,$){return p||$.playing},!1)||this.stateMachines.reduce(function(p,$){return p||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),w.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],p,$)),P},w.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(j){return j.playing});p<$.length;p++){var P=$[p];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},w.prototype.handleStateChanges=function(){for(var p=[],$=0,P=this.stateMachines.filter(function(W){return W.playing});$<P.length;$++){var j=P[$];p.push.apply(p,j.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},w.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},w}(),C;(function(w){w.Load="load",w.LoadError="loaderror",w.Play="play",w.Pause="pause",w.Stop="stop",w.Loop="loop",w.Draw="draw",w.Advance="advance",w.StateChange="statechange"})(C||(C={}));var I;(function(w){w.OneShot="oneshot",w.Loop="loop",w.PingPong="pingpong"})(I||(I={}));var D=function(){function w(p){p===void 0&&(p=[]),this.listeners=p}return w.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},w.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},w.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var P=this.listeners[$];if(P.type===p.type&&P.callback===p.callback){this.listeners.splice($,1);break}}},w.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(P){return P.type===p}).forEach(function(P){return $.remove(P)}):this.listeners.splice(0,this.listeners.length)},w.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(P){return P.callback(p)})},w}(),A=function(){function w(p){this.eventManager=p,this.queue=[]}return w.prototype.add=function(p){this.queue.push(p)},w.prototype.process=function(){for(;this.queue.length>0;){var p=this.queue.shift();p!=null&&p.action&&p.action(),p!=null&&p.event&&this.eventManager.fire(p.event)}},w}(),F=function(){function w(p){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=p.canvas,this.src=p.src,this.buffer=p.buffer,this.layout=($=p.layout)!==null&&$!==void 0?$:new h,this.shouldDisableRiveListeners=!!p.shouldDisableRiveListeners,this.eventManager=new D,p.onLoad&&this.on(C.Load,p.onLoad),p.onLoadError&&this.on(C.LoadError,p.onLoadError),p.onPlay&&this.on(C.Play,p.onPlay),p.onPause&&this.on(C.Pause,p.onPause),p.onStop&&this.on(C.Stop,p.onStop),p.onLoop&&this.on(C.Loop,p.onLoop),p.onStateChange&&this.on(C.StateChange,p.onStateChange),p.onAdvance&&this.on(C.Advance,p.onAdvance),p.onload&&!p.onLoad&&this.on(C.Load,p.onload),p.onloaderror&&!p.onLoadError&&this.on(C.LoadError,p.onloaderror),p.onplay&&!p.onPlay&&this.on(C.Play,p.onplay),p.onpause&&!p.onPause&&this.on(C.Pause,p.onpause),p.onstop&&!p.onStop&&this.on(C.Stop,p.onstop),p.onloop&&!p.onLoop&&this.on(C.Loop,p.onloop),p.onstatechange&&!p.onStateChange&&this.on(C.StateChange,p.onstatechange),this.taskQueue=new A(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:p.autoplay,animations:p.animations,stateMachines:p.stateMachines,artboard:p.artboard,useOffscreenRenderer:p.useOffscreenRenderer})}return w.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new w(p)},w.prototype.init=function(p){var $=this,P=p.src,j=p.buffer,W=p.animations,Y=p.stateMachines,ne=p.artboard,B=p.autoplay,L=B===void 0?!1:B,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(w.missingErrorMessage);var K=H(W),Z=H(Y);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(ne,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},w.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&p.runtime.hasListeners(P.instance)}).map(function(P){return P.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)})}},w.prototype.initData=function(p,$,P,j){var W;return u(this,void 0,void 0,function(){var Y,ne,B;return d(this,function(L){switch(L.label){case 0:return this.src?(Y=this,[4,k(this.src)]):[3,2];case 1:Y.buffer=L.sent(),L.label=2;case 2:return ne=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ne.file=L.sent(),this.file?(this.initArtboard(p,$,P,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)])}})})},w.prototype.initArtboard=function(p,$,P,j){var W=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!W){var Y="Invalid artboard name or no default artboard";console.warn(Y),this.eventManager.fire({type:C.LoadError,data:Y});return}if(this.artboard=W,this.artboard.animationCount()<1){var Y="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:Y}),Y}this.animator=new E(this.runtime,this.artboard,this.eventManager);var ne;$.length>0||P.length>0?(ne=$.concat(P),this.animator.add(ne,j,!1)):ne=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:ne}})},w.prototype.drawFrame=function(){this.startRendering()},w.prototype.draw=function(p,$){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),Y=0,ne=W;Y<ne.length;Y++){var B=ne[Y];B.advance(j),B.instance.didLoop&&(B.loopCount+=1),B.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.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-P);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)},w.prototype.alignRenderer=function(){var p=this,$=p.renderer,P=p.runtime,j=p._layout,W=p.artboard;$.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(w.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(p,$){return p+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){var p,$;this.stopRendering(),this.cleanupInstances(),(p=this.renderer)===null||p===void 0||p.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},w.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},w.prototype.play=function(p,$){var P=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},w.prototype.pause=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},w.prototype.scrub=function(p,$){var P=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},w.prototype.stop=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},w.prototype.reset=function(p){var $,P=p==null?void 0:p.artboard,j=H(p==null?void 0:p.animations),W=H(p==null?void 0:p.stateMachines),Y=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(P,j,W,Y),this.taskQueue.process()},w.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(w.prototype,"layout",{get:function(){return this._layout},set:function(p){this._layout=p,(!p.maxX||!p.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),w.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},w.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,P=p.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(w.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.animationCount();$++)p.push(this.artboard.animationByIndex($).name);return p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.stateMachineCount();$++)p.push(this.artboard.stateMachineByIndex($).name);return p},enumerable:!1,configurable:!0}),w.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(P){return P.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(w.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),w.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},w.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},w.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},w.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},w.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},w.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},w.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)))},w.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},w.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(w.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var P=this.file.artboardByIndex($),j={name:P.name,animations:[],stateMachines:[]},W=0;W<P.animationCount();W++){var Y=P.animationByIndex(W);j.animations.push(Y.name)}for(var ne=0;ne<P.stateMachineCount();ne++){for(var B=P.stateMachineByIndex(ne),L=B.name,oe=new this.runtime.StateMachineInstance(B,P),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}p.artboards.push(j)}return p}},enumerable:!1,configurable:!0}),w.missingErrorMessage="Rive source file or data buffer required",w}(),k=function(w){return u(void 0,void 0,void 0,function(){var p,$,P;return d(this,function(j){switch(j.label){case 0:return p=new Request(w),[4,fetch(p)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},H=function(w){return typeof w=="string"?[w]:w instanceof Array?w:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(ig);var XT=ig.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=XT;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 E,C=1,I=arguments.length;C<I;C++)for(var D in E=arguments[C])Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D]);return v},i.apply(this,arguments)};function a(v,E){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&E.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++)E.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,E){E===void 0&&(E=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&E){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,H=t.useRef(new u((A=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,w=[],p=0;p<arguments.length;p++)w[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,w)},F)})));return t.useEffect(function(){var R=H.current;if(E){var w=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),w&&d&&R.unobserve(w)}}R.disconnect()},[v,H]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var E=v.riveLoaded,C=E!==void 0&&E,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,H=v.artboardBounds,R=b(F),w=t.useState({height:0,width:0}),p=w[0],$=p.height,P=p.width,j=w[1],W=t.useState({height:0,width:0}),Y=W[0],ne=Y.height,B=Y.width,L=W[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,U=m(D,ce),ee=function(){var Te=s(),Pe=t.useState(Te),Ne=Pe[0],Oe=Pe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var rt=s();Oe(rt)},De=window.matchMedia("screen and (resolution: ".concat(Ne,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",We):De.addListener(We),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",We):De.removeListener(We)}}},[Ne]),Ne}(),Q=H??{},ie=Q.maxX,re=Q.maxY,me=t.useCallback(function(){var Te,Pe,Ne,Oe,We=(Pe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Pe!==void 0?Pe:0,De=(Oe=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Oe!==void 0?Oe:0;return Z&&H?{width:We,height:We*(H.maxY/H.maxX)}:{width:We,height:De}},[D,Z,ie,re]);t.useEffect(function(){if(ce&&D.current&&C){var Te=me(),Pe=Te.width,Ne=Te.height,Oe=!1;if(I.current){var We=Pe!==P||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Oe=!0),R.useDevicePixelRatio){if(We||Pe*ee!==B||Ne*ee!==ne){var De=ee*Pe,rt=ee*Ne;I.current.width=De,I.current.height=rt,I.current.style.width=Pe+"px",I.current.style.height=Ne+"px",L({width:De,height:rt}),Oe=!0}}else We&&(I.current.width=Pe,I.current.height=Ne,L({width:Pe,height:Ne}),Oe=!0);j({width:Pe,height:Ne})}k&&(G||Oe)&&k&&k(),G&&K(!1)}},[I,D,U,ee,me,G,K,ne,B,$,P,k,ce,Z,z,C])}function T(v){var E=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,A=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),H=i({width:"100%",height:"100%"},A);return o.default.createElement("div",i({ref:E,className:D},!D&&{style:H}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,E){E===void 0&&(E={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,H=b(E),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:C,containerRef:I,options:H,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var w=t.useCallback(function(j){if(j&&v&&k){var W=H.useOffscreenRenderer,Y=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));Y.on(n.EventType.Load,function(){C.current?F(Y):Y.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),p=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var $=v==null?void 0:v.animations;t.useEffect(function(){A&&$&&(A.isPlaying?(A.stop(A.animationNames),A.play($)):A.isPaused&&(A.stop(A.animationNames),A.pause($)))},[$,A]);var P=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:w},j))},[w,p]);return{canvas:C.current,container:I.current,setCanvasRef:w,setContainerRef:p,rive:A,RiveComponent:P}}e.default=function(v){var E=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,A=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,H=v.shouldDisableRiveListeners,R=H!==void 0&&H,w=v.shouldResizeCanvasToContainer,p=w===void 0||w,$=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:E,artboard:C,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(j,i({},P),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,E,C,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&E&&C||F(null),v&&E&&C){var H=v.stateMachineInputs(E);if(H){var R=H.find(function(w){return w.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]),A},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(og);const GT=yp(og),El=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(at,{width:t,height:n,style:r,children:M.jsx(GT,{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(at,{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(at,{"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 ZT=dt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const QT=({color:e,size:t,...n})=>M.jsx(at,{...n,className:Ie(ZT({color:e,size:t}))});function JT(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 eI="_1ypj0tt5",tI="_1ypj0tt4",nI="_1ypj0tt3",Wh="_1ypj0tt1",rI="_1ypj0tt0",oI="_1ypj0tt2";const iI=({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(at,{className:Ie(eI,e),children:a})},sg=JT(iI),aI=e=>null;function sI(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=aI,t}const cI=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),h=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,w=!1,p=!1;const $=(L,oe)=>{L.transform=oe},P=(L,oe)=>{L.transition=oe},j=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,P((K=f.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{A(),f.current&&P(f.current.style,"")},+G*1e3))},W=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:z=>{const U=+new Date;Z=(z-K)/(U-G),U-G>=L&&(Z=U-G<=oe?Z:0,K=z,G=U)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),Y=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=W.getVelocity(L)*4;K&&(L=K*40+L,G=Math.abs(K)*.1),L%h.current!==0&&(L=Math.round(L/h.current)*h.current),L<0?L=0:L>oe&&(L=oe),j(0,L,G<.3?.3:G),D()},ne=L=>{w||(p=!0,R=L,H=k)},B=L=>{var oe;w||!p||(k=H-L+R,W.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>ne(L.touches[0].pageY),mousedown:L=>ne(L.pageY),touchmove:L=>{L.preventDefault(),B(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),B(L.pageY)},touchend:()=>Y(),touchcancel:()=>Y(),mouseup:()=>Y(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{w=L}}})(),E=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,h.current,H.length);if(b.current!==R){b.current=R;const w=H[R];w&&e.onScrollChange?e.onScrollChange(w.props.value):!H&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Wh} ${oI}`,H=w=>{const{className:p="",style:$,value:P}=w.props,j=T===P;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Wh} ${p}`,children:w.props.children},P)};return l.Children?l.Children.map(t,H):[].concat(t).map(H)};return l.useEffect(()=>{var w,p,$;const k=((w=d.current)==null?void 0:w.getBoundingClientRect().height)??0,H=((p=m.current)==null?void 0:p.getBoundingClientRect().height)??0;h.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,h.current,E),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const W=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(P,v[P],W)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,E,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,h.current,C)},[C,o,T]),M.jsxs("div",{className:Ie(rI,u),ref:d,children:[M.jsx("div",{className:Ie(nI,u),ref:m}),M.jsx("div",{className:tI,ref:f,children:F()})]})},au=sI(cI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const qa=24*60*60*1e3,uI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),lI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},zh=(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)},Uh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},Yh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),dI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],fI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=uI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[h,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=()=>$(h||y.current),v=()=>w().getFullYear(),E=()=>p().getFullYear(),C=()=>w().getMonth(),I=()=>p().getMonth(),D=()=>w().getDate(),A=()=>p().getDate(),F=()=>w().getHours(),k=()=>p().getHours(),H=()=>w().getMinutes(),R=()=>p().getMinutes(),w=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=w(),Z=p();if(o===Mt.DATE_TIME){if(G<K)return Sr(K);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+qa<=K)return Sr(K);if(G>=+Z+qa)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),U=K.getHours(),ee=K.getMinutes(),Q=G.getHours(),ie=G.getMinutes();if(Q<U||Q===U&&ie<ee)return Sr(K);if(Q>ce||Q===ce&&ie>z)return Sr(Z)}return G},P=(G,K)=>{const Z=parseInt(G[K],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(K){case 0:ce.setDate(Z);break;case 1:lI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:zh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Uh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:zh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Uh(ce,Z);break}return $(ce)},j=(G,K)=>{const Z=P(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},W=(G,K)=>{if(e.onScrollChange){const Z=P(G,K);e.onScrollChange(Z,G,K)}},Y=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),z=E(),U=C(),ee=I(),Q=D(),ie=A(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const me={key:"year",props:{children:re}};if(o===Mt.YEAR)return[me];const Te=[];let Pe=0,Ne=11;ce===K&&(Pe=U),z===K&&(Ne=ee);for(let ze=Pe;ze<=Ne;ze+=1){const xt=m?m(ze,G):dI(ze);Te.push({value:`${ze}`,label:xt})}const Oe={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Oe,me];const We=[];let De=1,rt=cg(G);ce===K&&U===Z&&(De=Q),z===K&&ee===Z&&(rt=ie);for(let ze=De;ze<=rt;ze+=1){const xt=f?f(ze,G):`${ze}`;We.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:We}},Oe,me]},ne=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const U=H(),ee=R(),Q=F(),ie=k(),re=G.getHours();if(o===Mt.DATE_TIME){const Oe=G.getFullYear(),We=G.getMonth(),De=G.getDate(),rt=v(),ze=E(),xt=C(),Xe=I(),Pt=D(),xe=A();rt===Oe&&xt===We&&Pt===De&&(K=Q,Q===re&&(ce=U)),ze===Oe&&Xe===We&&xe===De&&(Z=ie,ie===re&&(z=ee))}else K=Q,Q===re&&(ce=U),Z=ie,ie===re&&(z=ee);const me=[];K===0&&Z===0||K!==0&&Z!==0?K=Yh(K):K===0&&c&&(K=1,me.push({value:"0",label:"12"})),Z=Yh(Z);for(let Oe=K;Oe<=Z;Oe+=1)me.push({value:`${Oe}`,label:pc(Oe)});const Te=[],Pe=G.getMinutes();for(let Oe=ce;Oe<=z;Oe+=s)Te.push({value:`${Oe}`,label:pc(Oe)}),Pe>Oe&&Pe<Oe+s&&Te.push({value:`${Pe}`,label:pc(Pe)});return{cols:[{key:"hours",props:{children:me}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Pe}},B=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:Y(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:Y(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=Y(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=ne(G);K=K.concat(ce.cols);const z=G.getHours();let U=[`${z}`,`${ce.selMinute}`],ee=z;c&&(ee=z>12?z-12:z,U=[`${ee}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(U)}return{value:Z,cols:K}},{value:L,cols:oe}=B();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:oe.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>M.jsx(au.Item,{value:K.value,children:K.label},K.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.
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the MIT license found in the
|
|
166
166
|
* LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/var Kh;function hI(){if(Kh)return yt;Kh=1;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,h=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"),h=S("react.server.block"),b=S("react.fundamental"),y=S("react.debug_trace_mode"),T=S("react.legacy_hidden")}function v(p){if(typeof p=="object"&&p!==null){var $=p.$$typeof;switch($){case e:switch(p=p.type,p){case n:case o:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case a:case s:case f:case d:case i:return p;default:return $}}case t:return $}}}var E=i,C=e,I=s,D=n,A=f,F=d,k=t,
|
|
167
|
+
*/var Kh;function hI(){if(Kh)return yt;Kh=1;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,h=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"),h=S("react.server.block"),b=S("react.fundamental"),y=S("react.debug_trace_mode"),T=S("react.legacy_hidden")}function v(p){if(typeof p=="object"&&p!==null){var $=p.$$typeof;switch($){case e:switch(p=p.type,p){case n:case o:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case a:case s:case f:case d:case i:return p;default:return $}}case t:return $}}}var E=i,C=e,I=s,D=n,A=f,F=d,k=t,H=o,R=r,w=c;return yt.ContextConsumer=a,yt.ContextProvider=E,yt.Element=C,yt.ForwardRef=I,yt.Fragment=D,yt.Lazy=A,yt.Memo=F,yt.Portal=k,yt.Profiler=H,yt.StrictMode=R,yt.Suspense=w,yt.isAsyncMode=function(){return!1},yt.isConcurrentMode=function(){return!1},yt.isContextConsumer=function(p){return v(p)===a},yt.isContextProvider=function(p){return v(p)===i},yt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},yt.isForwardRef=function(p){return v(p)===s},yt.isFragment=function(p){return v(p)===n},yt.isLazy=function(p){return v(p)===f},yt.isMemo=function(p){return v(p)===d},yt.isPortal=function(p){return v(p)===t},yt.isProfiler=function(p){return v(p)===o},yt.isStrictMode=function(p){return v(p)===r},yt.isSuspense=function(p){return v(p)===c},yt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===y||p===r||p===c||p===u||p===T||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===a||p.$$typeof===s||p.$$typeof===b||p.$$typeof===m||p[0]===h)},yt.typeOf=v,yt}var bt={};/** @license React v17.0.2
|
|
168
168
|
* react-is.development.js
|
|
169
169
|
*
|
|
170
170
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
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 qh;function pI(){return qh||(qh=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,h=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"),h=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 E(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===T||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===f||ie.$$typeof===d||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===h))}function C(ie){if(typeof ie=="object"&&ie!==null){var re=ie.$$typeof;switch(re){case e:var me=ie.type;switch(me){case n:case o:case r:case c:case u:return me;default:var Te=me&&me.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return re}}case t:return re}}}var I=a,D=i,A=e,F=s,k=n,B=f,R=d,w=t,p=o,$=r,P=c,j=!1,W=!1;function Y(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ne(ie){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(ie){return C(ie)===a}function L(ie){return C(ie)===i}function oe(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function G(ie){return C(ie)===s}function K(ie){return C(ie)===n}function Z(ie){return C(ie)===f}function ce(ie){return C(ie)===d}function z(ie){return C(ie)===t}function U(ie){return C(ie)===o}function ee(ie){return C(ie)===r}function Q(ie){return C(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=B,bt.Memo=R,bt.Portal=w,bt.Profiler=p,bt.StrictMode=$,bt.Suspense=P,bt.isAsyncMode=Y,bt.isConcurrentMode=ne,bt.isContextConsumer=H,bt.isContextProvider=L,bt.isElement=oe,bt.isForwardRef=G,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=U,bt.isStrictMode=ee,bt.isSuspense=Q,bt.isValidElementType=E,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=hI():su.exports=pI();var Xh=su.exports;let Gh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zh=(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 Zh(n.overflowY,t)||Zh(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},ua=(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,vI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var mI=(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,h=typeof f=="function"?f:$=>$!==f;if(!Gh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Gh(T)&&h(T);){if(T=vI(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,E=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:B}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,w=d==="center"?B+D/2:d==="end"?F:B,p=[];for(let $=0;$<y.length;$++){let P=y[$],{height:j,width:W,top:Y,right:ne,bottom:H,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=S&&A>=Y&&k<=H&&B>=L&&F<=ne)return p;let oe=getComputedStyle(P),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),z=0,U=0,ee="offsetWidth"in P?P.offsetWidth-P.clientWidth-G-Z:0,Q="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:W/P.offsetWidth:0,re="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ua(C,C+v,v,K,ce,C+R,C+R+I,I):R-v/2,U=d==="start"?w:d==="center"?w-S/2:d==="end"?w-S:ua(E,E+S,S,G,Z,E+w,E+w+D,D),z=Math.max(0,z+C),U=Math.max(0,U+E);else{z=u==="start"?R-Y-K:u==="end"?R-H+ce+Q:u==="nearest"?ua(Y,H,j,K,ce+Q,R,R+I,I):R-(Y+j/2)+Q/2,U=d==="start"?w-L-G:d==="center"?w-(L+W/2)+ee/2:d==="end"?w-ne+Z+ee:ua(L,ne,W,G,Z+ee,w,w+D,D);let{scrollLeft:me,scrollTop:Te}=P;z=Math.max(0,Math.min(Te+z/re,P.scrollHeight-j/re+Q)),U=Math.max(0,Math.min(me+U/ie,P.scrollWidth-W/ie+ee)),R+=Te-z,w+=me-U}p.push({el:P,top:z,left:U})}return p},gI=0;function Qh(e){return typeof e=="function"?e:dn}function dn(){}function ug(e,t){if(e){var n=mI(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 Jh(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 hr(){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(gI++)}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 ep(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function hg(e){return e.props}function yI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var bI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return bI.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]=Xa(t,r)?t[r]:e[r],n},{})}function Xa(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 wI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Or(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=Fr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Fr(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?Fr(1,0,n,r,!1):Fr(-1,n-1,n,r,!1):-1}function Ga(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jh(o,e,n)||r&&Jh(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 EI=xl(function(e){pg(e).textContent=""},500);function Sl(e,t){var n=pg(t);e&&(n.textContent=e,EI(t))}function pg(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,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Sa=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,xI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),_I=["refKey","ref"],SI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],CI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],$I=["refKey","ref"],TI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],II=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,E){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},E);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,E){v===void 0&&(v=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=la(E),i.internalSetState(ae({highlightedIndex:v},E))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,E,C){E=la(E),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},E),C)},i.selectItemAtIndex=function(v,E,C){var I=i.items[v];I!=null&&i.selectItem(I,E,C)},i.selectHighlightedItem=function(v,E){return i.selectItemAtIndex(i.getState().highlightedIndex,v,E)},i.internalSetState=function(v,E){var C,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var B={};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],Xa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Qh(E)();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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,_I),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=w;var p=i.getState(),$=p.isOpen;return ae((C={},C[A]=hr(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(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(-1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(E){if(E.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){E.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(E){E.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(E){E.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(1,0,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(-1,A-1,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var E=v===void 0?{}:v,C=E.onClick;E.onPress;var I=E.onKeyDown,D=E.onKeyUp,A=E.onBlur,F=an(E,SI),k=i.getState(),B=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(A,i.buttonHandleBlur)},w=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},w,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var E=Si(v);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].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 E=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!==E&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var E=v===void 0?{}:v,C=E.onKeyDown,I=E.onBlur,D=E.onChange,A=E.onInput;E.onChangeText;var F=an(E,CI),k,B={};k="onChange";var R=i.getState(),w=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Rt(D,A,i.inputHandleChange),P.onKeyDown=Rt(C,i.inputHandleKeyDown),P.onBlur=Rt(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":p&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":p?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:w,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var E=Si(v);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,$I),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=w,ae((C={},C[A]=hr(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 E,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,A=C.onClick;C.onPress;var F=C.index,k=C.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:yI("getItemProps","item"):k,R=an(C,TI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var w="onClick",p=A,$=(E={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()})},E[w]=Rt(p,function(){i.selectItemAtIndex(F,{type:xg})}),E),P=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,E){v===void 0&&(v={}),v=la(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)},E)},i.toggleMenu=function(v,E){v===void 0&&(v={}),v=la(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),Qh(E)()})},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(),E=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:E},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,h=a.initialInputValue,b=h===void 0?"":h,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=Or(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,h=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,E=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,w=this.setItemCount,p=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:h,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:E,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:w,unsetItemCount:p,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&&tp(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(h){i.isMouseDown=!1;var b=Ga(h.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(h){var b=Ga(h.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&&tp(this._menuNode,this.getMenuProps)),Xa(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=ep(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=ep(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&&RI(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(hg(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"&&wI(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=xI,e}();process.env.NODE_ENV!=="production"&&(II.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function tp(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 RI(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!Xh.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+'"'),!Xh.isForwardRef(e)&&!hg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var OI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function PI(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){AI(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 AI(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 DI(e,t){return t.changes}function NI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var kI=xl(function(e,t){Sl(e(),t)},200),MI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function jI(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 LI(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,h){o.current=h,m=_i(m,h.props);var b=e(m,h),y=h.props.stateReducer(m,ae({},h,{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&&PI(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function FI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:LI,stateReducer:DI,getA11ySelectionMessage:NI,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 VI(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 BI(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&&!Ga(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&&!Ga(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 np(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,OI);l.useEffect(function(){r||kI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function HI(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 MI(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 rp(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 WI(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)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function zI(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.":""}xn(xn({},ri),{getA11yStatusMessage:zI});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,Za=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:Za,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 UI(e){var t=VI(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 YI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function KI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(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){X.checkPropTypes(YI,t,"prop",n.name)});var qI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function XI(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:Or(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=rp(o,e.highlightedIndex):a={highlightedIndex:Or(-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=rp(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Fr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Za: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 WI(e,t,Bg)}return ae({},e,a)}var GI=["onMouseLeave","refKey","ref"],ZI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],QI=["onClick","onPress","refKey","ref"],JI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=Bg;function no(e){e===void 0&&(e={}),Hg(e,no);var t=ae({},qI,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=UI(t),f=KI(XI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),E=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=jI(t),F=l.useRef(),k=$l({state:m,props:t}),B=l.useCallback(function(z){return E.current[A.getItemId(z)]},[A]);np(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),np(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=HI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:E,scrollIntoView:i,getItemNodeFromIndex:B});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 w=BI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)E.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var U;C==null||(U=C.current)==null||U.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),h({type:Rl,altKey:U.altKey,getItemNodeFromIndex:B})},ArrowUp:function(U){U.preventDefault(),h({type:Ol,altKey:U.altKey,getItemNodeFromIndex:B})},Home:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Al,getItemNodeFromIndex:B}))},End:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Dl,getItemNodeFromIndex:B}))},Escape:function(U){var ee=k.current.state;(ee.isOpen||ee.inputValue||ee.selectedItem||ee.highlightedIndex>-1)&&(U.preventDefault(),h({type:Pl}))},Enter:function(U){var ee=k.current.state;!ee.isOpen||U.which===229||(U.preventDefault(),h({type:Ml,getItemNodeFromIndex:B}))},PageUp:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Nl,getItemNodeFromIndex:B}))},PageDown:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:kl,getItemNodeFromIndex:B}))}}},[h,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onMouseLeave,re=Q.refKey,me=re===void 0?"ref":re,Te=Q.ref,Pe=an(Q,GI),Ne=U===void 0?{}:U,Oe=Ne.suppressRefError,We=Oe===void 0?!1:Oe;return p("getMenuProps",We,me,v),ae((ee={},ee[me]=hr(Te,function(De){v.current=De}),ee.id=A.menuId,ee.role="listbox",ee["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+A.labelId,ee.onMouseLeave=Rt(ie,function(){h({type:Ag})}),ee),Pe)},[h,p,A]),W=l.useCallback(function(z){var U,ee,Q=z===void 0?{}:z,ie=Q.item,re=Q.index,me=Q.refKey,Te=me===void 0?"ref":me,Pe=Q.ref,Ne=Q.onMouseMove,Oe=Q.onMouseDown,We=Q.onClick;Q.onPress;var De=Q.disabled,ot=an(Q,ZI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Og(ie,re,xt.items,"Pass either item or index to getItemProps!"),xe=Pt[1],ct="onClick",je=We,Zt=function(){xe!==Xe.highlightedIndex&&(R.current=!1,h({type:Dg,index:xe,disabled:De}))},Ct=function(){h({type:Fl,index:xe})},tt=function(gt){return gt.preventDefault()};return ae((U={},U[Te]=hr(Pe,function(Fe){Fe&&(E.current[A.getItemId(xe)]=Fe)}),U.disabled=De,U.role="option",U["aria-selected"]=""+(xe===Xe.highlightedIndex),U.id=A.getItemId(xe),U),!De&&(ee={},ee[ct]=Rt(je,Ct),ee),{onMouseMove:Rt(Ne,Zt),onMouseDown:Rt(Oe,tt)},ot)},[h,k,R,A]),Y=l.useCallback(function(z){var U,ee=z===void 0?{}:z,Q=ee.onClick;ee.onPress;var ie=ee.refKey,re=ie===void 0?"ref":ie,me=ee.ref,Te=an(ee,QI),Pe=k.current.state,Ne=function(){h({type:Ng})};return ae((U={},U[re]=hr(me,function(Oe){I.current=Oe}),U["aria-controls"]=A.menuId,U["aria-expanded"]=Pe.isOpen,U.id=A.toggleButtonId,U.tabIndex=-1,U),!Te.disabled&&ae({},{onClick:Rt(Q,Ne)}),Te)},[h,k,A]),ne=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onKeyDown,re=Q.onChange,me=Q.onInput,Te=Q.onFocus,Pe=Q.onBlur;Q.onChangeText;var Ne=Q.refKey,Oe=Ne===void 0?"ref":Ne,We=Q.ref,De=an(Q,JI),ot=U===void 0?{}:U,ze=ot.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Oe,C);var Xe=k.current.state,Pt=function(gt){var nn=Si(gt);nn&&$[nn]&&$[nn](gt)},xe=function(gt){h({type:jl,inputValue:gt.target.value})},ct=function(gt){if(Xe.isOpen&&!w.current.isMouseDown){var nn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:Ll})},Zt="onChange",Ct={};if(!De.disabled){var tt;Ct=(tt={},tt[Zt]=Rt(re,me,xe),tt.onKeyDown=Rt(ie,Pt),tt.onBlur=Rt(Pe,ct),tt.onFocus=Rt(Te,je),tt)}return ae((ee={},ee[Oe]=hr(We,function(Fe){C.current=Fe}),ee["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",ee["aria-autocomplete"]="list",ee["aria-controls"]=A.menuId,ee["aria-expanded"]=Xe.isOpen,ee["aria-labelledby"]=De&&De["aria-label"]?void 0:""+A.labelId,ee.autoComplete="off",ee.id=A.inputId,ee.role="combobox",ee.value=Xe.inputValue,ee),Ct,De)},[p,k,A,$,h,w,a]),H=l.useCallback(function(){h({type:kg})},[h]),L=l.useCallback(function(){h({type:jg})},[h]),oe=l.useCallback(function(){h({type:Mg})},[h]),G=l.useCallback(function(z){h({type:Lg,highlightedIndex:z})},[h]),K=l.useCallback(function(z){h({type:Vl,selectedItem:z})},[h]),Z=l.useCallback(function(z){h({type:Fg,inputValue:z})},[h]),ce=l.useCallback(function(){h({type:Vg})},[h]);return{getItemProps:W,getLabelProps:P,getMenuProps:j,getInputProps:ne,getToggleButtonProps:Y,toggleMenu:H,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Wg={activeIndex:-1,selectedItems:[]};function op(e,t){return zo(e,t,Wg)}function ip(e,t){return Pn(e,t,Wg)}function eR(e){var t=op(e,"activeIndex"),n=op(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ap(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 tR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var nR={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},rR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:tR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=dn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(nR,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,oR=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 iR(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 h=t.activeIndex;c={activeIndex:h};break}case ed:c={activeIndex:ip(o,"activeIndex"),selectedItems:ip(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var aR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],sR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];td.stateChangeTypes=oR;function td(e){e===void 0&&(e={}),zg(e,td);var t=ae({},rR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=FI(iR,eR(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),h=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(w){return f.indexOf(w)<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&&h.current?h.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]),E=l.useMemo(function(){var R;return R={},R[a]=function(w){ap(w)&&u({type:Kl})},R.Backspace=function(p){ap(p)&&u({type:ql})},R},[u,a]),C=l.useCallback(function(R){var w,p=R===void 0?{}:R,$=p.refKey,P=$===void 0?"ref":$,j=p.ref,W=p.onClick,Y=p.onKeyDown,ne=p.selectedItem,H=p.index,L=an(p,aR),oe=T.current.state,G=Og(ne,H,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Hl,index:K})},z=function(ee){var Q=Si(ee);Q&&v[Q]&&v[Q](ee)};return ae((w={},w[P]=hr(j,function(U){U&&y.current.push(U)}),w.tabIndex=Z?0:-1,w.onClick=Rt(W,ce),w.onKeyDown=Rt(Y,z),w),L)},[u,T,v]),I=l.useCallback(function(R,w){var p,$=R===void 0?{}:R,P=$.refKey,j=P===void 0?"ref":P,W=$.ref,Y=$.onKeyDown,ne=$.onClick,H=$.preventKeyAction,L=H===void 0?!1:H,oe=an($,sR),G=w===void 0?{}:w,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,j,h);var ce=function(ee){var Q=Si(ee);Q&&E[Q]&&E[Q](ee)},z=function(){u({type:Xl})};return ae((p={},p[j]=hr(W,function(U){U&&(h.current=U)}),p),!L&&{onKeyDown:Rt(Y,ce),onClick:Rt(ne,z)},oe)},[u,E,S]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),A=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]),B=l.useCallback(function(){u({type:ed})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:f,activeIndex:d}}var cR="jbnkvn0",sp=dt({defaultClassName:"jbnkvna",variantClassNames:{highlighted:{true:"jbnkvnb"},selected:{true:"jbnkvnc"},multiSelected:{true:"jbnkvnd"},isDisabled:{true:"jbnkvne"}},defaultVariants:{},compoundVariants:[]}),cp="jbnkvn9",uR="jbnkvn3",mc=dt({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"}},defaultVariants:{isRounded:!1},compoundVariants:[]}),lR=dt({defaultClassName:"jbnkvn4",variantClassNames:{isMobile:{true:"jbnkvn5",false:"jbnkvn6"},isReadOnly:{true:"jbnkvn7"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),dR="jbnkvn8",up="jbnkvnf";const Ug=l.createContext(void 0),fR=({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}=nd();return t?t({children:e,defaultClassName:cp,innerProps:n()}):M.jsx("div",{className:cp,...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}=nd(),u=a===n,d=(o==null?void 0:o.value)===t.value&&!r,f=r&&i.includes(t)||!1,m=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sp({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:u,isSelected:d,isChecked:f}):M.jsxs("div",{className:sp({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:$t.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}=nd();if(e)return e({innerProps:o(),defaultClassName:up,isOpen:r});const a=n==="disabled"?$t.theme.colors.black:$t.theme.colors.grey1;return M.jsx("div",{className:up,...o({disabled:i}),"data-disabled":i,children:r?M.jsx(xu,{color:a,...t}):M.jsx(si,{color:a,...t})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const co=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,...m},h)=>{const{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,isRounded:D}=m,[A,F]=l.useState(e),k=Du({isError:v,isDisabled:C,isValid:I}),B=l.useRef(null),{removeSelectedItem:R,selectedItems:w,addSelectedItem:p,getDropdownProps:$}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(U){c&&r(U.selectedItems)}}),P=l.useMemo(()=>w.length,[w]),j=l.useCallback(U=>{let ee=U;(c&&!d||u)&&(ee="");const Q=new RegExp(ee.toLowerCase());return e.filter(ie=>Q.test(ie.label.toLowerCase()))},[e]),{isOpen:W,getToggleButtonProps:Y,getLabelProps:ne,getMenuProps:H,getInputProps:L,highlightedIndex:oe,getItemProps:G,selectedItem:K,openMenu:Z,closeMenu:ce}=no({items:A,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:U})=>{F(j(U||""))},itemToString(U){return U?U.label:""},onSelectedItemChange(U){var ee;c||(r(U.selectedItem),u&&((ee=B.current)==null||ee.blur()),ce())},stateReducer:(U,ee)=>{const{changes:Q,type:ie}=ee,re=A.find((me,Te)=>Te===U.highlightedIndex);switch(ie){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let me=P;return w.includes(re)?(me-=1,R(re)):(me+=1,p(re)),{...Q,isOpen:!0,highlightedIndex:U.highlightedIndex,inputValue:!d&&me>0?`${me} items selected`:""}}return{...Q,isOpen:!1,highlightedIndex:U.highlightedIndex,inputValue:Q.inputValue};case no.stateChangeTypes.InputBlur:{let me=Q.inputValue;return c&&!d&&(P>0?me=`${P} items selected`:me=""),{...Q,inputValue:me}}default:return Q}}});l.useImperativeHandle(h,()=>B.current);const z={isOpen:W,formState:k,selectedItem:K,multipleSelectedItems:w,isMulti:c,isDisabled:C,totalSelected:P,highlightedIndex:oe,getMenuProps:H,getItemProps:G,getToggleButtonProps:Y,onClickItem:f};return M.jsx(fR,{contextValue:z,children:M.jsxs(et,{position:"relative",w:"$full",children:[M.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,inputAreaClassName:Ie(cR,mc({isRounded:D})),className:mc({isRounded:D}),children:[M.jsxs("div",{className:uR,children:[M.jsx("input",{"data-test-id":m["data-test-id"],...L($({preventKeyAction:W,ref:B,placeholder:n,readOnly:u,disabled:C,className:lR({isMobile:d,isReadOnly:u}),onClick:()=>{W||Z()}}))}),d&&c&&M.jsx("div",{className:dR,children:P>0?`${P} items selected`:""}),d&&M.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,className:mc({isRounded:D}),...ne(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),W&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:A.map((U,ee)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:ee,item:U}))})]})})});co.displayName="Select";co.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)},hR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],pR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),vR=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:Qa[n.getMonth()],value:Qa[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Qa.findIndex(t=>t===e),lp=(e,t)=>new Date(e,ii(t)+1,0).getDate(),mR=({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<=lp(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lp(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,h]=l.useState(),[b,y]=l.useState(),T=l.useRef(null),S=()=>{f(void 0),h(void 0),y(void 0)},v=l.useMemo(()=>{if(a){if(d)return d;if(r)return gc("date",r)}},[r,d,a]),E=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),C=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),I=l.useMemo(()=>v||E||C?mR({date:v?Number(v==null?void 0:v.value):0,month:E?E.value:"",year:C?Number(C.value):0,maxDate:t}):!1,[v,E,C,t]),D=v&&E&&!C&&!I,A=v&&!E&&C&&!I,F=!v&&E&&C&&!I,k=v&&E&&C&&!I,B=()=>M.jsx(et,{as:"button",ref:T,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",marginRight:"$10",backgroundColor:"$white",border:"$none",children:M.jsx(et,{display:"none"})}),R=()=>{T.current&&T.current.focus()};return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),S()},children:M.jsxs(Pr,{gap:"$24",children:[M.jsxs(Pr,{gap:"$8",children:[M.jsx(et,{height:"$40",children:M.jsx(Di,{children:e})}),M.jsxs(Pr,{children:[M.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[M.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:v,isMobile:n,options:hR,onClickItem:R,onChange:f,isError:D||A||k,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:E,isMobile:n,options:pR,onClickItem:R,onChange:h,isError:F||D||k,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:C,isMobile:n,options:vR(t),onClickItem:R,onChange:y,isError:F||A||k,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(k||F||A||D)&&M.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),B(),M.jsx(vo,{onClick:()=>{o(new Date(Number(C==null?void 0:C.value),ii(E==null?void 0:E.value),Number(v==null?void 0:v.value))),S()},isDisabled:!C||!E||!v||!I,"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 gR=dt({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:Ie(gR({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",yR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,bR]=Ja(rd),[wR,Jg]=mn(rd,[bR]),[ER,xR]=wR(rd),_R=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(SR,ae({},e,{ref:t}))))),SR=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=st(t,f),h=es(i),[b=null,y]=Sn({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),E=Qg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(ER,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{C.current=!0}),onFocus:Ae(e.onFocus,A=>{const F=!C.current;if(A.target===A.currentTarget&&F&&!T){const k=new CustomEvent(yc,yR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=E().filter(P=>P.focusable),R=B.find(P=>P.active),w=B.find(P=>P.id===b),$=[R,w,...B].filter(Boolean).map(P=>P.ref.current);ey($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),CR="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=xR(CR,n),d=u.currentTabStopId===c,f=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),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:Ae(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ae(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ae(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=RR(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?OR(S,v+1):S.slice(v+1)}setTimeout(()=>ey(S))}})})))}),TR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function IR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function RR(e,t,n){const r=IR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return TR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function OR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const PR=_R,AR=$R,ty="Radio",[DR,ny]=mn(ty),[NR,kR]=DR(ty),MR=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=st(t,y=>f(y)),h=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(NR,{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:Ae(e.onClick,y=>{o||c==null||c(),b&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),b&&l.createElement(FR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),jR="RadioIndicator",LR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=kR(jR,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})))}),FR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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 VR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[BR,MP]=mn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[HR,WR]=BR(oy),zR=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,h=iy(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(HR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(PR,ae({asChild:!0},h,{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}))))}),UR="RadioGroupItem",YR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=WR(UR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{VR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),l.createElement(AR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(MR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ae(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ae(o.onFocus,()=>{var h;m.current&&((h=u.current)===null||h===void 0||h.click())})})))}),KR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(LR,ae({},o,r,{ref:t}))}),qR=zR,XR=YR,GR=KR;var ZR=dt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),QR="d6umgr1",JR=dt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),eO="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Yt,{alignItems:"center",children:[M.jsx(XR,{...r,disabled:n,className:Ie(t,eO),id:o,children:M.jsx(GR,{className:Ie("radio-indicator",JR({disabled:n}))})}),e&&M.jsx("label",{className:Ie("radio-label",ZR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const tO=({className:e,children:t,...n})=>M.jsx(qR,{...n,className:Ie(e,QR),children:t});var nO="_846x3h0",rO="_846x3h1",oO=dt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:o,...i},a)=>{const[s,c]=l.useState(!1),u=()=>c(!0),d=()=>c(!1),f=l.useMemo(()=>!!(o||e&&s),[s,e,o]);return M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Ie(nO),children:M.jsx(O0,{size:24})}),M.jsx("input",{className:Ie(oO({size:n,isHasIcon:f,isDisabled:r})),ref:a,value:e,"data-test-id":i["data-test-id"],onFocus:u,onBlur:d,disabled:r,...i}),f&&M.jsx(et,{className:Ie(rO),children:o&&(!s||s&&!e)?o:M.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const cy="Switch",[iO,jP]=mn(cy),[aO,sO]=iO(cy),cO=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),h=st(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u});return l.createElement(aO,{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:h,onClick:Ae(e.onClick,v=>{S(E=>!E),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(dO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),uO="SwitchThumb",lO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=sO(uO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),dO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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 fO=cO,hO=lO;var pO="b7c0j12",vO="b7c0j10",mO="b7c0j11";const ly=l.forwardRef((e,t)=>M.jsx(fO,{ref:t,className:vO,...e,children:M.jsx(hO,{className:mO,children:M.jsx(Eu,{className:pO,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(Yt,{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 gO="_94c6vs1",yO="_94c6vs3",dp="_94c6vs2",bO="_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,h=f.sortable,b=a.by===m;return h?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 h=[...f];return m.order==="ASC"?h.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?h.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 h=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(h)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},hy=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:bO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:yO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:dp,onClick:()=>d(m),children:M.jsxs(Yt,{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,h)=>M.jsx("tr",{className:gO,children:m.map((b,y)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:dp,w:"33%",children:b.CellRenderer??b.value}))}))})]})});hy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var wO=dt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var EO=dt({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]),h=e||"ul";return M.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Ie(EO({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:Ie(wO({isActive:s})),...n,children:M.jsx(sn,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[cd,xO,_O]=Ja("Toast"),[vy,LP]=mn("Toast",[_O]),[SO,Os]=vy(py),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(SO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(h=>h+1),[]),onToastRemove:l.useCallback(()=>d(h=>h-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 \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const CO="ToastViewport",$O=["F8"],lu="toast.viewportPause",du="toast.viewportResume",TO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=$O,label:o="Notifications ({hotkey})",...i}=e,a=Os(CO,n),s=xO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=st(t,f,a.onViewportChange),h=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}},E=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&E()},I=()=>{T.contains(document.activeElement)||E()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",E),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",E)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(E=>{const C=E.ref.current,I=[C,...HO(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 E=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!E){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 w=y({tabbingDirection:k?"backwards":"forwards"}),p=w.findIndex($=>$===F);if(bc(w.slice(p+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=d.current)===null||A===void 0||A.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(J0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fp,{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(fp,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),IO="ToastFocusProxy",fp=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(IO,n);return l.createElement(ds,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",RO="toast.swipeStart",OO="toast.swipeMove",PO="toast.swipeCancel",AO="toast.swipeEnd",DO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Sn({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:Ae(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ae(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:Ae(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:Ae(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)})})))}),[NO,kO]=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:h,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=st(t,$=>S($)),E=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:B}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),w=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 P=()=>{w(A.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;A.current=A.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,P),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,P)}}},[y.viewport,I,c,u,w]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&w(I)},[i,I,y.isClosePausedRef,w]),l.useEffect(()=>(k(),()=>B()),[k,B]);const p=l.useMemo(()=>T?by(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(MO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(NO,{scope:n,onClose:R},hn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(Q0,{asChild:!0,onEscapeKeyDown:Ae(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:Ae(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ae(e.onPointerDown,$=>{$.button===0&&(E.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!E.current)return;const P=$.clientX-E.current.x,j=$.clientY-E.current.y,W=!!C.current,Y=["left","right"].includes(y.swipeDirection),ne=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,H=Y?ne(0,P):0,L=Y?0:ne(0,j),oe=$.pointerType==="touch"?10:2,G={x:H,y:L},K={originalEvent:$,delta:G};W?(C.current=G,da(OO,f,K,{discrete:!1})):hp(G,y.swipeDirection,oe)?(C.current=G,da(RO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(P)>oe||Math.abs(j)>oe)&&(E.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const P=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,E.current=null,P){const W=$.currentTarget,Y={originalEvent:$,delta:P};hp(P,y.swipeDirection,y.swipeThreshold)?da(AO,h,Y,{discrete:!0}):da(PO,m,Y,{discrete:!0}),W.addEventListener("click",ne=>ne.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 MO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return VO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},jO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(yy,{altText:n,asChild:!0},l.createElement(FO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${jO}\``)}};const LO="ToastClose",FO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=kO(LO,n);return l.createElement(yy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(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),BO(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 da(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?Ep(o,i):o.dispatchEvent(i)}const hp=(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 VO(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 BO(e){return e.nodeType===e.ELEMENT_NODE}function HO(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 WO=my,wy=TO,Ey=DO,zO=ud;var UO="_10z4js29",YO=dt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),KO="_10z4js28",qO="_10z4js2a";const xy=WO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(wy,{ref:n,className:Ie(qO,e),...t}));ld.displayName=wy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(Ey,{ref:r,className:Ie(YO({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:Ie(e),...t}));dd.displayName=zO.displayName;const XO=1,GO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function ZO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,pp=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},GO);Ec.set(e,t)};function _y(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,XO)};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?pp(n):e.toasts.forEach(r=>{pp(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 Ca=[];let $a={toasts:[]};function ai(e){$a=_y($a,e),Ca.forEach(t=>{t($a)})}function Sy({...e}){const t=ZO(),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($a);return l.useEffect(()=>(Ca.push(t),()=>{const n=Ca.indexOf(t);n>-1&&Ca.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:h,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(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:KO,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:Ie(UO,h),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[Ds,FP]=mn("Tooltip",[us]),Ns=us(),QO="TooltipProvider",JO=700,fu="tooltip.open",[eP,hd]=Ds(QO),tP=e=>{const{__scopeTooltip:t,delayDuration:n=JO,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(eP,{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)},pd="Tooltip",[nP,ks]=Ds(pd),rP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=hd(pd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),h=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=Sn({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),E=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(h.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(h.current),[]),l.createElement(Zp,u,l.createElement(nP,{scope:t,contentId:m,open:S,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(h.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},vp="TooltipTrigger",oP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vp,n),i=hd(vp,n),a=Ns(n),s=l.useRef(null),c=st(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(Qp,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:Ae(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ae(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ae(e.onBlur,o.onClose),onClick:Ae(e.onClick,o.onClose)})))}),iP="TooltipPortal",[VP,aP]=Ds(iP,{forceMount:void 0}),Ci="TooltipContent",sP=l.forwardRef((e,t)=>{const n=aP(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(cP,ae({side:o},i,{ref:t})))}),cP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=hd(Ci,e.__scopeTooltip),o=l.useRef(null),i=st(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]),h=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=hP(S,T.getBoundingClientRect()),E=pP(S,v),C=vP(y.getBoundingClientRect()),I=gP([...E,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>h(T,d),y=T=>h(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,h,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)),E=!mP(S,a);v?m():E&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement($y,ae({},e,{ref:i}))}),[uP,lP]=Ds(pd,{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 h=m.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Jp,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(wp,null,r),l.createElement(uP,{scope:n,isInside:!0},l.createElement(i1,{id:c.contentId,role:"tooltip"},o||r))))}),dP="TooltipArrow",fP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return lP(dP,n).isInside?null:l.createElement(r1,ae({},o,r,{ref:t}))});function hP(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 pP(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 vP(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 mP(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 gP(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),yP(t)}function yP(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 bP=tP,wP=rP,EP=oP,xP=sP,_P=fP;function mp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function SP(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 CP(e,t){var n={};if(typeof t=="object"){var r=e;Ty(t,(a,s)=>{var c=SP(r,s);n[mp(c)]=String(a)})}else{var o=e;for(var i in o)n[mp(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 $P="var(--_4goys34)",TP="_4goys35",IP="_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:h,...b},y)=>{const T=$t.atoms.commonAtoms({color:r,bgColor:o}).className,S=$t.atoms.borderAtoms({borderColor:o}).className,E=o.replace("$","");return M.jsxs(wP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(EP,{asChild:!0,ref:y,children:n}),M.jsx(ms,{children:M.jsxs(xP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Ie(IP,T,S),children:[M.jsxs(Yt,{gap:"$6",children:[h&&M.jsx(Yt,{width:"$24",children:M.jsx(N0,{size:24})}),i]}),M.jsx(_P,{className:TP,style:CP({[$P]:$t.theme.colors[E]})})]})})]})});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(bP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:$t.theme.fonts.poppins},className:Ie(t??$t.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Nb;exports.AccordionContent=p0;exports.AccordionItem=v0;exports.AccordionTrigger=B0;exports.Alert=Pp;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=z$;exports.Box=et;exports.Button=vo;exports.Card=yu;exports.Checkbox=Gm;exports.Chips=ul;exports.CloseButton=xo;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=FT;exports.Container=bu;exports.DatePicker=fI;exports.Dialog=dl;exports.Divider=hl;exports.Flex=Yt;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=QT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=sg;exports.Overlay=ZE;exports.Picker=au;exports.Pills=Zg;exports.Portal=ms;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=tO;exports.RadixProvider=md;exports.Search=od;exports.Select=co;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=ly;exports.TabItem=sd;exports.Table=hy;exports.Tabs=ad;exports.TabsContext=id;exports.Text=sn;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=VT;exports.useIndeterminate=uT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=fy;exports.useToast=Cy;
|
|
174
|
+
*/var qh;function pI(){return qh||(qh=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,h=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"),h=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 E(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===T||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===f||ie.$$typeof===d||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===h))}function C(ie){if(typeof ie=="object"&&ie!==null){var re=ie.$$typeof;switch(re){case e:var me=ie.type;switch(me){case n:case o:case r:case c:case u:return me;default:var Te=me&&me.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return re}}case t:return re}}}var I=a,D=i,A=e,F=s,k=n,H=f,R=d,w=t,p=o,$=r,P=c,j=!1,W=!1;function Y(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ne(ie){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ie){return C(ie)===a}function L(ie){return C(ie)===i}function oe(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function G(ie){return C(ie)===s}function K(ie){return C(ie)===n}function Z(ie){return C(ie)===f}function ce(ie){return C(ie)===d}function z(ie){return C(ie)===t}function U(ie){return C(ie)===o}function ee(ie){return C(ie)===r}function Q(ie){return C(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=H,bt.Memo=R,bt.Portal=w,bt.Profiler=p,bt.StrictMode=$,bt.Suspense=P,bt.isAsyncMode=Y,bt.isConcurrentMode=ne,bt.isContextConsumer=B,bt.isContextProvider=L,bt.isElement=oe,bt.isForwardRef=G,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=U,bt.isStrictMode=ee,bt.isSuspense=Q,bt.isValidElementType=E,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=hI():su.exports=pI();var Xh=su.exports;let Gh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zh=(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 Zh(n.overflowY,t)||Zh(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},ua=(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,vI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var mI=(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,h=typeof f=="function"?f:$=>$!==f;if(!Gh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Gh(T)&&h(T);){if(T=vI(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,E=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:H}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,w=d==="center"?H+D/2:d==="end"?F:H,p=[];for(let $=0;$<y.length;$++){let P=y[$],{height:j,width:W,top:Y,right:ne,bottom:B,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&H>=0&&k<=v&&F<=S&&A>=Y&&k<=B&&H>=L&&F<=ne)return p;let oe=getComputedStyle(P),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),z=0,U=0,ee="offsetWidth"in P?P.offsetWidth-P.clientWidth-G-Z:0,Q="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:W/P.offsetWidth:0,re="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ua(C,C+v,v,K,ce,C+R,C+R+I,I):R-v/2,U=d==="start"?w:d==="center"?w-S/2:d==="end"?w-S:ua(E,E+S,S,G,Z,E+w,E+w+D,D),z=Math.max(0,z+C),U=Math.max(0,U+E);else{z=u==="start"?R-Y-K:u==="end"?R-B+ce+Q:u==="nearest"?ua(Y,B,j,K,ce+Q,R,R+I,I):R-(Y+j/2)+Q/2,U=d==="start"?w-L-G:d==="center"?w-(L+W/2)+ee/2:d==="end"?w-ne+Z+ee:ua(L,ne,W,G,Z+ee,w,w+D,D);let{scrollLeft:me,scrollTop:Te}=P;z=Math.max(0,Math.min(Te+z/re,P.scrollHeight-j/re+Q)),U=Math.max(0,Math.min(me+U/ie,P.scrollWidth-W/ie+ee)),R+=Te-z,w+=me-U}p.push({el:P,top:z,left:U})}return p},gI=0;function Qh(e){return typeof e=="function"?e:dn}function dn(){}function ug(e,t){if(e){var n=mI(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 Jh(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 hr(){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(gI++)}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 ep(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function hg(e){return e.props}function yI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var bI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return bI.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]=Xa(t,r)?t[r]:e[r],n},{})}function Xa(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 wI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Or(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=Fr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Fr(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?Fr(1,0,n,r,!1):Fr(-1,n-1,n,r,!1):-1}function Ga(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jh(o,e,n)||r&&Jh(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 EI=xl(function(e){pg(e).textContent=""},500);function Sl(e,t){var n=pg(t);e&&(n.textContent=e,EI(t))}function pg(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,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Sa=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,xI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),_I=["refKey","ref"],SI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],CI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],$I=["refKey","ref"],TI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],II=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,E){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},E);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,E){v===void 0&&(v=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=la(E),i.internalSetState(ae({highlightedIndex:v},E))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,E,C){E=la(E),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},E),C)},i.selectItemAtIndex=function(v,E,C){var I=i.items[v];I!=null&&i.selectItem(I,E,C)},i.selectHighlightedItem=function(v,E){return i.selectItemAtIndex(i.getState().highlightedIndex,v,E)},i.internalSetState=function(v,E){var C,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?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],Xa(i.props,R)||(H[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),H},function(){Qh(E)();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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,_I),H=E===void 0?{}:E,R=H.suppressRefError,w=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=w;var p=i.getState(),$=p.isOpen;return ae((C={},C[A]=hr(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(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(-1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(E){if(E.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){E.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(E){E.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(E){E.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(1,0,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(-1,A-1,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var E=v===void 0?{}:v,C=E.onClick;E.onPress;var I=E.onKeyDown,D=E.onKeyUp,A=E.onBlur,F=an(E,SI),k=i.getState(),H=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(A,i.buttonHandleBlur)},w=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":H?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},w,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var E=Si(v);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].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 E=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!==E&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var E=v===void 0?{}:v,C=E.onKeyDown,I=E.onBlur,D=E.onChange,A=E.onInput;E.onChangeText;var F=an(E,CI),k,H={};k="onChange";var R=i.getState(),w=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var P;H=(P={},P[k]=Rt(D,A,i.inputHandleChange),P.onKeyDown=Rt(C,i.inputHandleKeyDown),P.onBlur=Rt(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":p&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":p?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:w,id:i.inputId},H,F)},i.inputHandleKeyDown=function(v){var E=Si(v);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,$I),H=E===void 0?{}:E,R=H.suppressRefError,w=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=w,ae((C={},C[A]=hr(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 E,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,A=C.onClick;C.onPress;var F=C.index,k=C.item,H=k===void 0?process.env.NODE_ENV==="production"?void 0:yI("getItemProps","item"):k,R=an(C,TI);F===void 0?(i.items.push(H),F=i.items.indexOf(H)):i.items[F]=H;var w="onClick",p=A,$=(E={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()})},E[w]=Rt(p,function(){i.selectItemAtIndex(F,{type:xg})}),E),P=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,E){v===void 0&&(v={}),v=la(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)},E)},i.toggleMenu=function(v,E){v===void 0&&(v={}),v=la(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),Qh(E)()})},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(),E=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:E},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,h=a.initialInputValue,b=h===void 0?"":h,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=Or(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,h=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,E=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,H=this.clearItems,R=this.reset,w=this.setItemCount,p=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:h,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:E,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:H,setItemCount:w,unsetItemCount:p,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&&tp(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(h){i.isMouseDown=!1;var b=Ga(h.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(h){var b=Ga(h.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&&tp(this._menuNode,this.getMenuProps)),Xa(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=ep(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=ep(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&&RI(a,this.getRootProps),a;if(fg(a))return l.cloneElement(a,this.getRootProps(hg(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"&&wI(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=xI,e}();process.env.NODE_ENV!=="production"&&(II.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function tp(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 RI(e,t){var n=t.refKey,r=n!=="ref",o=!fg(e);o&&!r&&!Xh.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+'"'),!Xh.isForwardRef(e)&&!hg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var OI=["isInitialMount","highlightedIndex","items","environment"],Rg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function PI(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){AI(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 AI(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 DI(e,t){return t.changes}function NI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var kI=xl(function(e,t){Sl(e(),t)},200),MI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function jI(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 LI(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,h){o.current=h,m=_i(m,h.props);var b=e(m,h),y=h.props.stateReducer(m,ae({},h,{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&&PI(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function FI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:LI,stateReducer:DI,getA11ySelectionMessage:NI,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 VI(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 BI(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&&!Ga(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&&!Ga(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 np(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,OI);l.useEffect(function(){r||kI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function HI(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 MI(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 rp(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 WI(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)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function zI(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.":""}xn(xn({},ri),{getA11yStatusMessage:zI});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,Za=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:Za,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 UI(e){var t=VI(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 YI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function KI(e,t,n){var r=l.useRef(),o=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(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){X.checkPropTypes(YI,t,"prop",n.name)});var qI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function XI(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:Or(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=rp(o,e.highlightedIndex):a={highlightedIndex:Or(-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=rp(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Fr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Za: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 WI(e,t,Bg)}return ae({},e,a)}var GI=["onMouseLeave","refKey","ref"],ZI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],QI=["onClick","onPress","refKey","ref"],JI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=Bg;function no(e){e===void 0&&(e={}),Hg(e,no);var t=ae({},qI,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=UI(t),f=KI(XI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),E=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=jI(t),F=l.useRef(),k=$l({state:m,props:t}),H=l.useCallback(function(z){return E.current[A.getItemId(z)]},[A]);np(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),np(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=HI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:E,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 w=BI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)E.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var U;C==null||(U=C.current)==null||U.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),h({type:Rl,altKey:U.altKey,getItemNodeFromIndex:H})},ArrowUp:function(U){U.preventDefault(),h({type:Ol,altKey:U.altKey,getItemNodeFromIndex:H})},Home:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Al,getItemNodeFromIndex:H}))},End:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Dl,getItemNodeFromIndex:H}))},Escape:function(U){var ee=k.current.state;(ee.isOpen||ee.inputValue||ee.selectedItem||ee.highlightedIndex>-1)&&(U.preventDefault(),h({type:Pl}))},Enter:function(U){var ee=k.current.state;!ee.isOpen||U.which===229||(U.preventDefault(),h({type:Ml,getItemNodeFromIndex:H}))},PageUp:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Nl,getItemNodeFromIndex:H}))},PageDown:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:kl,getItemNodeFromIndex:H}))}}},[h,k,H]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onMouseLeave,re=Q.refKey,me=re===void 0?"ref":re,Te=Q.ref,Pe=an(Q,GI),Ne=U===void 0?{}:U,Oe=Ne.suppressRefError,We=Oe===void 0?!1:Oe;return p("getMenuProps",We,me,v),ae((ee={},ee[me]=hr(Te,function(De){v.current=De}),ee.id=A.menuId,ee.role="listbox",ee["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+A.labelId,ee.onMouseLeave=Rt(ie,function(){h({type:Ag})}),ee),Pe)},[h,p,A]),W=l.useCallback(function(z){var U,ee,Q=z===void 0?{}:z,ie=Q.item,re=Q.index,me=Q.refKey,Te=me===void 0?"ref":me,Pe=Q.ref,Ne=Q.onMouseMove,Oe=Q.onMouseDown,We=Q.onClick;Q.onPress;var De=Q.disabled,rt=an(Q,ZI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Og(ie,re,xt.items,"Pass either item or index to getItemProps!"),xe=Pt[1],ct="onClick",je=We,Zt=function(){xe!==Xe.highlightedIndex&&(R.current=!1,h({type:Dg,index:xe,disabled:De}))},Ct=function(){h({type:Fl,index:xe})},et=function(gt){return gt.preventDefault()};return ae((U={},U[Te]=hr(Pe,function(Fe){Fe&&(E.current[A.getItemId(xe)]=Fe)}),U.disabled=De,U.role="option",U["aria-selected"]=""+(xe===Xe.highlightedIndex),U.id=A.getItemId(xe),U),!De&&(ee={},ee[ct]=Rt(je,Ct),ee),{onMouseMove:Rt(Ne,Zt),onMouseDown:Rt(Oe,et)},rt)},[h,k,R,A]),Y=l.useCallback(function(z){var U,ee=z===void 0?{}:z,Q=ee.onClick;ee.onPress;var ie=ee.refKey,re=ie===void 0?"ref":ie,me=ee.ref,Te=an(ee,QI),Pe=k.current.state,Ne=function(){h({type:Ng})};return ae((U={},U[re]=hr(me,function(Oe){I.current=Oe}),U["aria-controls"]=A.menuId,U["aria-expanded"]=Pe.isOpen,U.id=A.toggleButtonId,U.tabIndex=-1,U),!Te.disabled&&ae({},{onClick:Rt(Q,Ne)}),Te)},[h,k,A]),ne=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onKeyDown,re=Q.onChange,me=Q.onInput,Te=Q.onFocus,Pe=Q.onBlur;Q.onChangeText;var Ne=Q.refKey,Oe=Ne===void 0?"ref":Ne,We=Q.ref,De=an(Q,JI),rt=U===void 0?{}:U,ze=rt.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Oe,C);var Xe=k.current.state,Pt=function(gt){var nn=Si(gt);nn&&$[nn]&&$[nn](gt)},xe=function(gt){h({type:jl,inputValue:gt.target.value})},ct=function(gt){if(Xe.isOpen&&!w.current.isMouseDown){var nn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:Ll})},Zt="onChange",Ct={};if(!De.disabled){var et;Ct=(et={},et[Zt]=Rt(re,me,xe),et.onKeyDown=Rt(ie,Pt),et.onBlur=Rt(Pe,ct),et.onFocus=Rt(Te,je),et)}return ae((ee={},ee[Oe]=hr(We,function(Fe){C.current=Fe}),ee["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",ee["aria-autocomplete"]="list",ee["aria-controls"]=A.menuId,ee["aria-expanded"]=Xe.isOpen,ee["aria-labelledby"]=De&&De["aria-label"]?void 0:""+A.labelId,ee.autoComplete="off",ee.id=A.inputId,ee.role="combobox",ee.value=Xe.inputValue,ee),Ct,De)},[p,k,A,$,h,w,a]),B=l.useCallback(function(){h({type:kg})},[h]),L=l.useCallback(function(){h({type:jg})},[h]),oe=l.useCallback(function(){h({type:Mg})},[h]),G=l.useCallback(function(z){h({type:Lg,highlightedIndex:z})},[h]),K=l.useCallback(function(z){h({type:Vl,selectedItem:z})},[h]),Z=l.useCallback(function(z){h({type:Fg,inputValue:z})},[h]),ce=l.useCallback(function(){h({type:Vg})},[h]);return{getItemProps:W,getLabelProps:P,getMenuProps:j,getInputProps:ne,getToggleButtonProps:Y,toggleMenu:B,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Wg={activeIndex:-1,selectedItems:[]};function op(e,t){return zo(e,t,Wg)}function ip(e,t){return Pn(e,t,Wg)}function eR(e){var t=op(e,"activeIndex"),n=op(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ap(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 tR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var nR={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},rR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:tR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},zg=dn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(nR,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,oR=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 iR(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 h=t.activeIndex;c={activeIndex:h};break}case ed:c={activeIndex:ip(o,"activeIndex"),selectedItems:ip(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var aR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],sR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];td.stateChangeTypes=oR;function td(e){e===void 0&&(e={}),zg(e,td);var t=ae({},rR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=FI(iR,eR(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),h=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(w){return f.indexOf(w)<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&&h.current?h.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]),E=l.useMemo(function(){var R;return R={},R[a]=function(w){ap(w)&&u({type:Kl})},R.Backspace=function(p){ap(p)&&u({type:ql})},R},[u,a]),C=l.useCallback(function(R){var w,p=R===void 0?{}:R,$=p.refKey,P=$===void 0?"ref":$,j=p.ref,W=p.onClick,Y=p.onKeyDown,ne=p.selectedItem,B=p.index,L=an(p,aR),oe=T.current.state,G=Og(ne,B,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Hl,index:K})},z=function(ee){var Q=Si(ee);Q&&v[Q]&&v[Q](ee)};return ae((w={},w[P]=hr(j,function(U){U&&y.current.push(U)}),w.tabIndex=Z?0:-1,w.onClick=Rt(W,ce),w.onKeyDown=Rt(Y,z),w),L)},[u,T,v]),I=l.useCallback(function(R,w){var p,$=R===void 0?{}:R,P=$.refKey,j=P===void 0?"ref":P,W=$.ref,Y=$.onKeyDown,ne=$.onClick,B=$.preventKeyAction,L=B===void 0?!1:B,oe=an($,sR),G=w===void 0?{}:w,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,j,h);var ce=function(ee){var Q=Si(ee);Q&&E[Q]&&E[Q](ee)},z=function(){u({type:Xl})};return ae((p={},p[j]=hr(W,function(U){U&&(h.current=U)}),p),!L&&{onKeyDown:Rt(Y,ce),onClick:Rt(ne,z)},oe)},[u,E,S]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),A=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:A,setSelectedItems:F,setActiveIndex:k,reset:H,selectedItems:f,activeIndex:d}}var cR="jbnkvn0",sp=dt({defaultClassName:"jbnkvna",variantClassNames:{highlighted:{true:"jbnkvnb"},selected:{true:"jbnkvnc"},multiSelected:{true:"jbnkvnd"},isDisabled:{true:"jbnkvne"}},defaultVariants:{},compoundVariants:[]}),cp="jbnkvn9",uR="jbnkvn3",mc=dt({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"}},defaultVariants:{isRounded:!1},compoundVariants:[]}),lR=dt({defaultClassName:"jbnkvn4",variantClassNames:{isMobile:{true:"jbnkvn5",false:"jbnkvn6"},isReadOnly:{true:"jbnkvn7"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),dR="jbnkvn8",up="jbnkvnf";const Ug=l.createContext(void 0),fR=({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}=nd();return t?t({children:e,defaultClassName:cp,innerProps:n()}):M.jsx("div",{className:cp,...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}=nd(),u=a===n,d=(o==null?void 0:o.value)===t.value&&!r,f=r&&i.includes(t)||!1,m=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sp({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:u,isSelected:d,isChecked:f}):M.jsxs("div",{className:sp({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:$t.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}=nd();if(e)return e({innerProps:o(),defaultClassName:up,isOpen:r});const a=n==="disabled"?$t.theme.colors.black:$t.theme.colors.grey1;return M.jsx("div",{className:up,...o({disabled:i}),"data-disabled":i,children:r?M.jsx(xu,{color:a,...t}):M.jsx(si,{color:a,...t})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const co=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,...m},h)=>{const{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,isRounded:D}=m,[A,F]=l.useState(e),k=Du({isError:v,isDisabled:C,isValid:I}),H=l.useRef(null),{removeSelectedItem:R,selectedItems:w,addSelectedItem:p,getDropdownProps:$}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(U){c&&r(U.selectedItems)}}),P=l.useMemo(()=>w.length,[w]),j=l.useCallback(U=>{let ee=U;(c&&!d||u)&&(ee="");const Q=new RegExp(ee.toLowerCase());return e.filter(ie=>Q.test(ie.label.toLowerCase()))},[e]),{isOpen:W,getToggleButtonProps:Y,getLabelProps:ne,getMenuProps:B,getInputProps:L,highlightedIndex:oe,getItemProps:G,selectedItem:K,openMenu:Z,closeMenu:ce}=no({items:A,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:U})=>{F(j(U||""))},itemToString(U){return U?U.label:""},onSelectedItemChange(U){var ee;c||(r(U.selectedItem),u&&((ee=H.current)==null||ee.blur()),ce())},stateReducer:(U,ee)=>{const{changes:Q,type:ie}=ee,re=A.find((me,Te)=>Te===U.highlightedIndex);switch(ie){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let me=P;return w.includes(re)?(me-=1,R(re)):(me+=1,p(re)),{...Q,isOpen:!0,highlightedIndex:U.highlightedIndex,inputValue:!d&&me>0?`${me} items selected`:""}}return{...Q,isOpen:!1,highlightedIndex:U.highlightedIndex,inputValue:Q.inputValue};case no.stateChangeTypes.InputBlur:{let me=Q.inputValue;return c&&!d&&(P>0?me=`${P} items selected`:me=""),{...Q,inputValue:me}}default:return Q}}});l.useImperativeHandle(h,()=>H.current);const z={isOpen:W,formState:k,selectedItem:K,multipleSelectedItems:w,isMulti:c,isDisabled:C,totalSelected:P,highlightedIndex:oe,getMenuProps:B,getItemProps:G,getToggleButtonProps:Y,onClickItem:f};return M.jsx(fR,{contextValue:z,children:M.jsxs(at,{position:"relative",w:"$full",children:[M.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,inputAreaClassName:Ie(cR,mc({isRounded:D})),className:mc({isRounded:D}),children:[M.jsxs("div",{className:uR,children:[M.jsx("input",{"data-test-id":m["data-test-id"],...L($({preventKeyAction:W,ref:H,placeholder:n,readOnly:u,disabled:C,className:lR({isMobile:d,isReadOnly:u}),onClick:()=>{W||Z()}}))}),d&&c&&M.jsx("div",{className:dR,children:P>0?`${P} items selected`:""}),d&&M.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,className:mc({isRounded:D}),...ne(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),W&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:A.map((U,ee)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:ee,item:U}))})]})})});co.displayName="Select";co.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)},hR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],pR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),vR=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:Qa[n.getMonth()],value:Qa[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Qa.findIndex(t=>t===e),lp=(e,t)=>new Date(e,ii(t)+1,0).getDate(),mR=({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<=lp(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lp(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,h]=l.useState(),[b,y]=l.useState(),T=()=>{f(void 0),h(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]),E=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),C=l.useMemo(()=>S||v||E?mR({date:S?Number(S==null?void 0:S.value):0,month:v?v.value:"",year:E?Number(E.value):0,maxDate:t}):!1,[S,v,E,t]),I=S&&v&&!E&&!C,D=S&&!v&&E&&!C,A=!S&&v&&E&&!C,F=S&&v&&E&&!C;return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),T()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},children:M.jsxs(Pr,{gap:"$24",children:[M.jsxs(Pr,{gap:"$8",children:[M.jsx(at,{height:"$40",children:M.jsx(Di,{children:e})}),M.jsxs(Pr,{children:[M.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[M.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:S,isMobile:n,options:hR,onChange:f,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:v,isMobile:n,options:pR,onChange:h,isError:A||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:E,isMobile:n,options:vR(t),onChange:y,isError:A||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||A||D||I)&&M.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),M.jsx(vo,{onClick:()=>{o(new Date(Number(E==null?void 0:E.value),ii(v==null?void 0:v.value),Number(S==null?void 0:S.value))),T()},isDisabled:!E||!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 gR=dt({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:Ie(gR({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",yR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,bR]=Ja(rd),[wR,Jg]=mn(rd,[bR]),[ER,xR]=wR(rd),_R=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(SR,ae({},e,{ref:t}))))),SR=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=st(t,f),h=es(i),[b=null,y]=Sn({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),E=Qg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(ER,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{C.current=!0}),onFocus:Ae(e.onFocus,A=>{const F=!C.current;if(A.target===A.currentTarget&&F&&!T){const k=new CustomEvent(yc,yR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const H=E().filter(P=>P.focusable),R=H.find(P=>P.active),w=H.find(P=>P.id===b),$=[R,w,...H].filter(Boolean).map(P=>P.ref.current);ey($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),CR="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=xR(CR,n),d=u.currentTabStopId===c,f=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),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:Ae(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ae(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ae(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=RR(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?OR(S,v+1):S.slice(v+1)}setTimeout(()=>ey(S))}})})))}),TR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function IR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function RR(e,t,n){const r=IR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return TR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function OR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const PR=_R,AR=$R,ty="Radio",[DR,ny]=mn(ty),[NR,kR]=DR(ty),MR=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=st(t,y=>f(y)),h=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(NR,{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:Ae(e.onClick,y=>{o||c==null||c(),b&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),b&&l.createElement(FR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),jR="RadioIndicator",LR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=kR(jR,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})))}),FR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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 VR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[BR,MP]=mn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[HR,WR]=BR(oy),zR=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,h=iy(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(HR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(PR,ae({asChild:!0},h,{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}))))}),UR="RadioGroupItem",YR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=WR(UR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{VR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),l.createElement(AR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(MR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ae(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ae(o.onFocus,()=>{var h;m.current&&((h=u.current)===null||h===void 0||h.click())})})))}),KR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(LR,ae({},o,r,{ref:t}))}),qR=zR,XR=YR,GR=KR;var ZR=dt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),QR="d6umgr1",JR=dt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),eO="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Yt,{alignItems:"center",children:[M.jsx(XR,{...r,disabled:n,className:Ie(t,eO),id:o,children:M.jsx(GR,{className:Ie("radio-indicator",JR({disabled:n}))})}),e&&M.jsx("label",{className:Ie("radio-label",ZR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const tO=({className:e,children:t,...n})=>M.jsx(qR,{...n,className:Ie(e,QR),children:t});var nO="_846x3h0",rO="_846x3h1",oO=dt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:o,...i},a)=>{const[s,c]=l.useState(!1),u=()=>c(!0),d=()=>c(!1),f=l.useMemo(()=>!!(o||e&&s),[s,e,o]);return M.jsxs(at,{position:"relative",children:[M.jsx(at,{className:Ie(nO),children:M.jsx(O0,{size:24})}),M.jsx("input",{className:Ie(oO({size:n,isHasIcon:f,isDisabled:r})),ref:a,value:e,"data-test-id":i["data-test-id"],onFocus:u,onBlur:d,disabled:r,...i}),f&&M.jsx(at,{className:Ie(rO),children:o&&(!s||s&&!e)?o:M.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const cy="Switch",[iO,jP]=mn(cy),[aO,sO]=iO(cy),cO=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),h=st(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u});return l.createElement(aO,{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:h,onClick:Ae(e.onClick,v=>{S(E=>!E),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(dO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),uO="SwitchThumb",lO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=sO(uO,n);return l.createElement(Ue.span,ae({"data-state":uy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),dO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(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 fO=cO,hO=lO;var pO="b7c0j12",vO="b7c0j10",mO="b7c0j11";const ly=l.forwardRef((e,t)=>M.jsx(fO,{ref:t,className:vO,...e,children:M.jsx(hO,{className:mO,children:M.jsx(Eu,{className:pO,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(Yt,{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 gO="_94c6vs1",yO="_94c6vs3",dp="_94c6vs2",bO="_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,h=f.sortable,b=a.by===m;return h?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 h=[...f];return m.order==="ASC"?h.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?h.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 h=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(h)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},hy=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:bO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:yO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:dp,onClick:()=>d(m),children:M.jsxs(Yt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(at,{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,h)=>M.jsx("tr",{className:gO,children:m.map((b,y)=>M.jsx(at,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:dp,w:"33%",children:b.CellRenderer??b.value}))}))})]})});hy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var wO=dt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var EO=dt({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]),h=e||"ul";return M.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Ie(EO({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:Ie(wO({isActive:s})),...n,children:M.jsx(sn,{as:"span",textStyle:"body2",children:t})})});sd.displayName="TabItem";sd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[cd,xO,_O]=Ja("Toast"),[vy,LP]=mn("Toast",[_O]),[SO,Os]=vy(py),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(SO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(h=>h+1),[]),onToastRemove:l.useCallback(()=>d(h=>h-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 \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const CO="ToastViewport",$O=["F8"],lu="toast.viewportPause",du="toast.viewportResume",TO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=$O,label:o="Notifications ({hotkey})",...i}=e,a=Os(CO,n),s=xO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=st(t,f,a.onViewportChange),h=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}},E=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&E()},I=()=>{T.contains(document.activeElement)||E()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",E),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",E)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(E=>{const C=E.ref.current,I=[C,...HO(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 E=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!E){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 w=y({tabbingDirection:k?"backwards":"forwards"}),p=w.findIndex($=>$===F);if(bc(w.slice(p+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=d.current)===null||A===void 0||A.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(J0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fp,{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(fp,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),IO="ToastFocusProxy",fp=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(IO,n);return l.createElement(ds,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",RO="toast.swipeStart",OO="toast.swipeMove",PO="toast.swipeCancel",AO="toast.swipeEnd",DO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Sn({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:Ae(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ae(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:Ae(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:Ae(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)})})))}),[NO,kO]=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:h,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=st(t,$=>S($)),E=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=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()}),w=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 P=()=>{w(A.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;A.current=A.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,P),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,P)}}},[y.viewport,I,c,u,w]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&w(I)},[i,I,y.isClosePausedRef,w]),l.useEffect(()=>(k(),()=>H()),[k,H]);const p=l.useMemo(()=>T?by(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(MO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(NO,{scope:n,onClose:R},hn.createPortal(l.createElement(cd.ItemSlot,{scope:n},l.createElement(Q0,{asChild:!0,onEscapeKeyDown:Ae(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:Ae(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ae(e.onPointerDown,$=>{$.button===0&&(E.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!E.current)return;const P=$.clientX-E.current.x,j=$.clientY-E.current.y,W=!!C.current,Y=["left","right"].includes(y.swipeDirection),ne=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=Y?ne(0,P):0,L=Y?0:ne(0,j),oe=$.pointerType==="touch"?10:2,G={x:B,y:L},K={originalEvent:$,delta:G};W?(C.current=G,da(OO,f,K,{discrete:!1})):hp(G,y.swipeDirection,oe)?(C.current=G,da(RO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(P)>oe||Math.abs(j)>oe)&&(E.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const P=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,E.current=null,P){const W=$.currentTarget,Y={originalEvent:$,delta:P};hp(P,y.swipeDirection,y.swipeThreshold)?da(AO,h,Y,{discrete:!0}):da(PO,m,Y,{discrete:!0}),W.addEventListener("click",ne=>ne.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 MO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return VO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},jO="ToastAction",ud=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(yy,{altText:n,asChild:!0},l.createElement(FO,ae({},r,{ref:t}))):null});ud.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${jO}\``)}};const LO="ToastClose",FO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=kO(LO,n);return l.createElement(yy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ae(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),BO(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 da(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?Ep(o,i):o.dispatchEvent(i)}const hp=(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 VO(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 BO(e){return e.nodeType===e.ELEMENT_NODE}function HO(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 WO=my,wy=TO,Ey=DO,zO=ud;var UO="_10z4js29",YO=dt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),KO="_10z4js28",qO="_10z4js2a";const xy=WO,ld=l.forwardRef(({className:e,...t},n)=>M.jsx(wy,{ref:n,className:Ie(qO,e),...t}));ld.displayName=wy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(Ey,{ref:r,className:Ie(YO({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:Ie(e),...t}));dd.displayName=zO.displayName;const XO=1,GO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function ZO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,pp=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},GO);Ec.set(e,t)};function _y(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,XO)};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?pp(n):e.toasts.forEach(r=>{pp(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 Ca=[];let $a={toasts:[]};function ai(e){$a=_y($a,e),Ca.forEach(t=>{t($a)})}function Sy({...e}){const t=ZO(),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($a);return l.useEffect(()=>(Ca.push(t),()=>{const n=Ca.indexOf(t);n>-1&&Ca.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:h,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(at,{"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(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:KO,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:Ie(UO,h),children:s})}):a]},o),M.jsx(ld,{...m})]},o))})});fd.displayName="Toaster";const[Ds,FP]=mn("Tooltip",[us]),Ns=us(),QO="TooltipProvider",JO=700,fu="tooltip.open",[eP,hd]=Ds(QO),tP=e=>{const{__scopeTooltip:t,delayDuration:n=JO,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(eP,{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)},pd="Tooltip",[nP,ks]=Ds(pd),rP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=hd(pd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),h=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=Sn({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),E=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(h.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(h.current),[]),l.createElement(Zp,u,l.createElement(nP,{scope:t,contentId:m,open:S,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(h.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},vp="TooltipTrigger",oP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vp,n),i=hd(vp,n),a=Ns(n),s=l.useRef(null),c=st(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(Qp,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:Ae(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ae(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ae(e.onBlur,o.onClose),onClick:Ae(e.onClick,o.onClose)})))}),iP="TooltipPortal",[VP,aP]=Ds(iP,{forceMount:void 0}),Ci="TooltipContent",sP=l.forwardRef((e,t)=>{const n=aP(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(cP,ae({side:o},i,{ref:t})))}),cP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=hd(Ci,e.__scopeTooltip),o=l.useRef(null),i=st(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]),h=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=hP(S,T.getBoundingClientRect()),E=pP(S,v),C=vP(y.getBoundingClientRect()),I=gP([...E,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>h(T,d),y=T=>h(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,h,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)),E=!mP(S,a);v?m():E&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement($y,ae({},e,{ref:i}))}),[uP,lP]=Ds(pd,{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 h=m.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Jp,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(wp,null,r),l.createElement(uP,{scope:n,isInside:!0},l.createElement(i1,{id:c.contentId,role:"tooltip"},o||r))))}),dP="TooltipArrow",fP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return lP(dP,n).isInside?null:l.createElement(r1,ae({},o,r,{ref:t}))});function hP(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 pP(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 vP(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 mP(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 gP(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),yP(t)}function yP(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 bP=tP,wP=rP,EP=oP,xP=sP,_P=fP;function mp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function SP(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 CP(e,t){var n={};if(typeof t=="object"){var r=e;Ty(t,(a,s)=>{var c=SP(r,s);n[mp(c)]=String(a)})}else{var o=e;for(var i in o)n[mp(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 $P="var(--_4goys34)",TP="_4goys35",IP="_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:h,...b},y)=>{const T=$t.atoms.commonAtoms({color:r,bgColor:o}).className,S=$t.atoms.borderAtoms({borderColor:o}).className,E=o.replace("$","");return M.jsxs(wP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(EP,{asChild:!0,ref:y,children:n}),M.jsx(ms,{children:M.jsxs(xP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Ie(IP,T,S),children:[M.jsxs(Yt,{gap:"$6",children:[h&&M.jsx(Yt,{width:"$24",children:M.jsx(N0,{size:24})}),i]}),M.jsx(_P,{className:TP,style:CP({[$P]:$t.theme.colors[E]})})]})})]})});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(bP,{children:[e,M.jsx(fd,{})]});md.displayName="RadixProvider";const gd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:$t.theme.fonts.poppins},className:Ie(t??$t.scrollbarStyle),children:M.jsx(md,{children:e})});gd.displayName="Provider";gd.defaultProps={withScrollStyles:!1};exports.Accordion=Nb;exports.AccordionContent=p0;exports.AccordionItem=v0;exports.AccordionTrigger=B0;exports.Alert=Pp;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=z$;exports.Box=at;exports.Button=vo;exports.Card=yu;exports.Checkbox=Gm;exports.Chips=ul;exports.CloseButton=xo;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=FT;exports.Container=bu;exports.DatePicker=fI;exports.Dialog=dl;exports.Divider=hl;exports.Flex=Yt;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=QT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=sg;exports.Overlay=ZE;exports.Picker=au;exports.Pills=Zg;exports.Portal=ms;exports.Provider=gd;exports.Radio=sy;exports.RadioGroup=tO;exports.RadixProvider=md;exports.Search=od;exports.Select=co;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=ly;exports.TabItem=sd;exports.Table=hy;exports.Tabs=ad;exports.TabsContext=id;exports.Text=sn;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=VT;exports.useIndeterminate=uT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=fy;exports.useToast=Cy;
|