@ctlyst.id/voila-ui 1.22.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18,13 +18,13 @@
18
18
  `+B+y}}var J=!1,ee;{var te=typeof WeakMap=="function"?WeakMap:Map;ee=new te}function Z(y,F){if(!y||J)return"";{var Q=ee.get(y);if(Q!==void 0)return Q}var fe;J=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=ae.current,ae.current=null,X();try{if(F){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(Be){fe=Be}Reflect.construct(y,[],be)}else{try{be.call()}catch(Be){fe=Be}y.call(be.prototype)}}else{try{throw Error()}catch(Be){fe=Be}y()}}catch(Be){if(Be&&fe&&typeof Be.stack=="string"){for(var ye=Be.stack.split(`
19
19
  `),Ke=fe.stack.split(`
20
20
  `),Me=ye.length-1,Ve=Ke.length-1;Me>=1&&Ve>=0&&ye[Me]!==Ke[Ve];)Ve--;for(;Me>=1&&Ve>=0;Me--,Ve--)if(ye[Me]!==Ke[Ve]){if(Me!==1||Ve!==1)do if(Me--,Ve--,Ve<0||ye[Me]!==Ke[Ve]){var He=`
21
- `+ye[Me].replace(" at new "," at ");return y.displayName&&He.includes("<anonymous>")&&(He=He.replace("<anonymous>",y.displayName)),typeof y=="function"&&ee.set(y,He),He}while(Me>=1&&Ve>=0);break}}}finally{J=!1,ae.current=_e,ne(),Error.prepareStackTrace=xe}var It=y?y.displayName||y.name:"",or=It?H(It):"";return typeof y=="function"&&ee.set(y,or),or}function ge(y,F,Q){return Z(y,!1)}function Ce(y){var F=y.prototype;return!!(F&&F.isReactComponent)}function Re(y,F,Q){if(y==null)return"";if(typeof y=="function")return Z(y,Ce(y));if(typeof y=="string")return H(y);switch(y){case l:return H("Suspense");case d:return H("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case c:return ge(y.render);case f:return Re(y.type,F,Q);case m:{var fe=y,xe=fe._payload,_e=fe._init;try{return Re(_e(xe),F,Q)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,Se={},We=T.ReactDebugCurrentFrame;function ke(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);We.setExtraStackFrame(Q)}else We.setExtraStackFrame(null)}function lt(y,F,Q,fe,xe){{var _e=Function.call.bind(Pe);for(var be in y)if(_e(y,be)){var ye=void 0;try{if(typeof y[be]!="function"){var Ke=Error((fe||"React class")+": "+Q+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}ye=y[be](F,be,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(ke(xe),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,be,typeof ye),ke(null)),ye instanceof Error&&!(ye.message in Se)&&(Se[ye.message]=!0,ke(xe),h("Failed %s type: %s",Q,ye.message),ke(null))}}}var Ye=Array.isArray;function yt(y){return Ye(y)}function Je(y){{var F=typeof Symbol=="function"&&Symbol.toStringTag,Q=F&&y[Symbol.toStringTag]||y.constructor.name||"Object";return Q}}function Pt(y){try{return Te(y),!1}catch{return!0}}function Te(y){return""+y}function Et(y){if(Pt(y))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(y)),Te(y)}var ut=T.ReactCurrentOwner,cn={key:!0,ref:!0,__self:!0,__source:!0},jt,St,je;je={};function Ct(y){if(Pe.call(y,"ref")){var F=Object.getOwnPropertyDescriptor(y,"ref").get;if(F&&F.isReactWarning)return!1}return y.ref!==void 0}function Lt(y){if(Pe.call(y,"key")){var F=Object.getOwnPropertyDescriptor(y,"key").get;if(F&&F.isReactWarning)return!1}return y.key!==void 0}function bn(y,F){if(typeof y.ref=="string"&&ut.current&&F&&ut.current.stateNode!==F){var Q=v(ut.current.type);je[Q]||(h('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',v(ut.current.type),y.ref),je[Q]=!0)}}function Ft(y,F){{var Q=function(){jt||(jt=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"key",{get:Q,configurable:!0})}}function rr(y,F){{var Q=function(){St||(St=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"ref",{get:Q,configurable:!0})}}var rn=function(y,F,Q,fe,xe,_e,be){var ye={$$typeof:t,type:y,key:F,ref:Q,props:be,_owner:_e};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _r(y,F,Q,fe,xe){{var _e,be={},ye=null,Ke=null;Q!==void 0&&(Et(Q),ye=""+Q),Lt(F)&&(Et(F.key),ye=""+F.key),Ct(F)&&(Ke=F.ref,bn(F,xe));for(_e in F)Pe.call(F,_e)&&!cn.hasOwnProperty(_e)&&(be[_e]=F[_e]);if(y&&y.defaultProps){var Me=y.defaultProps;for(_e in Me)be[_e]===void 0&&(be[_e]=Me[_e])}if(ye||Ke){var Ve=typeof y=="function"?y.displayName||y.name||"Unknown":y;ye&&Ft(be,Ve),Ke&&rr(be,Ve)}return rn(y,ye,Ke,xe,fe,ut.current,be)}}var Bt=T.ReactCurrentOwner,ln=T.ReactDebugCurrentFrame;function Tt(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);ln.setExtraStackFrame(Q)}else ln.setExtraStackFrame(null)}var un;un=!1;function dn(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function kn(){{if(Bt.current){var y=v(Bt.current.type);if(y)return`
21
+ `+ye[Me].replace(" at new "," at ");return y.displayName&&He.includes("<anonymous>")&&(He=He.replace("<anonymous>",y.displayName)),typeof y=="function"&&ee.set(y,He),He}while(Me>=1&&Ve>=0);break}}}finally{J=!1,ae.current=_e,ne(),Error.prepareStackTrace=xe}var It=y?y.displayName||y.name:"",or=It?H(It):"";return typeof y=="function"&&ee.set(y,or),or}function ge(y,F,Q){return Z(y,!1)}function Ce(y){var F=y.prototype;return!!(F&&F.isReactComponent)}function Re(y,F,Q){if(y==null)return"";if(typeof y=="function")return Z(y,Ce(y));if(typeof y=="string")return H(y);switch(y){case l:return H("Suspense");case d:return H("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case c:return ge(y.render);case f:return Re(y.type,F,Q);case m:{var fe=y,xe=fe._payload,_e=fe._init;try{return Re(_e(xe),F,Q)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,Te={},We=T.ReactDebugCurrentFrame;function ke(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);We.setExtraStackFrame(Q)}else We.setExtraStackFrame(null)}function lt(y,F,Q,fe,xe){{var _e=Function.call.bind(Pe);for(var be in y)if(_e(y,be)){var ye=void 0;try{if(typeof y[be]!="function"){var Ke=Error((fe||"React class")+": "+Q+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}ye=y[be](F,be,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(ke(xe),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,be,typeof ye),ke(null)),ye instanceof Error&&!(ye.message in Te)&&(Te[ye.message]=!0,ke(xe),h("Failed %s type: %s",Q,ye.message),ke(null))}}}var Ye=Array.isArray;function yt(y){return Ye(y)}function Je(y){{var F=typeof Symbol=="function"&&Symbol.toStringTag,Q=F&&y[Symbol.toStringTag]||y.constructor.name||"Object";return Q}}function Pt(y){try{return $e(y),!1}catch{return!0}}function $e(y){return""+y}function Et(y){if(Pt(y))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(y)),$e(y)}var ut=T.ReactCurrentOwner,cn={key:!0,ref:!0,__self:!0,__source:!0},jt,St,je;je={};function Ct(y){if(Pe.call(y,"ref")){var F=Object.getOwnPropertyDescriptor(y,"ref").get;if(F&&F.isReactWarning)return!1}return y.ref!==void 0}function Lt(y){if(Pe.call(y,"key")){var F=Object.getOwnPropertyDescriptor(y,"key").get;if(F&&F.isReactWarning)return!1}return y.key!==void 0}function bn(y,F){if(typeof y.ref=="string"&&ut.current&&F&&ut.current.stateNode!==F){var Q=v(ut.current.type);je[Q]||(h('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',v(ut.current.type),y.ref),je[Q]=!0)}}function Ft(y,F){{var Q=function(){jt||(jt=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"key",{get:Q,configurable:!0})}}function rr(y,F){{var Q=function(){St||(St=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"ref",{get:Q,configurable:!0})}}var rn=function(y,F,Q,fe,xe,_e,be){var ye={$$typeof:t,type:y,key:F,ref:Q,props:be,_owner:_e};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _r(y,F,Q,fe,xe){{var _e,be={},ye=null,Ke=null;Q!==void 0&&(Et(Q),ye=""+Q),Lt(F)&&(Et(F.key),ye=""+F.key),Ct(F)&&(Ke=F.ref,bn(F,xe));for(_e in F)Pe.call(F,_e)&&!cn.hasOwnProperty(_e)&&(be[_e]=F[_e]);if(y&&y.defaultProps){var Me=y.defaultProps;for(_e in Me)be[_e]===void 0&&(be[_e]=Me[_e])}if(ye||Ke){var Ve=typeof y=="function"?y.displayName||y.name||"Unknown":y;ye&&Ft(be,Ve),Ke&&rr(be,Ve)}return rn(y,ye,Ke,xe,fe,ut.current,be)}}var Bt=T.ReactCurrentOwner,ln=T.ReactDebugCurrentFrame;function Tt(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);ln.setExtraStackFrame(Q)}else ln.setExtraStackFrame(null)}var un;un=!1;function dn(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function kn(){{if(Bt.current){var y=v(Bt.current.type);if(y)return`
22
22
 
23
23
  Check the render method of \``+y+"`."}return""}}function Zr(y){{if(y!==void 0){var F=y.fileName.replace(/^.*[\\\/]/,""),Q=y.lineNumber;return`
24
24
 
25
25
  Check your code at `+F+":"+Q+"."}return""}}var Nn={};function Vn(y){{var F=kn();if(!F){var Q=typeof y=="string"?y:y.displayName||y.name;Q&&(F=`
26
26
 
27
- Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var Q=Vn(F);if(Nn[Q])return;Nn[Q]=!0;var fe="";y&&y._owner&&y._owner!==Bt.current&&(fe=" It was passed a child from "+v(y._owner.type)+"."),Tt(y),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Tt(null)}}function qt(y,F){{if(typeof y!="object")return;if(yt(y))for(var Q=0;Q<y.length;Q++){var fe=y[Q];dn(fe)&&fn(fe,F)}else if(dn(y))y._store&&(y._store.validated=!0);else if(y){var xe=S(y);if(typeof xe=="function"&&xe!==y.entries)for(var _e=xe.call(y),be;!(be=_e.next()).done;)dn(be.value)&&fn(be.value,F)}}}function jn(y){{var F=y.type;if(F==null||typeof F=="string")return;var Q;if(typeof F=="function")Q=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===c||F.$$typeof===f))Q=F.propTypes;else return;if(Q){var fe=v(F);lt(Q,y.props,"prop",fe,y)}else if(F.PropTypes!==void 0&&!un){un=!0;var xe=v(F);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xn(y){{for(var F=Object.keys(y.props),Q=0;Q<F.length;Q++){var fe=F[Q];if(fe!=="children"&&fe!=="key"){Tt(y),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Tt(null);break}}y.ref!==null&&(Tt(y),h("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}function on(y,F,Q,fe,xe,_e){{var be=z(y);if(!be){var ye="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ye+=" 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 Ke=Zr(xe);Ke?ye+=Ke:ye+=kn();var Me;y===null?Me="null":yt(y)?Me="array":y!==void 0&&y.$$typeof===t?(Me="<"+(v(y.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof y,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Ve=_r(y,F,Q,xe,_e);if(Ve==null)return Ve;if(be){var He=F.children;if(He!==void 0)if(fe)if(yt(He)){for(var It=0;It<He.length;It++)qt(He[It],y);Object.freeze&&Object.freeze(He)}else h("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 qt(He,y)}return y===r?xn(Ve):jn(Ve),Ve}}function pn(y,F,Q){return on(y,F,Q,!0)}function Ln(y,F,Q){return on(y,F,Q,!1)}var $t=Ln,Fn=pn;to.Fragment=r,to.jsx=$t,to.jsxs=Fn}()),to}process.env.NODE_ENV==="production"?fa.exports=Wg():fa.exports=Ug();var D=fa.exports;function ie(){return ie=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},ie.apply(this,arguments)}function Xt(e,t=[]){let n=[];function r(o,s){const a=u.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:m,children:p,...x}=f,E=(m==null?void 0:m[e][c])||a,S=u.useMemo(()=>x,Object.values(x));return u.createElement(E.Provider,{value:S},p)}function d(f,m){const p=(m==null?void 0:m[e][c])||a,x=u.useContext(p);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,d]}const i=()=>{const o=n.map(s=>u.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Yg(i,...t)]}function Yg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...a,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Kg(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function fp(...e){return t=>e.forEach(n=>Kg(n,t))}function Xe(...e){return u.useCallback(fp(...e),e)}const Lr=u.forwardRef((e,t)=>{const{children:n,...r}=e,i=u.Children.toArray(n),o=i.find(zg);if(o){const s=o.props.children,a=i.map(c=>c===o?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:c);return u.createElement(pa,ie({},r,{ref:t}),u.isValidElement(s)?u.cloneElement(s,void 0,a):null)}return u.createElement(pa,ie({},r,{ref:t}),n)});Lr.displayName="Slot";const pa=u.forwardRef((e,t)=>{const{children:n,...r}=e;return u.isValidElement(n)?u.cloneElement(n,{...Xg(r,n.props),ref:t?fp(t,n.ref):n.ref}):u.Children.count(n)>1?u.Children.only(null):null});pa.displayName="SlotClone";const pp=({children:e})=>u.createElement(u.Fragment,null,e);function zg(e){return u.isValidElement(e)&&e.type===pp}function Xg(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Li(e){const t=e+"CollectionProvider",[n,r]=Xt(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:x,children:E}=p,S=u.useRef(null),T=u.useRef(new Map).current;return u.createElement(i,{scope:x,itemMap:T,collectionRef:S},E)},a=e+"CollectionSlot",c=u.forwardRef((p,x)=>{const{scope:E,children:S}=p,T=o(a,E),h=Xe(x,T.collectionRef);return u.createElement(Lr,{ref:h},S)}),l=e+"CollectionItemSlot",d="data-radix-collection-item",f=u.forwardRef((p,x)=>{const{scope:E,children:S,...T}=p,h=u.useRef(null),w=Xe(x,h),_=o(l,E);return u.useEffect(()=>(_.itemMap.set(h,{ref:h,...T}),()=>void _.itemMap.delete(h))),u.createElement(Lr,{[d]:"",ref:w},S)});function m(p){const x=o(e+"CollectionConsumer",p);return u.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const T=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,$)=>T.indexOf(_.ref.current)-T.indexOf($.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},m,r]}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Vt(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function tn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Gg({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Vt(n),c=u.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else i(l)},[o,e,i,a]);return[s,c]}function Gg({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,i=u.useRef(r),o=Vt(t);return u.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const qg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fe=qg.reduce((e,t)=>{const n=u.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Lr:t;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(a,ie({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hp(e,t){e&&en.flushSync(()=>e.dispatchEvent(t))}const Ot=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{};function Zg(e,t){return u.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Jn=e=>{const{present:t,children:n}=e,r=Qg(t),i=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),o=Xe(r.ref,i.ref);return typeof n=="function"||r.isPresent?u.cloneElement(i,{ref:o}):null};Jn.displayName="Presence";function Qg(e){const[t,n]=u.useState(),r=u.useRef({}),i=u.useRef(e),o=u.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Zg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=Yo(r.current);o.current=a==="mounted"?l:"none"},[a]),Ot(()=>{const l=r.current,d=i.current;if(d!==e){const m=o.current,p=Yo(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ot(()=>{if(t){const l=f=>{const p=Yo(r.current).includes(f.animationName);f.target===t&&p&&en.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Yo(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Yo(e){return(e==null?void 0:e.animationName)||"none"}const Jg=he["useId".toString()]||(()=>{});let ey=0;function $n(e){const[t,n]=he.useState(Jg());return Ot(()=>{e||n(r=>r??String(ey++))},[e]),e||(t?`radix-${t}`:"")}const mp="Collapsible",[ty,vp]=Xt(mp),[ny,Ga]=ty(mp),ry=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=e,[c=!1,l]=tn({prop:r,defaultProp:i,onChange:s});return u.createElement(ny,{scope:n,disabled:o,contentId:$n(),open:c,onOpenToggle:u.useCallback(()=>l(d=>!d),[l])},u.createElement(Fe.div,ie({"data-state":qa(c),"data-disabled":o?"":void 0},a,{ref:t})))}),oy="CollapsibleTrigger",iy=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Ga(oy,n);return u.createElement(Fe.button,ie({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qa(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Ie(e.onClick,i.onOpenToggle)}))}),gp="CollapsibleContent",sy=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ga(gp,e.__scopeCollapsible);return u.createElement(Jn,{present:n||i.open},({present:o})=>u.createElement(ay,ie({},r,{ref:t,present:o})))}),ay=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,s=Ga(gp,n),[a,c]=u.useState(r),l=u.useRef(null),d=Xe(t,l),f=u.useRef(0),m=f.current,p=u.useRef(0),x=p.current,E=s.open||a,S=u.useRef(E),T=u.useRef();return u.useEffect(()=>{const h=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(h)},[]),Ot(()=>{const h=l.current;if(h){T.current=T.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const w=h.getBoundingClientRect();f.current=w.height,p.current=w.width,S.current||(h.style.transitionDuration=T.current.transitionDuration,h.style.animationName=T.current.animationName),c(r)}},[s.open,r]),u.createElement(Fe.div,ie({"data-state":qa(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!E},o,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style}}),E&&i)});function qa(e){return e?"open":"closed"}const cy=ry,ly=iy,uy=sy,dy=u.createContext(void 0);function Fi(e){const t=u.useContext(dy);return e||t||"ltr"}const er="Accordion",fy=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Za,py,hy]=Li(er),[Bi,WI]=Xt(er,[hy,vp]),Qa=vp(),yp=u.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,o=r;return u.createElement(Za.Provider,{scope:e.__scopeAccordion},n==="multiple"?u.createElement(yy,ie({},o,{ref:t})):u.createElement(gy,ie({},i,{ref:t})))});yp.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[bp,my]=Bi(er),[xp,vy]=Bi(er,{collapsible:!1}),gy=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...s}=e,[a,c]=tn({prop:n,defaultProp:r,onChange:i});return u.createElement(bp,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:u.useCallback(()=>o&&c(""),[o,c])},u.createElement(xp,{scope:e.__scopeAccordion,collapsible:o},u.createElement(wp,ie({},s,{ref:t}))))}),yy=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],a]=tn({prop:n,defaultProp:r,onChange:i}),c=u.useCallback(d=>a((f=[])=>[...f,d]),[a]),l=u.useCallback(d=>a((f=[])=>f.filter(m=>m!==d)),[a]);return u.createElement(bp,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:l},u.createElement(xp,{scope:e.__scopeAccordion,collapsible:!0},u.createElement(wp,ie({},o,{ref:t}))))}),[by,Hi]=Bi(er),wp=u.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...s}=e,a=u.useRef(null),c=Xe(a,t),l=py(n),f=Fi(i)==="ltr",m=Ie(e.onKeyDown,p=>{var x;if(!fy.includes(p.key))return;const E=p.target,S=l().filter(V=>{var z;return!((z=V.ref.current)!==null&&z!==void 0&&z.disabled)}),T=S.findIndex(V=>V.ref.current===E),h=S.length;if(T===-1)return;p.preventDefault();let w=T;const _=0,$=h-1,M=()=>{w=T+1,w>$&&(w=_)},O=()=>{w=T-1,w<_&&(w=$)};switch(p.key){case"Home":w=_;break;case"End":w=$;break;case"ArrowRight":o==="horizontal"&&(f?M():O());break;case"ArrowDown":o==="vertical"&&M();break;case"ArrowLeft":o==="horizontal"&&(f?O():M());break;case"ArrowUp":o==="vertical"&&O();break}const N=w%h;(x=S[N].ref.current)===null||x===void 0||x.focus()});return u.createElement(by,{scope:n,disabled:r,direction:i,orientation:o},u.createElement(Za.Slot,{scope:n},u.createElement(Fe.div,ie({},s,{"data-orientation":o,ref:c,onKeyDown:r?void 0:m}))))}),ha="AccordionItem",[xy,Ja]=Bi(ha),wy=u.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,o=Hi(ha,n),s=my(ha,n),a=Qa(n),c=$n(),l=r&&s.value.includes(r)||!1,d=o.disabled||e.disabled;return u.createElement(xy,{scope:n,open:l,disabled:d,triggerId:c},u.createElement(cy,ie({"data-orientation":o.orientation,"data-state":Ep(l)},a,i,{ref:t,disabled:d,open:l,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})))}),Ey="AccordionHeader",Cy=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(Ey,n);return u.createElement(Fe.h3,ie({"data-orientation":i.orientation,"data-state":Ep(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),vu="AccordionTrigger",_y=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(vu,n),s=vy(vu,n),a=Qa(n);return u.createElement(Za.ItemSlot,{scope:n},u.createElement(ly,ie({"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},a,r,{ref:t})))}),Sy="AccordionContent",Ty=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(Sy,n),s=Qa(n);return u.createElement(uy,ie({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},s,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 Ep(e){return e?"open":"closed"}const $y=yp,Ry=wy,Py=Cy,Iy=_y,Ay=Ty;function Cp(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=Cp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $e(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Cp(e))&&(r&&(r+=" "),r+=t);return r}const Oy=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx($y,{className:$e("accordion-root",t),...n,ref:r,children:e})),Is=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,i)=>Object.assign(r,i),{})},Dy=(e,t)=>{const r=Object.keys(e).map(o=>e[o].properties).reduce((o,s)=>new Set([...Array.from(o),...Array.from(s)]),new Set),i={};return Object.keys(t).forEach(o=>{r.has(o)||(i[o]=t[o])}),i},Wi=(e,t,n)=>{const i=[...Object.keys(e).map(l=>e[l](t)),...n??[]],o=Is(i,"className"),s=Is(i,"otherProps"),a=Is(i,"style");return{otherProps:Dy(e,s),className:o,style:a}},{backgroundAtoms:My,borderAtoms:ky,commonAtoms:gu,flexAtoms:yu,positionAtoms:Ny,radiiAtoms:Vy,shadowAtoms:jy,sizesAtoms:Ly,spaceAtoms:Fy,typographyAtoms:By}=dt.atoms,at=u.forwardRef(({as:e,children:t,id:n,className:r,isDisabled:i,isColumn:o,...s},a)=>{const c=e||"div",l=gu({display:o?"flex":s.display}),d=yu({flexWrap:o?"wrap":s.flexWrap}),{className:f,otherProps:m,style:p}=Wi({commonAtoms:gu,flexAtoms:yu,positionAtoms:Ny,spaceAtoms:Fy,sizesAtoms:Ly,borderAtoms:ky,typographyAtoms:By,radiiAtoms:Vy,backgroundAtoms:My,shadowAtoms:jy},s,[l,d]);return D.jsx(c,{ref:a,className:$e(f,r),disabled:i,style:p,...m,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 ec=({children:e,withShadow:t,bgColor:n,...r})=>D.jsx(at,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});ec.displayName="Card";ec.defaultProps={withShadow:!1};var Hy="ifvo3u0";const{sizesAtoms:bu,spaceAtoms:xu,commonAtoms:wu,flexAtoms:Wy}=dt.atoms,tc=({children:e,isFluid:t,className:n,display:r,...i})=>{const s=bu({width:"$full",maxW:t?"$full":"$lg"}),a=xu({mx:"$auto",my:"$0"}),c=wu({display:r}),{className:l,style:d}=Wi({flexAtoms:Wy,sizesAtoms:bu,spaceAtoms:xu,commonAtoms:wu},i,[s,a,c]);return D.jsx("div",{className:$e("vds-container",!t&&Hy,l,n),style:d,...i,children:e})};tc.displayName="Container";tc.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Eu,spaceAtoms:Uy,sizesAtoms:Yy,radiiAtoms:Ky,flexAtoms:zy,backgroundAtoms:Xy}=dt.atoms,Rt=u.forwardRef(({as:e,children:t,id:n,className:r,...i},o)=>{const s=e||"div",a=Eu({display:"flex"}),{className:c,otherProps:l,style:d}=Wi({flexAtoms:zy,commonAtoms:Eu,spaceAtoms:Uy,sizesAtoms:Yy,radiiAtoms:Ky,backgroundAtoms:Xy},i,[a]);return D.jsx(s,{"data-test-id":i["data-test-id"],ref:o,className:$e(c,r),style:d,...l,children:t})});Rt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Rt.displayName="Flex";const{gridAtoms:Gy,commonAtoms:qy,spaceAtoms:Zy,sizesAtoms:Qy,radiiAtoms:Jy}=dt.atoms,nc=u.forwardRef(({as:e,children:t,id:n,className:r,...i},o)=>{const s=e||"div",a=dt.atoms.commonAtoms({display:"grid"}),{className:c,otherProps:l,style:d}=Wi({gridAtoms:Gy,commonAtoms:qy,spaceAtoms:Zy,sizesAtoms:Qy,radiiAtoms:Jy},i,[a]);return D.jsx(s,{"data-test-id":i["data-test-id"],ref:o,className:$e(c,r),style:d,...l,children:t})});nc.displayName="Grid";nc.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const e0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},t0=e=>e?e0[e]:void 0,Cu={1:"wrap",0:"nowrap"},n0=e=>e?typeof e=="boolean"?Cu[1]:Cu[0]:void 0,mr=u.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:i,gap:o,wrap:s=!0,content:a,...c},l)=>{const d=t0(i),f=n0(s);return D.jsx(Rt,{ref:l,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:o,justifyContent:r,...c,children:n})});mr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};mr.displayName="Stack";function r0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_u(Object(n),!0).forEach(function(r){r0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var o0=(e,t,n)=>{for(var r of Object.keys(e)){var i;if(e[r]!==((i=t[r])!==null&&i!==void 0?i:n[r]))return!1}return!0},it=e=>t=>{var n=e.defaultClassName,r=Su(Su({},e.defaultVariants),t);for(var i in r){var o,s=(o=r[i])!==null&&o!==void 0?o:e.defaultVariants[i];if(s!=null){var a=s;typeof a=="boolean"&&(a=a===!0?"true":"false");var c=e.variantClassNames[i][a];c&&(n+=" "+c)}}for(var[l,d]of e.compoundVariants)o0(l,r,e.defaultVariants)&&(n+=" "+d);return n},i0=it({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 Nt=u.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:i,...o},s)=>D.jsx(at,{as:e,ref:s,className:$e(i0({textStyle:n,isStrikethrough:r}),i),...o,children:t}));Nt.displayName="Text";Nt.defaultProps={as:"p"};var s0="_13vyt6x7",a0="_13vyt6x5",c0="_13vyt6x6",l0="_13vyt6x2",u0="_13vyt6x3",d0="_13vyt6x4";const f0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Ay,{className:$e(a0,t),...n,ref:r,children:D.jsx(at,{className:c0,children:e})})),p0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Ry,{className:$e(l0,t),...n,ref:r,children:e}));var ma={exports:{}},no={};/**
27
+ Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var Q=Vn(F);if(Nn[Q])return;Nn[Q]=!0;var fe="";y&&y._owner&&y._owner!==Bt.current&&(fe=" It was passed a child from "+v(y._owner.type)+"."),Tt(y),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Tt(null)}}function qt(y,F){{if(typeof y!="object")return;if(yt(y))for(var Q=0;Q<y.length;Q++){var fe=y[Q];dn(fe)&&fn(fe,F)}else if(dn(y))y._store&&(y._store.validated=!0);else if(y){var xe=S(y);if(typeof xe=="function"&&xe!==y.entries)for(var _e=xe.call(y),be;!(be=_e.next()).done;)dn(be.value)&&fn(be.value,F)}}}function jn(y){{var F=y.type;if(F==null||typeof F=="string")return;var Q;if(typeof F=="function")Q=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===c||F.$$typeof===f))Q=F.propTypes;else return;if(Q){var fe=v(F);lt(Q,y.props,"prop",fe,y)}else if(F.PropTypes!==void 0&&!un){un=!0;var xe=v(F);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xn(y){{for(var F=Object.keys(y.props),Q=0;Q<F.length;Q++){var fe=F[Q];if(fe!=="children"&&fe!=="key"){Tt(y),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Tt(null);break}}y.ref!==null&&(Tt(y),h("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}function on(y,F,Q,fe,xe,_e){{var be=z(y);if(!be){var ye="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ye+=" 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 Ke=Zr(xe);Ke?ye+=Ke:ye+=kn();var Me;y===null?Me="null":yt(y)?Me="array":y!==void 0&&y.$$typeof===t?(Me="<"+(v(y.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof y,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Ve=_r(y,F,Q,xe,_e);if(Ve==null)return Ve;if(be){var He=F.children;if(He!==void 0)if(fe)if(yt(He)){for(var It=0;It<He.length;It++)qt(He[It],y);Object.freeze&&Object.freeze(He)}else h("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 qt(He,y)}return y===r?xn(Ve):jn(Ve),Ve}}function pn(y,F,Q){return on(y,F,Q,!0)}function Ln(y,F,Q){return on(y,F,Q,!1)}var $t=Ln,Fn=pn;to.Fragment=r,to.jsx=$t,to.jsxs=Fn}()),to}process.env.NODE_ENV==="production"?fa.exports=Wg():fa.exports=Ug();var D=fa.exports;function ie(){return ie=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},ie.apply(this,arguments)}function Xt(e,t=[]){let n=[];function r(o,s){const a=u.createContext(s),c=n.length;n=[...n,s];function l(f){const{scope:m,children:p,...x}=f,E=(m==null?void 0:m[e][c])||a,S=u.useMemo(()=>x,Object.values(x));return u.createElement(E.Provider,{value:S},p)}function d(f,m){const p=(m==null?void 0:m[e][c])||a,x=u.useContext(p);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,d]}const i=()=>{const o=n.map(s=>u.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Yg(i,...t)]}function Yg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...a,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Kg(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function fp(...e){return t=>e.forEach(n=>Kg(n,t))}function Xe(...e){return u.useCallback(fp(...e),e)}const Lr=u.forwardRef((e,t)=>{const{children:n,...r}=e,i=u.Children.toArray(n),o=i.find(zg);if(o){const s=o.props.children,a=i.map(c=>c===o?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:c);return u.createElement(pa,ie({},r,{ref:t}),u.isValidElement(s)?u.cloneElement(s,void 0,a):null)}return u.createElement(pa,ie({},r,{ref:t}),n)});Lr.displayName="Slot";const pa=u.forwardRef((e,t)=>{const{children:n,...r}=e;return u.isValidElement(n)?u.cloneElement(n,{...Xg(r,n.props),ref:t?fp(t,n.ref):n.ref}):u.Children.count(n)>1?u.Children.only(null):null});pa.displayName="SlotClone";const pp=({children:e})=>u.createElement(u.Fragment,null,e);function zg(e){return u.isValidElement(e)&&e.type===pp}function Xg(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Li(e){const t=e+"CollectionProvider",[n,r]=Xt(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:x,children:E}=p,S=u.useRef(null),T=u.useRef(new Map).current;return u.createElement(i,{scope:x,itemMap:T,collectionRef:S},E)},a=e+"CollectionSlot",c=u.forwardRef((p,x)=>{const{scope:E,children:S}=p,T=o(a,E),h=Xe(x,T.collectionRef);return u.createElement(Lr,{ref:h},S)}),l=e+"CollectionItemSlot",d="data-radix-collection-item",f=u.forwardRef((p,x)=>{const{scope:E,children:S,...T}=p,h=u.useRef(null),w=Xe(x,h),_=o(l,E);return u.useEffect(()=>(_.itemMap.set(h,{ref:h,...T}),()=>void _.itemMap.delete(h))),u.createElement(Lr,{[d]:"",ref:w},S)});function m(p){const x=o(e+"CollectionConsumer",p);return u.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const T=Array.from(S.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,$)=>T.indexOf(_.ref.current)-T.indexOf($.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:f},m,r]}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Vt(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function tn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Gg({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Vt(n),c=u.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&a(f)}else i(l)},[o,e,i,a]);return[s,c]}function Gg({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,i=u.useRef(r),o=Vt(t);return u.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const qg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fe=qg.reduce((e,t)=>{const n=u.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Lr:t;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(a,ie({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hp(e,t){e&&en.flushSync(()=>e.dispatchEvent(t))}const Ot=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{};function Zg(e,t){return u.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Jn=e=>{const{present:t,children:n}=e,r=Qg(t),i=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),o=Xe(r.ref,i.ref);return typeof n=="function"||r.isPresent?u.cloneElement(i,{ref:o}):null};Jn.displayName="Presence";function Qg(e){const[t,n]=u.useState(),r=u.useRef({}),i=u.useRef(e),o=u.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Zg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=Yo(r.current);o.current=a==="mounted"?l:"none"},[a]),Ot(()=>{const l=r.current,d=i.current;if(d!==e){const m=o.current,p=Yo(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ot(()=>{if(t){const l=f=>{const p=Yo(r.current).includes(f.animationName);f.target===t&&p&&en.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Yo(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Yo(e){return(e==null?void 0:e.animationName)||"none"}const Jg=he["useId".toString()]||(()=>{});let ey=0;function $n(e){const[t,n]=he.useState(Jg());return Ot(()=>{e||n(r=>r??String(ey++))},[e]),e||(t?`radix-${t}`:"")}const mp="Collapsible",[ty,vp]=Xt(mp),[ny,Ga]=ty(mp),ry=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=e,[c=!1,l]=tn({prop:r,defaultProp:i,onChange:s});return u.createElement(ny,{scope:n,disabled:o,contentId:$n(),open:c,onOpenToggle:u.useCallback(()=>l(d=>!d),[l])},u.createElement(Fe.div,ie({"data-state":qa(c),"data-disabled":o?"":void 0},a,{ref:t})))}),oy="CollapsibleTrigger",iy=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Ga(oy,n);return u.createElement(Fe.button,ie({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qa(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:Ie(e.onClick,i.onOpenToggle)}))}),gp="CollapsibleContent",sy=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ga(gp,e.__scopeCollapsible);return u.createElement(Jn,{present:n||i.open},({present:o})=>u.createElement(ay,ie({},r,{ref:t,present:o})))}),ay=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,s=Ga(gp,n),[a,c]=u.useState(r),l=u.useRef(null),d=Xe(t,l),f=u.useRef(0),m=f.current,p=u.useRef(0),x=p.current,E=s.open||a,S=u.useRef(E),T=u.useRef();return u.useEffect(()=>{const h=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(h)},[]),Ot(()=>{const h=l.current;if(h){T.current=T.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const w=h.getBoundingClientRect();f.current=w.height,p.current=w.width,S.current||(h.style.transitionDuration=T.current.transitionDuration,h.style.animationName=T.current.animationName),c(r)}},[s.open,r]),u.createElement(Fe.div,ie({"data-state":qa(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!E},o,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style}}),E&&i)});function qa(e){return e?"open":"closed"}const cy=ry,ly=iy,uy=sy,dy=u.createContext(void 0);function Fi(e){const t=u.useContext(dy);return e||t||"ltr"}const er="Accordion",fy=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Za,py,hy]=Li(er),[Bi,WI]=Xt(er,[hy,vp]),Qa=vp(),yp=u.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,o=r;return u.createElement(Za.Provider,{scope:e.__scopeAccordion},n==="multiple"?u.createElement(yy,ie({},o,{ref:t})):u.createElement(gy,ie({},i,{ref:t})))});yp.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[bp,my]=Bi(er),[xp,vy]=Bi(er,{collapsible:!1}),gy=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...s}=e,[a,c]=tn({prop:n,defaultProp:r,onChange:i});return u.createElement(bp,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:u.useCallback(()=>o&&c(""),[o,c])},u.createElement(xp,{scope:e.__scopeAccordion,collapsible:o},u.createElement(wp,ie({},s,{ref:t}))))}),yy=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],a]=tn({prop:n,defaultProp:r,onChange:i}),c=u.useCallback(d=>a((f=[])=>[...f,d]),[a]),l=u.useCallback(d=>a((f=[])=>f.filter(m=>m!==d)),[a]);return u.createElement(bp,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:l},u.createElement(xp,{scope:e.__scopeAccordion,collapsible:!0},u.createElement(wp,ie({},o,{ref:t}))))}),[by,Hi]=Bi(er),wp=u.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...s}=e,a=u.useRef(null),c=Xe(a,t),l=py(n),f=Fi(i)==="ltr",m=Ie(e.onKeyDown,p=>{var x;if(!fy.includes(p.key))return;const E=p.target,S=l().filter(V=>{var z;return!((z=V.ref.current)!==null&&z!==void 0&&z.disabled)}),T=S.findIndex(V=>V.ref.current===E),h=S.length;if(T===-1)return;p.preventDefault();let w=T;const _=0,$=h-1,M=()=>{w=T+1,w>$&&(w=_)},O=()=>{w=T-1,w<_&&(w=$)};switch(p.key){case"Home":w=_;break;case"End":w=$;break;case"ArrowRight":o==="horizontal"&&(f?M():O());break;case"ArrowDown":o==="vertical"&&M();break;case"ArrowLeft":o==="horizontal"&&(f?O():M());break;case"ArrowUp":o==="vertical"&&O();break}const N=w%h;(x=S[N].ref.current)===null||x===void 0||x.focus()});return u.createElement(by,{scope:n,disabled:r,direction:i,orientation:o},u.createElement(Za.Slot,{scope:n},u.createElement(Fe.div,ie({},s,{"data-orientation":o,ref:c,onKeyDown:r?void 0:m}))))}),ha="AccordionItem",[xy,Ja]=Bi(ha),wy=u.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,o=Hi(ha,n),s=my(ha,n),a=Qa(n),c=$n(),l=r&&s.value.includes(r)||!1,d=o.disabled||e.disabled;return u.createElement(xy,{scope:n,open:l,disabled:d,triggerId:c},u.createElement(cy,ie({"data-orientation":o.orientation,"data-state":Ep(l)},a,i,{ref:t,disabled:d,open:l,onOpenChange:f=>{f?s.onItemOpen(r):s.onItemClose(r)}})))}),Ey="AccordionHeader",Cy=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(Ey,n);return u.createElement(Fe.h3,ie({"data-orientation":i.orientation,"data-state":Ep(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),vu="AccordionTrigger",_y=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(vu,n),s=vy(vu,n),a=Qa(n);return u.createElement(Za.ItemSlot,{scope:n},u.createElement(ly,ie({"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},a,r,{ref:t})))}),Sy="AccordionContent",Ty=u.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Hi(er,n),o=Ja(Sy,n),s=Qa(n);return u.createElement(uy,ie({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},s,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 Ep(e){return e?"open":"closed"}const $y=yp,Ry=wy,Py=Cy,Iy=_y,Ay=Ty;function Cp(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=Cp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Se(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Cp(e))&&(r&&(r+=" "),r+=t);return r}const Oy=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx($y,{className:Se("accordion-root",t),...n,ref:r,children:e})),Is=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,i)=>Object.assign(r,i),{})},Dy=(e,t)=>{const r=Object.keys(e).map(o=>e[o].properties).reduce((o,s)=>new Set([...Array.from(o),...Array.from(s)]),new Set),i={};return Object.keys(t).forEach(o=>{r.has(o)||(i[o]=t[o])}),i},Wi=(e,t,n)=>{const i=[...Object.keys(e).map(l=>e[l](t)),...n??[]],o=Is(i,"className"),s=Is(i,"otherProps"),a=Is(i,"style");return{otherProps:Dy(e,s),className:o,style:a}},{backgroundAtoms:My,borderAtoms:ky,commonAtoms:gu,flexAtoms:yu,positionAtoms:Ny,radiiAtoms:Vy,shadowAtoms:jy,sizesAtoms:Ly,spaceAtoms:Fy,typographyAtoms:By}=dt.atoms,at=u.forwardRef(({as:e,children:t,id:n,className:r,isDisabled:i,isColumn:o,...s},a)=>{const c=e||"div",l=gu({display:o?"flex":s.display}),d=yu({flexWrap:o?"wrap":s.flexWrap}),{className:f,otherProps:m,style:p}=Wi({commonAtoms:gu,flexAtoms:yu,positionAtoms:Ny,spaceAtoms:Fy,sizesAtoms:Ly,borderAtoms:ky,typographyAtoms:By,radiiAtoms:Vy,backgroundAtoms:My,shadowAtoms:jy},s,[l,d]);return D.jsx(c,{ref:a,className:Se(f,r),disabled:i,style:p,...m,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 ec=({children:e,withShadow:t,bgColor:n,...r})=>D.jsx(at,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});ec.displayName="Card";ec.defaultProps={withShadow:!1};var Hy="ifvo3u0";const{sizesAtoms:bu,spaceAtoms:xu,commonAtoms:wu,flexAtoms:Wy}=dt.atoms,tc=({children:e,isFluid:t,className:n,display:r,...i})=>{const s=bu({width:"$full",maxW:t?"$full":"$lg"}),a=xu({mx:"$auto",my:"$0"}),c=wu({display:r}),{className:l,style:d}=Wi({flexAtoms:Wy,sizesAtoms:bu,spaceAtoms:xu,commonAtoms:wu},i,[s,a,c]);return D.jsx("div",{className:Se("vds-container",!t&&Hy,l,n),style:d,...i,children:e})};tc.displayName="Container";tc.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Eu,spaceAtoms:Uy,sizesAtoms:Yy,radiiAtoms:Ky,flexAtoms:zy,backgroundAtoms:Xy}=dt.atoms,Rt=u.forwardRef(({as:e,children:t,id:n,className:r,...i},o)=>{const s=e||"div",a=Eu({display:"flex"}),{className:c,otherProps:l,style:d}=Wi({flexAtoms:zy,commonAtoms:Eu,spaceAtoms:Uy,sizesAtoms:Yy,radiiAtoms:Ky,backgroundAtoms:Xy},i,[a]);return D.jsx(s,{"data-test-id":i["data-test-id"],ref:o,className:Se(c,r),style:d,...l,children:t})});Rt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Rt.displayName="Flex";const{gridAtoms:Gy,commonAtoms:qy,spaceAtoms:Zy,sizesAtoms:Qy,radiiAtoms:Jy}=dt.atoms,nc=u.forwardRef(({as:e,children:t,id:n,className:r,...i},o)=>{const s=e||"div",a=dt.atoms.commonAtoms({display:"grid"}),{className:c,otherProps:l,style:d}=Wi({gridAtoms:Gy,commonAtoms:qy,spaceAtoms:Zy,sizesAtoms:Qy,radiiAtoms:Jy},i,[a]);return D.jsx(s,{"data-test-id":i["data-test-id"],ref:o,className:Se(c,r),style:d,...l,children:t})});nc.displayName="Grid";nc.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const e0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},t0=e=>e?e0[e]:void 0,Cu={1:"wrap",0:"nowrap"},n0=e=>e?typeof e=="boolean"?Cu[1]:Cu[0]:void 0,mr=u.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:i,gap:o,wrap:s=!0,content:a,...c},l)=>{const d=t0(i),f=n0(s);return D.jsx(Rt,{ref:l,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:o,justifyContent:r,...c,children:n})});mr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};mr.displayName="Stack";function r0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_u(Object(n),!0).forEach(function(r){r0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var o0=(e,t,n)=>{for(var r of Object.keys(e)){var i;if(e[r]!==((i=t[r])!==null&&i!==void 0?i:n[r]))return!1}return!0},it=e=>t=>{var n=e.defaultClassName,r=Su(Su({},e.defaultVariants),t);for(var i in r){var o,s=(o=r[i])!==null&&o!==void 0?o:e.defaultVariants[i];if(s!=null){var a=s;typeof a=="boolean"&&(a=a===!0?"true":"false");var c=e.variantClassNames[i][a];c&&(n+=" "+c)}}for(var[l,d]of e.compoundVariants)o0(l,r,e.defaultVariants)&&(n+=" "+d);return n},i0=it({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 Nt=u.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:i,...o},s)=>D.jsx(at,{as:e,ref:s,className:Se(i0({textStyle:n,isStrikethrough:r}),i),...o,children:t}));Nt.displayName="Text";Nt.defaultProps={as:"p"};var s0="_13vyt6x7",a0="_13vyt6x5",c0="_13vyt6x6",l0="_13vyt6x2",u0="_13vyt6x3",d0="_13vyt6x4";const f0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Ay,{className:Se(a0,t),...n,ref:r,children:D.jsx(at,{className:c0,children:e})})),p0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Ry,{className:Se(l0,t),...n,ref:r,children:e}));var ma={exports:{}},no={};/**
28
28
  * @license React
29
29
  * react-jsx-runtime.production.min.js
30
30
  *
@@ -44,13 +44,13 @@ Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(
44
44
  `+B+y}}var J=!1,ee;{var te=typeof WeakMap=="function"?WeakMap:Map;ee=new te}function Z(y,F){if(!y||J)return"";{var Q=ee.get(y);if(Q!==void 0)return Q}var fe;J=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=ae.current,ae.current=null,X();try{if(F){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(Be){fe=Be}Reflect.construct(y,[],be)}else{try{be.call()}catch(Be){fe=Be}y.call(be.prototype)}}else{try{throw Error()}catch(Be){fe=Be}y()}}catch(Be){if(Be&&fe&&typeof Be.stack=="string"){for(var ye=Be.stack.split(`
45
45
  `),Ke=fe.stack.split(`
46
46
  `),Me=ye.length-1,Ve=Ke.length-1;Me>=1&&Ve>=0&&ye[Me]!==Ke[Ve];)Ve--;for(;Me>=1&&Ve>=0;Me--,Ve--)if(ye[Me]!==Ke[Ve]){if(Me!==1||Ve!==1)do if(Me--,Ve--,Ve<0||ye[Me]!==Ke[Ve]){var He=`
47
- `+ye[Me].replace(" at new "," at ");return y.displayName&&He.includes("<anonymous>")&&(He=He.replace("<anonymous>",y.displayName)),typeof y=="function"&&ee.set(y,He),He}while(Me>=1&&Ve>=0);break}}}finally{J=!1,ae.current=_e,ne(),Error.prepareStackTrace=xe}var It=y?y.displayName||y.name:"",or=It?H(It):"";return typeof y=="function"&&ee.set(y,or),or}function ge(y,F,Q){return Z(y,!1)}function Ce(y){var F=y.prototype;return!!(F&&F.isReactComponent)}function Re(y,F,Q){if(y==null)return"";if(typeof y=="function")return Z(y,Ce(y));if(typeof y=="string")return H(y);switch(y){case l:return H("Suspense");case d:return H("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case c:return ge(y.render);case f:return Re(y.type,F,Q);case m:{var fe=y,xe=fe._payload,_e=fe._init;try{return Re(_e(xe),F,Q)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,Se={},We=T.ReactDebugCurrentFrame;function ke(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);We.setExtraStackFrame(Q)}else We.setExtraStackFrame(null)}function lt(y,F,Q,fe,xe){{var _e=Function.call.bind(Pe);for(var be in y)if(_e(y,be)){var ye=void 0;try{if(typeof y[be]!="function"){var Ke=Error((fe||"React class")+": "+Q+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}ye=y[be](F,be,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(ke(xe),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,be,typeof ye),ke(null)),ye instanceof Error&&!(ye.message in Se)&&(Se[ye.message]=!0,ke(xe),h("Failed %s type: %s",Q,ye.message),ke(null))}}}var Ye=Array.isArray;function yt(y){return Ye(y)}function Je(y){{var F=typeof Symbol=="function"&&Symbol.toStringTag,Q=F&&y[Symbol.toStringTag]||y.constructor.name||"Object";return Q}}function Pt(y){try{return Te(y),!1}catch{return!0}}function Te(y){return""+y}function Et(y){if(Pt(y))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(y)),Te(y)}var ut=T.ReactCurrentOwner,cn={key:!0,ref:!0,__self:!0,__source:!0},jt,St,je;je={};function Ct(y){if(Pe.call(y,"ref")){var F=Object.getOwnPropertyDescriptor(y,"ref").get;if(F&&F.isReactWarning)return!1}return y.ref!==void 0}function Lt(y){if(Pe.call(y,"key")){var F=Object.getOwnPropertyDescriptor(y,"key").get;if(F&&F.isReactWarning)return!1}return y.key!==void 0}function bn(y,F){if(typeof y.ref=="string"&&ut.current&&F&&ut.current.stateNode!==F){var Q=v(ut.current.type);je[Q]||(h('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',v(ut.current.type),y.ref),je[Q]=!0)}}function Ft(y,F){{var Q=function(){jt||(jt=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"key",{get:Q,configurable:!0})}}function rr(y,F){{var Q=function(){St||(St=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"ref",{get:Q,configurable:!0})}}var rn=function(y,F,Q,fe,xe,_e,be){var ye={$$typeof:t,type:y,key:F,ref:Q,props:be,_owner:_e};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _r(y,F,Q,fe,xe){{var _e,be={},ye=null,Ke=null;Q!==void 0&&(Et(Q),ye=""+Q),Lt(F)&&(Et(F.key),ye=""+F.key),Ct(F)&&(Ke=F.ref,bn(F,xe));for(_e in F)Pe.call(F,_e)&&!cn.hasOwnProperty(_e)&&(be[_e]=F[_e]);if(y&&y.defaultProps){var Me=y.defaultProps;for(_e in Me)be[_e]===void 0&&(be[_e]=Me[_e])}if(ye||Ke){var Ve=typeof y=="function"?y.displayName||y.name||"Unknown":y;ye&&Ft(be,Ve),Ke&&rr(be,Ve)}return rn(y,ye,Ke,xe,fe,ut.current,be)}}var Bt=T.ReactCurrentOwner,ln=T.ReactDebugCurrentFrame;function Tt(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);ln.setExtraStackFrame(Q)}else ln.setExtraStackFrame(null)}var un;un=!1;function dn(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function kn(){{if(Bt.current){var y=v(Bt.current.type);if(y)return`
47
+ `+ye[Me].replace(" at new "," at ");return y.displayName&&He.includes("<anonymous>")&&(He=He.replace("<anonymous>",y.displayName)),typeof y=="function"&&ee.set(y,He),He}while(Me>=1&&Ve>=0);break}}}finally{J=!1,ae.current=_e,ne(),Error.prepareStackTrace=xe}var It=y?y.displayName||y.name:"",or=It?H(It):"";return typeof y=="function"&&ee.set(y,or),or}function ge(y,F,Q){return Z(y,!1)}function Ce(y){var F=y.prototype;return!!(F&&F.isReactComponent)}function Re(y,F,Q){if(y==null)return"";if(typeof y=="function")return Z(y,Ce(y));if(typeof y=="string")return H(y);switch(y){case l:return H("Suspense");case d:return H("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case c:return ge(y.render);case f:return Re(y.type,F,Q);case m:{var fe=y,xe=fe._payload,_e=fe._init;try{return Re(_e(xe),F,Q)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,Te={},We=T.ReactDebugCurrentFrame;function ke(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);We.setExtraStackFrame(Q)}else We.setExtraStackFrame(null)}function lt(y,F,Q,fe,xe){{var _e=Function.call.bind(Pe);for(var be in y)if(_e(y,be)){var ye=void 0;try{if(typeof y[be]!="function"){var Ke=Error((fe||"React class")+": "+Q+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}ye=y[be](F,be,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(ke(xe),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,be,typeof ye),ke(null)),ye instanceof Error&&!(ye.message in Te)&&(Te[ye.message]=!0,ke(xe),h("Failed %s type: %s",Q,ye.message),ke(null))}}}var Ye=Array.isArray;function yt(y){return Ye(y)}function Je(y){{var F=typeof Symbol=="function"&&Symbol.toStringTag,Q=F&&y[Symbol.toStringTag]||y.constructor.name||"Object";return Q}}function Pt(y){try{return $e(y),!1}catch{return!0}}function $e(y){return""+y}function Et(y){if(Pt(y))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(y)),$e(y)}var ut=T.ReactCurrentOwner,cn={key:!0,ref:!0,__self:!0,__source:!0},jt,St,je;je={};function Ct(y){if(Pe.call(y,"ref")){var F=Object.getOwnPropertyDescriptor(y,"ref").get;if(F&&F.isReactWarning)return!1}return y.ref!==void 0}function Lt(y){if(Pe.call(y,"key")){var F=Object.getOwnPropertyDescriptor(y,"key").get;if(F&&F.isReactWarning)return!1}return y.key!==void 0}function bn(y,F){if(typeof y.ref=="string"&&ut.current&&F&&ut.current.stateNode!==F){var Q=v(ut.current.type);je[Q]||(h('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',v(ut.current.type),y.ref),je[Q]=!0)}}function Ft(y,F){{var Q=function(){jt||(jt=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"key",{get:Q,configurable:!0})}}function rr(y,F){{var Q=function(){St||(St=!0,h("%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)",F))};Q.isReactWarning=!0,Object.defineProperty(y,"ref",{get:Q,configurable:!0})}}var rn=function(y,F,Q,fe,xe,_e,be){var ye={$$typeof:t,type:y,key:F,ref:Q,props:be,_owner:_e};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _r(y,F,Q,fe,xe){{var _e,be={},ye=null,Ke=null;Q!==void 0&&(Et(Q),ye=""+Q),Lt(F)&&(Et(F.key),ye=""+F.key),Ct(F)&&(Ke=F.ref,bn(F,xe));for(_e in F)Pe.call(F,_e)&&!cn.hasOwnProperty(_e)&&(be[_e]=F[_e]);if(y&&y.defaultProps){var Me=y.defaultProps;for(_e in Me)be[_e]===void 0&&(be[_e]=Me[_e])}if(ye||Ke){var Ve=typeof y=="function"?y.displayName||y.name||"Unknown":y;ye&&Ft(be,Ve),Ke&&rr(be,Ve)}return rn(y,ye,Ke,xe,fe,ut.current,be)}}var Bt=T.ReactCurrentOwner,ln=T.ReactDebugCurrentFrame;function Tt(y){if(y){var F=y._owner,Q=Re(y.type,y._source,F?F.type:null);ln.setExtraStackFrame(Q)}else ln.setExtraStackFrame(null)}var un;un=!1;function dn(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function kn(){{if(Bt.current){var y=v(Bt.current.type);if(y)return`
48
48
 
49
49
  Check the render method of \``+y+"`."}return""}}function Zr(y){{if(y!==void 0){var F=y.fileName.replace(/^.*[\\\/]/,""),Q=y.lineNumber;return`
50
50
 
51
51
  Check your code at `+F+":"+Q+"."}return""}}var Nn={};function Vn(y){{var F=kn();if(!F){var Q=typeof y=="string"?y:y.displayName||y.name;Q&&(F=`
52
52
 
53
- Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var Q=Vn(F);if(Nn[Q])return;Nn[Q]=!0;var fe="";y&&y._owner&&y._owner!==Bt.current&&(fe=" It was passed a child from "+v(y._owner.type)+"."),Tt(y),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Tt(null)}}function qt(y,F){{if(typeof y!="object")return;if(yt(y))for(var Q=0;Q<y.length;Q++){var fe=y[Q];dn(fe)&&fn(fe,F)}else if(dn(y))y._store&&(y._store.validated=!0);else if(y){var xe=S(y);if(typeof xe=="function"&&xe!==y.entries)for(var _e=xe.call(y),be;!(be=_e.next()).done;)dn(be.value)&&fn(be.value,F)}}}function jn(y){{var F=y.type;if(F==null||typeof F=="string")return;var Q;if(typeof F=="function")Q=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===c||F.$$typeof===f))Q=F.propTypes;else return;if(Q){var fe=v(F);lt(Q,y.props,"prop",fe,y)}else if(F.PropTypes!==void 0&&!un){un=!0;var xe=v(F);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xn(y){{for(var F=Object.keys(y.props),Q=0;Q<F.length;Q++){var fe=F[Q];if(fe!=="children"&&fe!=="key"){Tt(y),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Tt(null);break}}y.ref!==null&&(Tt(y),h("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}function on(y,F,Q,fe,xe,_e){{var be=z(y);if(!be){var ye="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ye+=" 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 Ke=Zr(xe);Ke?ye+=Ke:ye+=kn();var Me;y===null?Me="null":yt(y)?Me="array":y!==void 0&&y.$$typeof===t?(Me="<"+(v(y.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof y,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Ve=_r(y,F,Q,xe,_e);if(Ve==null)return Ve;if(be){var He=F.children;if(He!==void 0)if(fe)if(yt(He)){for(var It=0;It<He.length;It++)qt(He[It],y);Object.freeze&&Object.freeze(He)}else h("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 qt(He,y)}return y===r?xn(Ve):jn(Ve),Ve}}function pn(y,F,Q){return on(y,F,Q,!0)}function Ln(y,F,Q){return on(y,F,Q,!1)}var $t=Ln,Fn=pn;Ko.Fragment=r,Ko.jsx=$t,Ko.jsxs=Fn}()),Ko}process.env.NODE_ENV==="production"?ma.exports=h0():ma.exports=m0();var ct=ma.exports;const v0=e=>{const t="currentColor";return{...e,color:(()=>e.color?dt.theme.colors[e.color]?dt.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}},Gt=v0,g0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},rc=g0,y0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},wo=y0,b0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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=b0,w0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},oc=w0,E0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},Ui=E0,C0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},_0=C0,S0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},T0=S0,$0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},R0=$0,P0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},I0=P0,A0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},O0=A0,D0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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=D0,k0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},N0=k0,V0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},j0=V0,L0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Py,{className:"accordion-header",children:D.jsxs(Iy,{className:$e(u0,t),...n,ref:r,children:[D.jsx(at,{className:d0,children:e}),D.jsx(wo,{className:s0,size:24,color:dt.theme.colors.black})]})}));var F0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},B0=it({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const _p=u.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:i,onClose:o,...s},a)=>{const c="div",d=(()=>{switch(i){case"error":return I0;case"warning":return j0;case"success":return N0;default:return M0}})();return D.jsxs(c,{ref:a,className:$e(B0({colorScheme:i}),e),"data-test-id":s["data-test-id"],...s,children:[D.jsxs(Rt,{gap:"$16",children:[D.jsx(at,{display:"flex",minW:dt.theme.space[24],children:D.jsx(d,{size:24,color:F0[i||"neutral"]})}),D.jsx(at,{pt:"$2",children:D.jsxs(mr,{gap:"$8",children:[t&&D.jsx(Nt,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),D.jsx(at,{children:n})]})})]}),r&&D.jsx(Rt,{pl:"$16",pt:"$4",children:D.jsx(Ui,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:o,cursor:"pointer",color:dt.theme.colors.black,size:16})})]})});_p.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var H0=it({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 ic=u.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:i,isRounded:o,className:s,style:a,...c},l)=>{const d=e||"span";return D.jsx(d,{ref:l,"data-test-id":c["data-test-id"],className:$e(H0({colorScheme:n,variant:i,size:r,isRounded:o}),s),style:a,...c,children:t})});ic.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};ic.displayName="Badge";function Ru(e,[t,n]){return Math.min(n,Math.max(t,e))}function W0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e);u.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const va="dismissableLayer.update",U0="dismissableLayer.pointerDownOutside",Y0="dismissableLayer.focusOutside";let Pu;const Sp=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yi=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,d=u.useContext(Sp),[f,m]=u.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,x]=u.useState({}),E=Xe(t,N=>m(N)),S=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),h=S.indexOf(T),w=f?S.indexOf(f):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,$=w>=h,M=z0(N=>{const V=N.target,z=[...d.branches].some(j=>j.contains(V));!$||z||(o==null||o(N),a==null||a(N),N.defaultPrevented||c==null||c())},p),O=X0(N=>{const V=N.target;[...d.branches].some(j=>j.contains(V))||(s==null||s(N),a==null||a(N),N.defaultPrevented||c==null||c())},p);return W0(N=>{w===d.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},p),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Pu=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Iu(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pu)}},[f,p,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Iu())},[f,d]),u.useEffect(()=>{const N=()=>x({});return document.addEventListener(va,N),()=>document.removeEventListener(va,N)},[]),u.createElement(Fe.div,ie({},l,{ref:E,style:{pointerEvents:_?$?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,M.onPointerDownCapture)}))}),K0=u.forwardRef((e,t)=>{const n=u.useContext(Sp),r=u.useRef(null),i=Xe(t,r);return u.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.createElement(Fe.div,ie({},e,{ref:i}))});function z0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Tp(U0,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=u.useRef(!1);return u.useEffect(()=>{const i=o=>{o.target&&!r.current&&Tp(Y0,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Iu(){const e=new CustomEvent(va);document.dispatchEvent(e)}function Tp(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hp(i,o):i.dispatchEvent(o)}const G0=Yi,q0=K0;let As=0;function $p(){u.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:Au()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Au()),As++,()=>{As===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),As--}},[])}function Au(){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 Os="focusScope.autoFocusOnMount",Ds="focusScope.autoFocusOnUnmount",Ou={bubbles:!1,cancelable:!0},Rp=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=u.useState(null),l=Vt(i),d=Vt(o),f=u.useRef(null),m=Xe(t,E=>c(E)),p=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let E=function(w){if(p.paused||!a)return;const _=w.target;a.contains(_)?f.current=_:Hn(f.current,{select:!0})},S=function(w){if(p.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Hn(f.current,{select:!0}))},T=function(w){const _=document.activeElement;for(const $ of w)$.removedNodes.length>0&&(a!=null&&a.contains(_)||Hn(a))};document.addEventListener("focusin",E),document.addEventListener("focusout",S);const h=new MutationObserver(T);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",S),h.disconnect()}}},[r,a,p.paused]),u.useEffect(()=>{if(a){Mu.add(p);const E=document.activeElement;if(!a.contains(E)){const T=new CustomEvent(Os,Ou);a.addEventListener(Os,l),a.dispatchEvent(T),T.defaultPrevented||(Z0(nb(Pp(a)),{select:!0}),document.activeElement===E&&Hn(a))}return()=>{a.removeEventListener(Os,l),setTimeout(()=>{const T=new CustomEvent(Ds,Ou);a.addEventListener(Ds,d),a.dispatchEvent(T),T.defaultPrevented||Hn(E??document.body,{select:!0}),a.removeEventListener(Ds,d),Mu.remove(p)},0)}}},[a,l,d,p]);const x=u.useCallback(E=>{if(!n&&!r||p.paused)return;const S=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,T=document.activeElement;if(S&&T){const h=E.currentTarget,[w,_]=Q0(h);w&&_?!E.shiftKey&&T===_?(E.preventDefault(),n&&Hn(w,{select:!0})):E.shiftKey&&T===w&&(E.preventDefault(),n&&Hn(_,{select:!0})):T===h&&E.preventDefault()}},[n,r,p.paused]);return u.createElement(Fe.div,ie({tabIndex:-1},s,{ref:m,onKeyDown:x}))});function Z0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Hn(r,{select:t}),document.activeElement!==n)return}function Q0(e){const t=Pp(e),n=Du(t,e),r=Du(t.reverse(),e);return[n,r]}function Pp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Du(e,t){for(const n of e)if(!J0(n,{upTo:t}))return n}function J0(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 eb(e){return e instanceof HTMLInputElement&&"select"in e}function Hn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eb(e)&&t&&e.select()}}const Mu=tb();function tb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ku(e,t),e.unshift(t)},remove(t){var n;e=ku(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ku(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nb(e){return e.filter(t=>t.tagName!=="A")}const rb=["top","right","bottom","left"],Xn=Math.min,Ut=Math.max,bi=Math.round,zo=Math.floor,Gn=e=>({x:e,y:e}),ob={left:"right",right:"left",bottom:"top",top:"bottom"},ib={start:"end",end:"start"};function ga(e,t,n){return Ut(e,Xn(t,n))}function In(e,t){return typeof e=="function"?e(t):e}function An(e){return e.split("-")[0]}function Yr(e){return e.split("-")[1]}function sc(e){return e==="x"?"y":"x"}function ac(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(An(e))?"y":"x"}function cc(e){return sc(Kr(e))}function sb(e,t,n){n===void 0&&(n=!1);const r=Yr(e),i=cc(e),o=ac(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xi(s)),[s,xi(s)]}function ab(e){const t=xi(e);return[ya(e),t,ya(t)]}function ya(e){return e.replace(/start|end/g,t=>ib[t])}function cb(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function lb(e,t,n,r){const i=Yr(e);let o=cb(An(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(ya)))),o}function xi(e){return e.replace(/left|right|bottom|top/g,t=>ob[t])}function ub(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ip(e){return typeof e!="number"?ub(e):{top:e,right:e,bottom:e,left:e}}function wi(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Nu(e,t,n){let{reference:r,floating:i}=e;const o=Kr(t),s=cc(t),a=ac(s),c=An(t),l=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Yr(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}const db=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=Nu(l,r,c),m=r,p={},x=0;for(let E=0;E<a.length;E++){const{name:S,fn:T}=a[E],{x:h,y:w,data:_,reset:$}=await T({x:d,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});if(d=h??d,f=w??f,p={...p,[S]:{...p[S],..._}},$&&x<=50){x++,typeof $=="object"&&($.placement&&(m=$.placement),$.rects&&(l=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:d,y:f}=Nu(l,m,c)),E=-1;continue}}return{x:d,y:f,placement:m,strategy:i,middlewareData:p}};async function Eo(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=In(t,e),x=Ip(p),S=a[m?f==="floating"?"reference":"floating":f],T=wi(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),h=f==="floating"?{...s.floating,x:r,y:i}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},$=wi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:w,strategy:c}):h);return{top:(T.top-$.top+x.top)/_.y,bottom:($.bottom-T.bottom+x.bottom)/_.y,left:(T.left-$.left+x.left)/_.x,right:($.right-T.right+x.right)/_.x}}const Vu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=t,{element:c,padding:l=0}=In(e,t)||{};if(c==null)return{};const d=Ip(l),f={x:n,y:r},m=cc(i),p=ac(m),x=await s.getDimensions(c),E=m==="y",S=E?"top":"left",T=E?"bottom":"right",h=E?"clientHeight":"clientWidth",w=o.reference[p]+o.reference[m]-f[m]-o.floating[p],_=f[m]-o.reference[m],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=$?$[h]:0;(!M||!await(s.isElement==null?void 0:s.isElement($)))&&(M=a.floating[h]||o.floating[p]);const O=w/2-_/2,N=M/2-x[p]/2-1,V=Xn(d[S],N),z=Xn(d[T],N),j=V,R=M-x[p]-z,v=M/2-x[p]/2+O,C=ga(j,v,R),k=Yr(i)!=null&&v!=C&&o.reference[p]/2-(v<j?V:z)-x[p]/2<0?v<j?j-v:R-v:0;return{[m]:f[m]-k,data:{[m]:C,centerOffset:v-C+k}}}}),fb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...E}=In(e,t),S=An(r),T=An(s)===s,h=await(a.isRTL==null?void 0:a.isRTL(c.floating)),w=f||(T||!x?[xi(s)]:ab(s));!f&&p!=="none"&&w.push(...lb(s,x,p,h));const _=[s,...w],$=await Eo(t,E),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&M.push($[S]),d){const j=sb(r,o,h);M.push($[j[0]],$[j[1]])}if(O=[...O,{placement:r,overflows:M}],!M.every(j=>j<=0)){var N,V;const j=(((N=i.flip)==null?void 0:N.index)||0)+1,R=_[j];if(R)return{data:{index:j,overflows:O},reset:{placement:R}};let v=(V=O.filter(C=>C.overflows[0]<=0).sort((C,I)=>C.overflows[1]-I.overflows[1])[0])==null?void 0:V.placement;if(!v)switch(m){case"bestFit":{var z;const C=(z=O.map(I=>[I.placement,I.overflows.filter(k=>k>0).reduce((k,U)=>k+U,0)]).sort((I,k)=>I[1]-k[1])[0])==null?void 0:z[0];C&&(v=C);break}case"initialPlacement":v=s;break}if(r!==v)return{reset:{placement:v}}}return{}}}};function ju(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lu(e){return rb.some(t=>e[t]>=0)}const pb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=In(e,t);switch(r){case"referenceHidden":{const o=await Eo(t,{...i,elementContext:"reference"}),s=ju(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Lu(s)}}}case"escaped":{const o=await Eo(t,{...i,altBoundary:!0}),s=ju(o,n.floating);return{data:{escapedOffsets:s,escaped:Lu(s)}}}default:return{}}}}};async function hb(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=An(n),a=Yr(n),c=Kr(n)==="y",l=["left","top"].includes(s)?-1:1,d=o&&c?-1:1,f=In(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(p=a==="end"?x*-1:x),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const mb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hb(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},vb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:T,y:h}=S;return{x:T,y:h}}},...c}=In(e,t),l={x:n,y:r},d=await Eo(t,c),f=Kr(An(i)),m=sc(f);let p=l[m],x=l[f];if(o){const S=m==="y"?"top":"left",T=m==="y"?"bottom":"right",h=p+d[S],w=p-d[T];p=ga(h,p,w)}if(s){const S=f==="y"?"top":"left",T=f==="y"?"bottom":"right",h=x+d[S],w=x-d[T];x=ga(h,x,w)}const E=a.fn({...t,[m]:p,[f]:x});return{...E,data:{x:E.x-n,y:E.y-r}}}}},gb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=In(e,t),d={x:n,y:r},f=Kr(i),m=sc(f);let p=d[m],x=d[f];const E=In(a,t),S=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(c){const w=m==="y"?"height":"width",_=o.reference[m]-o.floating[w]+S.mainAxis,$=o.reference[m]+o.reference[w]-S.mainAxis;p<_?p=_:p>$&&(p=$)}if(l){var T,h;const w=m==="y"?"width":"height",_=["top","left"].includes(An(i)),$=o.reference[f]-o.floating[w]+(_&&((T=s.offset)==null?void 0:T[f])||0)+(_?0:S.crossAxis),M=o.reference[f]+o.reference[w]+(_?0:((h=s.offset)==null?void 0:h[f])||0)-(_?S.crossAxis:0);x<$?x=$:x>M&&(x=M)}return{[m]:p,[f]:x}}}},yb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:s=()=>{},...a}=In(e,t),c=await Eo(t,a),l=An(n),d=Yr(n),f=Kr(n)==="y",{width:m,height:p}=r.floating;let x,E;l==="top"||l==="bottom"?(x=l,E=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(E=l,x=d==="end"?"top":"bottom");const S=p-c[x],T=m-c[E],h=!t.middlewareData.shift;let w=S,_=T;if(f){const M=m-c.left-c.right;_=d||h?Xn(T,M):M}else{const M=p-c.top-c.bottom;w=d||h?Xn(S,M):M}if(h&&!d){const M=Ut(c.left,0),O=Ut(c.right,0),N=Ut(c.top,0),V=Ut(c.bottom,0);f?_=m-2*(M!==0||O!==0?M+O:Ut(c.left,c.right)):w=p-2*(N!==0||V!==0?N+V:Ut(c.top,c.bottom))}await s({...t,availableWidth:_,availableHeight:w});const $=await i.getDimensions(o.floating);return m!==$.width||p!==$.height?{reset:{rects:!0}}:{}}}};function qn(e){return Ap(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dn(e){var t;return(t=(Ap(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ap(e){return e instanceof Node||e instanceof Yt(e).Node}function On(e){return e instanceof Element||e instanceof Yt(e).Element}function yn(e){return e instanceof HTMLElement||e instanceof Yt(e).HTMLElement}function Fu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}function Io(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function bb(e){return["table","td","th"].includes(qn(e))}function lc(e){const t=uc(),n=nn(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 xb(e){let t=Fr(e);for(;yn(t)&&!Ki(t);){if(lc(t))return t;t=Fr(t)}return null}function uc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ki(e){return["html","body","#document"].includes(qn(e))}function nn(e){return Yt(e).getComputedStyle(e)}function zi(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Fr(e){if(qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fu(e)&&e.host||Dn(e);return Fu(t)?t.host:t}function Op(e){const t=Fr(e);return Ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:yn(t)&&Io(t)?t:Op(t)}function Ei(e,t){var n;t===void 0&&(t=[]);const r=Op(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yt(r);return i?t.concat(o,o.visualViewport||[],Io(r)?r:[]):t.concat(r,Ei(r))}function Dp(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=yn(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=bi(n)!==o||bi(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function dc(e){return On(e)?e:e.contextElement}function Vr(e){const t=dc(e);if(!yn(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Dp(t);let s=(o?bi(n.width):n.width)/r,a=(o?bi(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const wb=Gn(0);function Mp(e){const t=Yt(e);return!uc()||!t.visualViewport?wb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=dc(e);let s=Gn(1);t&&(r?On(r)&&(s=Vr(r)):s=Vr(e));const a=Eb(o,n,r)?Mp(o):Gn(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const m=Yt(o),p=r&&On(r)?Yt(r):r;let x=m.frameElement;for(;x&&r&&p!==m;){const E=Vr(x),S=x.getBoundingClientRect(),T=nn(x),h=S.left+(x.clientLeft+parseFloat(T.paddingLeft))*E.x,w=S.top+(x.clientTop+parseFloat(T.paddingTop))*E.y;c*=E.x,l*=E.y,d*=E.x,f*=E.y,c+=h,l+=w,x=Yt(x).frameElement}}return wi({width:d,height:f,x:c,y:l})}function Cb(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=yn(n),o=Dn(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a=Gn(1);const c=Gn(0);if((i||!i&&r!=="fixed")&&((qn(n)!=="body"||Io(o))&&(s=zi(n)),yn(n))){const l=gr(n);a=Vr(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function _b(e){return Array.from(e.getClientRects())}function kp(e){return gr(Dn(e)).left+zi(e).scrollLeft}function Sb(e){const t=Dn(e),n=zi(e),r=e.ownerDocument.body,i=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kp(e);const a=-n.scrollTop;return nn(r).direction==="rtl"&&(s+=Ut(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Tb(e,t){const n=Yt(e),r=Dn(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const l=uc();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function $b(e,t){const n=gr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=yn(e)?Vr(e):Gn(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,l=r*o.y;return{width:s,height:a,x:c,y:l}}function Bu(e,t,n){let r;if(t==="viewport")r=Tb(e,n);else if(t==="document")r=Sb(Dn(e));else if(On(t))r=$b(t,n);else{const i=Mp(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wi(r)}function Np(e,t){const n=Fr(e);return n===t||!On(n)||Ki(n)?!1:nn(n).position==="fixed"||Np(n,t)}function Rb(e,t){const n=t.get(e);if(n)return n;let r=Ei(e).filter(a=>On(a)&&qn(a)!=="body"),i=null;const o=nn(e).position==="fixed";let s=o?Fr(e):e;for(;On(s)&&!Ki(s);){const a=nn(s),c=lc(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Io(s)&&!c&&Np(e,s))?r=r.filter(d=>d!==s):i=a,s=Fr(s)}return t.set(e,r),r}function Pb(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Rb(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,d)=>{const f=Bu(t,d,i);return l.top=Ut(f.top,l.top),l.right=Xn(f.right,l.right),l.bottom=Xn(f.bottom,l.bottom),l.left=Ut(f.left,l.left),l},Bu(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ib(e){return Dp(e)}function Ab(e,t,n){const r=yn(t),i=Dn(t),o=n==="fixed",s=gr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=Gn(0);if(r||!r&&!o)if((qn(t)!=="body"||Io(i))&&(a=zi(t)),r){const l=gr(t,!0,o,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else i&&(c.x=kp(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Hu(e,t){return!yn(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Vp(e,t){const n=Yt(e);if(!yn(e))return n;let r=Hu(e,t);for(;r&&bb(r)&&nn(r).position==="static";)r=Hu(r,t);return r&&(qn(r)==="html"||qn(r)==="body"&&nn(r).position==="static"&&!lc(r))?n:r||xb(e)||n}const Ob=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||Vp,o=this.getDimensions;return{reference:Ab(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function Db(e){return nn(e).direction==="rtl"}const Mb={convertOffsetParentRelativeRectToViewportRelativeRect:Cb,getDocumentElement:Dn,getClippingRect:Pb,getOffsetParent:Vp,getElementRects:Ob,getClientRects:_b,getDimensions:Ib,getScale:Vr,isElement:On,isRTL:Db};function kb(e,t){let n=null,r;const i=Dn(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:l,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const p=zo(d),x=zo(i.clientWidth-(l+f)),E=zo(i.clientHeight-(d+m)),S=zo(l),h={rootMargin:-p+"px "+-x+"px "+-E+"px "+-S+"px",threshold:Ut(0,Xn(1,c))||1};let w=!0;function _($){const M=$[0].intersectionRatio;if(M!==c){if(!w)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(_,{...h,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,h)}n.observe(e)}return s(!0),o}function Nb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=dc(e),d=i||o?[...l?Ei(l):[],...Ei(t)]:[];d.forEach(T=>{i&&T.addEventListener("scroll",n,{passive:!0}),o&&T.addEventListener("resize",n)});const f=l&&a?kb(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(T=>{let[h]=T;h&&h.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let x,E=c?gr(e):null;c&&S();function S(){const T=gr(e);E&&(T.x!==E.x||T.y!==E.y||T.width!==E.width||T.height!==E.height)&&n(),E=T,x=requestAnimationFrame(S)}return n(),()=>{d.forEach(T=>{i&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const Vb=(e,t,n)=>{const r=new Map,i={platform:Mb,...n},o={...i.platform,_c:r};return db(e,t,{...i,platform:o})},jb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vu({element:r.current,padding:i}).fn(n):{}:r?Vu({element:r,padding:i}).fn(n):{}}}};var ui=typeof document<"u"?u.useLayoutEffect:u.useEffect;function Ci(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,i;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(!Ci(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ci(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wu(e,t){const n=jp(e);return Math.round(t*n)/n}function Uu(e){const t=he.useRef(e);return ui(()=>{t.current=e}),t}function Lb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,f]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=he.useState(r);Ci(m,r)||p(r);const[x,E]=he.useState(null),[S,T]=he.useState(null),h=he.useCallback(k=>{k!=M.current&&(M.current=k,E(k))},[E]),w=he.useCallback(k=>{k!==O.current&&(O.current=k,T(k))},[T]),_=o||x,$=s||S,M=he.useRef(null),O=he.useRef(null),N=he.useRef(d),V=Uu(c),z=Uu(i),j=he.useCallback(()=>{if(!M.current||!O.current)return;const k={placement:t,strategy:n,middleware:m};z.current&&(k.platform=z.current),Vb(M.current,O.current,k).then(U=>{const q={...U,isPositioned:!0};R.current&&!Ci(N.current,q)&&(N.current=q,Bg.flushSync(()=>{f(q)}))})},[m,t,n,z]);ui(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[l]);const R=he.useRef(!1);ui(()=>(R.current=!0,()=>{R.current=!1}),[]),ui(()=>{if(_&&(M.current=_),$&&(O.current=$),_&&$){if(V.current)return V.current(_,$,j);j()}},[_,$,j,V]);const v=he.useMemo(()=>({reference:M,floating:O,setReference:h,setFloating:w}),[h,w]),C=he.useMemo(()=>({reference:_,floating:$}),[_,$]),I=he.useMemo(()=>{const k={position:n,left:0,top:0};if(!C.floating)return k;const U=Wu(C.floating,d.x),q=Wu(C.floating,d.y);return a?{...k,transform:"translate("+U+"px, "+q+"px)",...jp(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:q}},[n,a,C.floating,d.x,d.y]);return he.useMemo(()=>({...d,update:j,refs:v,elements:C,floatingStyles:I}),[d,j,v,C,I])}const Fb=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.createElement(Fe.svg,ie({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:u.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Bb=Fb;function Xi(e){const[t,n]=u.useState(void 0);return Ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Lp="Popper",[Fp,Gi]=Xt(Lp),[Hb,Bp]=Fp(Lp),Wb=e=>{const{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return u.createElement(Hb,{scope:t,anchor:r,onAnchorChange:i},n)},Ub="PopperAnchor",Yb=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Bp(Ub,n),s=u.useRef(null),a=Xe(t,s);return u.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.createElement(Fe.div,ie({},i,{ref:a}))}),Hp="PopperContent",[Kb,zb]=Fp(Hp),Xb=u.forwardRef((e,t)=>{var n,r,i,o,s,a,c,l;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:p="center",alignOffset:x=0,arrowPadding:E=0,collisionBoundary:S=[],collisionPadding:T=0,sticky:h="partial",hideWhenDetached:w=!1,avoidCollisions:_=!0,onPlaced:$,...M}=e,O=Bp(Hp,d),[N,V]=u.useState(null),z=Xe(t,Ce=>V(Ce)),[j,R]=u.useState(null),v=Xi(j),C=(n=v==null?void 0:v.width)!==null&&n!==void 0?n:0,I=(r=v==null?void 0:v.height)!==null&&r!==void 0?r:0,k=f+(p!=="center"?"-"+p:""),U=typeof T=="number"?T:{top:0,right:0,bottom:0,left:0,...T},q=Array.isArray(S)?S:[S],ue=q.length>0,W={padding:U,boundary:q.filter(Qb),altBoundary:ue},{refs:L,floatingStyles:oe,placement:G,isPositioned:X,middlewareData:ne}=Lb({strategy:"fixed",placement:k,whileElementsMounted:Nb,elements:{reference:O.anchor},middleware:[mb({mainAxis:m+I,alignmentAxis:x}),_&&vb({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?gb():void 0,...W}),_&&fb({...W}),yb({...W,apply:({elements:Ce,rects:Re,availableWidth:Pe,availableHeight:Se})=>{const{width:We,height:ke}=Re.reference,lt=Ce.floating.style;lt.setProperty("--radix-popper-available-width",`${Pe}px`),lt.setProperty("--radix-popper-available-height",`${Se}px`),lt.setProperty("--radix-popper-anchor-width",`${We}px`),lt.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),j&&jb({element:j,padding:E}),Jb({arrowWidth:C,arrowHeight:I}),w&&pb({strategy:"referenceHidden"})]}),[ae,B]=Wp(G),H=Vt($);Ot(()=>{X&&(H==null||H())},[X,H]);const J=(i=ne.arrow)===null||i===void 0?void 0:i.x,ee=(o=ne.arrow)===null||o===void 0?void 0:o.y,te=((s=ne.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Z,ge]=u.useState();return Ot(()=>{N&&ge(window.getComputedStyle(N).zIndex)},[N]),u.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:X?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(a=ne.transformOrigin)===null||a===void 0?void 0:a.x,(c=ne.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},u.createElement(Kb,{scope:d,placedSide:ae,onArrowChange:R,arrowX:J,arrowY:ee,shouldHideArrow:te},u.createElement(Fe.div,ie({"data-side":ae,"data-align":B},M,{ref:z,style:{...M.style,animation:X?void 0:"none",opacity:(l=ne.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Gb="PopperArrow",qb={top:"bottom",right:"left",bottom:"top",left:"right"},Zb=u.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=zb(Gb,r),s=qb[o.placedSide];return u.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},u.createElement(Bb,ie({},i,{ref:n,style:{...i.style,display:"block"}})))});function Qb(e){return e!==null}const Jb=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:l}=t,f=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[x,E]=Wp(a),S={start:"0%",center:"50%",end:"100%"}[E],T=((r=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,h=((o=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+p/2;let w="",_="";return x==="bottom"?(w=f?S:`${T}px`,_=`${-p}px`):x==="top"?(w=f?S:`${T}px`,_=`${c.floating.height+p}px`):x==="right"?(w=`${-p}px`,_=f?S:`${h}px`):x==="left"&&(w=`${c.floating.width+p}px`,_=f?S:`${h}px`),{data:{x:w,y:_}}}});function Wp(e){const[t,n="center"]=e.split("-");return[t,n]}const Up=Wb,Yp=Yb,Kp=Xb,ex=Zb,zp=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?en.createPortal(u.createElement(Fe.div,ie({},i,{ref:t})),r):null}),tx=zp;function qi(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const Zi=u.forwardRef((e,t)=>u.createElement(Fe.span,ie({},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}}))),nx=Zi;var rx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tr=new WeakMap,Xo=new WeakMap,Go={},Ms=0,Xp=function(e){return e&&(e.host||Xp(e.parentNode))},ox=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Xp(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})},ix=function(e,t,n,r){var i=ox(t,Array.isArray(e)?e:[e]);Go[n]||(Go[n]=new WeakMap);var o=Go[n],s=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else{var p=m.getAttribute(r),x=p!==null&&p!=="false",E=(Tr.get(m)||0)+1,S=(o.get(m)||0)+1;Tr.set(m,E),o.set(m,S),s.push(m),E===1&&x&&Xo.set(m,!0),S===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}})};return d(t),a.clear(),Ms++,function(){s.forEach(function(f){var m=Tr.get(f)-1,p=o.get(f)-1;Tr.set(f,m),o.set(f,p),m||(Xo.has(f)||f.removeAttribute(r),Xo.delete(f)),p||f.removeAttribute(n)}),Ms--,Ms||(Tr=new WeakMap,Tr=new WeakMap,Xo=new WeakMap,Go={})}},Gp=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||rx(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ix(r,i,n,"aria-hidden")):function(){return null}},Jt=function(){return Jt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Jt.apply(this,arguments)};function qp(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sx(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var di="right-scroll-bar-position",fi="width-before-scroll-bar",ax="with-scroll-bars-hidden",cx="--removed-body-scroll-bar-size";function lx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ux(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function dx(e,t){return ux(t||null,function(n){return e.forEach(function(r){return lx(r,n)})})}function fx(e){return e}function px(e,t){t===void 0&&(t=fx);var n=[],r=!1,i={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(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){s.push(d),l()},filter:function(d){return s=s.filter(d),n}}}};return i}function hx(e){e===void 0&&(e={});var t=px(null);return t.options=Jt({async:!0,ssr:!1},e),t}var Zp=function(e){var t=e.sideCar,n=qp(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 he.createElement(r,Jt({},n))};Zp.isSideCarExport=!0;function mx(e,t){return e.useMedium(t),Zp}var Qp=hx(),ks=function(){},Qi=he.forwardRef(function(e,t){var n=he.useRef(null),r=he.useState({onScrollCapture:ks,onWheelCapture:ks,onTouchMoveCapture:ks}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,x=e.inert,E=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,h=qp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,_=dx([n,t]),$=Jt(Jt({},h),i);return he.createElement(he.Fragment,null,d&&he.createElement(w,{sideCar:Qp,removeScrollBar:l,shards:f,noIsolation:p,inert:x,setCallbacks:o,allowPinchZoom:!!E,lockRef:n}),s?he.cloneElement(he.Children.only(a),Jt(Jt({},$),{ref:_})):he.createElement(T,Jt({},$,{className:c,ref:_}),a))});Qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qi.classNames={fullWidth:fi,zeroRight:di};var Yu,vx=function(){if(Yu)return Yu;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vx();return t&&e.setAttribute("nonce",t),e}function yx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gx())&&(yx(t,n),bx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wx=function(){var e=xx();return function(t,n){he.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jp=function(){var e=wx(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ex={left:0,top:0,right:0,gap:0},Ns=function(e){return parseInt(e||"",10)||0},Cx=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Ns(n),Ns(r),Ns(i)]},_x=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ex;var t=Cx(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])}},Sx=Jp(),Tx=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
53
+ Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var Q=Vn(F);if(Nn[Q])return;Nn[Q]=!0;var fe="";y&&y._owner&&y._owner!==Bt.current&&(fe=" It was passed a child from "+v(y._owner.type)+"."),Tt(y),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Tt(null)}}function qt(y,F){{if(typeof y!="object")return;if(yt(y))for(var Q=0;Q<y.length;Q++){var fe=y[Q];dn(fe)&&fn(fe,F)}else if(dn(y))y._store&&(y._store.validated=!0);else if(y){var xe=S(y);if(typeof xe=="function"&&xe!==y.entries)for(var _e=xe.call(y),be;!(be=_e.next()).done;)dn(be.value)&&fn(be.value,F)}}}function jn(y){{var F=y.type;if(F==null||typeof F=="string")return;var Q;if(typeof F=="function")Q=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===c||F.$$typeof===f))Q=F.propTypes;else return;if(Q){var fe=v(F);lt(Q,y.props,"prop",fe,y)}else if(F.PropTypes!==void 0&&!un){un=!0;var xe=v(F);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xn(y){{for(var F=Object.keys(y.props),Q=0;Q<F.length;Q++){var fe=F[Q];if(fe!=="children"&&fe!=="key"){Tt(y),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Tt(null);break}}y.ref!==null&&(Tt(y),h("Invalid attribute `ref` supplied to `React.Fragment`."),Tt(null))}}function on(y,F,Q,fe,xe,_e){{var be=z(y);if(!be){var ye="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ye+=" 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 Ke=Zr(xe);Ke?ye+=Ke:ye+=kn();var Me;y===null?Me="null":yt(y)?Me="array":y!==void 0&&y.$$typeof===t?(Me="<"+(v(y.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof y,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Ve=_r(y,F,Q,xe,_e);if(Ve==null)return Ve;if(be){var He=F.children;if(He!==void 0)if(fe)if(yt(He)){for(var It=0;It<He.length;It++)qt(He[It],y);Object.freeze&&Object.freeze(He)}else h("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 qt(He,y)}return y===r?xn(Ve):jn(Ve),Ve}}function pn(y,F,Q){return on(y,F,Q,!0)}function Ln(y,F,Q){return on(y,F,Q,!1)}var $t=Ln,Fn=pn;Ko.Fragment=r,Ko.jsx=$t,Ko.jsxs=Fn}()),Ko}process.env.NODE_ENV==="production"?ma.exports=h0():ma.exports=m0();var ct=ma.exports;const v0=e=>{const t="currentColor";return{...e,color:(()=>e.color?dt.theme.colors[e.color]?dt.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}},Gt=v0,g0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},rc=g0,y0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},wo=y0,b0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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=b0,w0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},oc=w0,E0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},Ui=E0,C0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},_0=C0,S0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},T0=S0,$0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},R0=$0,P0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},I0=P0,A0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},O0=A0,D0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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=D0,k0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},N0=k0,V0=e=>{const{color:t,...n}=Gt(e);return ct.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:ct.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})})},j0=V0,L0=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(Py,{className:"accordion-header",children:D.jsxs(Iy,{className:Se(u0,t),...n,ref:r,children:[D.jsx(at,{className:d0,children:e}),D.jsx(wo,{className:s0,size:24,color:dt.theme.colors.black})]})}));var F0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},B0=it({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const _p=u.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:i,onClose:o,...s},a)=>{const c="div",d=(()=>{switch(i){case"error":return I0;case"warning":return j0;case"success":return N0;default:return M0}})();return D.jsxs(c,{ref:a,className:Se(B0({colorScheme:i}),e),"data-test-id":s["data-test-id"],...s,children:[D.jsxs(Rt,{gap:"$16",children:[D.jsx(at,{display:"flex",minW:dt.theme.space[24],children:D.jsx(d,{size:24,color:F0[i||"neutral"]})}),D.jsx(at,{pt:"$2",children:D.jsxs(mr,{gap:"$8",children:[t&&D.jsx(Nt,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),D.jsx(at,{children:n})]})})]}),r&&D.jsx(Rt,{pl:"$16",pt:"$4",children:D.jsx(Ui,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:o,cursor:"pointer",color:dt.theme.colors.black,size:16})})]})});_p.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var H0=it({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 ic=u.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:i,isRounded:o,className:s,style:a,...c},l)=>{const d=e||"span";return D.jsx(d,{ref:l,"data-test-id":c["data-test-id"],className:Se(H0({colorScheme:n,variant:i,size:r,isRounded:o}),s),style:a,...c,children:t})});ic.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};ic.displayName="Badge";function Ru(e,[t,n]){return Math.min(n,Math.max(t,e))}function W0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e);u.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const va="dismissableLayer.update",U0="dismissableLayer.pointerDownOutside",Y0="dismissableLayer.focusOutside";let Pu;const Sp=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yi=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,d=u.useContext(Sp),[f,m]=u.useState(null),p=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,x]=u.useState({}),E=Xe(t,N=>m(N)),S=Array.from(d.layers),[T]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),h=S.indexOf(T),w=f?S.indexOf(f):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,$=w>=h,M=z0(N=>{const V=N.target,z=[...d.branches].some(j=>j.contains(V));!$||z||(o==null||o(N),a==null||a(N),N.defaultPrevented||c==null||c())},p),O=X0(N=>{const V=N.target;[...d.branches].some(j=>j.contains(V))||(s==null||s(N),a==null||a(N),N.defaultPrevented||c==null||c())},p);return W0(N=>{w===d.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},p),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Pu=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Iu(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Pu)}},[f,p,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Iu())},[f,d]),u.useEffect(()=>{const N=()=>x({});return document.addEventListener(va,N),()=>document.removeEventListener(va,N)},[]),u.createElement(Fe.div,ie({},l,{ref:E,style:{pointerEvents:_?$?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,M.onPointerDownCapture)}))}),K0=u.forwardRef((e,t)=>{const n=u.useContext(Sp),r=u.useRef(null),i=Xe(t,r);return u.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.createElement(Fe.div,ie({},e,{ref:i}))});function z0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Tp(U0,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function X0(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=u.useRef(!1);return u.useEffect(()=>{const i=o=>{o.target&&!r.current&&Tp(Y0,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Iu(){const e=new CustomEvent(va);document.dispatchEvent(e)}function Tp(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hp(i,o):i.dispatchEvent(o)}const G0=Yi,q0=K0;let As=0;function $p(){u.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:Au()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Au()),As++,()=>{As===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),As--}},[])}function Au(){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 Os="focusScope.autoFocusOnMount",Ds="focusScope.autoFocusOnUnmount",Ou={bubbles:!1,cancelable:!0},Rp=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=u.useState(null),l=Vt(i),d=Vt(o),f=u.useRef(null),m=Xe(t,E=>c(E)),p=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let E=function(w){if(p.paused||!a)return;const _=w.target;a.contains(_)?f.current=_:Hn(f.current,{select:!0})},S=function(w){if(p.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Hn(f.current,{select:!0}))},T=function(w){const _=document.activeElement;for(const $ of w)$.removedNodes.length>0&&(a!=null&&a.contains(_)||Hn(a))};document.addEventListener("focusin",E),document.addEventListener("focusout",S);const h=new MutationObserver(T);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",S),h.disconnect()}}},[r,a,p.paused]),u.useEffect(()=>{if(a){Mu.add(p);const E=document.activeElement;if(!a.contains(E)){const T=new CustomEvent(Os,Ou);a.addEventListener(Os,l),a.dispatchEvent(T),T.defaultPrevented||(Z0(nb(Pp(a)),{select:!0}),document.activeElement===E&&Hn(a))}return()=>{a.removeEventListener(Os,l),setTimeout(()=>{const T=new CustomEvent(Ds,Ou);a.addEventListener(Ds,d),a.dispatchEvent(T),T.defaultPrevented||Hn(E??document.body,{select:!0}),a.removeEventListener(Ds,d),Mu.remove(p)},0)}}},[a,l,d,p]);const x=u.useCallback(E=>{if(!n&&!r||p.paused)return;const S=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,T=document.activeElement;if(S&&T){const h=E.currentTarget,[w,_]=Q0(h);w&&_?!E.shiftKey&&T===_?(E.preventDefault(),n&&Hn(w,{select:!0})):E.shiftKey&&T===w&&(E.preventDefault(),n&&Hn(_,{select:!0})):T===h&&E.preventDefault()}},[n,r,p.paused]);return u.createElement(Fe.div,ie({tabIndex:-1},s,{ref:m,onKeyDown:x}))});function Z0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Hn(r,{select:t}),document.activeElement!==n)return}function Q0(e){const t=Pp(e),n=Du(t,e),r=Du(t.reverse(),e);return[n,r]}function Pp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Du(e,t){for(const n of e)if(!J0(n,{upTo:t}))return n}function J0(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 eb(e){return e instanceof HTMLInputElement&&"select"in e}function Hn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eb(e)&&t&&e.select()}}const Mu=tb();function tb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ku(e,t),e.unshift(t)},remove(t){var n;e=ku(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ku(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nb(e){return e.filter(t=>t.tagName!=="A")}const rb=["top","right","bottom","left"],Xn=Math.min,Ut=Math.max,bi=Math.round,zo=Math.floor,Gn=e=>({x:e,y:e}),ob={left:"right",right:"left",bottom:"top",top:"bottom"},ib={start:"end",end:"start"};function ga(e,t,n){return Ut(e,Xn(t,n))}function In(e,t){return typeof e=="function"?e(t):e}function An(e){return e.split("-")[0]}function Yr(e){return e.split("-")[1]}function sc(e){return e==="x"?"y":"x"}function ac(e){return e==="y"?"height":"width"}function Kr(e){return["top","bottom"].includes(An(e))?"y":"x"}function cc(e){return sc(Kr(e))}function sb(e,t,n){n===void 0&&(n=!1);const r=Yr(e),i=cc(e),o=ac(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xi(s)),[s,xi(s)]}function ab(e){const t=xi(e);return[ya(e),t,ya(t)]}function ya(e){return e.replace(/start|end/g,t=>ib[t])}function cb(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function lb(e,t,n,r){const i=Yr(e);let o=cb(An(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(ya)))),o}function xi(e){return e.replace(/left|right|bottom|top/g,t=>ob[t])}function ub(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ip(e){return typeof e!="number"?ub(e):{top:e,right:e,bottom:e,left:e}}function wi(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Nu(e,t,n){let{reference:r,floating:i}=e;const o=Kr(t),s=cc(t),a=ac(s),c=An(t),l=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Yr(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}const db=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=Nu(l,r,c),m=r,p={},x=0;for(let E=0;E<a.length;E++){const{name:S,fn:T}=a[E],{x:h,y:w,data:_,reset:$}=await T({x:d,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});if(d=h??d,f=w??f,p={...p,[S]:{...p[S],..._}},$&&x<=50){x++,typeof $=="object"&&($.placement&&(m=$.placement),$.rects&&(l=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:d,y:f}=Nu(l,m,c)),E=-1;continue}}return{x:d,y:f,placement:m,strategy:i,middlewareData:p}};async function Eo(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=In(t,e),x=Ip(p),S=a[m?f==="floating"?"reference":"floating":f],T=wi(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),h=f==="floating"?{...s.floating,x:r,y:i}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},$=wi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:w,strategy:c}):h);return{top:(T.top-$.top+x.top)/_.y,bottom:($.bottom-T.bottom+x.bottom)/_.y,left:(T.left-$.left+x.left)/_.x,right:($.right-T.right+x.right)/_.x}}const Vu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=t,{element:c,padding:l=0}=In(e,t)||{};if(c==null)return{};const d=Ip(l),f={x:n,y:r},m=cc(i),p=ac(m),x=await s.getDimensions(c),E=m==="y",S=E?"top":"left",T=E?"bottom":"right",h=E?"clientHeight":"clientWidth",w=o.reference[p]+o.reference[m]-f[m]-o.floating[p],_=f[m]-o.reference[m],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=$?$[h]:0;(!M||!await(s.isElement==null?void 0:s.isElement($)))&&(M=a.floating[h]||o.floating[p]);const O=w/2-_/2,N=M/2-x[p]/2-1,V=Xn(d[S],N),z=Xn(d[T],N),j=V,R=M-x[p]-z,v=M/2-x[p]/2+O,C=ga(j,v,R),k=Yr(i)!=null&&v!=C&&o.reference[p]/2-(v<j?V:z)-x[p]/2<0?v<j?j-v:R-v:0;return{[m]:f[m]-k,data:{[m]:C,centerOffset:v-C+k}}}}),fb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...E}=In(e,t),S=An(r),T=An(s)===s,h=await(a.isRTL==null?void 0:a.isRTL(c.floating)),w=f||(T||!x?[xi(s)]:ab(s));!f&&p!=="none"&&w.push(...lb(s,x,p,h));const _=[s,...w],$=await Eo(t,E),M=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&M.push($[S]),d){const j=sb(r,o,h);M.push($[j[0]],$[j[1]])}if(O=[...O,{placement:r,overflows:M}],!M.every(j=>j<=0)){var N,V;const j=(((N=i.flip)==null?void 0:N.index)||0)+1,R=_[j];if(R)return{data:{index:j,overflows:O},reset:{placement:R}};let v=(V=O.filter(C=>C.overflows[0]<=0).sort((C,I)=>C.overflows[1]-I.overflows[1])[0])==null?void 0:V.placement;if(!v)switch(m){case"bestFit":{var z;const C=(z=O.map(I=>[I.placement,I.overflows.filter(k=>k>0).reduce((k,U)=>k+U,0)]).sort((I,k)=>I[1]-k[1])[0])==null?void 0:z[0];C&&(v=C);break}case"initialPlacement":v=s;break}if(r!==v)return{reset:{placement:v}}}return{}}}};function ju(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lu(e){return rb.some(t=>e[t]>=0)}const pb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=In(e,t);switch(r){case"referenceHidden":{const o=await Eo(t,{...i,elementContext:"reference"}),s=ju(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Lu(s)}}}case"escaped":{const o=await Eo(t,{...i,altBoundary:!0}),s=ju(o,n.floating);return{data:{escapedOffsets:s,escaped:Lu(s)}}}default:return{}}}}};async function hb(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=An(n),a=Yr(n),c=Kr(n)==="y",l=["left","top"].includes(s)?-1:1,d=o&&c?-1:1,f=In(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(p=a==="end"?x*-1:x),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const mb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await hb(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},vb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:T,y:h}=S;return{x:T,y:h}}},...c}=In(e,t),l={x:n,y:r},d=await Eo(t,c),f=Kr(An(i)),m=sc(f);let p=l[m],x=l[f];if(o){const S=m==="y"?"top":"left",T=m==="y"?"bottom":"right",h=p+d[S],w=p-d[T];p=ga(h,p,w)}if(s){const S=f==="y"?"top":"left",T=f==="y"?"bottom":"right",h=x+d[S],w=x-d[T];x=ga(h,x,w)}const E=a.fn({...t,[m]:p,[f]:x});return{...E,data:{x:E.x-n,y:E.y-r}}}}},gb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=In(e,t),d={x:n,y:r},f=Kr(i),m=sc(f);let p=d[m],x=d[f];const E=In(a,t),S=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(c){const w=m==="y"?"height":"width",_=o.reference[m]-o.floating[w]+S.mainAxis,$=o.reference[m]+o.reference[w]-S.mainAxis;p<_?p=_:p>$&&(p=$)}if(l){var T,h;const w=m==="y"?"width":"height",_=["top","left"].includes(An(i)),$=o.reference[f]-o.floating[w]+(_&&((T=s.offset)==null?void 0:T[f])||0)+(_?0:S.crossAxis),M=o.reference[f]+o.reference[w]+(_?0:((h=s.offset)==null?void 0:h[f])||0)-(_?S.crossAxis:0);x<$?x=$:x>M&&(x=M)}return{[m]:p,[f]:x}}}},yb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:s=()=>{},...a}=In(e,t),c=await Eo(t,a),l=An(n),d=Yr(n),f=Kr(n)==="y",{width:m,height:p}=r.floating;let x,E;l==="top"||l==="bottom"?(x=l,E=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(E=l,x=d==="end"?"top":"bottom");const S=p-c[x],T=m-c[E],h=!t.middlewareData.shift;let w=S,_=T;if(f){const M=m-c.left-c.right;_=d||h?Xn(T,M):M}else{const M=p-c.top-c.bottom;w=d||h?Xn(S,M):M}if(h&&!d){const M=Ut(c.left,0),O=Ut(c.right,0),N=Ut(c.top,0),V=Ut(c.bottom,0);f?_=m-2*(M!==0||O!==0?M+O:Ut(c.left,c.right)):w=p-2*(N!==0||V!==0?N+V:Ut(c.top,c.bottom))}await s({...t,availableWidth:_,availableHeight:w});const $=await i.getDimensions(o.floating);return m!==$.width||p!==$.height?{reset:{rects:!0}}:{}}}};function qn(e){return Ap(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dn(e){var t;return(t=(Ap(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ap(e){return e instanceof Node||e instanceof Yt(e).Node}function On(e){return e instanceof Element||e instanceof Yt(e).Element}function yn(e){return e instanceof HTMLElement||e instanceof Yt(e).HTMLElement}function Fu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}function Io(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function bb(e){return["table","td","th"].includes(qn(e))}function lc(e){const t=uc(),n=nn(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 xb(e){let t=Fr(e);for(;yn(t)&&!Ki(t);){if(lc(t))return t;t=Fr(t)}return null}function uc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ki(e){return["html","body","#document"].includes(qn(e))}function nn(e){return Yt(e).getComputedStyle(e)}function zi(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Fr(e){if(qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fu(e)&&e.host||Dn(e);return Fu(t)?t.host:t}function Op(e){const t=Fr(e);return Ki(t)?e.ownerDocument?e.ownerDocument.body:e.body:yn(t)&&Io(t)?t:Op(t)}function Ei(e,t){var n;t===void 0&&(t=[]);const r=Op(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yt(r);return i?t.concat(o,o.visualViewport||[],Io(r)?r:[]):t.concat(r,Ei(r))}function Dp(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=yn(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=bi(n)!==o||bi(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function dc(e){return On(e)?e:e.contextElement}function Vr(e){const t=dc(e);if(!yn(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Dp(t);let s=(o?bi(n.width):n.width)/r,a=(o?bi(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const wb=Gn(0);function Mp(e){const t=Yt(e);return!uc()||!t.visualViewport?wb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=dc(e);let s=Gn(1);t&&(r?On(r)&&(s=Vr(r)):s=Vr(e));const a=Eb(o,n,r)?Mp(o):Gn(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const m=Yt(o),p=r&&On(r)?Yt(r):r;let x=m.frameElement;for(;x&&r&&p!==m;){const E=Vr(x),S=x.getBoundingClientRect(),T=nn(x),h=S.left+(x.clientLeft+parseFloat(T.paddingLeft))*E.x,w=S.top+(x.clientTop+parseFloat(T.paddingTop))*E.y;c*=E.x,l*=E.y,d*=E.x,f*=E.y,c+=h,l+=w,x=Yt(x).frameElement}}return wi({width:d,height:f,x:c,y:l})}function Cb(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=yn(n),o=Dn(n);if(n===o)return t;let s={scrollLeft:0,scrollTop:0},a=Gn(1);const c=Gn(0);if((i||!i&&r!=="fixed")&&((qn(n)!=="body"||Io(o))&&(s=zi(n)),yn(n))){const l=gr(n);a=Vr(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function _b(e){return Array.from(e.getClientRects())}function kp(e){return gr(Dn(e)).left+zi(e).scrollLeft}function Sb(e){const t=Dn(e),n=zi(e),r=e.ownerDocument.body,i=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kp(e);const a=-n.scrollTop;return nn(r).direction==="rtl"&&(s+=Ut(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Tb(e,t){const n=Yt(e),r=Dn(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const l=uc();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function $b(e,t){const n=gr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=yn(e)?Vr(e):Gn(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,l=r*o.y;return{width:s,height:a,x:c,y:l}}function Bu(e,t,n){let r;if(t==="viewport")r=Tb(e,n);else if(t==="document")r=Sb(Dn(e));else if(On(t))r=$b(t,n);else{const i=Mp(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wi(r)}function Np(e,t){const n=Fr(e);return n===t||!On(n)||Ki(n)?!1:nn(n).position==="fixed"||Np(n,t)}function Rb(e,t){const n=t.get(e);if(n)return n;let r=Ei(e).filter(a=>On(a)&&qn(a)!=="body"),i=null;const o=nn(e).position==="fixed";let s=o?Fr(e):e;for(;On(s)&&!Ki(s);){const a=nn(s),c=lc(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Io(s)&&!c&&Np(e,s))?r=r.filter(d=>d!==s):i=a,s=Fr(s)}return t.set(e,r),r}function Pb(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Rb(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((l,d)=>{const f=Bu(t,d,i);return l.top=Ut(f.top,l.top),l.right=Xn(f.right,l.right),l.bottom=Xn(f.bottom,l.bottom),l.left=Ut(f.left,l.left),l},Bu(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ib(e){return Dp(e)}function Ab(e,t,n){const r=yn(t),i=Dn(t),o=n==="fixed",s=gr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=Gn(0);if(r||!r&&!o)if((qn(t)!=="body"||Io(i))&&(a=zi(t)),r){const l=gr(t,!0,o,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else i&&(c.x=kp(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function Hu(e,t){return!yn(e)||nn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Vp(e,t){const n=Yt(e);if(!yn(e))return n;let r=Hu(e,t);for(;r&&bb(r)&&nn(r).position==="static";)r=Hu(r,t);return r&&(qn(r)==="html"||qn(r)==="body"&&nn(r).position==="static"&&!lc(r))?n:r||xb(e)||n}const Ob=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||Vp,o=this.getDimensions;return{reference:Ab(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function Db(e){return nn(e).direction==="rtl"}const Mb={convertOffsetParentRelativeRectToViewportRelativeRect:Cb,getDocumentElement:Dn,getClippingRect:Pb,getOffsetParent:Vp,getElementRects:Ob,getClientRects:_b,getDimensions:Ib,getScale:Vr,isElement:On,isRTL:Db};function kb(e,t){let n=null,r;const i=Dn(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:l,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const p=zo(d),x=zo(i.clientWidth-(l+f)),E=zo(i.clientHeight-(d+m)),S=zo(l),h={rootMargin:-p+"px "+-x+"px "+-E+"px "+-S+"px",threshold:Ut(0,Xn(1,c))||1};let w=!0;function _($){const M=$[0].intersectionRatio;if(M!==c){if(!w)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(_,{...h,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,h)}n.observe(e)}return s(!0),o}function Nb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=dc(e),d=i||o?[...l?Ei(l):[],...Ei(t)]:[];d.forEach(T=>{i&&T.addEventListener("scroll",n,{passive:!0}),o&&T.addEventListener("resize",n)});const f=l&&a?kb(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(T=>{let[h]=T;h&&h.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let x,E=c?gr(e):null;c&&S();function S(){const T=gr(e);E&&(T.x!==E.x||T.y!==E.y||T.width!==E.width||T.height!==E.height)&&n(),E=T,x=requestAnimationFrame(S)}return n(),()=>{d.forEach(T=>{i&&T.removeEventListener("scroll",n),o&&T.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const Vb=(e,t,n)=>{const r=new Map,i={platform:Mb,...n},o={...i.platform,_c:r};return db(e,t,{...i,platform:o})},jb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vu({element:r.current,padding:i}).fn(n):{}:r?Vu({element:r,padding:i}).fn(n):{}}}};var ui=typeof document<"u"?u.useLayoutEffect:u.useEffect;function Ci(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,i;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(!Ci(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Ci(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wu(e,t){const n=jp(e);return Math.round(t*n)/n}function Uu(e){const t=he.useRef(e);return ui(()=>{t.current=e}),t}function Lb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,f]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=he.useState(r);Ci(m,r)||p(r);const[x,E]=he.useState(null),[S,T]=he.useState(null),h=he.useCallback(k=>{k!=M.current&&(M.current=k,E(k))},[E]),w=he.useCallback(k=>{k!==O.current&&(O.current=k,T(k))},[T]),_=o||x,$=s||S,M=he.useRef(null),O=he.useRef(null),N=he.useRef(d),V=Uu(c),z=Uu(i),j=he.useCallback(()=>{if(!M.current||!O.current)return;const k={placement:t,strategy:n,middleware:m};z.current&&(k.platform=z.current),Vb(M.current,O.current,k).then(U=>{const q={...U,isPositioned:!0};R.current&&!Ci(N.current,q)&&(N.current=q,Bg.flushSync(()=>{f(q)}))})},[m,t,n,z]);ui(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[l]);const R=he.useRef(!1);ui(()=>(R.current=!0,()=>{R.current=!1}),[]),ui(()=>{if(_&&(M.current=_),$&&(O.current=$),_&&$){if(V.current)return V.current(_,$,j);j()}},[_,$,j,V]);const v=he.useMemo(()=>({reference:M,floating:O,setReference:h,setFloating:w}),[h,w]),C=he.useMemo(()=>({reference:_,floating:$}),[_,$]),I=he.useMemo(()=>{const k={position:n,left:0,top:0};if(!C.floating)return k;const U=Wu(C.floating,d.x),q=Wu(C.floating,d.y);return a?{...k,transform:"translate("+U+"px, "+q+"px)",...jp(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:q}},[n,a,C.floating,d.x,d.y]);return he.useMemo(()=>({...d,update:j,refs:v,elements:C,floatingStyles:I}),[d,j,v,C,I])}const Fb=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.createElement(Fe.svg,ie({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:u.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Bb=Fb;function Xi(e){const[t,n]=u.useState(void 0);return Ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Lp="Popper",[Fp,Gi]=Xt(Lp),[Hb,Bp]=Fp(Lp),Wb=e=>{const{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return u.createElement(Hb,{scope:t,anchor:r,onAnchorChange:i},n)},Ub="PopperAnchor",Yb=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Bp(Ub,n),s=u.useRef(null),a=Xe(t,s);return u.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.createElement(Fe.div,ie({},i,{ref:a}))}),Hp="PopperContent",[Kb,zb]=Fp(Hp),Xb=u.forwardRef((e,t)=>{var n,r,i,o,s,a,c,l;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:p="center",alignOffset:x=0,arrowPadding:E=0,collisionBoundary:S=[],collisionPadding:T=0,sticky:h="partial",hideWhenDetached:w=!1,avoidCollisions:_=!0,onPlaced:$,...M}=e,O=Bp(Hp,d),[N,V]=u.useState(null),z=Xe(t,Ce=>V(Ce)),[j,R]=u.useState(null),v=Xi(j),C=(n=v==null?void 0:v.width)!==null&&n!==void 0?n:0,I=(r=v==null?void 0:v.height)!==null&&r!==void 0?r:0,k=f+(p!=="center"?"-"+p:""),U=typeof T=="number"?T:{top:0,right:0,bottom:0,left:0,...T},q=Array.isArray(S)?S:[S],ue=q.length>0,W={padding:U,boundary:q.filter(Qb),altBoundary:ue},{refs:L,floatingStyles:oe,placement:G,isPositioned:X,middlewareData:ne}=Lb({strategy:"fixed",placement:k,whileElementsMounted:Nb,elements:{reference:O.anchor},middleware:[mb({mainAxis:m+I,alignmentAxis:x}),_&&vb({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?gb():void 0,...W}),_&&fb({...W}),yb({...W,apply:({elements:Ce,rects:Re,availableWidth:Pe,availableHeight:Te})=>{const{width:We,height:ke}=Re.reference,lt=Ce.floating.style;lt.setProperty("--radix-popper-available-width",`${Pe}px`),lt.setProperty("--radix-popper-available-height",`${Te}px`),lt.setProperty("--radix-popper-anchor-width",`${We}px`),lt.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),j&&jb({element:j,padding:E}),Jb({arrowWidth:C,arrowHeight:I}),w&&pb({strategy:"referenceHidden"})]}),[ae,B]=Wp(G),H=Vt($);Ot(()=>{X&&(H==null||H())},[X,H]);const J=(i=ne.arrow)===null||i===void 0?void 0:i.x,ee=(o=ne.arrow)===null||o===void 0?void 0:o.y,te=((s=ne.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Z,ge]=u.useState();return Ot(()=>{N&&ge(window.getComputedStyle(N).zIndex)},[N]),u.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:X?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[(a=ne.transformOrigin)===null||a===void 0?void 0:a.x,(c=ne.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},u.createElement(Kb,{scope:d,placedSide:ae,onArrowChange:R,arrowX:J,arrowY:ee,shouldHideArrow:te},u.createElement(Fe.div,ie({"data-side":ae,"data-align":B},M,{ref:z,style:{...M.style,animation:X?void 0:"none",opacity:(l=ne.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Gb="PopperArrow",qb={top:"bottom",right:"left",bottom:"top",left:"right"},Zb=u.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=zb(Gb,r),s=qb[o.placedSide];return u.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},u.createElement(Bb,ie({},i,{ref:n,style:{...i.style,display:"block"}})))});function Qb(e){return e!==null}const Jb=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:l}=t,f=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[x,E]=Wp(a),S={start:"0%",center:"50%",end:"100%"}[E],T=((r=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,h=((o=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+p/2;let w="",_="";return x==="bottom"?(w=f?S:`${T}px`,_=`${-p}px`):x==="top"?(w=f?S:`${T}px`,_=`${c.floating.height+p}px`):x==="right"?(w=`${-p}px`,_=f?S:`${h}px`):x==="left"&&(w=`${c.floating.width+p}px`,_=f?S:`${h}px`),{data:{x:w,y:_}}}});function Wp(e){const[t,n="center"]=e.split("-");return[t,n]}const Up=Wb,Yp=Yb,Kp=Xb,ex=Zb,zp=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?en.createPortal(u.createElement(Fe.div,ie({},i,{ref:t})),r):null}),tx=zp;function qi(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const Zi=u.forwardRef((e,t)=>u.createElement(Fe.span,ie({},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}}))),nx=Zi;var rx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tr=new WeakMap,Xo=new WeakMap,Go={},Ms=0,Xp=function(e){return e&&(e.host||Xp(e.parentNode))},ox=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Xp(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})},ix=function(e,t,n,r){var i=ox(t,Array.isArray(e)?e:[e]);Go[n]||(Go[n]=new WeakMap);var o=Go[n],s=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else{var p=m.getAttribute(r),x=p!==null&&p!=="false",E=(Tr.get(m)||0)+1,S=(o.get(m)||0)+1;Tr.set(m,E),o.set(m,S),s.push(m),E===1&&x&&Xo.set(m,!0),S===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}})};return d(t),a.clear(),Ms++,function(){s.forEach(function(f){var m=Tr.get(f)-1,p=o.get(f)-1;Tr.set(f,m),o.set(f,p),m||(Xo.has(f)||f.removeAttribute(r),Xo.delete(f)),p||f.removeAttribute(n)}),Ms--,Ms||(Tr=new WeakMap,Tr=new WeakMap,Xo=new WeakMap,Go={})}},Gp=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||rx(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ix(r,i,n,"aria-hidden")):function(){return null}},Jt=function(){return Jt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Jt.apply(this,arguments)};function qp(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sx(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var di="right-scroll-bar-position",fi="width-before-scroll-bar",ax="with-scroll-bars-hidden",cx="--removed-body-scroll-bar-size";function lx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ux(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function dx(e,t){return ux(t||null,function(n){return e.forEach(function(r){return lx(r,n)})})}function fx(e){return e}function px(e,t){t===void 0&&(t=fx);var n=[],r=!1,i={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(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){s.push(d),l()},filter:function(d){return s=s.filter(d),n}}}};return i}function hx(e){e===void 0&&(e={});var t=px(null);return t.options=Jt({async:!0,ssr:!1},e),t}var Zp=function(e){var t=e.sideCar,n=qp(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 he.createElement(r,Jt({},n))};Zp.isSideCarExport=!0;function mx(e,t){return e.useMedium(t),Zp}var Qp=hx(),ks=function(){},Qi=he.forwardRef(function(e,t){var n=he.useRef(null),r=he.useState({onScrollCapture:ks,onWheelCapture:ks,onTouchMoveCapture:ks}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noIsolation,x=e.inert,E=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,h=qp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,_=dx([n,t]),$=Jt(Jt({},h),i);return he.createElement(he.Fragment,null,d&&he.createElement(w,{sideCar:Qp,removeScrollBar:l,shards:f,noIsolation:p,inert:x,setCallbacks:o,allowPinchZoom:!!E,lockRef:n}),s?he.cloneElement(he.Children.only(a),Jt(Jt({},$),{ref:_})):he.createElement(T,Jt({},$,{className:c,ref:_}),a))});Qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qi.classNames={fullWidth:fi,zeroRight:di};var Yu,vx=function(){if(Yu)return Yu;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vx();return t&&e.setAttribute("nonce",t),e}function yx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xx=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gx())&&(yx(t,n),bx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wx=function(){var e=xx();return function(t,n){he.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jp=function(){var e=wx(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ex={left:0,top:0,right:0,gap:0},Ns=function(e){return parseInt(e||"",10)||0},Cx=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Ns(n),Ns(r),Ns(i)]},_x=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ex;var t=Cx(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])}},Sx=Jp(),Tx=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
54
54
  .`.concat(ax,` {
55
55
  overflow: hidden `).concat(r,`;
56
56
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -90,7 +90,7 @@ Check the top-level render call using <`+Q+">.")}return F}}function fn(y,F){{if(
90
90
  `)},$x=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=he.useMemo(function(){return _x(i)},[i]);return he.createElement(Sx,{styles:Tx(o,!t,i,n?"":"!important")})},ba=!1;if(typeof window<"u")try{var qo=Object.defineProperty({},"passive",{get:function(){return ba=!0,!0}});window.addEventListener("test",qo,qo),window.removeEventListener("test",qo,qo)}catch{ba=!1}var $r=ba?{passive:!1}:!1,Rx=function(e){return e.tagName==="TEXTAREA"},eh=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Rx(e)&&n[t]==="visible")},Px=function(e){return eh(e,"overflowY")},Ix=function(e){return eh(e,"overflowX")},Ku=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=th(e,n);if(r){var i=nh(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ax=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ox=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},th=function(e,t){return e==="v"?Px(t):Ix(t)},nh=function(e,t){return e==="v"?Ax(t):Ox(t)},Dx=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mx=function(e,t,n,r,i){var o=Dx(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),l=!1,d=s>0,f=0,m=0;do{var p=nh(e,a),x=p[0],E=p[1],S=p[2],T=E-S-o*x;(x||T)&&th(e,a)&&(f+=T,m+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(i&&f===0||!i&&s>f)||!d&&(i&&m===0||!i&&-s>m))&&(l=!0),l},Zo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zu=function(e){return[e.deltaX,e.deltaY]},Xu=function(e){return e&&"current"in e?e.current:e},kx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nx=function(e){return`
91
91
  .block-interactivity-`.concat(e,` {pointer-events: none;}
92
92
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
93
- `)},Vx=0,Rr=[];function jx(e){var t=he.useRef([]),n=he.useRef([0,0]),r=he.useRef(),i=he.useState(Vx++)[0],o=he.useState(function(){return Jp()})[0],s=he.useRef(e);he.useEffect(function(){s.current=e},[e]),he.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var E=sx([e.lockRef.current],(e.shards||[]).map(Xu),!0).filter(Boolean);return E.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),E.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=he.useCallback(function(E,S){if("touches"in E&&E.touches.length===2)return!s.current.allowPinchZoom;var T=Zo(E),h=n.current,w="deltaX"in E?E.deltaX:h[0]-T[0],_="deltaY"in E?E.deltaY:h[1]-T[1],$,M=E.target,O=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in E&&O==="h"&&M.type==="range")return!1;var N=Ku(O,M);if(!N)return!0;if(N?$=O:($=O==="v"?"h":"v",N=Ku(O,M)),!N)return!1;if(!r.current&&"changedTouches"in E&&(w||_)&&(r.current=$),!$)return!0;var V=r.current||$;return Mx(V,S,E,V==="h"?w:_,!0)},[]),c=he.useCallback(function(E){var S=E;if(!(!Rr.length||Rr[Rr.length-1]!==o)){var T="deltaY"in S?zu(S):Zo(S),h=t.current.filter(function($){return $.name===S.type&&$.target===S.target&&kx($.delta,T)})[0];if(h&&h.should){S.cancelable&&S.preventDefault();return}if(!h){var w=(s.current.shards||[]).map(Xu).filter(Boolean).filter(function($){return $.contains(S.target)}),_=w.length>0?a(S,w[0]):!s.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),l=he.useCallback(function(E,S,T,h){var w={name:E,delta:S,target:T,should:h};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),d=he.useCallback(function(E){n.current=Zo(E),r.current=void 0},[]),f=he.useCallback(function(E){l(E.type,zu(E),E.target,a(E,e.lockRef.current))},[]),m=he.useCallback(function(E){l(E.type,Zo(E),E.target,a(E,e.lockRef.current))},[]);he.useEffect(function(){return Rr.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,$r),document.addEventListener("touchmove",c,$r),document.addEventListener("touchstart",d,$r),function(){Rr=Rr.filter(function(E){return E!==o}),document.removeEventListener("wheel",c,$r),document.removeEventListener("touchmove",c,$r),document.removeEventListener("touchstart",d,$r)}},[]);var p=e.removeScrollBar,x=e.inert;return he.createElement(he.Fragment,null,x?he.createElement(o,{styles:Nx(i)}):null,p?he.createElement($x,{gapMode:"margin"}):null)}const Lx=mx(Qp,jx);var rh=he.forwardRef(function(e,t){return he.createElement(Qi,Jt({},e,{ref:t,sideCar:Lx}))});rh.classNames=Qi.classNames;const oh=rh,Fx=[" ","Enter","ArrowUp","ArrowDown"],Bx=[" ","Enter"],Ji="Select",[es,ts,Hx]=Li(Ji),[zr,UI]=Xt(Ji,[Hx,Gi]),fc=Gi(),[Wx,xr]=zr(Ji),[Ux,Yx]=zr(Ji),Kx=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:l,name:d,autoComplete:f,disabled:m,required:p}=e,x=fc(t),[E,S]=u.useState(null),[T,h]=u.useState(null),[w,_]=u.useState(!1),$=Fi(l),[M=!1,O]=tn({prop:r,defaultProp:i,onChange:o}),[N,V]=tn({prop:s,defaultProp:a,onChange:c}),z=u.useRef(null),j=E?!!E.closest("form"):!0,[R,v]=u.useState(new Set),C=Array.from(R).map(I=>I.props.value).join(";");return u.createElement(Up,x,u.createElement(Wx,{required:p,scope:t,trigger:E,onTriggerChange:S,valueNode:T,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:$n(),value:N,onValueChange:V,open:M,onOpenChange:O,dir:$,triggerPointerDownPosRef:z,disabled:m},u.createElement(es.Provider,{scope:t},u.createElement(Ux,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(I=>{v(k=>new Set(k).add(I))},[]),onNativeOptionRemove:u.useCallback(I=>{v(k=>{const U=new Set(k);return U.delete(I),U})},[])},n)),j?u.createElement(ah,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:I=>V(I.target.value),disabled:m},N===void 0?u.createElement("option",{value:""}):null,Array.from(R)):null))},zx="SelectTrigger",Xx=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=fc(n),s=xr(zx,n),a=s.disabled||r,c=Xe(t,s.onTriggerChange),l=ts(n),[d,f,m]=ch(x=>{const E=l().filter(h=>!h.disabled),S=E.find(h=>h.value===s.value),T=lh(E,x,S);T!==void 0&&s.onValueChange(T.value)}),p=()=>{a||(s.onOpenChange(!0),m())};return u.createElement(Yp,ie({asChild:!0},o),u.createElement(Fe.button,ie({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":s.value===void 0?"":void 0},i,{ref:c,onClick:Ie(i.onClick,x=>{x.currentTarget.focus()}),onPointerDown:Ie(i.onPointerDown,x=>{const E=x.target;E.hasPointerCapture(x.pointerId)&&E.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(p(),s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:Ie(i.onKeyDown,x=>{const E=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(E&&x.key===" ")&&Fx.includes(x.key)&&(p(),x.preventDefault())})})))}),Gx="SelectValue",qx=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s,...a}=e,c=xr(Gx,n),{onValueNodeHasChildrenChange:l}=c,d=o!==void 0,f=Xe(t,c.onValueNodeChange);return Ot(()=>{l(d)},[l,d]),u.createElement(Fe.span,ie({},a,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&s!==void 0?s:o)}),Zx=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return u.createElement(Fe.span,ie({"aria-hidden":!0},i,{ref:t}),r||"▼")}),Br="SelectContent",Qx=u.forwardRef((e,t)=>{const n=xr(Br,e.__scopeSelect),[r,i]=u.useState();if(Ot(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?en.createPortal(u.createElement(ih,{scope:e.__scopeSelect},u.createElement(es.Slot,{scope:e.__scopeSelect},u.createElement("div",null,e.children))),o):null}return u.createElement(Jx,ie({},e,{ref:t}))}),_n=10,[ih,wr]=zr(Br),Jx=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:E,avoidCollisions:S,...T}=e,h=xr(Br,n),[w,_]=u.useState(null),[$,M]=u.useState(null),O=Xe(t,B=>_(B)),[N,V]=u.useState(null),[z,j]=u.useState(null),R=ts(n),[v,C]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(w)return Gp(w)},[w]),$p();const k=u.useCallback(B=>{const[H,...J]=R().map(Z=>Z.ref.current),[ee]=J.slice(-1),te=document.activeElement;for(const Z of B)if(Z===te||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===H&&$&&($.scrollTop=0),Z===ee&&$&&($.scrollTop=$.scrollHeight),Z==null||Z.focus(),document.activeElement!==te))return},[R,$]),U=u.useCallback(()=>k([N,w]),[k,N,w]);u.useEffect(()=>{v&&U()},[v,U]);const{onOpenChange:q,triggerPointerDownPosRef:ue}=h;u.useEffect(()=>{if(w){let B={x:0,y:0};const H=ee=>{var te,Z,ge,Ce;B={x:Math.abs(Math.round(ee.pageX)-((te=(Z=ue.current)===null||Z===void 0?void 0:Z.x)!==null&&te!==void 0?te:0)),y:Math.abs(Math.round(ee.pageY)-((ge=(Ce=ue.current)===null||Ce===void 0?void 0:Ce.y)!==null&&ge!==void 0?ge:0))}},J=ee=>{B.x<=10&&B.y<=10?ee.preventDefault():w.contains(ee.target)||q(!1),document.removeEventListener("pointermove",H),ue.current=null};return ue.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,q,ue]),u.useEffect(()=>{const B=()=>q(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[q]);const[W,L]=ch(B=>{const H=R().filter(te=>!te.disabled),J=H.find(te=>te.ref.current===document.activeElement),ee=lh(H,B,J);ee&&setTimeout(()=>ee.ref.current.focus())}),oe=u.useCallback((B,H,J)=>{const ee=!I.current&&!J;(h.value!==void 0&&h.value===H||ee)&&(V(B),ee&&(I.current=!0))},[h.value]),G=u.useCallback(()=>w==null?void 0:w.focus(),[w]),X=u.useCallback((B,H,J)=>{const ee=!I.current&&!J;(h.value!==void 0&&h.value===H||ee)&&j(B)},[h.value]),ne=r==="popper"?Gu:ew,ae=ne===Gu?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:E,avoidCollisions:S}:{};return u.createElement(ih,{scope:n,content:w,viewport:$,onViewportChange:M,itemRefCallback:oe,selectedItem:N,onItemLeave:G,itemTextRefCallback:X,focusSelectedItem:U,selectedItemText:z,position:r,isPositioned:v,searchRef:W},u.createElement(oh,{as:Lr,allowPinchZoom:!0},u.createElement(Rp,{asChild:!0,trapped:h.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:Ie(i,B=>{var H;(H=h.trigger)===null||H===void 0||H.focus({preventScroll:!0}),B.preventDefault()})},u.createElement(Yi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>h.onOpenChange(!1)},u.createElement(ne,ie({role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:B=>B.preventDefault()},T,ae,{onPlaced:()=>C(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:Ie(T.onKeyDown,B=>{const H=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!H&&B.key.length===1&&L(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let ee=R().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(B.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const te=B.target,Z=ee.indexOf(te);ee=ee.slice(Z+1)}setTimeout(()=>k(ee)),B.preventDefault()}})}))))))}),ew=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=xr(Br,n),s=wr(Br,n),[a,c]=u.useState(null),[l,d]=u.useState(null),f=Xe(t,O=>d(O)),m=ts(n),p=u.useRef(!1),x=u.useRef(!0),{viewport:E,selectedItem:S,selectedItemText:T,focusSelectedItem:h}=s,w=u.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&l&&E&&S&&T){const O=o.trigger.getBoundingClientRect(),N=l.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),z=T.getBoundingClientRect();if(o.dir!=="rtl"){const te=z.left-N.left,Z=V.left-te,ge=O.left-Z,Ce=O.width+ge,Re=Math.max(Ce,N.width),Pe=window.innerWidth-_n,Se=Ru(Z,[_n,Pe-Re]);a.style.minWidth=Ce+"px",a.style.left=Se+"px"}else{const te=N.right-z.right,Z=window.innerWidth-V.right-te,ge=window.innerWidth-O.right-Z,Ce=O.width+ge,Re=Math.max(Ce,N.width),Pe=window.innerWidth-_n,Se=Ru(Z,[_n,Pe-Re]);a.style.minWidth=Ce+"px",a.style.right=Se+"px"}const j=m(),R=window.innerHeight-_n*2,v=E.scrollHeight,C=window.getComputedStyle(l),I=parseInt(C.borderTopWidth,10),k=parseInt(C.paddingTop,10),U=parseInt(C.borderBottomWidth,10),q=parseInt(C.paddingBottom,10),ue=I+k+v+q+U,W=Math.min(S.offsetHeight*5,ue),L=window.getComputedStyle(E),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),X=O.top+O.height/2-_n,ne=R-X,ae=S.offsetHeight/2,B=S.offsetTop+ae,H=I+k+B,J=ue-H;if(H<=X){const te=S===j[j.length-1].ref.current;a.style.bottom="0px";const Z=l.clientHeight-E.offsetTop-E.offsetHeight,ge=Math.max(ne,ae+(te?G:0)+Z+U),Ce=H+ge;a.style.height=Ce+"px"}else{const te=S===j[0].ref.current;a.style.top="0px";const ge=Math.max(X,I+E.offsetTop+(te?oe:0)+ae)+J;a.style.height=ge+"px",E.scrollTop=H-X+E.offsetTop}a.style.margin=`${_n}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,o.trigger,o.valueNode,a,l,E,S,T,o.dir,r]);Ot(()=>w(),[w]);const[_,$]=u.useState();Ot(()=>{l&&$(window.getComputedStyle(l).zIndex)},[l]);const M=u.useCallback(O=>{O&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return u.createElement(tw,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:M},u.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_}},u.createElement(Fe.div,ie({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Gu=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=_n,...o}=e,s=fc(n);return u.createElement(Kp,ie({},s,o,{ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}}))}),[tw,pc]=zr(Br,{}),qu="SelectViewport",nw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=wr(qu,n),o=pc(qu,n),s=Xe(t,i.onViewportChange),a=u.useRef(0);return u.createElement(u.Fragment,null,u.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}"}}),u.createElement(es.Slot,{scope:n},u.createElement(Fe.div,ie({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ie(r.onScroll,c=>{const l=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const m=Math.abs(a.current-l.scrollTop);if(m>0){const p=window.innerHeight-_n*2,x=parseFloat(d.style.minHeight),E=parseFloat(d.style.height),S=Math.max(x,E);if(S<p){const T=S+m,h=Math.min(p,T),w=T-h;d.style.height=h+"px",d.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),rw="SelectGroup";zr(rw);const xa="SelectItem",[ow,iw]=zr(xa),sw=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=xr(xa,n),c=wr(xa,n),l=a.value===r,[d,f]=u.useState(o??""),[m,p]=u.useState(!1),x=Xe(t,T=>{var h;return(h=c.itemRefCallback)===null||h===void 0?void 0:h.call(c,T,r,i)}),E=$n(),S=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};return u.createElement(ow,{scope:n,value:r,disabled:i,textId:E,isSelected:l,onItemTextChange:u.useCallback(T=>{f(h=>{var w;return h||((w=T==null?void 0:T.textContent)!==null&&w!==void 0?w:"").trim()})},[])},u.createElement(es.ItemSlot,{scope:n,value:r,disabled:i,textValue:d},u.createElement(Fe.div,ie({role:"option","aria-labelledby":E,"data-highlighted":m?"":void 0,"aria-selected":l&&m,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:x,onFocus:Ie(s.onFocus,()=>p(!0)),onBlur:Ie(s.onBlur,()=>p(!1)),onPointerUp:Ie(s.onPointerUp,S),onPointerMove:Ie(s.onPointerMove,T=>{if(i){var h;(h=c.onItemLeave)===null||h===void 0||h.call(c)}else T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(s.onPointerLeave,T=>{if(T.currentTarget===document.activeElement){var h;(h=c.onItemLeave)===null||h===void 0||h.call(c)}}),onKeyDown:Ie(s.onKeyDown,T=>{var h;((h=c.searchRef)===null||h===void 0?void 0:h.current)!==""&&T.key===" "||(Bx.includes(T.key)&&S(),T.key===" "&&T.preventDefault())})}))))}),Qo="SelectItemText",aw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=xr(Qo,n),a=wr(Qo,n),c=iw(Qo,n),l=Yx(Qo,n),[d,f]=u.useState(null),m=Xe(t,T=>f(T),c.onItemTextChange,T=>{var h;return(h=a.itemTextRefCallback)===null||h===void 0?void 0:h.call(a,T,c.value,c.disabled)}),p=d==null?void 0:d.textContent,x=u.useMemo(()=>u.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:E,onNativeOptionRemove:S}=l;return Ot(()=>(E(x),()=>S(x)),[E,S,x]),u.createElement(u.Fragment,null,u.createElement(Fe.span,ie({id:c.textId},o,{ref:m})),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?en.createPortal(o.children,s.valueNode):null)}),Zu="SelectScrollUpButton",cw=u.forwardRef((e,t)=>{const n=wr(Zu,e.__scopeSelect),r=pc(Zu,e.__scopeSelect),[i,o]=u.useState(!1),s=Xe(t,r.onScrollButtonChange);return Ot(()=>{if(n.viewport&&n.isPositioned){let c=function(){const l=a.scrollTop>0;o(l)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.createElement(sh,ie({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}})):null}),Qu="SelectScrollDownButton",lw=u.forwardRef((e,t)=>{const n=wr(Qu,e.__scopeSelect),r=pc(Qu,e.__scopeSelect),[i,o]=u.useState(!1),s=Xe(t,r.onScrollButtonChange);return Ot(()=>{if(n.viewport&&n.isPositioned){let c=function(){const l=a.scrollHeight-a.clientHeight,d=Math.ceil(a.scrollTop)<l;o(d)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.createElement(sh,ie({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}})):null}),sh=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=wr("SelectScrollButton",n),s=u.useRef(null),a=ts(n),c=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Ot(()=>{var l;const d=a().find(f=>f.ref.current===document.activeElement);d==null||(l=d.ref.current)===null||l===void 0||l.scrollIntoView({block:"nearest"})},[a]),u.createElement(Fe.div,ie({"aria-hidden":!0},i,{ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ie(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Ie(i.onPointerMove,()=>{var l;(l=o.onItemLeave)===null||l===void 0||l.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Ie(i.onPointerLeave,()=>{c()})}))}),ah=u.forwardRef((e,t)=>{const{value:n,...r}=e,i=u.useRef(null),o=Xe(t,i),s=qi(n);return u.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[s,n]),u.createElement(Zi,{asChild:!0},u.createElement("select",ie({},r,{ref:o,defaultValue:n})))});ah.displayName="BubbleSelect";function ch(e){const t=Vt(e),n=u.useRef(""),r=u.useRef(0),i=u.useCallback(s=>{const a=n.current+s;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function lh(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=uw(e,Math.max(o,0));i.length===1&&(s=s.filter(l=>l!==n));const c=s.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function uw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const dw=Kx,fw=Xx,pw=qx,hw=Zx,mw=Qx,vw=nw,gw=sw,yw=aw,bw=cw,xw=lw;var ww=it({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var Ew=it({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var Cw=it({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),_w="_1kg30950";var Sw="ldkv8w2",Tw="ldkv8w1",$w="ldkv8w0",Rw="ldkv8w3";var Pw="yihd6a0",Iw=it({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"]]}),Aw="_18kp58y0";const wa=({formState:e,place:t,children:n})=>D.jsx("div",{className:$e(ww({state:e,place:t})),children:D.jsx(Nt,{textStyle:"body2",children:n})});wa.displayName="Addon";const hc=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",Xr=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:i,elementLeft:o,elementRight:s,errorMessage:a,isError:c,isDisabled:l,isValid:d,className:f,inputAreaClassName:m,onClick:p})=>{const x=!!t,E=!!n,S=!x&&E,T=x||E,h=!!i,w=!!r,_=!!o,$=!!s,M=!!a,O=hc({isError:c,isDisabled:l,isValid:d}),N=u.useCallback(()=>O==="disabled"?"$blackTypoMedium":O==="error"?"$redAccent1":O==="valid"?"$greenAccent1":"$blackTypoMedium",[O]),V=()=>c&&M?D.jsx(Nt,{textStyle:"caption",color:N(),children:a}):x&&typeof t=="string"?D.jsx(Nt,{textStyle:"caption",children:t}):x?t:null;return D.jsxs("div",{"data-test-id":"CT_Field_Container",className:$e(_w),onClick:p,children:[D.jsx("div",{className:$e(Cw({state:O}),f),children:D.jsxs(Rt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[h&&D.jsx(wa,{formState:O,place:"left",children:i}),_&&o,D.jsx("div",{className:$e(Pw,m),children:e}),$&&s,w&&D.jsx(wa,{formState:O,place:"right",children:r})]})}),(T||M)&&D.jsxs(Rt,{justifyContent:S?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[V(),E&&typeof n=="string"?D.jsx(Nt,{textStyle:"caption",children:n}):n]})]})};Xr.displayName="Field";Xr.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 kt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ea(e,t)}function mc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ea(e,t)}var Ca={exports:{}},Jo={exports:{}},Ze={};/** @license React v16.13.1
93
+ `)},Vx=0,Rr=[];function jx(e){var t=he.useRef([]),n=he.useRef([0,0]),r=he.useRef(),i=he.useState(Vx++)[0],o=he.useState(function(){return Jp()})[0],s=he.useRef(e);he.useEffect(function(){s.current=e},[e]),he.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var E=sx([e.lockRef.current],(e.shards||[]).map(Xu),!0).filter(Boolean);return E.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),E.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=he.useCallback(function(E,S){if("touches"in E&&E.touches.length===2)return!s.current.allowPinchZoom;var T=Zo(E),h=n.current,w="deltaX"in E?E.deltaX:h[0]-T[0],_="deltaY"in E?E.deltaY:h[1]-T[1],$,M=E.target,O=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in E&&O==="h"&&M.type==="range")return!1;var N=Ku(O,M);if(!N)return!0;if(N?$=O:($=O==="v"?"h":"v",N=Ku(O,M)),!N)return!1;if(!r.current&&"changedTouches"in E&&(w||_)&&(r.current=$),!$)return!0;var V=r.current||$;return Mx(V,S,E,V==="h"?w:_,!0)},[]),c=he.useCallback(function(E){var S=E;if(!(!Rr.length||Rr[Rr.length-1]!==o)){var T="deltaY"in S?zu(S):Zo(S),h=t.current.filter(function($){return $.name===S.type&&$.target===S.target&&kx($.delta,T)})[0];if(h&&h.should){S.cancelable&&S.preventDefault();return}if(!h){var w=(s.current.shards||[]).map(Xu).filter(Boolean).filter(function($){return $.contains(S.target)}),_=w.length>0?a(S,w[0]):!s.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),l=he.useCallback(function(E,S,T,h){var w={name:E,delta:S,target:T,should:h};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),d=he.useCallback(function(E){n.current=Zo(E),r.current=void 0},[]),f=he.useCallback(function(E){l(E.type,zu(E),E.target,a(E,e.lockRef.current))},[]),m=he.useCallback(function(E){l(E.type,Zo(E),E.target,a(E,e.lockRef.current))},[]);he.useEffect(function(){return Rr.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,$r),document.addEventListener("touchmove",c,$r),document.addEventListener("touchstart",d,$r),function(){Rr=Rr.filter(function(E){return E!==o}),document.removeEventListener("wheel",c,$r),document.removeEventListener("touchmove",c,$r),document.removeEventListener("touchstart",d,$r)}},[]);var p=e.removeScrollBar,x=e.inert;return he.createElement(he.Fragment,null,x?he.createElement(o,{styles:Nx(i)}):null,p?he.createElement($x,{gapMode:"margin"}):null)}const Lx=mx(Qp,jx);var rh=he.forwardRef(function(e,t){return he.createElement(Qi,Jt({},e,{ref:t,sideCar:Lx}))});rh.classNames=Qi.classNames;const oh=rh,Fx=[" ","Enter","ArrowUp","ArrowDown"],Bx=[" ","Enter"],Ji="Select",[es,ts,Hx]=Li(Ji),[zr,UI]=Xt(Ji,[Hx,Gi]),fc=Gi(),[Wx,xr]=zr(Ji),[Ux,Yx]=zr(Ji),Kx=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:l,name:d,autoComplete:f,disabled:m,required:p}=e,x=fc(t),[E,S]=u.useState(null),[T,h]=u.useState(null),[w,_]=u.useState(!1),$=Fi(l),[M=!1,O]=tn({prop:r,defaultProp:i,onChange:o}),[N,V]=tn({prop:s,defaultProp:a,onChange:c}),z=u.useRef(null),j=E?!!E.closest("form"):!0,[R,v]=u.useState(new Set),C=Array.from(R).map(I=>I.props.value).join(";");return u.createElement(Up,x,u.createElement(Wx,{required:p,scope:t,trigger:E,onTriggerChange:S,valueNode:T,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:$n(),value:N,onValueChange:V,open:M,onOpenChange:O,dir:$,triggerPointerDownPosRef:z,disabled:m},u.createElement(es.Provider,{scope:t},u.createElement(Ux,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(I=>{v(k=>new Set(k).add(I))},[]),onNativeOptionRemove:u.useCallback(I=>{v(k=>{const U=new Set(k);return U.delete(I),U})},[])},n)),j?u.createElement(ah,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:N,onChange:I=>V(I.target.value),disabled:m},N===void 0?u.createElement("option",{value:""}):null,Array.from(R)):null))},zx="SelectTrigger",Xx=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=fc(n),s=xr(zx,n),a=s.disabled||r,c=Xe(t,s.onTriggerChange),l=ts(n),[d,f,m]=ch(x=>{const E=l().filter(h=>!h.disabled),S=E.find(h=>h.value===s.value),T=lh(E,x,S);T!==void 0&&s.onValueChange(T.value)}),p=()=>{a||(s.onOpenChange(!0),m())};return u.createElement(Yp,ie({asChild:!0},o),u.createElement(Fe.button,ie({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":s.value===void 0?"":void 0},i,{ref:c,onClick:Ie(i.onClick,x=>{x.currentTarget.focus()}),onPointerDown:Ie(i.onPointerDown,x=>{const E=x.target;E.hasPointerCapture(x.pointerId)&&E.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(p(),s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:Ie(i.onKeyDown,x=>{const E=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(E&&x.key===" ")&&Fx.includes(x.key)&&(p(),x.preventDefault())})})))}),Gx="SelectValue",qx=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s,...a}=e,c=xr(Gx,n),{onValueNodeHasChildrenChange:l}=c,d=o!==void 0,f=Xe(t,c.onValueNodeChange);return Ot(()=>{l(d)},[l,d]),u.createElement(Fe.span,ie({},a,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&s!==void 0?s:o)}),Zx=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return u.createElement(Fe.span,ie({"aria-hidden":!0},i,{ref:t}),r||"▼")}),Br="SelectContent",Qx=u.forwardRef((e,t)=>{const n=xr(Br,e.__scopeSelect),[r,i]=u.useState();if(Ot(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?en.createPortal(u.createElement(ih,{scope:e.__scopeSelect},u.createElement(es.Slot,{scope:e.__scopeSelect},u.createElement("div",null,e.children))),o):null}return u.createElement(Jx,ie({},e,{ref:t}))}),_n=10,[ih,wr]=zr(Br),Jx=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:E,avoidCollisions:S,...T}=e,h=xr(Br,n),[w,_]=u.useState(null),[$,M]=u.useState(null),O=Xe(t,B=>_(B)),[N,V]=u.useState(null),[z,j]=u.useState(null),R=ts(n),[v,C]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(w)return Gp(w)},[w]),$p();const k=u.useCallback(B=>{const[H,...J]=R().map(Z=>Z.ref.current),[ee]=J.slice(-1),te=document.activeElement;for(const Z of B)if(Z===te||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===H&&$&&($.scrollTop=0),Z===ee&&$&&($.scrollTop=$.scrollHeight),Z==null||Z.focus(),document.activeElement!==te))return},[R,$]),U=u.useCallback(()=>k([N,w]),[k,N,w]);u.useEffect(()=>{v&&U()},[v,U]);const{onOpenChange:q,triggerPointerDownPosRef:ue}=h;u.useEffect(()=>{if(w){let B={x:0,y:0};const H=ee=>{var te,Z,ge,Ce;B={x:Math.abs(Math.round(ee.pageX)-((te=(Z=ue.current)===null||Z===void 0?void 0:Z.x)!==null&&te!==void 0?te:0)),y:Math.abs(Math.round(ee.pageY)-((ge=(Ce=ue.current)===null||Ce===void 0?void 0:Ce.y)!==null&&ge!==void 0?ge:0))}},J=ee=>{B.x<=10&&B.y<=10?ee.preventDefault():w.contains(ee.target)||q(!1),document.removeEventListener("pointermove",H),ue.current=null};return ue.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,q,ue]),u.useEffect(()=>{const B=()=>q(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[q]);const[W,L]=ch(B=>{const H=R().filter(te=>!te.disabled),J=H.find(te=>te.ref.current===document.activeElement),ee=lh(H,B,J);ee&&setTimeout(()=>ee.ref.current.focus())}),oe=u.useCallback((B,H,J)=>{const ee=!I.current&&!J;(h.value!==void 0&&h.value===H||ee)&&(V(B),ee&&(I.current=!0))},[h.value]),G=u.useCallback(()=>w==null?void 0:w.focus(),[w]),X=u.useCallback((B,H,J)=>{const ee=!I.current&&!J;(h.value!==void 0&&h.value===H||ee)&&j(B)},[h.value]),ne=r==="popper"?Gu:ew,ae=ne===Gu?{side:a,sideOffset:c,align:l,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:x,hideWhenDetached:E,avoidCollisions:S}:{};return u.createElement(ih,{scope:n,content:w,viewport:$,onViewportChange:M,itemRefCallback:oe,selectedItem:N,onItemLeave:G,itemTextRefCallback:X,focusSelectedItem:U,selectedItemText:z,position:r,isPositioned:v,searchRef:W},u.createElement(oh,{as:Lr,allowPinchZoom:!0},u.createElement(Rp,{asChild:!0,trapped:h.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:Ie(i,B=>{var H;(H=h.trigger)===null||H===void 0||H.focus({preventScroll:!0}),B.preventDefault()})},u.createElement(Yi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>h.onOpenChange(!1)},u.createElement(ne,ie({role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:B=>B.preventDefault()},T,ae,{onPlaced:()=>C(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:Ie(T.onKeyDown,B=>{const H=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!H&&B.key.length===1&&L(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let ee=R().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(B.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const te=B.target,Z=ee.indexOf(te);ee=ee.slice(Z+1)}setTimeout(()=>k(ee)),B.preventDefault()}})}))))))}),ew=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=xr(Br,n),s=wr(Br,n),[a,c]=u.useState(null),[l,d]=u.useState(null),f=Xe(t,O=>d(O)),m=ts(n),p=u.useRef(!1),x=u.useRef(!0),{viewport:E,selectedItem:S,selectedItemText:T,focusSelectedItem:h}=s,w=u.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&l&&E&&S&&T){const O=o.trigger.getBoundingClientRect(),N=l.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),z=T.getBoundingClientRect();if(o.dir!=="rtl"){const te=z.left-N.left,Z=V.left-te,ge=O.left-Z,Ce=O.width+ge,Re=Math.max(Ce,N.width),Pe=window.innerWidth-_n,Te=Ru(Z,[_n,Pe-Re]);a.style.minWidth=Ce+"px",a.style.left=Te+"px"}else{const te=N.right-z.right,Z=window.innerWidth-V.right-te,ge=window.innerWidth-O.right-Z,Ce=O.width+ge,Re=Math.max(Ce,N.width),Pe=window.innerWidth-_n,Te=Ru(Z,[_n,Pe-Re]);a.style.minWidth=Ce+"px",a.style.right=Te+"px"}const j=m(),R=window.innerHeight-_n*2,v=E.scrollHeight,C=window.getComputedStyle(l),I=parseInt(C.borderTopWidth,10),k=parseInt(C.paddingTop,10),U=parseInt(C.borderBottomWidth,10),q=parseInt(C.paddingBottom,10),ue=I+k+v+q+U,W=Math.min(S.offsetHeight*5,ue),L=window.getComputedStyle(E),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),X=O.top+O.height/2-_n,ne=R-X,ae=S.offsetHeight/2,B=S.offsetTop+ae,H=I+k+B,J=ue-H;if(H<=X){const te=S===j[j.length-1].ref.current;a.style.bottom="0px";const Z=l.clientHeight-E.offsetTop-E.offsetHeight,ge=Math.max(ne,ae+(te?G:0)+Z+U),Ce=H+ge;a.style.height=Ce+"px"}else{const te=S===j[0].ref.current;a.style.top="0px";const ge=Math.max(X,I+E.offsetTop+(te?oe:0)+ae)+J;a.style.height=ge+"px",E.scrollTop=H-X+E.offsetTop}a.style.margin=`${_n}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,o.trigger,o.valueNode,a,l,E,S,T,o.dir,r]);Ot(()=>w(),[w]);const[_,$]=u.useState();Ot(()=>{l&&$(window.getComputedStyle(l).zIndex)},[l]);const M=u.useCallback(O=>{O&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return u.createElement(tw,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:M},u.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_}},u.createElement(Fe.div,ie({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Gu=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=_n,...o}=e,s=fc(n);return u.createElement(Kp,ie({},s,o,{ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}}))}),[tw,pc]=zr(Br,{}),qu="SelectViewport",nw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=wr(qu,n),o=pc(qu,n),s=Xe(t,i.onViewportChange),a=u.useRef(0);return u.createElement(u.Fragment,null,u.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}"}}),u.createElement(es.Slot,{scope:n},u.createElement(Fe.div,ie({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ie(r.onScroll,c=>{const l=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const m=Math.abs(a.current-l.scrollTop);if(m>0){const p=window.innerHeight-_n*2,x=parseFloat(d.style.minHeight),E=parseFloat(d.style.height),S=Math.max(x,E);if(S<p){const T=S+m,h=Math.min(p,T),w=T-h;d.style.height=h+"px",d.style.bottom==="0px"&&(l.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),rw="SelectGroup";zr(rw);const xa="SelectItem",[ow,iw]=zr(xa),sw=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=xr(xa,n),c=wr(xa,n),l=a.value===r,[d,f]=u.useState(o??""),[m,p]=u.useState(!1),x=Xe(t,T=>{var h;return(h=c.itemRefCallback)===null||h===void 0?void 0:h.call(c,T,r,i)}),E=$n(),S=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};return u.createElement(ow,{scope:n,value:r,disabled:i,textId:E,isSelected:l,onItemTextChange:u.useCallback(T=>{f(h=>{var w;return h||((w=T==null?void 0:T.textContent)!==null&&w!==void 0?w:"").trim()})},[])},u.createElement(es.ItemSlot,{scope:n,value:r,disabled:i,textValue:d},u.createElement(Fe.div,ie({role:"option","aria-labelledby":E,"data-highlighted":m?"":void 0,"aria-selected":l&&m,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:x,onFocus:Ie(s.onFocus,()=>p(!0)),onBlur:Ie(s.onBlur,()=>p(!1)),onPointerUp:Ie(s.onPointerUp,S),onPointerMove:Ie(s.onPointerMove,T=>{if(i){var h;(h=c.onItemLeave)===null||h===void 0||h.call(c)}else T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(s.onPointerLeave,T=>{if(T.currentTarget===document.activeElement){var h;(h=c.onItemLeave)===null||h===void 0||h.call(c)}}),onKeyDown:Ie(s.onKeyDown,T=>{var h;((h=c.searchRef)===null||h===void 0?void 0:h.current)!==""&&T.key===" "||(Bx.includes(T.key)&&S(),T.key===" "&&T.preventDefault())})}))))}),Qo="SelectItemText",aw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=xr(Qo,n),a=wr(Qo,n),c=iw(Qo,n),l=Yx(Qo,n),[d,f]=u.useState(null),m=Xe(t,T=>f(T),c.onItemTextChange,T=>{var h;return(h=a.itemTextRefCallback)===null||h===void 0?void 0:h.call(a,T,c.value,c.disabled)}),p=d==null?void 0:d.textContent,x=u.useMemo(()=>u.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:E,onNativeOptionRemove:S}=l;return Ot(()=>(E(x),()=>S(x)),[E,S,x]),u.createElement(u.Fragment,null,u.createElement(Fe.span,ie({id:c.textId},o,{ref:m})),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?en.createPortal(o.children,s.valueNode):null)}),Zu="SelectScrollUpButton",cw=u.forwardRef((e,t)=>{const n=wr(Zu,e.__scopeSelect),r=pc(Zu,e.__scopeSelect),[i,o]=u.useState(!1),s=Xe(t,r.onScrollButtonChange);return Ot(()=>{if(n.viewport&&n.isPositioned){let c=function(){const l=a.scrollTop>0;o(l)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.createElement(sh,ie({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}})):null}),Qu="SelectScrollDownButton",lw=u.forwardRef((e,t)=>{const n=wr(Qu,e.__scopeSelect),r=pc(Qu,e.__scopeSelect),[i,o]=u.useState(!1),s=Xe(t,r.onScrollButtonChange);return Ot(()=>{if(n.viewport&&n.isPositioned){let c=function(){const l=a.scrollHeight-a.clientHeight,d=Math.ceil(a.scrollTop)<l;o(d)};const a=n.viewport;return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?u.createElement(sh,ie({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}})):null}),sh=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=wr("SelectScrollButton",n),s=u.useRef(null),a=ts(n),c=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Ot(()=>{var l;const d=a().find(f=>f.ref.current===document.activeElement);d==null||(l=d.ref.current)===null||l===void 0||l.scrollIntoView({block:"nearest"})},[a]),u.createElement(Fe.div,ie({"aria-hidden":!0},i,{ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ie(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Ie(i.onPointerMove,()=>{var l;(l=o.onItemLeave)===null||l===void 0||l.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Ie(i.onPointerLeave,()=>{c()})}))}),ah=u.forwardRef((e,t)=>{const{value:n,...r}=e,i=u.useRef(null),o=Xe(t,i),s=qi(n);return u.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[s,n]),u.createElement(Zi,{asChild:!0},u.createElement("select",ie({},r,{ref:o,defaultValue:n})))});ah.displayName="BubbleSelect";function ch(e){const t=Vt(e),n=u.useRef(""),r=u.useRef(0),i=u.useCallback(s=>{const a=n.current+s;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function lh(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=uw(e,Math.max(o,0));i.length===1&&(s=s.filter(l=>l!==n));const c=s.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function uw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const dw=Kx,fw=Xx,pw=qx,hw=Zx,mw=Qx,vw=nw,gw=sw,yw=aw,bw=cw,xw=lw;var ww=it({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var Ew=it({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var Cw=it({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),_w="_1kg30950";var Sw="ldkv8w2",Tw="ldkv8w1",$w="ldkv8w0",Rw="ldkv8w3";var Pw="yihd6a0",Iw=it({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"]]}),Aw="_18kp58y0";const wa=({formState:e,place:t,children:n})=>D.jsx("div",{className:Se(ww({state:e,place:t})),children:D.jsx(Nt,{textStyle:"body2",children:n})});wa.displayName="Addon";const hc=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",Xr=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:i,elementLeft:o,elementRight:s,errorMessage:a,isError:c,isDisabled:l,isValid:d,className:f,inputAreaClassName:m,onClick:p})=>{const x=!!t,E=!!n,S=!x&&E,T=x||E,h=!!i,w=!!r,_=!!o,$=!!s,M=!!a,O=hc({isError:c,isDisabled:l,isValid:d}),N=u.useCallback(()=>O==="disabled"?"$blackTypoMedium":O==="error"?"$redAccent1":O==="valid"?"$greenAccent1":"$blackTypoMedium",[O]),V=()=>c&&M?D.jsx(Nt,{textStyle:"caption",color:N(),children:a}):x&&typeof t=="string"?D.jsx(Nt,{textStyle:"caption",children:t}):x?t:null;return D.jsxs("div",{"data-test-id":"CT_Field_Container",className:Se(_w),onClick:p,children:[D.jsx("div",{className:Se(Cw({state:O}),f),children:D.jsxs(Rt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[h&&D.jsx(wa,{formState:O,place:"left",children:i}),_&&o,D.jsx("div",{className:Se(Pw,m),children:e}),$&&s,w&&D.jsx(wa,{formState:O,place:"right",children:r})]})}),(T||M)&&D.jsxs(Rt,{justifyContent:S?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[V(),E&&typeof n=="string"?D.jsx(Nt,{textStyle:"caption",children:n}):n]})]})};Xr.displayName="Field";Xr.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 kt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ea(e,t)}function mc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ea(e,t)}var Ca={exports:{}},Jo={exports:{}},Ze={};/** @license React v16.13.1
94
94
  * react-is.production.min.js
95
95
  *
96
96
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -109,7 +109,7 @@ object-assign
109
109
  (c) Sindre Sorhus
110
110
  @license MIT
111
111
  */var Vs,nd;function Mw(){if(nd)return Vs;nd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vs=i()?Object.assign:function(o,s){for(var a,c=r(o),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){l=e(a);for(var m=0;m<l.length;m++)n.call(a,l[m])&&(c[l[m]]=a[l[m]])}}return c},Vs}var js,rd;function vc(){if(rd)return js;rd=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return js=e,js}var Ls,od;function dh(){return od||(od=1,Ls=Function.call.bind(Object.prototype.hasOwnProperty)),Ls}var Fs,id;function kw(){if(id)return Fs;id=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=vc(),n={},r=dh();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in o)if(r(o,d)){var f;try{if(typeof o[d]!="function"){var m=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=o[d](s,d,c,a,null,t)}catch(x){f=x}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+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 p=l?l():"";e("Failed "+a+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Fs=i,Fs}var Bs,sd;function Nw(){if(sd)return Bs;sd=1;var e=uh(),t=Mw(),n=vc(),r=dh(),i=kw(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Bs=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(W){var L=W&&(l&&W[l]||W[d]);if(typeof L=="function")return L}var m="<<anonymous>>",p={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:h(),arrayOf:w,element:_(),elementType:$(),instanceOf:M,node:z(),objectOf:N,oneOf:O,oneOfType:V,shape:R,exact:v};function x(W,L){return W===L?W!==0||1/W===1/L:W!==W&&L!==L}function E(W,L){this.message=W,this.data=L&&typeof L=="object"?L:{},this.stack=""}E.prototype=Error.prototype;function S(W){if(process.env.NODE_ENV!=="production")var L={},oe=0;function G(ne,ae,B,H,J,ee,te){if(H=H||m,ee=ee||B,te!==n){if(c){var Z=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 Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=H+":"+B;!L[ge]&&oe<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+H+"`. 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[ge]=!0,oe++)}}return ae[B]==null?ne?ae[B]===null?new E("The "+J+" `"+ee+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new E("The "+J+" `"+ee+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:W(ae,B,H,J,ee)}var X=G.bind(null,!1);return X.isRequired=G.bind(null,!0),X}function T(W){function L(oe,G,X,ne,ae,B){var H=oe[G],J=k(H);if(J!==W){var ee=U(H);return new E("Invalid "+ne+" `"+ae+"` of type "+("`"+ee+"` supplied to `"+X+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return S(L)}function h(){return S(s)}function w(W){function L(oe,G,X,ne,ae){if(typeof W!="function")return new E("Property `"+ae+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var B=oe[G];if(!Array.isArray(B)){var H=k(B);return new E("Invalid "+ne+" `"+ae+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an array."))}for(var J=0;J<B.length;J++){var ee=W(B,J,X,ne,ae+"["+J+"]",n);if(ee instanceof Error)return ee}return null}return S(L)}function _(){function W(L,oe,G,X,ne){var ae=L[oe];if(!a(ae)){var B=k(ae);return new E("Invalid "+X+" `"+ne+"` of type "+("`"+B+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return S(W)}function $(){function W(L,oe,G,X,ne){var ae=L[oe];if(!e.isValidElementType(ae)){var B=k(ae);return new E("Invalid "+X+" `"+ne+"` of type "+("`"+B+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return S(W)}function M(W){function L(oe,G,X,ne,ae){if(!(oe[G]instanceof W)){var B=W.name||m,H=ue(oe[G]);return new E("Invalid "+ne+" `"+ae+"` of type "+("`"+H+"` supplied to `"+X+"`, expected ")+("instance of `"+B+"`."))}return null}return S(L)}function O(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function L(oe,G,X,ne,ae){for(var B=oe[G],H=0;H<W.length;H++)if(x(B,W[H]))return null;var J=JSON.stringify(W,function(te,Z){var ge=U(Z);return ge==="symbol"?String(Z):Z});return new E("Invalid "+ne+" `"+ae+"` of value `"+String(B)+"` "+("supplied to `"+X+"`, expected one of "+J+"."))}return S(L)}function N(W){function L(oe,G,X,ne,ae){if(typeof W!="function")return new E("Property `"+ae+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var B=oe[G],H=k(B);if(H!=="object")return new E("Invalid "+ne+" `"+ae+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an object."));for(var J in B)if(r(B,J)){var ee=W(B,J,X,ne,ae+"."+J,n);if(ee instanceof Error)return ee}return null}return S(L)}function V(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var L=0;L<W.length;L++){var oe=W[L];if(typeof oe!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(oe)+" at index "+L+"."),s}function G(X,ne,ae,B,H){for(var J=[],ee=0;ee<W.length;ee++){var te=W[ee],Z=te(X,ne,ae,B,H,n);if(Z==null)return null;Z.data&&r(Z.data,"expectedType")&&J.push(Z.data.expectedType)}var ge=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new E("Invalid "+B+" `"+H+"` supplied to "+("`"+ae+"`"+ge+"."))}return S(G)}function z(){function W(L,oe,G,X,ne){return C(L[oe])?null:new E("Invalid "+X+" `"+ne+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return S(W)}function j(W,L,oe,G,X){return new E((W||"React class")+": "+L+" type `"+oe+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function R(W){function L(oe,G,X,ne,ae){var B=oe[G],H=k(B);if(H!=="object")return new E("Invalid "+ne+" `"+ae+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));for(var J in W){var ee=W[J];if(typeof ee!="function")return j(X,ne,ae,J,U(ee));var te=ee(B,J,X,ne,ae+"."+J,n);if(te)return te}return null}return S(L)}function v(W){function L(oe,G,X,ne,ae){var B=oe[G],H=k(B);if(H!=="object")return new E("Invalid "+ne+" `"+ae+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));var J=t({},oe[G],W);for(var ee in J){var te=W[ee];if(r(W,ee)&&typeof te!="function")return j(X,ne,ae,ee,U(te));if(!te)return new E("Invalid "+ne+" `"+ae+"` key `"+ee+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(oe[G],null," ")+`
112
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var Z=te(B,ee,X,ne,ae+"."+ee,n);if(Z)return Z}return null}return S(L)}function C(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(C);if(W===null||a(W))return!0;var L=f(W);if(L){var oe=L.call(W),G;if(L!==W.entries){for(;!(G=oe.next()).done;)if(!C(G.value))return!1}else for(;!(G=oe.next()).done;){var X=G.value;if(X&&!C(X[1]))return!1}}else return!1;return!0;default:return!1}}function I(W,L){return W==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function k(W){var L=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":I(L,W)?"symbol":L}function U(W){if(typeof W>"u"||W===null)return""+W;var L=k(W);if(L==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return L}function q(W){var L=U(W);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ue(W){return!W.constructor||!W.constructor.name?m:W.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},Bs}var Hs,ad;function Vw(){if(ad)return Hs;ad=1;var e=vc();function t(){}function n(){}return n.resetWarningCache=t,Hs=function(){function r(s,a,c,l,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 i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Hs}if(process.env.NODE_ENV!=="production"){var jw=uh(),Lw=!0;Ca.exports=Nw()(jw.isElement,Lw)}else Ca.exports=Vw()();var Fw=Ca.exports;const K=dp(Fw);function Bw(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Hw(e,t){e.classList?e.classList.add(t):Bw(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function cd(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ww(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=cd(e.className,t):e.setAttribute("class",cd(e.className&&e.className.baseVal||"",t))}const ld={disabled:!1};var Uw=process.env.NODE_ENV!=="production"?K.oneOfType([K.number,K.shape({enter:K.number,exit:K.number,appear:K.number}).isRequired]):null,Yw=process.env.NODE_ENV!=="production"?K.oneOfType([K.string,K.shape({enter:K.string,exit:K.string,active:K.string}),K.shape({enter:K.string,enterDone:K.string,enterActive:K.string,exit:K.string,exitDone:K.string,exitActive:K.string})]):null;const fh=u.createContext(null);var ph=function(t){return t.scrollTop},ao="unmounted",lr="exited",ur="entering",Ir="entered",_a="exiting",Mn=function(e){mc(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?a?(c=lr,o.appearStatus=ur):c=Ir:r.unmountOnExit||r.mountOnEnter?c=ao:c=lr,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===ao?{status:lr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==ur&&s!==Ir&&(o=ur):(s===ur||s===Ir)&&(o=_a)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ur){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:en.findDOMNode(this);s&&ph(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lr&&this.setState({status:ao})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,c=this.props.nodeRef?[a]:[en.findDOMNode(this),a],l=c[0],d=c[1],f=this.getTimeouts(),m=a?f.appear:f.enter;if(!i&&!s||ld.disabled){this.safeSetState({status:Ir},function(){o.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:ur},function(){o.props.onEntering(l,d),o.onTransitionEnd(m,function(){o.safeSetState({status:Ir},function(){o.props.onEntered(l,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:en.findDOMNode(this);if(!o||ld.disabled){this.safeSetState({status:lr},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:_a},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:lr},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:en.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=c[0],d=c[1];this.props.addEndListener(l,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ao)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=kt(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return u.createElement(fh.Provider,{value:null},typeof s=="function"?s(i,a):u.cloneElement(u.Children.only(s),a))},t}(u.Component);Mn.contextType=fh;Mn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:K.shape({current:typeof Element>"u"?K.any:function(e,t,n,r,i,o){var s=e[t];return K.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:K.oneOfType([K.func.isRequired,K.element.isRequired]).isRequired,in:K.bool,mountOnEnter:K.bool,unmountOnExit:K.bool,appear:K.bool,enter:K.bool,exit:K.bool,timeout:function(t){var n=Uw;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:K.func,onEnter:K.func,onEntering:K.func,onEntered:K.func,onExit:K.func,onExiting:K.func,onExited:K.func}:{};function Pr(){}Mn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pr,onEntering:Pr,onEntered:Pr,onExit:Pr,onExiting:Pr,onExited:Pr};Mn.UNMOUNTED=ao;Mn.EXITED=lr;Mn.ENTERING=ur;Mn.ENTERED=Ir;Mn.EXITING=_a;const hh=Mn;var Kw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Hw(t,r)})},Ws=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Ww(t,r)})},gc=function(e){mc(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,c)},r.onEntering=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(a,c)},r.onEntered=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(a,c)},r.onExit=function(a){var c=r.resolveArguments(a),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var c=r.resolveArguments(a),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var c=r.resolveArguments(a),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,c){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,c]},r.getClassNames=function(a){var c=r.props.classNames,l=typeof c=="string",d=l&&c?c+"-":"",f=l?""+d+a:c[a],m=l?f+"-active":c[a+"Active"],p=l?f+"-done":c[a+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(i,o,s){var a=this.getClassNames(o)[s+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;o==="appear"&&s==="done"&&l&&(a+=" "+l),s==="active"&&i&&ph(i),a&&(this.appliedClasses[o][s]=a,Kw(i,a))},n.removeClasses=function(i,o){var s=this.appliedClasses[o],a=s.base,c=s.active,l=s.done;this.appliedClasses[o]={},a&&Ws(i,a),c&&Ws(i,c),l&&Ws(i,l)},n.render=function(){var i=this.props;i.classNames;var o=kt(i,["classNames"]);return u.createElement(hh,ie({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(u.Component);gc.defaultProps={classNames:""};gc.propTypes=process.env.NODE_ENV!=="production"?ie({},hh.propTypes,{classNames:Yw,onEnter:K.func,onEntering:K.func,onEntered:K.func,onExit:K.func,onExiting:K.func,onExited:K.func}):{};const zw=gc;function ud(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ei=it({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const Xw=u.forwardRef(({isOpen:e,onClose:t},n)=>{const r=u.useRef(null),i=n||r;return D.jsx(zw,{in:e,nodeRef:i,timeout:400,unmountOnExit:!0,classNames:{enter:$e(ei({animate:"in"})),enterDone:$e(ei({animate:"in"})),exit:$e(ei({animate:"out"})),exitDone:$e(ei({animate:"out"}))},children:D.jsx("div",{ref:i,"data-test-id":"vds-BS-overlay",onClick:t})})}),mh=e=>{u.useEffect(e,[e])},ns=({children:e,...t})=>{const[n,r]=u.useState(!1);return mh(()=>{r(!0)}),n?D.jsx(tx,{...t,children:e}):null};var Gw="_185nehu0",qw=it({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const Zw=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(gw,{...n,ref:r,className:$e(Gw),children:D.jsx(yw,{children:e})})),yc=u.forwardRef(({options:e,position:t,placeholder:n,...r},i)=>D.jsx(Xr,{children:D.jsxs(dw,{...r,children:[D.jsxs(fw,{ref:i,className:$e(qw()),"data-test-id":r["data-test-id"],children:[D.jsx(pw,{placeholder:n}),D.jsx(hw,{className:"SelectIcon",children:D.jsx(wo,{})})]}),D.jsx(ns,{children:D.jsxs(mw,{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:[D.jsx(bw,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:D.jsx(oc,{height:15,width:15})}),D.jsx(vw,{className:"SelectViewport",children:e.map(({label:o,value:s})=>D.jsx(Zw,{value:s,children:o},s))}),D.jsx(xw,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:D.jsx(wo,{height:15,width:15})})]})})]})}));yc.displayName="BaseSelect";yc.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};const bc=u.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rs=u.createContext({}),os=u.createContext(null),is=typeof document<"u",ss=is?u.useLayoutEffect:u.useEffect,vh=u.createContext({strict:!1});function Qw(e,t,n,r){const{visualElement:i}=u.useContext(rs),o=u.useContext(vh),s=u.useContext(os),a=u.useContext(bc).reducedMotion,c=u.useRef();r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;u.useInsertionEffect(()=>{l&&l.update(n,s)});const d=u.useRef(!!window.HandoffAppearAnimations);return ss(()=>{l&&(l.render(),d.current&&l.animationState&&l.animationState.animateChanges())}),u.useEffect(()=>{l&&(l.updateFeatures(),!d.current&&l.animationState&&l.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),l}function Or(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Jw(e,t,n){return u.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Or(n)&&(n.current=r))},[t])}function Co(e){return typeof e=="string"||Array.isArray(e)}function as(e){return typeof e=="object"&&typeof e.start=="function"}const xc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wc=["initial",...xc];function cs(e){return as(e.animate)||wc.some(t=>Co(e[t]))}function gh(e){return!!(cs(e)||e.variants)}function e1(e,t){if(cs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Co(n)?n:void 0,animate:Co(r)?r:void 0}}return e.inherit!==!1?t:{}}function t1(e){const{initial:t,animate:n}=e1(e,u.useContext(rs));return u.useMemo(()=>({initial:t,animate:n}),[dd(t),dd(n)])}function dd(e){return Array.isArray(e)?e.join(" "):e}const fd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_o={};for(const e in fd)_o[e]={isEnabled:t=>fd[e].some(n=>!!t[n])};function n1(e){for(const t in e)_o[t]={..._o[t],...e[t]}}const Ec=u.createContext({}),yh=u.createContext({}),r1=Symbol.for("motionComponentSymbol");function o1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&n1(e);function o(a,c){let l;const d={...u.useContext(bc),...a,layoutId:i1(a)},{isStatic:f}=d,m=t1(a),p=r(a,f);if(!f&&is){m.visualElement=Qw(i,p,d,t);const x=u.useContext(yh),E=u.useContext(vh).strict;m.visualElement&&(l=m.visualElement.loadFeatures(d,E,e,x))}return he.createElement(rs.Provider,{value:m},l&&m.visualElement?he.createElement(l,{visualElement:m.visualElement,...d}):null,n(i,a,Jw(p,m.visualElement,c),p,f,m.visualElement))}const s=u.forwardRef(o);return s[r1]=i,s}function i1({layoutId:e}){const t=u.useContext(Ec).id;return t&&e!==void 0?t+"-"+e:e}function s1(e){function t(r,i={}){return o1(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const a1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Cc(e){return typeof e!="string"||e.includes("-")?!1:!!(a1.indexOf(e)>-1||/[A-Z]/.test(e))}const _i={};function c1(e){Object.assign(_i,e)}const Ao=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Er=new Set(Ao);function bh(e,{layout:t,layoutId:n}){return Er.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const Dt=e=>!!(e&&e.getVelocity),l1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},u1=Ao.length;function d1(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<u1;s++){const a=Ao[s];if(e[a]!==void 0){const c=l1[a]||a;o+=`${c}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const xh=e=>t=>typeof t=="string"&&t.startsWith(e),wh=xh("--"),Sa=xh("var(--"),f1=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,p1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>Math.min(Math.max(n,e),t),Cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uo={...Cr,transform:e=>Zn(0,1,e)},ti={...Cr,default:1},fo=e=>Math.round(e*1e5)/1e5,ls=/(-)?([\d]*\.?[\d])+/g,Eh=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,h1=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oo(e){return typeof e=="string"}const Do=e=>({test:t=>Oo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wn=Do("deg"),vn=Do("%"),Oe=Do("px"),m1=Do("vh"),v1=Do("vw"),pd={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},hd={...Cr,transform:Math.round},Ch={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,radius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,size:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,rotate:Wn,rotateX:Wn,rotateY:Wn,rotateZ:Wn,scale:ti,scaleX:ti,scaleY:ti,scaleZ:ti,skew:Wn,skewX:Wn,skewY:Wn,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:uo,originX:pd,originY:pd,originZ:Oe,zIndex:hd,fillOpacity:uo,strokeOpacity:uo,numOctaves:hd};function _c(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let c=!1,l=!1,d=!0;for(const f in t){const m=t[f];if(wh(f)){o[f]=m;continue}const p=Ch[f],x=p1(m,p);if(Er.has(f)){if(c=!0,s[f]=x,!d)continue;m!==(p.default||0)&&(d=!1)}else f.startsWith("origin")?(l=!0,a[f]=x):i[f]=x}if(t.transform||(c||r?i.transform=d1(e.transform,n,d,r):i.transform&&(i.transform="none")),l){const{originX:f="50%",originY:m="50%",originZ:p=0}=a;i.transformOrigin=`${f} ${m} ${p}`}}const Sc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _h(e,t,n){for(const r in t)!Dt(t[r])&&!bh(r,n)&&(e[r]=t[r])}function g1({transformTemplate:e},t,n){return u.useMemo(()=>{const r=Sc();return _c(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function y1(e,t,n){const r=e.style||{},i={};return _h(i,r,e),Object.assign(i,g1(e,t,n)),e.transformValues?e.transformValues(i):i}function b1(e,t,n){const r={},i=y1(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const x1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Si(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||x1.has(e)}let Sh=e=>!Si(e);function w1(e){e&&(Sh=t=>t.startsWith("on")?!Si(t):e(t))}try{w1(require("@emotion/is-prop-valid").default)}catch{}function E1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Sh(i)||n===!0&&Si(i)||!t&&!Si(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function md(e,t,n){return typeof e=="string"?e:Oe.transform(t+n*e)}function C1(e,t,n){const r=md(t,e.x,e.width),i=md(n,e.y,e.height);return`${r} ${i}`}const _1={offset:"stroke-dashoffset",array:"stroke-dasharray"},S1={offset:"strokeDashoffset",array:"strokeDasharray"};function T1(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_1:S1;e[o.offset]=Oe.transform(-r);const s=Oe.transform(t),a=Oe.transform(n);e[o.array]=`${s} ${a}`}function Tc(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...l},d,f,m){if(_c(e,l,d,m),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:x,dimensions:E}=e;p.transform&&(E&&(x.transform=p.transform),delete p.transform),E&&(i!==void 0||o!==void 0||x.transform)&&(x.transformOrigin=C1(E,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&T1(p,s,a,c,!1)}const Th=()=>({...Sc(),attrs:{}}),$c=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $1(e,t,n,r){const i=u.useMemo(()=>{const o=Th();return Tc(o,t,{enableHardwareAcceleration:!1},$c(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};_h(o,e.style,e),i.style={...o,...i.style}}return i}function R1(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Cc(n)?$1:b1)(r,o,s,n),d={...E1(r,typeof n=="string",e),...c,ref:i},{children:f}=r,m=u.useMemo(()=>Dt(f)?f.get():f,[f]);return u.createElement(n,{...d,children:m})}}const Rc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function $h(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Rh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ph(e,t,n,r){$h(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Rh.has(i)?i:Rc(i),t.attrs[i])}function Pc(e,t){const{style:n}=e,r={};for(const i in n)(Dt(n[i])||t.style&&Dt(t.style[i])||bh(i,e))&&(r[i]=n[i]);return r}function Ih(e,t){const n=Pc(e,t);for(const r in e)if(Dt(e[r])||Dt(t[r])){const i=Ao.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Ic(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function us(e){const t=u.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ti=e=>Array.isArray(e),P1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),I1=e=>Ti(e)?e[e.length-1]||0:e;function pi(e){const t=Dt(e)?e.get():e;return P1(t)?t.toValue():t}function A1({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:O1(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Ah=e=>(t,n)=>{const r=u.useContext(rs),i=u.useContext(os),o=()=>A1(e,t,r,i);return n?o():us(o)};function O1(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=pi(o[m]);let{initial:s,animate:a}=e;const c=cs(e),l=gh(e);t&&l&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const f=d?a:s;return f&&typeof f!="boolean"&&!as(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const x=Ic(e,p);if(!x)return;const{transitionEnd:E,transition:S,...T}=x;for(const h in T){let w=T[h];if(Array.isArray(w)){const _=d?w.length-1:0;w=w[_]}w!==null&&(i[h]=w)}for(const h in E)i[h]=E[h]}),i}const mt=e=>e;function D1(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,l=!1,d=!1)=>{const f=d&&i,m=f?t:n;return l&&s.add(c),m.indexOf(c)===-1&&(m.push(c),f&&i&&(r=t.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let l=0;l<r;l++){const d=t[l];d(c),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(c))}};return a}const ni=["prepare","read","update","preRender","render","postRender"],M1=40;function k1(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=ni.reduce((f,m)=>(f[m]=D1(()=>n=!0),f),{}),s=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,M1),1),i.timestamp=f,i.isProcessing=!0,ni.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:ni.reduce((f,m)=>{const p=o[m];return f[m]=(x,E=!1,S=!1)=>(n||c(),p.schedule(x,E,S)),f},{}),cancel:f=>ni.forEach(m=>o[m].cancel(f)),state:i,steps:o}}const{schedule:ot,cancel:an,state:At,steps:Us}=k1(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0),N1={useVisualState:Ah({scrapeMotionValuesFromProps:Ih,createRenderState:Th,onMount:(e,t,{renderState:n,latestValues:r})=>{ot.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ot.render(()=>{Tc(n,r,{enableHardwareAcceleration:!1},$c(t.tagName),e.transformTemplate),Ph(t,n)})}})},V1={useVisualState:Ah({scrapeMotionValuesFromProps:Pc,createRenderState:Sc})};function j1(e,{forwardMotionProps:t=!1},n,r){return{...Cc(e)?N1:V1,preloadedFeatures:n,useRender:R1(t),createVisualElement:r,Component:e}}function Sn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Oh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ds(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const L1=e=>t=>Oh(t)&&e(t,ds(t));function Rn(e,t,n,r){return Sn(e,t,L1(n),r)}const F1=(e,t)=>n=>t(e(n)),Kn=(...e)=>e.reduce(F1);function Dh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const vd=Dh("dragHorizontal"),gd=Dh("dragVertical");function Mh(e){let t=!1;if(e==="y")t=gd();else if(e==="x")t=vd();else{const n=vd(),r=gd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function kh(){const e=Mh(!0);return e?(e(),!1):!0}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function yd(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||kh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ot.update(()=>a[r](o,s))};return Rn(e.current,n,i,{passive:!e.getProps()[r]})}class B1 extends tr{mount(){this.unmount=Kn(yd(this.node,!0),yd(this.node,!1))}unmount(){}}class H1 extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Kn(Sn(this.node.current,"focus",()=>this.onFocus()),Sn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nh=(e,t)=>t?e===t?!0:Nh(e,t.parentElement):!1;function Ys(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ds(n))}class W1 extends tr{constructor(){super(...arguments),this.removeStartListeners=mt,this.removeEndListeners=mt,this.removeAccessibleListeners=mt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Rn(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:d}=this.node.getProps();ot.update(()=>{Nh(this.node.current,a.target)?l&&l(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=Rn(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Kn(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ys("up",(c,l)=>{const{onTap:d}=this.node.getProps();d&&ot.update(()=>d(c,l))})};this.removeEndListeners(),this.removeEndListeners=Sn(this.node.current,"keyup",s),Ys("down",(a,c)=>{this.startPress(a,c)})},n=Sn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ys("cancel",(o,s)=>this.cancelPress(o,s))},i=Sn(this.node.current,"blur",r);this.removeAccessibleListeners=Kn(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ot.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!kh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ot.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Rn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Sn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ta=new WeakMap,Ks=new WeakMap,U1=e=>{const t=Ta.get(e.target);t&&t(e)},Y1=e=>{e.forEach(U1)};function K1({root:e,...t}){const n=e||document;Ks.has(n)||Ks.set(n,{});const r=Ks.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Y1,{root:e,...t})),r[i]}function z1(e,t,n){const r=K1(t);return Ta.set(e,n),r.observe(e),()=>{Ta.delete(e),r.unobserve(e)}}const X1={some:0,all:1};class G1 extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:X1[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return z1(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(q1(t,n))&&this.startObserver()}unmount(){}}function q1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Z1={inView:{Feature:G1},tap:{Feature:W1},focus:{Feature:H1},hover:{Feature:B1}};function Vh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Q1(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function J1(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function fs(e,t,n){const r=e.getProps();return Ic(r,t,n!==void 0?n:r.custom,Q1(e),J1(e))}const eE="framerAppearId",tE="data-"+Rc(eE);let Mo=mt,Kt=mt;process.env.NODE_ENV!=="production"&&(Mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Kt=(e,t)=>{if(!e)throw new Error(t)});const Pn=e=>e*1e3,gn=e=>e/1e3,nE={current:!1},jh=e=>Array.isArray(e)&&typeof e[0]=="number";function Lh(e){return!!(!e||typeof e=="string"&&Fh[e]||jh(e)||Array.isArray(e)&&e.every(Lh))}const co=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:co([0,.65,.55,1]),circOut:co([.55,0,1,.45]),backIn:co([.31,.01,.66,-.59]),backOut:co([.33,1.53,.69,.99])};function Bh(e){if(e)return jh(e)?co(e):Array.isArray(e)?e.map(Bh):Fh[e]}function rE(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const d=Bh(a);return Array.isArray(d)&&(l.easing=d),e.animate(l,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function oE(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Hh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,iE=1e-7,sE=12;function aE(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Hh(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>iE&&++a<sE);return s}function ko(e,t,n,r){if(e===t&&n===r)return mt;const i=o=>aE(o,0,1,e,n);return o=>o===0||o===1?o:Hh(i(o),t,r)}const cE=ko(.42,0,1,1),lE=ko(0,0,.58,1),Wh=ko(.42,0,.58,1),Uh=e=>Array.isArray(e)&&typeof e[0]!="number",Yh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Kh=e=>t=>1-e(1-t),zh=e=>1-Math.sin(Math.acos(e)),Ac=Kh(zh),uE=Yh(Ac),Xh=ko(.33,1.53,.69,.99),Oc=Kh(Xh),dE=Yh(Oc),fE=e=>(e*=2)<1?.5*Oc(e):.5*(2-Math.pow(2,-10*(e-1))),bd={linear:mt,easeIn:cE,easeInOut:Wh,easeOut:lE,circIn:zh,circInOut:uE,circOut:Ac,backIn:Oc,backInOut:dE,backOut:Xh,anticipate:fE},xd=e=>{if(Array.isArray(e)){Kt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return ko(t,n,r,i)}else if(typeof e=="string")return Kt(bd[e]!==void 0,`Invalid easing type '${e}'`),bd[e];return e},Dc=(e,t)=>n=>!!(Oo(n)&&h1.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Gh=(e,t,n)=>r=>{if(!Oo(r))return r;const[i,o,s,a]=r.match(ls);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},pE=e=>Zn(0,255,e),zs={...Cr,transform:e=>Math.round(pE(e))},pr={test:Dc("rgb","red"),parse:Gh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zs.transform(e)+", "+zs.transform(t)+", "+zs.transform(n)+", "+fo(uo.transform(r))+")"};function hE(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const $a={test:Dc("#"),parse:hE,transform:pr.transform},Dr={test:Dc("hsl","hue"),parse:Gh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(fo(t))+", "+vn.transform(fo(n))+", "+fo(uo.transform(r))+")"},Mt={test:e=>pr.test(e)||$a.test(e)||Dr.test(e),parse:e=>pr.test(e)?pr.parse(e):Dr.test(e)?Dr.parse(e):$a.parse(e),transform:e=>Oo(e)?e:e.hasOwnProperty("red")?pr.transform(e):Dr.transform(e)},ft=(e,t,n)=>-n*e+n*t+e;function Xs(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 mE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Xs(c,a,e+1/3),o=Xs(c,a,e),s=Xs(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Gs=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},vE=[$a,pr,Dr],gE=e=>vE.find(t=>t.test(e));function wd(e){const t=gE(e);Kt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Dr&&(n=mE(n)),n}const qh=(e,t)=>{const n=wd(e),r=wd(t),i={...n};return o=>(i.red=Gs(n.red,r.red,o),i.green=Gs(n.green,r.green,o),i.blue=Gs(n.blue,r.blue,o),i.alpha=ft(n.alpha,r.alpha,o),pr.transform(i))};function yE(e){var t,n;return isNaN(e)&&Oo(e)&&(((t=e.match(ls))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Eh))===null||n===void 0?void 0:n.length)||0)>0}const Zh={regex:f1,countKey:"Vars",token:"${v}",parse:mt},Qh={regex:Eh,countKey:"Colors",token:"${c}",parse:Mt.parse},Jh={regex:ls,countKey:"Numbers",token:"${n}",parse:Cr.parse};function qs(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function $i(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&qs(n,Zh),qs(n,Qh),qs(n,Jh),n}function em(e){return $i(e).values}function tm(e){const{values:t,numColors:n,numVars:r,tokenised:i}=$i(e),o=t.length;return s=>{let a=i;for(let c=0;c<o;c++)c<r?a=a.replace(Zh.token,s[c]):c<r+n?a=a.replace(Qh.token,Mt.transform(s[c])):a=a.replace(Jh.token,fo(s[c]));return a}}const bE=e=>typeof e=="number"?0:e;function xE(e){const t=em(e);return tm(e)(t.map(bE))}const Qn={test:yE,parse:em,createTransformer:tm,getAnimatableNone:xE},nm=(e,t)=>n=>`${n>0?t:e}`;function rm(e,t){return typeof e=="number"?n=>ft(e,t,n):Mt.test(e)?qh(e,t):e.startsWith("var(")?nm(e,t):im(e,t)}const om=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>rm(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},wE=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rm(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},im=(e,t)=>{const n=Qn.createTransformer(t),r=$i(e),i=$i(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Kn(om(r.values,i.values),n):(Mo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),nm(e,t))},Hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ed=(e,t)=>n=>ft(e,t,n);function EE(e){return typeof e=="number"?Ed:typeof e=="string"?Mt.test(e)?qh:im:Array.isArray(e)?om:typeof e=="object"?wE:Ed}function CE(e,t,n){const r=[],i=n||EE(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||mt:t;a=Kn(c,a)}r.push(a)}return r}function Mc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Kt(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=CE(t,r,i),a=s.length,c=l=>{let d=0;if(a>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const f=Hr(e[d],e[d+1],l);return s[d](f)};return n?l=>c(Zn(e[0],e[o-1],l)):c}function sm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Hr(0,t,r);e.push(ft(n,1,i))}}function am(e){const t=[0];return sm(t,e.length-1),t}function _E(e,t){return e.map(n=>n*t)}function SE(e,t){return e.map(()=>t||Wh).splice(0,e.length-1)}function Ri({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Uh(r)?r.map(xd):xd(r),o={done:!1,value:t[0]},s=_E(n&&n.length===t.length?n:am(t),e),a=Mc(s,t,{ease:Array.isArray(i)?i:SE(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}function cm(e,t){return t?e*(1e3/t):0}const TE=5;function lm(e,t,n){const r=Math.max(t-TE,0);return cm(n-e(r),t-r)}const Zs=.001,$E=.01,Cd=10,RE=.05,PE=1;function IE({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Mo(e<=Pn(Cd),"Spring duration must be 10 seconds or less");let s=1-t;s=Zn(RE,PE,s),e=Zn($E,Cd,gn(e)),s<1?(i=l=>{const d=l*s,f=d*e,m=d-n,p=Ra(l,s),x=Math.exp(-f);return Zs-m/p*x},o=l=>{const f=l*s*e,m=f*n+n,p=Math.pow(s,2)*Math.pow(l,2)*e,x=Math.exp(-f),E=Ra(Math.pow(l,2),s);return(-i(l)+Zs>0?-1:1)*((m-p)*x)/E}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Zs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const a=5/e,c=OE(i,o,a);if(e=Pn(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const AE=12;function OE(e,t,n){let r=n;for(let i=1;i<AE;i++)r=r-e(r)/t(r);return r}function Ra(e,t){return e*Math.sqrt(1-t*t)}const DE=["duration","bounce"],ME=["stiffness","damping","mass"];function _d(e,t){return t.some(n=>e[n]!==void 0)}function kE(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!_d(e,ME)&&_d(e,DE)){const n=IE(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function kc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:d,duration:f,isResolvedFromDuration:m}=kE(r),p=d?-gn(d):0,x=c/(2*Math.sqrt(a*l)),E=o-i,S=gn(Math.sqrt(a/l)),T=Math.abs(E)<5;n||(n=T?.01:2),t||(t=T?.005:.5);let h;if(x<1){const w=Ra(S,x);h=_=>{const $=Math.exp(-x*S*_);return o-$*((p+x*S*E)/w*Math.sin(w*_)+E*Math.cos(w*_))}}else if(x===1)h=w=>o-Math.exp(-S*w)*(E+(p+S*E)*w);else{const w=S*Math.sqrt(x*x-1);h=_=>{const $=Math.exp(-x*S*_),M=Math.min(w*_,300);return o-$*((p+x*S*E)*Math.sinh(M)+w*E*Math.cosh(M))/w}}return{calculatedDuration:m&&f||null,next:w=>{const _=h(w);if(m)s.done=w>=f;else{let $=p;w!==0&&(x<1?$=lm(h,w,_):$=0);const M=Math.abs($)<=n,O=Math.abs(o-_)<=t;s.done=M&&O}return s.value=s.done?o:_,s}}}function Sd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},p=N=>a!==void 0&&N<a||c!==void 0&&N>c,x=N=>a===void 0?c:c===void 0||Math.abs(a-N)<Math.abs(c-N)?a:c;let E=n*t;const S=f+E,T=s===void 0?S:s(S);T!==S&&(E=T-f);const h=N=>-E*Math.exp(-N/r),w=N=>T+h(N),_=N=>{const V=h(N),z=w(N);m.done=Math.abs(V)<=l,m.value=m.done?T:z};let $,M;const O=N=>{p(m.value)&&($=N,M=kc({keyframes:[m.value,x(m.value)],velocity:lm(w,N,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:N=>{let V=!1;return!M&&$===void 0&&(V=!0,_(N),O(N)),$!==void 0&&N>$?M.next(N-$):(!V&&_(N),m)}}}const NE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ot.update(t,!0),stop:()=>an(t),now:()=>At.isProcessing?At.timestamp:performance.now()}},Pa=2e4;function Ia(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Pa;)t+=n,r=e.next(t);return t>=Pa?1/0:t}const VE={decay:Sd,inertia:Sd,tween:Ri,keyframes:Ri,spring:kc};function Pi({autoplay:e=!0,delay:t=0,driver:n=NE,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:d,onUpdate:f,...m}){let p=1,x=!1,E,S;const T=()=>{S=new Promise(L=>{E=L})};T();let h;const w=VE[i]||Ri;let _;w!==Ri&&typeof r[0]!="number"&&(_=Mc([0,100],r,{clamp:!1}),r=[0,100]);const $=w({...m,keyframes:r});let M;a==="mirror"&&(M=w({...m,keyframes:[...r].reverse(),velocity:-(m.velocity||0)}));let O="idle",N=null,V=null,z=null;$.calculatedDuration===null&&o&&($.calculatedDuration=Ia($));const{calculatedDuration:j}=$;let R=1/0,v=1/0;j!==null&&(R=j+s,v=R*(o+1)-s);let C=0;const I=L=>{if(V===null)return;p>0&&(V=Math.min(V,L)),p<0&&(V=Math.min(L-v/p,V)),N!==null?C=N:C=Math.round(L-V)*p;const oe=C-t*(p>=0?1:-1),G=p>=0?oe<0:oe>v;C=Math.max(oe,0),O==="finished"&&N===null&&(C=v);let X=C,ne=$;if(o){const J=C/R;let ee=Math.floor(J),te=J%1;!te&&J>=1&&(te=1),te===1&&ee--,ee=Math.min(ee,o+1);const Z=!!(ee%2);Z&&(a==="reverse"?(te=1-te,s&&(te-=s/R)):a==="mirror"&&(ne=M));let ge=Zn(0,1,te);C>v&&(ge=a==="reverse"&&Z?1:0),X=ge*R}const ae=G?{done:!1,value:r[0]}:ne.next(X);_&&(ae.value=_(ae.value));let{done:B}=ae;!G&&j!==null&&(B=p>=0?C>=v:C<=0);const H=N===null&&(O==="finished"||O==="running"&&B);return f&&f(ae.value),H&&q(),ae},k=()=>{h&&h.stop(),h=void 0},U=()=>{O="idle",k(),E(),T(),V=z=null},q=()=>{O="finished",d&&d(),k(),E()},ue=()=>{if(x)return;h||(h=n(I));const L=h.now();c&&c(),N!==null?V=L-N:(!V||O==="finished")&&(V=L),O==="finished"&&T(),z=V,N=null,O="running",h.start()};e&&ue();const W={then(L,oe){return S.then(L,oe)},get time(){return gn(C)},set time(L){L=Pn(L),C=L,N!==null||!h||p===0?N=L:V=h.now()-L/p},get duration(){const L=$.calculatedDuration===null?Ia($):$.calculatedDuration;return gn(L)},get speed(){return p},set speed(L){L===p||!h||(p=L,W.time=gn(C))},get state(){return O},play:ue,pause:()=>{O="paused",N=C},stop:()=>{x=!0,O!=="idle"&&(O="idle",l&&l(),U())},cancel:()=>{z!==null&&I(z),U()},complete:()=>{O="finished"},sample:L=>(V=0,I(L))};return W}function um(e){let t;return()=>(t===void 0&&(t=e()),t)}const jE=um(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),LE=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ri=10,FE=2e4,BE=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Lh(t.ease);function HE(e,t,{onUpdate:n,onComplete:r,...i}){if(!(jE()&&LE.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c;const l=()=>{c=new Promise(h=>{a=h})};l();let{keyframes:d,duration:f=300,ease:m,times:p}=i;if(BE(t,i)){const h=Pi({...i,repeat:0,delay:0});let w={done:!1,value:d[0]};const _=[];let $=0;for(;!w.done&&$<FE;)w=h.sample($),_.push(w.value),$+=ri;p=void 0,d=_,f=$-ri,m="linear"}const x=rE(e.owner.current,t,d,{...i,duration:f,ease:m,times:p}),E=()=>x.cancel(),S=()=>{ot.update(E),a(),l()};return x.onfinish=()=>{e.set(oE(d,i)),r&&r(),S()},{then(h,w){return c.then(h,w)},attachTimeline(h){return x.timeline=h,x.onfinish=null,mt},get time(){return gn(x.currentTime||0)},set time(h){x.currentTime=Pn(h)},get speed(){return x.playbackRate},set speed(h){x.playbackRate=h},get duration(){return gn(f)},play:()=>{s||(x.play(),an(E))},pause:()=>x.pause(),stop:()=>{if(s=!0,x.playState==="idle")return;const{currentTime:h}=x;if(h){const w=Pi({...i,autoplay:!1});e.setWithVelocity(w.sample(h-ri).value,w.sample(h).value,ri)}S()},complete:()=>x.finish(),cancel:S}}function WE({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:mt,pause:mt,stop:mt,then:o=>(o(),Promise.resolve()),cancel:mt,complete:mt});return t?Pi({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const UE={type:"spring",stiffness:500,damping:25,restSpeed:10},YE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KE={type:"keyframes",duration:.8},zE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XE=(e,{keyframes:t})=>t.length>2?KE:Er.has(e)?e.startsWith("scale")?YE(t[1]):UE:zE,Aa=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Qn.test(t)||t==="0")&&!t.startsWith("url(")),GE=new Set(["brightness","contrast","saturate","opacity"]);function qE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ls)||[];if(!r)return e;const i=n.replace(r,"");let o=GE.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ZE=/([a-z-]*)\(.*?\)/g,Oa={...Qn,getAnimatableNone:e=>{const t=e.match(ZE);return t?t.map(qE).join(" "):e}},QE={...Ch,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Oa,WebkitFilter:Oa},Nc=e=>QE[e];function dm(e,t){let n=Nc(e);return n!==Oa&&(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fm=e=>/^0[^.\s]+$/.test(e);function JE(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||fm(e)}function eC(e,t,n,r){const i=Aa(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let l=0;l<o.length;l++)o[l]===null&&(o[l]=l===0?s:o[l-1]),JE(o[l])&&c.push(l),typeof o[l]=="string"&&o[l]!=="none"&&o[l]!=="0"&&(a=o[l]);if(i&&c.length&&a)for(let l=0;l<c.length;l++){const d=c[l];o[d]=dm(t,a)}return o}function tC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:l,...d}){return!!Object.keys(d).length}function pm(e,t){return e[t]||e.default||e}const Vc=(e,t,n,r={})=>i=>{const o=pm(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Pn(s);const c=eC(t,e,n,o),l=c[0],d=c[c.length-1],f=Aa(e,l),m=Aa(e,d);Mo(f===m,`You are trying to animate ${e} from "${l}" to "${d}". ${l} is not an animatable value - to enable this animation set ${l} to a value animatable to ${d} via the \`style\` property.`);let p={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:x=>{t.set(x),o.onUpdate&&o.onUpdate(x)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(tC(o)||(p={...p,...XE(e,p)}),p.duration&&(p.duration=Pn(p.duration)),p.repeatDelay&&(p.repeatDelay=Pn(p.repeatDelay)),!f||!m||nE.current||o.type===!1)return WE(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const x=HE(t,e,p);if(x)return x}return Pi(p)};function Ii(e){return!!(Dt(e)&&e.add)}const hm=e=>/^\-?\d*\.?\d+$/.test(e);function jc(e,t){e.indexOf(t)===-1&&e.push(t)}function ps(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Lc{constructor(){this.subscriptions=[]}add(t){return jc(this.subscriptions,t),()=>ps(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Td=new Set;function hs(e,t,n){e||Td.has(t)||(console.warn(t),n&&console.warn(n),Td.add(t))}const nC=e=>!isNaN(parseFloat(e)),po={current:void 0};class rC{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=At;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,ot.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ot.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=nC(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&hs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Lc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return po.current&&po.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?cm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yr(e,t){return new rC(e,t)}const mm=e=>t=>t.test(e),oC={test:e=>e==="auto",parse:e=>e},vm=[Cr,Oe,vn,Wn,v1,m1,oC],ro=e=>vm.find(mm(e)),iC=[...vm,Mt,Qn],sC=e=>iC.find(mm(e));function aC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yr(n))}function cC(e,t){const n=fs(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=I1(o[s]);aC(e,s,a)}}function lC(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],l=t[c];let d=null;Array.isArray(l)&&(d=l[0]),d===null&&(d=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),d!=null&&(typeof d=="string"&&(hm(d)||fm(d))?d=parseFloat(d):!sC(d)&&Qn.test(l)&&(d=dm(c,l)),e.addValue(c,yr(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function uC(e,t){return t?(t[e]||t.default||t).from:void 0}function dC(e,t,n){const r={};for(const i in e){const o=uC(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function fC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Fc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(o=r);const l=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const m=e.getValue(f),p=a[f];if(!m||p===void 0||d&&fC(d,f))continue;const x={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!m.hasAnimated){const S=e.getProps()[tE];S&&(x.elapsed=window.HandoffAppearAnimations(S,f,m,ot))}m.start(Vc(f,m,p,e.shouldReduceMotion&&Er.has(f)?{type:!1}:x));const E=m.animation;Ii(c)&&(c.add(f),E.then(()=>c.remove(f))),l.push(E)}return s&&Promise.all(l).then(()=>{s&&cC(e,s)}),l}function Da(e,t,n={}){const r=fs(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Fc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return pC(e,t,l+c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function pC(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(hC).forEach((l,d)=>{l.notify("AnimationStart",t),s.push(Da(l,t,{...o,delay:n+c(d)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function hC(e,t){return e.sortNodePosition(t)}function mC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Da(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Da(e,t,n);else{const i=typeof t=="function"?fs(e,t,n.custom):t;r=Promise.all(Fc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const vC=[...xc].reverse(),gC=xc.length;function yC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>mC(e,n,r)))}function bC(e){let t=yC(e);const n=wC();let r=!0;const i=(c,l)=>{const d=fs(e,l);if(d){const{transition:f,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(c){t=c(e)}function s(c,l){const d=e.getProps(),f=e.getVariantContext(!0)||{},m=[],p=new Set;let x={},E=1/0;for(let T=0;T<gC;T++){const h=vC[T],w=n[h],_=d[h]!==void 0?d[h]:f[h],$=Co(_),M=h===l?w.isActive:null;M===!1&&(E=T);let O=_===f[h]&&_!==d[h]&&$;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),w.protectedKeys={...x},!w.isActive&&M===null||!_&&!w.prevProp||as(_)||typeof _=="boolean")continue;const N=xC(w.prevProp,_);let V=N||h===l&&w.isActive&&!O&&$||T>E&&$;const z=Array.isArray(_)?_:[_];let j=z.reduce(i,{});M===!1&&(j={});const{prevResolvedValues:R={}}=w,v={...R,...j},C=I=>{V=!0,p.delete(I),w.needsAnimating[I]=!0};for(const I in v){const k=j[I],U=R[I];x.hasOwnProperty(I)||(k!==U?Ti(k)&&Ti(U)?!Vh(k,U)||N?C(I):w.protectedKeys[I]=!0:k!==void 0?C(I):p.add(I):k!==void 0&&p.has(I)?C(I):w.protectedKeys[I]=!0)}w.prevProp=_,w.prevResolvedValues=j,w.isActive&&(x={...x,...j}),r&&e.blockInitialAnimation&&(V=!1),V&&!O&&m.push(...z.map(I=>({animation:I,options:{type:h,...c}})))}if(p.size){const T={};p.forEach(h=>{const w=e.getBaseTarget(h);w!==void 0&&(T[h]=w)}),m.push({animation:T})}let S=!!m.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(m):Promise.resolve()}function a(c,l,d){var f;if(n[c].isActive===l)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var x;return(x=p.animationState)===null||x===void 0?void 0:x.setActive(c,l)}),n[c].isActive=l;const m=s(d,c);for(const p in n)n[p].protectedKeys={};return m}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function xC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vh(t,e):!1}function ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wC(){return{animate:ar(!0),whileInView:ar(),whileHover:ar(),whileTap:ar(),whileDrag:ar(),whileFocus:ar(),exit:ar()}}class EC extends tr{constructor(t){super(t),t.animationState||(t.animationState=bC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),as(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let CC=0;class _C extends tr{constructor(){super(...arguments),this.id=CC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const SC={animation:{Feature:EC},exit:{Feature:_C}},$d=(e,t)=>Math.abs(e-t);function TC(e,t){const n=$d(e.x,t.x),r=$d(e.y,t.y);return Math.sqrt(n**2+r**2)}class gm{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=Js(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=TC(l.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:m}=l,{timestamp:p}=At;this.history.push({...m,timestamp:p});const{onStart:x,onMove:E}=this.handlers;d||(x&&x(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,l)},this.handlePointerMove=(l,d)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=Qs(d,this.transformPagePoint),ot.update(this.updatePoint,!0)},this.handlePointerUp=(l,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:m}=this.handlers,p=Js(l.type==="pointercancel"?this.lastMoveEventInfo:Qs(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,p),m&&m(l,p)},!Oh(t))return;this.handlers=n,this.transformPagePoint=r;const i=ds(t),o=Qs(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=At;this.history=[{...s,timestamp:a}];const{onSessionStart:c}=n;c&&c(t,Js(o,this.history)),this.removeListeners=Kn(Rn(window,"pointermove",this.handlePointerMove),Rn(window,"pointerup",this.handlePointerUp),Rn(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),an(this.updatePoint)}}function Qs(e,t){return t?{point:t(e.point)}:e}function Rd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Js({point:e},t){return{point:e,delta:Rd(e,ym(t)),offset:Rd(e,$C(t)),velocity:RC(t,.1)}}function $C(e){return e[0]}function ym(e){return e[e.length-1]}function RC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ym(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Pn(t)));)n--;if(!r)return{x:0,y:0};const o=gn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zt(e){return e.max-e.min}function Ma(e,t=0,n=.01){return Math.abs(e-t)<=n}function Pd(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),(Ma(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(Ma(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ho(e,t,n,r){Pd(e.x,t.x,n.x,r?r.originX:void 0),Pd(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function PC(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Ad(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function mo(e,t,n){Ad(e.x,t.x,n.x),Ad(e.y,t.y,n.y)}function IC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function Od(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AC(e,{top:t,left:n,bottom:r,right:i}){return{x:Od(e.x,n,i),y:Od(e.y,t,r)}}function Dd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function OC(e,t){return{x:Dd(e.x,t.x),y:Dd(e.y,t.y)}}function DC(e,t){let n=.5;const r=zt(e),i=zt(t);return i>r?n=Hr(t.min,t.max-r,e.min):r>i&&(n=Hr(e.min,e.max-i,t.min)),Zn(0,1,n)}function MC(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ka=.35;function kC(e=ka){return e===!1?e=0:e===!0&&(e=ka),{x:Md(e,"left","right"),y:Md(e,"top","bottom")}}function Md(e,t,n){return{min:kd(e,t),max:kd(e,n)}}function kd(e,t){return typeof e=="number"?e:e[t]||0}const Nd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:Nd(),y:Nd()}),Vd=()=>({min:0,max:0}),xt=()=>({x:Vd(),y:Vd()});function mn(e){return[e("x"),e("y")]}function bm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function NC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ea(e){return e===void 0||e===1}function Na({scale:e,scaleX:t,scaleY:n}){return!ea(e)||!ea(t)||!ea(n)}function dr(e){return Na(e)||xm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function xm(e){return jd(e.x)||jd(e.y)}function jd(e){return e&&e!=="0%"}function Ai(e,t,n){const r=e-n,i=t*r;return n+i}function Ld(e,t,n,r,i){return i!==void 0&&(e=Ai(e,i,r)),Ai(e,n,r)+t}function Va(e,t=0,n=1,r,i){e.min=Ld(e.min,t,n,r,i),e.max=Ld(e.max,t,n,r,i)}function wm(e,{x:t,y:n}){Va(e.x,t.translate,t.scale,t.originPoint),Va(e.y,n.translate,n.scale,n.originPoint)}function jC(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&kr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,wm(e,s)),r&&dr(o.latestValues)&&kr(e,o.latestValues))}t.x=Fd(t.x),t.y=Fd(t.y)}function Fd(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Un(e,t){e.min=e.min+t,e.max=e.max+t}function Bd(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=ft(e.min,e.max,o);Va(e,t[n],t[r],s,t.scale)}const LC=["x","scaleX","originX"],FC=["y","scaleY","originY"];function kr(e,t){Bd(e.x,t,LC),Bd(e.y,t,FC)}function Em(e,t){return bm(VC(e.getBoundingClientRect(),t))}function BC(e,t,n){const r=Em(e,n),{scroll:i}=t;return i&&(Un(r.x,i.offset.x),Un(r.y,i.offset.y)),r}const HC=new WeakMap;class WC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(ds(c,"page").point)},o=(c,l)=>{const{drag:d,dragPropagation:f,onDragStart:m}=this.getProps();if(d&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mh(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mn(x=>{let E=this.getAxisMotionValue(x).get()||0;if(vn.test(E)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[x];T&&(E=zt(T)*(parseFloat(E)/100))}}this.originPoint[x]=E}),m&&ot.update(()=>m(c,l),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},s=(c,l)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:x}=l;if(f&&this.currentDirection===null){this.currentDirection=UC(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",l.point,x),this.updateAxis("y",l.point,x),this.visualElement.render(),p&&p(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new gm(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ot.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!oi(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=IC(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Or(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=AC(r.layoutBox,t):this.constraints=!1,this.elastic=kC(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mn(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=MC(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Or(t))return!1;const r=t.current;Kt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=BC(r,i.root,this.visualElement.getTransformPagePoint());let s=OC(i.layout.layoutBox,o);if(n){const a=n(NC(s));this.hasMutatedConstraints=!!a,a&&(s=bm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=mn(d=>{if(!oi(d,n,this.currentDirection))return;let f=c&&c[d]||{};s&&(f={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,x)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Vc(t,r,0,n))}stopAnimation(){mn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mn(n=>{const{drag:r}=this.getProps();if(!oi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-ft(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Or(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mn(s=>{const a=this.getAxisMotionValue(s);if(a){const c=a.get();i[s]=DC({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mn(s=>{if(!oi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(ft(c,l,i[s]))})}addListeners(){if(!this.visualElement.current)return;HC.set(this.visualElement,this);const t=this.visualElement.current,n=Rn(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Or(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Sn(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(mn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ka,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function oi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function UC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YC extends tr{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new WC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hd=e=>(t,n)=>{e&&ot.update(()=>e(t,n))};class KC extends tr{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new gm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hd(t),onStart:Hd(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ot.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Rn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function zC(){const e=u.useContext(os);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=u.useId();return u.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const hi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const oo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Oe.test(e))e=parseFloat(e);else return e;const n=Wd(e,t.target.x),r=Wd(e,t.target.y);return`${n}% ${r}%`}},XC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Qn.parse(e);if(i.length>5)return r;const o=Qn.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=c;const l=ft(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),o(i)}};class GC extends u.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;c1(qC),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),hi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ot.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cm(e){const[t,n]=zC(),r=u.useContext(Ec);return u.createElement(GC,{...e,layoutGroup:r,switchLayoutGroup:u.useContext(yh),isPresent:t,safeToRemove:n})}const qC={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:XC},_m=["TopLeft","TopRight","BottomLeft","BottomRight"],ZC=_m.length,Ud=e=>typeof e=="string"?parseFloat(e):e,Yd=e=>typeof e=="number"||Oe.test(e);function QC(e,t,n,r,i,o){i?(e.opacity=ft(0,n.opacity!==void 0?n.opacity:1,JC(r)),e.opacityExit=ft(t.opacity!==void 0?t.opacity:1,0,e_(r))):o&&(e.opacity=ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<ZC;s++){const a=`border${_m[s]}Radius`;let c=Kd(t,a),l=Kd(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Yd(c)===Yd(l)?(e[a]=Math.max(ft(Ud(c),Ud(l),r),0),(vn.test(l)||vn.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function Kd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JC=Sm(0,.5,Ac),e_=Sm(.5,.95,mt);function Sm(e,t,n){return r=>r<e?0:r>t?1:n(Hr(e,t,r))}function zd(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){zd(e.x,t.x),zd(e.y,t.y)}function Xd(e,t,n,r,i){return e-=t,e=Ai(e,1/n,r),i!==void 0&&(e=Ai(e,1/i,r)),e}function t_(e,t=0,n=1,r=.5,i,o=e,s=e){if(vn.test(t)&&(t=parseFloat(t),t=ft(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ft(o.min,o.max,r);e===o&&(a-=t),e.min=Xd(e.min,t,n,a,i),e.max=Xd(e.max,t,n,a,i)}function Gd(e,t,[n,r,i],o,s){t_(e,t[n],t[r],t[i],t.scale,o,s)}const n_=["x","scaleX","originX"],r_=["y","scaleY","originY"];function qd(e,t,n,r){Gd(e.x,t,n_,n?n.x:void 0,r?r.x:void 0),Gd(e.y,t,r_,n?n.y:void 0,r?r.y:void 0)}function Zd(e){return e.translate===0&&e.scale===1}function Tm(e){return Zd(e.x)&&Zd(e.y)}function o_(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function $m(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Qd(e){return zt(e.x)/zt(e.y)}class i_{constructor(){this.members=[]}add(t){jc(this.members,t),t.scheduleRender()}remove(t){if(ps(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jd(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:c,rotateX:l,rotateY:d}=n;c&&(r+=`rotate(${c}deg) `),l&&(r+=`rotateX(${l}deg) `),d&&(r+=`rotateY(${d}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const s_=(e,t)=>e.depth-t.depth;class a_{constructor(){this.children=[],this.isDirty=!1}add(t){jc(this.children,t),this.isDirty=!0}remove(t){ps(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(s_),this.isDirty=!1,this.children.forEach(t)}}function c_(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(an(r),e(o-t))};return ot.read(r,!0),()=>an(r)}function l_(e){window.MotionDebug&&window.MotionDebug.record(e)}function Rm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Bc(e,t,n){const r=Dt(e)?e:yr(e);return r.start(Vc("",r,t,n)),r.animation}const ef=["","X","Y","Z"],tf=1e3;let u_=0;const fr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Pm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=u_++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{fr.totalNodes=fr.resolvedTargetDeltas=fr.recalculatedProjection=0,this.nodes.forEach(p_),this.nodes.forEach(y_),this.nodes.forEach(b_),this.nodes.forEach(h_),l_(fr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new a_)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Lc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rm(s),this.instance=s;const{layoutId:c,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),e){let f;const m=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=c_(m,250),hi.hasAnimatedSinceResize&&(hi.hasAnimatedSinceResize=!1,this.nodes.forEach(rf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:m,hasRelativeTargetChanged:p,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||d.getDefaultTransition()||__,{onLayoutAnimationStart:S,onLayoutAnimationComplete:T}=d.getProps(),h=!this.targetLayout||!$m(this.targetLayout,x)||p,w=!m&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||m&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const _={...pm(E,"layout"),onPlay:S,onComplete:T};(d.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else m||rf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,an(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(x_),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nf);return}this.isUpdating||this.nodes.forEach(v_),this.isUpdating=!1,this.nodes.forEach(g_),this.nodes.forEach(d_),this.nodes.forEach(f_),this.clearAllSnapshots();const a=performance.now();At.delta=Zn(0,1e3/60,a-At.timestamp),At.timestamp=a,At.isProcessing=!0,Us.update.process(At),Us.preRender.process(At),Us.render.process(At),At.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(m_),this.sharedNodes.forEach(w_)}scheduleUpdateProjection(){ot.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Tm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;s&&(a||dr(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),S_(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return xt();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(Un(a.x,c.offset.x),Un(a.y,c.offset.y)),a}removeElementScroll(s){const a=xt();Qt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;if(l!==this.root&&d&&f.layoutScroll){if(d.isRoot){Qt(a,s);const{scroll:m}=this.root;m&&(Un(a.x,-m.offset.x),Un(a.y,-m.offset.y))}Un(a.x,d.offset.x),Un(a.y,d.offset.y)}}return a}applyTransform(s,a=!1){const c=xt();Qt(c,s);for(let l=0;l<this.path.length;l++){const d=this.path[l];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&kr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),dr(d.latestValues)&&kr(c,d.latestValues)}return dr(this.latestValues)&&kr(c,this.latestValues),c}removeTransform(s){const a=xt();Qt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!dr(l.latestValues))continue;Na(l.latestValues)&&l.updateSnapshot();const d=xt(),f=l.measurePageBox();Qt(d,f),qd(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return dr(this.latestValues)&&qd(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==At.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:m}=this.options;if(!(!this.layout||!(f||m))){if(this.resolvedRelativeTargetAt=At.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),mo(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=xt(),this.targetWithTransforms=xt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),wm(this.target,this.targetDelta)):Qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),mo(this.relativeTargetOrigin,this.target,p.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}fr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Na(this.parent.latestValues)||xm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===At.timestamp&&(l=!1),l)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Qt(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,p=this.treeScale.y;jC(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:x}=a;if(!x){this.projectionTransform&&(this.projectionDelta=Mr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Mr(),this.projectionDeltaWithTransform=Mr());const E=this.projectionTransform;ho(this.projectionDelta,this.layoutCorrected,x,this.latestValues),this.projectionTransform=Jd(this.projectionDelta,this.treeScale),(this.projectionTransform!==E||this.treeScale.x!==m||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),fr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=Mr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=xt(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,E=p!==x,S=this.getStack(),T=!S||S.members.length<=1,h=!!(E&&!T&&this.options.crossfade===!0&&!this.path.some(C_));this.animationProgress=0;let w;this.mixTargetDelta=_=>{const $=_/1e3;of(f.x,s.x,$),of(f.y,s.y,$),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mo(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),E_(this.relativeTarget,this.relativeTargetOrigin,m,$),w&&o_(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=xt()),Qt(w,this.relativeTarget)),E&&(this.animationValues=d,QC(d,l,this.latestValues,$,h,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=$},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(an(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ot.update(()=>{hi.hasAnimatedSinceResize=!0,this.currentAnimation=Bc(0,tf,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:d}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||xt();const f=zt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=zt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}Qt(a,c),kr(a,d),ho(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new i_),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let d=0;d<ef.length;d++){const f="rotate"+ef[d];c[f]&&(l[f]=c[f],s.setStaticValue(f,0))}s.render();for(const d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}getProjectionStyles(s={}){var a,c;const l={};if(!this.instance||this.isSVG)return l;if(this.isVisible)l.visibility="";else return{visibility:"hidden"};const d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=pi(s.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none",l;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=pi(s.pointerEvents)||""),this.hasProjected&&!dr(this.latestValues)&&(E.transform=d?d({},""):"none",this.hasProjected=!1),E}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=Jd(this.projectionDeltaWithTransform,this.treeScale,m),d&&(l.transform=d(m,l.transform));const{x:p,y:x}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${x.origin*100}% 0`,f.animationValues?l.opacity=f===this?(c=(a=m.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const E in _i){if(m[E]===void 0)continue;const{correct:S,applyTo:T}=_i[E],h=l.transform==="none"?m[E]:S(m[E],f);if(T){const w=T.length;for(let _=0;_<w;_++)l[T[_]]=h}else l[E]=h}return this.options.layoutId&&(l.pointerEvents=f===this?pi(s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(nf),this.root.sharedNodes.clear()}}}function d_(e){e.updateLayout()}function f_(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?mn(f=>{const m=s?n.measuredBox[f]:n.layoutBox[f],p=zt(m);m.min=r[f].min,m.max=m.min+p}):Im(o,n.layoutBox,r)&&mn(f=>{const m=s?n.measuredBox[f]:n.layoutBox[f],p=zt(r[f]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=Mr();ho(a,r,n.layoutBox);const c=Mr();s?ho(c,e.applyTransform(i,!0),n.measuredBox):ho(c,r,n.layoutBox);const l=!Tm(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:p}=f;if(m&&p){const x=xt();mo(x,n.layoutBox,m.layoutBox);const E=xt();mo(E,r,p.layoutBox),$m(x,E)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function p_(e){fr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function h_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function m_(e){e.clearSnapshot()}function nf(e){e.clearMeasurements()}function v_(e){e.isLayoutDirty=!1}function g_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function y_(e){e.resolveTargetDelta()}function b_(e){e.calcProjection()}function x_(e){e.resetRotation()}function w_(e){e.removeLeadSnapshot()}function of(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sf(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function E_(e,t,n,r){sf(e.x,t.x,n.x,r),sf(e.y,t.y,n.y,r)}function C_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const __={duration:.45,ease:[.4,0,.1,1]},af=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),cf=af("applewebkit/")&&!af("chrome/")?Math.round:mt;function lf(e){e.min=cf(e.min),e.max=cf(e.max)}function S_(e){lf(e.x),lf(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ma(Qd(t),Qd(n),.2)}const T_=Pm({attachResizeListener:(e,t)=>Sn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ta={current:void 0},Am=Pm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ta.current){const e=new T_({});e.mount(window),e.setOptions({layoutScroll:!0}),ta.current=e}return ta.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$_={pan:{Feature:KC},drag:{Feature:YC,ProjectionNode:Am,MeasureLayout:Cm}},R_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function P_(e){const t=R_.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const I_=4;function ja(e,t,n=1){Kt(n<=I_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=P_(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return hm(s)?parseFloat(s):s}else return Sa(i)?ja(i,t,n+1):i}function A_(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Sa(o))return;const s=ja(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Sa(o))continue;const s=ja(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const O_=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Om=e=>O_.has(e),D_=e=>Object.keys(e).some(Om),ii=e=>e===Cr||e===Oe,uf=(e,t)=>parseFloat(e.split(", ")[t]),df=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return uf(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?uf(o[1],e):0}},M_=new Set(["x","y","z"]),k_=Ao.filter(e=>!M_.has(e));function N_(e){const t=[];return k_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Wr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:df(4,13),y:df(5,14)};Wr.translateX=Wr.x;Wr.translateY=Wr.y;const V_=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(l=>{a[l]=Wr[l](r,o)}),t.render();const c=t.measureViewportBox();return n.forEach(l=>{const d=t.getValue(l);d&&d.jump(a[l]),e[l]=Wr[l](c,o)}),e},j_=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Om);let o=[],s=!1;const a=[];if(i.forEach(c=>{const l=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],f=ro(d);const m=t[c];let p;if(Ti(m)){const x=m.length,E=m[0]===null?1:0;d=m[E],f=ro(d);for(let S=E;S<x&&m[S]!==null;S++)p?Kt(ro(m[S])===p,"All keyframes must be of the same type"):(p=ro(m[S]),Kt(p===f||ii(f)&&ii(p),"Keyframes must be of the same dimension as the current value"))}else p=ro(m);if(f!==p)if(ii(f)&&ii(p)){const x=l.get();typeof x=="string"&&l.set(parseFloat(x)),typeof m=="string"?t[c]=parseFloat(m):Array.isArray(m)&&p===Oe&&(t[c]=m.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(d===0||m===0)?d===0?l.set(p.transform(d)):t[c]=f.transform(m):(s||(o=N_(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],l.jump(m))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,l=V_(t,e,a);return o.length&&o.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),is&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function L_(e,t,n,r){return D_(t)?j_(e,t,n,r):{target:t,transitionEnd:r}}const F_=(e,t,n,r)=>{const i=A_(e,t,r);return t=i.target,r=i.transitionEnd,L_(e,t,n,r)},Oi={current:null},Hc={current:!1};function Dm(){if(Hc.current=!0,!!is)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Oi.current=e.matches;e.addListener(t),t()}else Oi.current=!1}function B_(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Dt(o))e.addValue(i,o),Ii(r)&&r.add(i),process.env.NODE_ENV==="development"&&hs(o.version==="10.16.1",`Attempting to mix Framer Motion versions ${o.version} with 10.16.1 may not work as expected.`);else if(Dt(s))e.addValue(i,yr(o,{owner:e})),Ii(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,yr(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const So=new WeakMap,Mm=Object.keys(_o),H_=Mm.length,ff=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],W_=wc.length;class U_{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ot.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=cs(n),this.isVariantNode=gh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const m=d[f];a[f]!==void 0&&Dt(m)&&(m.set(a[f],!1),Ii(l)&&l.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,So.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Hc.current||Dm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Oi.current,process.env.NODE_ENV!=="production"&&hs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){So.delete(this.current),this.projection&&this.projection.unmount(),an(this.notifyUpdate),an(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Er.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ot.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Mo(!1,c):Kt(!1,c)}for(let c=0;c<H_;c++){const l=Mm[c],{isEnabled:d,Feature:f,ProjectionNode:m,MeasureLayout:p}=_o[l];m&&(s=m),d(n)&&(!this.features[l]&&f&&(this.features[l]=new f(this)),p&&(a=p))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:l,drag:d,dragConstraints:f,layoutScroll:m,layoutRoot:p}=n;this.projection.setOptions({layoutId:c,layout:l,alwaysMeasureLayout:!!d||f&&Or(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ff.length;r++){const i=ff[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=B_(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<W_;r++){const i=wc[r],o=this.props[i];(Co(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=yr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ic(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Dt(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class km extends U_{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=dC(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){lC(this,r,s);const a=F_(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Y_(e){return window.getComputedStyle(e)}class Nm extends km{readValueFromInstance(t,n){if(Er.has(n)){const r=Nc(n);return r&&r.default||0}else{const r=Y_(t),i=(wh(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Em(t,n)}build(t,n,r,i){_c(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Pc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Dt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){$h(t,n,r,i)}}class Vm extends km{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Er.has(n)){const r=Nc(n);return r&&r.default||0}return n=Rh.has(n)?n:Rc(n),t.getAttribute(n)}measureInstanceViewportBox(){return xt()}scrapeMotionValuesFromProps(t,n){return Ih(t,n)}build(t,n,r,i){Tc(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Ph(t,n,r,i)}mount(t){this.isSVGTag=$c(t.tagName),super.mount(t)}}const K_=(e,t)=>Cc(e)?new Vm(t,{enableHardwareAcceleration:!1}):new Nm(t,{enableHardwareAcceleration:!0}),z_={layout:{ProjectionNode:Am,MeasureLayout:Cm}},X_={...SC,...Z1,...$_,...z_},zn=s1((e,t)=>j1(e,t,X_,K_));function jm(){const e=u.useRef(!1);return ss(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function G_(){const e=jm(),[t,n]=u.useState(0),r=u.useCallback(()=>{e.current&&n(t+1)},[t]);return[u.useCallback(()=>ot.postRender(r),[r]),t]}class q_ extends he.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Z_({children:e,isPresent:t}){const n=u.useId(),r=u.useRef(null),i=u.useRef({width:0,height:0,top:0,left:0});return u.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
112
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var Z=te(B,ee,X,ne,ae+"."+ee,n);if(Z)return Z}return null}return S(L)}function C(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(C);if(W===null||a(W))return!0;var L=f(W);if(L){var oe=L.call(W),G;if(L!==W.entries){for(;!(G=oe.next()).done;)if(!C(G.value))return!1}else for(;!(G=oe.next()).done;){var X=G.value;if(X&&!C(X[1]))return!1}}else return!1;return!0;default:return!1}}function I(W,L){return W==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function k(W){var L=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":I(L,W)?"symbol":L}function U(W){if(typeof W>"u"||W===null)return""+W;var L=k(W);if(L==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return L}function q(W){var L=U(W);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ue(W){return!W.constructor||!W.constructor.name?m:W.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},Bs}var Hs,ad;function Vw(){if(ad)return Hs;ad=1;var e=vc();function t(){}function n(){}return n.resetWarningCache=t,Hs=function(){function r(s,a,c,l,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 i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Hs}if(process.env.NODE_ENV!=="production"){var jw=uh(),Lw=!0;Ca.exports=Nw()(jw.isElement,Lw)}else Ca.exports=Vw()();var Fw=Ca.exports;const K=dp(Fw);function Bw(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Hw(e,t){e.classList?e.classList.add(t):Bw(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function cd(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ww(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=cd(e.className,t):e.setAttribute("class",cd(e.className&&e.className.baseVal||"",t))}const ld={disabled:!1};var Uw=process.env.NODE_ENV!=="production"?K.oneOfType([K.number,K.shape({enter:K.number,exit:K.number,appear:K.number}).isRequired]):null,Yw=process.env.NODE_ENV!=="production"?K.oneOfType([K.string,K.shape({enter:K.string,exit:K.string,active:K.string}),K.shape({enter:K.string,enterDone:K.string,enterActive:K.string,exit:K.string,exitDone:K.string,exitActive:K.string})]):null;const fh=u.createContext(null);var ph=function(t){return t.scrollTop},ao="unmounted",lr="exited",ur="entering",Ir="entered",_a="exiting",Mn=function(e){mc(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?a?(c=lr,o.appearStatus=ur):c=Ir:r.unmountOnExit||r.mountOnEnter?c=ao:c=lr,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===ao?{status:lr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==ur&&s!==Ir&&(o=ur):(s===ur||s===Ir)&&(o=_a)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ur){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:en.findDOMNode(this);s&&ph(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lr&&this.setState({status:ao})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,c=this.props.nodeRef?[a]:[en.findDOMNode(this),a],l=c[0],d=c[1],f=this.getTimeouts(),m=a?f.appear:f.enter;if(!i&&!s||ld.disabled){this.safeSetState({status:Ir},function(){o.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:ur},function(){o.props.onEntering(l,d),o.onTransitionEnd(m,function(){o.safeSetState({status:Ir},function(){o.props.onEntered(l,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:en.findDOMNode(this);if(!o||ld.disabled){this.safeSetState({status:lr},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:_a},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:lr},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:en.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=c[0],d=c[1];this.props.addEndListener(l,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===ao)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=kt(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return u.createElement(fh.Provider,{value:null},typeof s=="function"?s(i,a):u.cloneElement(u.Children.only(s),a))},t}(u.Component);Mn.contextType=fh;Mn.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:K.shape({current:typeof Element>"u"?K.any:function(e,t,n,r,i,o){var s=e[t];return K.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:K.oneOfType([K.func.isRequired,K.element.isRequired]).isRequired,in:K.bool,mountOnEnter:K.bool,unmountOnExit:K.bool,appear:K.bool,enter:K.bool,exit:K.bool,timeout:function(t){var n=Uw;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:K.func,onEnter:K.func,onEntering:K.func,onEntered:K.func,onExit:K.func,onExiting:K.func,onExited:K.func}:{};function Pr(){}Mn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pr,onEntering:Pr,onEntered:Pr,onExit:Pr,onExiting:Pr,onExited:Pr};Mn.UNMOUNTED=ao;Mn.EXITED=lr;Mn.ENTERING=ur;Mn.ENTERED=Ir;Mn.EXITING=_a;const hh=Mn;var Kw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Hw(t,r)})},Ws=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Ww(t,r)})},gc=function(e){mc(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,c)},r.onEntering=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(a,c)},r.onEntered=function(a,c){var l=r.resolveArguments(a,c),d=l[0],f=l[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(a,c)},r.onExit=function(a){var c=r.resolveArguments(a),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var c=r.resolveArguments(a),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var c=r.resolveArguments(a),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,c){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,c]},r.getClassNames=function(a){var c=r.props.classNames,l=typeof c=="string",d=l&&c?c+"-":"",f=l?""+d+a:c[a],m=l?f+"-active":c[a+"Active"],p=l?f+"-done":c[a+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(i,o,s){var a=this.getClassNames(o)[s+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;o==="appear"&&s==="done"&&l&&(a+=" "+l),s==="active"&&i&&ph(i),a&&(this.appliedClasses[o][s]=a,Kw(i,a))},n.removeClasses=function(i,o){var s=this.appliedClasses[o],a=s.base,c=s.active,l=s.done;this.appliedClasses[o]={},a&&Ws(i,a),c&&Ws(i,c),l&&Ws(i,l)},n.render=function(){var i=this.props;i.classNames;var o=kt(i,["classNames"]);return u.createElement(hh,ie({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(u.Component);gc.defaultProps={classNames:""};gc.propTypes=process.env.NODE_ENV!=="production"?ie({},hh.propTypes,{classNames:Yw,onEnter:K.func,onEntering:K.func,onEntered:K.func,onExit:K.func,onExiting:K.func,onExited:K.func}):{};const zw=gc;function ud(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ei=it({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const Xw=u.forwardRef(({isOpen:e,onClose:t},n)=>{const r=u.useRef(null),i=n||r;return D.jsx(zw,{in:e,nodeRef:i,timeout:400,unmountOnExit:!0,classNames:{enter:Se(ei({animate:"in"})),enterDone:Se(ei({animate:"in"})),exit:Se(ei({animate:"out"})),exitDone:Se(ei({animate:"out"}))},children:D.jsx("div",{ref:i,"data-test-id":"vds-BS-overlay",onClick:t})})}),mh=e=>{u.useEffect(e,[e])},ns=({children:e,...t})=>{const[n,r]=u.useState(!1);return mh(()=>{r(!0)}),n?D.jsx(tx,{...t,children:e}):null};var Gw="_185nehu0",qw=it({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const Zw=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(gw,{...n,ref:r,className:Se(Gw),children:D.jsx(yw,{children:e})})),yc=u.forwardRef(({options:e,position:t,placeholder:n,...r},i)=>D.jsx(Xr,{children:D.jsxs(dw,{...r,children:[D.jsxs(fw,{ref:i,className:Se(qw()),"data-test-id":r["data-test-id"],children:[D.jsx(pw,{placeholder:n}),D.jsx(hw,{className:"SelectIcon",children:D.jsx(wo,{})})]}),D.jsx(ns,{children:D.jsxs(mw,{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:[D.jsx(bw,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:D.jsx(oc,{height:15,width:15})}),D.jsx(vw,{className:"SelectViewport",children:e.map(({label:o,value:s})=>D.jsx(Zw,{value:s,children:o},s))}),D.jsx(xw,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:D.jsx(wo,{height:15,width:15})})]})})]})}));yc.displayName="BaseSelect";yc.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};const bc=u.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rs=u.createContext({}),os=u.createContext(null),is=typeof document<"u",ss=is?u.useLayoutEffect:u.useEffect,vh=u.createContext({strict:!1});function Qw(e,t,n,r){const{visualElement:i}=u.useContext(rs),o=u.useContext(vh),s=u.useContext(os),a=u.useContext(bc).reducedMotion,c=u.useRef();r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;u.useInsertionEffect(()=>{l&&l.update(n,s)});const d=u.useRef(!!window.HandoffAppearAnimations);return ss(()=>{l&&(l.render(),d.current&&l.animationState&&l.animationState.animateChanges())}),u.useEffect(()=>{l&&(l.updateFeatures(),!d.current&&l.animationState&&l.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),l}function Or(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Jw(e,t,n){return u.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Or(n)&&(n.current=r))},[t])}function Co(e){return typeof e=="string"||Array.isArray(e)}function as(e){return typeof e=="object"&&typeof e.start=="function"}const xc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wc=["initial",...xc];function cs(e){return as(e.animate)||wc.some(t=>Co(e[t]))}function gh(e){return!!(cs(e)||e.variants)}function e1(e,t){if(cs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Co(n)?n:void 0,animate:Co(r)?r:void 0}}return e.inherit!==!1?t:{}}function t1(e){const{initial:t,animate:n}=e1(e,u.useContext(rs));return u.useMemo(()=>({initial:t,animate:n}),[dd(t),dd(n)])}function dd(e){return Array.isArray(e)?e.join(" "):e}const fd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_o={};for(const e in fd)_o[e]={isEnabled:t=>fd[e].some(n=>!!t[n])};function n1(e){for(const t in e)_o[t]={..._o[t],...e[t]}}const Ec=u.createContext({}),yh=u.createContext({}),r1=Symbol.for("motionComponentSymbol");function o1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&n1(e);function o(a,c){let l;const d={...u.useContext(bc),...a,layoutId:i1(a)},{isStatic:f}=d,m=t1(a),p=r(a,f);if(!f&&is){m.visualElement=Qw(i,p,d,t);const x=u.useContext(yh),E=u.useContext(vh).strict;m.visualElement&&(l=m.visualElement.loadFeatures(d,E,e,x))}return he.createElement(rs.Provider,{value:m},l&&m.visualElement?he.createElement(l,{visualElement:m.visualElement,...d}):null,n(i,a,Jw(p,m.visualElement,c),p,f,m.visualElement))}const s=u.forwardRef(o);return s[r1]=i,s}function i1({layoutId:e}){const t=u.useContext(Ec).id;return t&&e!==void 0?t+"-"+e:e}function s1(e){function t(r,i={}){return o1(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const a1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Cc(e){return typeof e!="string"||e.includes("-")?!1:!!(a1.indexOf(e)>-1||/[A-Z]/.test(e))}const _i={};function c1(e){Object.assign(_i,e)}const Ao=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Er=new Set(Ao);function bh(e,{layout:t,layoutId:n}){return Er.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_i[e]||e==="opacity")}const Dt=e=>!!(e&&e.getVelocity),l1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},u1=Ao.length;function d1(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<u1;s++){const a=Ao[s];if(e[a]!==void 0){const c=l1[a]||a;o+=`${c}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const xh=e=>t=>typeof t=="string"&&t.startsWith(e),wh=xh("--"),Sa=xh("var(--"),f1=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,p1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>Math.min(Math.max(n,e),t),Cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uo={...Cr,transform:e=>Zn(0,1,e)},ti={...Cr,default:1},fo=e=>Math.round(e*1e5)/1e5,ls=/(-)?([\d]*\.?[\d])+/g,Eh=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,h1=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oo(e){return typeof e=="string"}const Do=e=>({test:t=>Oo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wn=Do("deg"),vn=Do("%"),Oe=Do("px"),m1=Do("vh"),v1=Do("vw"),pd={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},hd={...Cr,transform:Math.round},Ch={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,radius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,size:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,rotate:Wn,rotateX:Wn,rotateY:Wn,rotateZ:Wn,scale:ti,scaleX:ti,scaleY:ti,scaleZ:ti,skew:Wn,skewX:Wn,skewY:Wn,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:uo,originX:pd,originY:pd,originZ:Oe,zIndex:hd,fillOpacity:uo,strokeOpacity:uo,numOctaves:hd};function _c(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let c=!1,l=!1,d=!0;for(const f in t){const m=t[f];if(wh(f)){o[f]=m;continue}const p=Ch[f],x=p1(m,p);if(Er.has(f)){if(c=!0,s[f]=x,!d)continue;m!==(p.default||0)&&(d=!1)}else f.startsWith("origin")?(l=!0,a[f]=x):i[f]=x}if(t.transform||(c||r?i.transform=d1(e.transform,n,d,r):i.transform&&(i.transform="none")),l){const{originX:f="50%",originY:m="50%",originZ:p=0}=a;i.transformOrigin=`${f} ${m} ${p}`}}const Sc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _h(e,t,n){for(const r in t)!Dt(t[r])&&!bh(r,n)&&(e[r]=t[r])}function g1({transformTemplate:e},t,n){return u.useMemo(()=>{const r=Sc();return _c(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function y1(e,t,n){const r=e.style||{},i={};return _h(i,r,e),Object.assign(i,g1(e,t,n)),e.transformValues?e.transformValues(i):i}function b1(e,t,n){const r={},i=y1(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const x1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Si(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||x1.has(e)}let Sh=e=>!Si(e);function w1(e){e&&(Sh=t=>t.startsWith("on")?!Si(t):e(t))}try{w1(require("@emotion/is-prop-valid").default)}catch{}function E1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Sh(i)||n===!0&&Si(i)||!t&&!Si(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function md(e,t,n){return typeof e=="string"?e:Oe.transform(t+n*e)}function C1(e,t,n){const r=md(t,e.x,e.width),i=md(n,e.y,e.height);return`${r} ${i}`}const _1={offset:"stroke-dashoffset",array:"stroke-dasharray"},S1={offset:"strokeDashoffset",array:"strokeDasharray"};function T1(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?_1:S1;e[o.offset]=Oe.transform(-r);const s=Oe.transform(t),a=Oe.transform(n);e[o.array]=`${s} ${a}`}function Tc(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...l},d,f,m){if(_c(e,l,d,m),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:x,dimensions:E}=e;p.transform&&(E&&(x.transform=p.transform),delete p.transform),E&&(i!==void 0||o!==void 0||x.transform)&&(x.transformOrigin=C1(E,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&T1(p,s,a,c,!1)}const Th=()=>({...Sc(),attrs:{}}),$c=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $1(e,t,n,r){const i=u.useMemo(()=>{const o=Th();return Tc(o,t,{enableHardwareAcceleration:!1},$c(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};_h(o,e.style,e),i.style={...o,...i.style}}return i}function R1(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Cc(n)?$1:b1)(r,o,s,n),d={...E1(r,typeof n=="string",e),...c,ref:i},{children:f}=r,m=u.useMemo(()=>Dt(f)?f.get():f,[f]);return u.createElement(n,{...d,children:m})}}const Rc=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function $h(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Rh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ph(e,t,n,r){$h(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Rh.has(i)?i:Rc(i),t.attrs[i])}function Pc(e,t){const{style:n}=e,r={};for(const i in n)(Dt(n[i])||t.style&&Dt(t.style[i])||bh(i,e))&&(r[i]=n[i]);return r}function Ih(e,t){const n=Pc(e,t);for(const r in e)if(Dt(e[r])||Dt(t[r])){const i=Ao.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Ic(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function us(e){const t=u.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ti=e=>Array.isArray(e),P1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),I1=e=>Ti(e)?e[e.length-1]||0:e;function pi(e){const t=Dt(e)?e.get():e;return P1(t)?t.toValue():t}function A1({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:O1(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Ah=e=>(t,n)=>{const r=u.useContext(rs),i=u.useContext(os),o=()=>A1(e,t,r,i);return n?o():us(o)};function O1(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=pi(o[m]);let{initial:s,animate:a}=e;const c=cs(e),l=gh(e);t&&l&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const f=d?a:s;return f&&typeof f!="boolean"&&!as(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const x=Ic(e,p);if(!x)return;const{transitionEnd:E,transition:S,...T}=x;for(const h in T){let w=T[h];if(Array.isArray(w)){const _=d?w.length-1:0;w=w[_]}w!==null&&(i[h]=w)}for(const h in E)i[h]=E[h]}),i}const mt=e=>e;function D1(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,l=!1,d=!1)=>{const f=d&&i,m=f?t:n;return l&&s.add(c),m.indexOf(c)===-1&&(m.push(c),f&&i&&(r=t.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let l=0;l<r;l++){const d=t[l];d(c),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(c))}};return a}const ni=["prepare","read","update","preRender","render","postRender"],M1=40;function k1(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=ni.reduce((f,m)=>(f[m]=D1(()=>n=!0),f),{}),s=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,M1),1),i.timestamp=f,i.isProcessing=!0,ni.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:ni.reduce((f,m)=>{const p=o[m];return f[m]=(x,E=!1,S=!1)=>(n||c(),p.schedule(x,E,S)),f},{}),cancel:f=>ni.forEach(m=>o[m].cancel(f)),state:i,steps:o}}const{schedule:ot,cancel:an,state:At,steps:Us}=k1(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0),N1={useVisualState:Ah({scrapeMotionValuesFromProps:Ih,createRenderState:Th,onMount:(e,t,{renderState:n,latestValues:r})=>{ot.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ot.render(()=>{Tc(n,r,{enableHardwareAcceleration:!1},$c(t.tagName),e.transformTemplate),Ph(t,n)})}})},V1={useVisualState:Ah({scrapeMotionValuesFromProps:Pc,createRenderState:Sc})};function j1(e,{forwardMotionProps:t=!1},n,r){return{...Cc(e)?N1:V1,preloadedFeatures:n,useRender:R1(t),createVisualElement:r,Component:e}}function Sn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Oh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ds(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const L1=e=>t=>Oh(t)&&e(t,ds(t));function Rn(e,t,n,r){return Sn(e,t,L1(n),r)}const F1=(e,t)=>n=>t(e(n)),Kn=(...e)=>e.reduce(F1);function Dh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const vd=Dh("dragHorizontal"),gd=Dh("dragVertical");function Mh(e){let t=!1;if(e==="y")t=gd();else if(e==="x")t=vd();else{const n=vd(),r=gd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function kh(){const e=Mh(!0);return e?(e(),!1):!0}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function yd(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||kh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ot.update(()=>a[r](o,s))};return Rn(e.current,n,i,{passive:!e.getProps()[r]})}class B1 extends tr{mount(){this.unmount=Kn(yd(this.node,!0),yd(this.node,!1))}unmount(){}}class H1 extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Kn(Sn(this.node.current,"focus",()=>this.onFocus()),Sn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nh=(e,t)=>t?e===t?!0:Nh(e,t.parentElement):!1;function Ys(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ds(n))}class W1 extends tr{constructor(){super(...arguments),this.removeStartListeners=mt,this.removeEndListeners=mt,this.removeAccessibleListeners=mt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Rn(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:d}=this.node.getProps();ot.update(()=>{Nh(this.node.current,a.target)?l&&l(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=Rn(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Kn(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ys("up",(c,l)=>{const{onTap:d}=this.node.getProps();d&&ot.update(()=>d(c,l))})};this.removeEndListeners(),this.removeEndListeners=Sn(this.node.current,"keyup",s),Ys("down",(a,c)=>{this.startPress(a,c)})},n=Sn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ys("cancel",(o,s)=>this.cancelPress(o,s))},i=Sn(this.node.current,"blur",r);this.removeAccessibleListeners=Kn(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ot.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!kh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ot.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Rn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Sn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Kn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ta=new WeakMap,Ks=new WeakMap,U1=e=>{const t=Ta.get(e.target);t&&t(e)},Y1=e=>{e.forEach(U1)};function K1({root:e,...t}){const n=e||document;Ks.has(n)||Ks.set(n,{});const r=Ks.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Y1,{root:e,...t})),r[i]}function z1(e,t,n){const r=K1(t);return Ta.set(e,n),r.observe(e),()=>{Ta.delete(e),r.unobserve(e)}}const X1={some:0,all:1};class G1 extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:X1[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return z1(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(q1(t,n))&&this.startObserver()}unmount(){}}function q1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Z1={inView:{Feature:G1},tap:{Feature:W1},focus:{Feature:H1},hover:{Feature:B1}};function Vh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Q1(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function J1(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function fs(e,t,n){const r=e.getProps();return Ic(r,t,n!==void 0?n:r.custom,Q1(e),J1(e))}const eE="framerAppearId",tE="data-"+Rc(eE);let Mo=mt,Kt=mt;process.env.NODE_ENV!=="production"&&(Mo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Kt=(e,t)=>{if(!e)throw new Error(t)});const Pn=e=>e*1e3,gn=e=>e/1e3,nE={current:!1},jh=e=>Array.isArray(e)&&typeof e[0]=="number";function Lh(e){return!!(!e||typeof e=="string"&&Fh[e]||jh(e)||Array.isArray(e)&&e.every(Lh))}const co=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:co([0,.65,.55,1]),circOut:co([.55,0,1,.45]),backIn:co([.31,.01,.66,-.59]),backOut:co([.33,1.53,.69,.99])};function Bh(e){if(e)return jh(e)?co(e):Array.isArray(e)?e.map(Bh):Fh[e]}function rE(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const d=Bh(a);return Array.isArray(d)&&(l.easing=d),e.animate(l,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function oE(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Hh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,iE=1e-7,sE=12;function aE(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Hh(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>iE&&++a<sE);return s}function ko(e,t,n,r){if(e===t&&n===r)return mt;const i=o=>aE(o,0,1,e,n);return o=>o===0||o===1?o:Hh(i(o),t,r)}const cE=ko(.42,0,1,1),lE=ko(0,0,.58,1),Wh=ko(.42,0,.58,1),Uh=e=>Array.isArray(e)&&typeof e[0]!="number",Yh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Kh=e=>t=>1-e(1-t),zh=e=>1-Math.sin(Math.acos(e)),Ac=Kh(zh),uE=Yh(Ac),Xh=ko(.33,1.53,.69,.99),Oc=Kh(Xh),dE=Yh(Oc),fE=e=>(e*=2)<1?.5*Oc(e):.5*(2-Math.pow(2,-10*(e-1))),bd={linear:mt,easeIn:cE,easeInOut:Wh,easeOut:lE,circIn:zh,circInOut:uE,circOut:Ac,backIn:Oc,backInOut:dE,backOut:Xh,anticipate:fE},xd=e=>{if(Array.isArray(e)){Kt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return ko(t,n,r,i)}else if(typeof e=="string")return Kt(bd[e]!==void 0,`Invalid easing type '${e}'`),bd[e];return e},Dc=(e,t)=>n=>!!(Oo(n)&&h1.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Gh=(e,t,n)=>r=>{if(!Oo(r))return r;const[i,o,s,a]=r.match(ls);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},pE=e=>Zn(0,255,e),zs={...Cr,transform:e=>Math.round(pE(e))},pr={test:Dc("rgb","red"),parse:Gh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zs.transform(e)+", "+zs.transform(t)+", "+zs.transform(n)+", "+fo(uo.transform(r))+")"};function hE(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const $a={test:Dc("#"),parse:hE,transform:pr.transform},Dr={test:Dc("hsl","hue"),parse:Gh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(fo(t))+", "+vn.transform(fo(n))+", "+fo(uo.transform(r))+")"},Mt={test:e=>pr.test(e)||$a.test(e)||Dr.test(e),parse:e=>pr.test(e)?pr.parse(e):Dr.test(e)?Dr.parse(e):$a.parse(e),transform:e=>Oo(e)?e:e.hasOwnProperty("red")?pr.transform(e):Dr.transform(e)},ft=(e,t,n)=>-n*e+n*t+e;function Xs(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 mE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Xs(c,a,e+1/3),o=Xs(c,a,e),s=Xs(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Gs=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},vE=[$a,pr,Dr],gE=e=>vE.find(t=>t.test(e));function wd(e){const t=gE(e);Kt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Dr&&(n=mE(n)),n}const qh=(e,t)=>{const n=wd(e),r=wd(t),i={...n};return o=>(i.red=Gs(n.red,r.red,o),i.green=Gs(n.green,r.green,o),i.blue=Gs(n.blue,r.blue,o),i.alpha=ft(n.alpha,r.alpha,o),pr.transform(i))};function yE(e){var t,n;return isNaN(e)&&Oo(e)&&(((t=e.match(ls))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Eh))===null||n===void 0?void 0:n.length)||0)>0}const Zh={regex:f1,countKey:"Vars",token:"${v}",parse:mt},Qh={regex:Eh,countKey:"Colors",token:"${c}",parse:Mt.parse},Jh={regex:ls,countKey:"Numbers",token:"${n}",parse:Cr.parse};function qs(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function $i(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&qs(n,Zh),qs(n,Qh),qs(n,Jh),n}function em(e){return $i(e).values}function tm(e){const{values:t,numColors:n,numVars:r,tokenised:i}=$i(e),o=t.length;return s=>{let a=i;for(let c=0;c<o;c++)c<r?a=a.replace(Zh.token,s[c]):c<r+n?a=a.replace(Qh.token,Mt.transform(s[c])):a=a.replace(Jh.token,fo(s[c]));return a}}const bE=e=>typeof e=="number"?0:e;function xE(e){const t=em(e);return tm(e)(t.map(bE))}const Qn={test:yE,parse:em,createTransformer:tm,getAnimatableNone:xE},nm=(e,t)=>n=>`${n>0?t:e}`;function rm(e,t){return typeof e=="number"?n=>ft(e,t,n):Mt.test(e)?qh(e,t):e.startsWith("var(")?nm(e,t):im(e,t)}const om=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>rm(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},wE=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rm(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},im=(e,t)=>{const n=Qn.createTransformer(t),r=$i(e),i=$i(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Kn(om(r.values,i.values),n):(Mo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),nm(e,t))},Hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ed=(e,t)=>n=>ft(e,t,n);function EE(e){return typeof e=="number"?Ed:typeof e=="string"?Mt.test(e)?qh:im:Array.isArray(e)?om:typeof e=="object"?wE:Ed}function CE(e,t,n){const r=[],i=n||EE(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||mt:t;a=Kn(c,a)}r.push(a)}return r}function Mc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Kt(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=CE(t,r,i),a=s.length,c=l=>{let d=0;if(a>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const f=Hr(e[d],e[d+1],l);return s[d](f)};return n?l=>c(Zn(e[0],e[o-1],l)):c}function sm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Hr(0,t,r);e.push(ft(n,1,i))}}function am(e){const t=[0];return sm(t,e.length-1),t}function _E(e,t){return e.map(n=>n*t)}function SE(e,t){return e.map(()=>t||Wh).splice(0,e.length-1)}function Ri({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Uh(r)?r.map(xd):xd(r),o={done:!1,value:t[0]},s=_E(n&&n.length===t.length?n:am(t),e),a=Mc(s,t,{ease:Array.isArray(i)?i:SE(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}function cm(e,t){return t?e*(1e3/t):0}const TE=5;function lm(e,t,n){const r=Math.max(t-TE,0);return cm(n-e(r),t-r)}const Zs=.001,$E=.01,Cd=10,RE=.05,PE=1;function IE({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Mo(e<=Pn(Cd),"Spring duration must be 10 seconds or less");let s=1-t;s=Zn(RE,PE,s),e=Zn($E,Cd,gn(e)),s<1?(i=l=>{const d=l*s,f=d*e,m=d-n,p=Ra(l,s),x=Math.exp(-f);return Zs-m/p*x},o=l=>{const f=l*s*e,m=f*n+n,p=Math.pow(s,2)*Math.pow(l,2)*e,x=Math.exp(-f),E=Ra(Math.pow(l,2),s);return(-i(l)+Zs>0?-1:1)*((m-p)*x)/E}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Zs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const a=5/e,c=OE(i,o,a);if(e=Pn(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const AE=12;function OE(e,t,n){let r=n;for(let i=1;i<AE;i++)r=r-e(r)/t(r);return r}function Ra(e,t){return e*Math.sqrt(1-t*t)}const DE=["duration","bounce"],ME=["stiffness","damping","mass"];function _d(e,t){return t.some(n=>e[n]!==void 0)}function kE(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!_d(e,ME)&&_d(e,DE)){const n=IE(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function kc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:d,duration:f,isResolvedFromDuration:m}=kE(r),p=d?-gn(d):0,x=c/(2*Math.sqrt(a*l)),E=o-i,S=gn(Math.sqrt(a/l)),T=Math.abs(E)<5;n||(n=T?.01:2),t||(t=T?.005:.5);let h;if(x<1){const w=Ra(S,x);h=_=>{const $=Math.exp(-x*S*_);return o-$*((p+x*S*E)/w*Math.sin(w*_)+E*Math.cos(w*_))}}else if(x===1)h=w=>o-Math.exp(-S*w)*(E+(p+S*E)*w);else{const w=S*Math.sqrt(x*x-1);h=_=>{const $=Math.exp(-x*S*_),M=Math.min(w*_,300);return o-$*((p+x*S*E)*Math.sinh(M)+w*E*Math.cosh(M))/w}}return{calculatedDuration:m&&f||null,next:w=>{const _=h(w);if(m)s.done=w>=f;else{let $=p;w!==0&&(x<1?$=lm(h,w,_):$=0);const M=Math.abs($)<=n,O=Math.abs(o-_)<=t;s.done=M&&O}return s.value=s.done?o:_,s}}}function Sd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},p=N=>a!==void 0&&N<a||c!==void 0&&N>c,x=N=>a===void 0?c:c===void 0||Math.abs(a-N)<Math.abs(c-N)?a:c;let E=n*t;const S=f+E,T=s===void 0?S:s(S);T!==S&&(E=T-f);const h=N=>-E*Math.exp(-N/r),w=N=>T+h(N),_=N=>{const V=h(N),z=w(N);m.done=Math.abs(V)<=l,m.value=m.done?T:z};let $,M;const O=N=>{p(m.value)&&($=N,M=kc({keyframes:[m.value,x(m.value)],velocity:lm(w,N,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:N=>{let V=!1;return!M&&$===void 0&&(V=!0,_(N),O(N)),$!==void 0&&N>$?M.next(N-$):(!V&&_(N),m)}}}const NE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ot.update(t,!0),stop:()=>an(t),now:()=>At.isProcessing?At.timestamp:performance.now()}},Pa=2e4;function Ia(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Pa;)t+=n,r=e.next(t);return t>=Pa?1/0:t}const VE={decay:Sd,inertia:Sd,tween:Ri,keyframes:Ri,spring:kc};function Pi({autoplay:e=!0,delay:t=0,driver:n=NE,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:d,onUpdate:f,...m}){let p=1,x=!1,E,S;const T=()=>{S=new Promise(L=>{E=L})};T();let h;const w=VE[i]||Ri;let _;w!==Ri&&typeof r[0]!="number"&&(_=Mc([0,100],r,{clamp:!1}),r=[0,100]);const $=w({...m,keyframes:r});let M;a==="mirror"&&(M=w({...m,keyframes:[...r].reverse(),velocity:-(m.velocity||0)}));let O="idle",N=null,V=null,z=null;$.calculatedDuration===null&&o&&($.calculatedDuration=Ia($));const{calculatedDuration:j}=$;let R=1/0,v=1/0;j!==null&&(R=j+s,v=R*(o+1)-s);let C=0;const I=L=>{if(V===null)return;p>0&&(V=Math.min(V,L)),p<0&&(V=Math.min(L-v/p,V)),N!==null?C=N:C=Math.round(L-V)*p;const oe=C-t*(p>=0?1:-1),G=p>=0?oe<0:oe>v;C=Math.max(oe,0),O==="finished"&&N===null&&(C=v);let X=C,ne=$;if(o){const J=C/R;let ee=Math.floor(J),te=J%1;!te&&J>=1&&(te=1),te===1&&ee--,ee=Math.min(ee,o+1);const Z=!!(ee%2);Z&&(a==="reverse"?(te=1-te,s&&(te-=s/R)):a==="mirror"&&(ne=M));let ge=Zn(0,1,te);C>v&&(ge=a==="reverse"&&Z?1:0),X=ge*R}const ae=G?{done:!1,value:r[0]}:ne.next(X);_&&(ae.value=_(ae.value));let{done:B}=ae;!G&&j!==null&&(B=p>=0?C>=v:C<=0);const H=N===null&&(O==="finished"||O==="running"&&B);return f&&f(ae.value),H&&q(),ae},k=()=>{h&&h.stop(),h=void 0},U=()=>{O="idle",k(),E(),T(),V=z=null},q=()=>{O="finished",d&&d(),k(),E()},ue=()=>{if(x)return;h||(h=n(I));const L=h.now();c&&c(),N!==null?V=L-N:(!V||O==="finished")&&(V=L),O==="finished"&&T(),z=V,N=null,O="running",h.start()};e&&ue();const W={then(L,oe){return S.then(L,oe)},get time(){return gn(C)},set time(L){L=Pn(L),C=L,N!==null||!h||p===0?N=L:V=h.now()-L/p},get duration(){const L=$.calculatedDuration===null?Ia($):$.calculatedDuration;return gn(L)},get speed(){return p},set speed(L){L===p||!h||(p=L,W.time=gn(C))},get state(){return O},play:ue,pause:()=>{O="paused",N=C},stop:()=>{x=!0,O!=="idle"&&(O="idle",l&&l(),U())},cancel:()=>{z!==null&&I(z),U()},complete:()=>{O="finished"},sample:L=>(V=0,I(L))};return W}function um(e){let t;return()=>(t===void 0&&(t=e()),t)}const jE=um(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),LE=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ri=10,FE=2e4,BE=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Lh(t.ease);function HE(e,t,{onUpdate:n,onComplete:r,...i}){if(!(jE()&&LE.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c;const l=()=>{c=new Promise(h=>{a=h})};l();let{keyframes:d,duration:f=300,ease:m,times:p}=i;if(BE(t,i)){const h=Pi({...i,repeat:0,delay:0});let w={done:!1,value:d[0]};const _=[];let $=0;for(;!w.done&&$<FE;)w=h.sample($),_.push(w.value),$+=ri;p=void 0,d=_,f=$-ri,m="linear"}const x=rE(e.owner.current,t,d,{...i,duration:f,ease:m,times:p}),E=()=>x.cancel(),S=()=>{ot.update(E),a(),l()};return x.onfinish=()=>{e.set(oE(d,i)),r&&r(),S()},{then(h,w){return c.then(h,w)},attachTimeline(h){return x.timeline=h,x.onfinish=null,mt},get time(){return gn(x.currentTime||0)},set time(h){x.currentTime=Pn(h)},get speed(){return x.playbackRate},set speed(h){x.playbackRate=h},get duration(){return gn(f)},play:()=>{s||(x.play(),an(E))},pause:()=>x.pause(),stop:()=>{if(s=!0,x.playState==="idle")return;const{currentTime:h}=x;if(h){const w=Pi({...i,autoplay:!1});e.setWithVelocity(w.sample(h-ri).value,w.sample(h).value,ri)}S()},complete:()=>x.finish(),cancel:S}}function WE({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:mt,pause:mt,stop:mt,then:o=>(o(),Promise.resolve()),cancel:mt,complete:mt});return t?Pi({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const UE={type:"spring",stiffness:500,damping:25,restSpeed:10},YE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KE={type:"keyframes",duration:.8},zE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XE=(e,{keyframes:t})=>t.length>2?KE:Er.has(e)?e.startsWith("scale")?YE(t[1]):UE:zE,Aa=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Qn.test(t)||t==="0")&&!t.startsWith("url(")),GE=new Set(["brightness","contrast","saturate","opacity"]);function qE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ls)||[];if(!r)return e;const i=n.replace(r,"");let o=GE.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ZE=/([a-z-]*)\(.*?\)/g,Oa={...Qn,getAnimatableNone:e=>{const t=e.match(ZE);return t?t.map(qE).join(" "):e}},QE={...Ch,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Oa,WebkitFilter:Oa},Nc=e=>QE[e];function dm(e,t){let n=Nc(e);return n!==Oa&&(n=Qn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fm=e=>/^0[^.\s]+$/.test(e);function JE(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||fm(e)}function eC(e,t,n,r){const i=Aa(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let l=0;l<o.length;l++)o[l]===null&&(o[l]=l===0?s:o[l-1]),JE(o[l])&&c.push(l),typeof o[l]=="string"&&o[l]!=="none"&&o[l]!=="0"&&(a=o[l]);if(i&&c.length&&a)for(let l=0;l<c.length;l++){const d=c[l];o[d]=dm(t,a)}return o}function tC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:l,...d}){return!!Object.keys(d).length}function pm(e,t){return e[t]||e.default||e}const Vc=(e,t,n,r={})=>i=>{const o=pm(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Pn(s);const c=eC(t,e,n,o),l=c[0],d=c[c.length-1],f=Aa(e,l),m=Aa(e,d);Mo(f===m,`You are trying to animate ${e} from "${l}" to "${d}". ${l} is not an animatable value - to enable this animation set ${l} to a value animatable to ${d} via the \`style\` property.`);let p={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:x=>{t.set(x),o.onUpdate&&o.onUpdate(x)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(tC(o)||(p={...p,...XE(e,p)}),p.duration&&(p.duration=Pn(p.duration)),p.repeatDelay&&(p.repeatDelay=Pn(p.repeatDelay)),!f||!m||nE.current||o.type===!1)return WE(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const x=HE(t,e,p);if(x)return x}return Pi(p)};function Ii(e){return!!(Dt(e)&&e.add)}const hm=e=>/^\-?\d*\.?\d+$/.test(e);function jc(e,t){e.indexOf(t)===-1&&e.push(t)}function ps(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Lc{constructor(){this.subscriptions=[]}add(t){return jc(this.subscriptions,t),()=>ps(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Td=new Set;function hs(e,t,n){e||Td.has(t)||(console.warn(t),n&&console.warn(n),Td.add(t))}const nC=e=>!isNaN(parseFloat(e)),po={current:void 0};class rC{constructor(t,n={}){this.version="10.16.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=At;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,ot.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ot.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=nC(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&hs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Lc);const r=this.events[t].add(n);return t==="change"?()=>{r(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return po.current&&po.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?cm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yr(e,t){return new rC(e,t)}const mm=e=>t=>t.test(e),oC={test:e=>e==="auto",parse:e=>e},vm=[Cr,Oe,vn,Wn,v1,m1,oC],ro=e=>vm.find(mm(e)),iC=[...vm,Mt,Qn],sC=e=>iC.find(mm(e));function aC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yr(n))}function cC(e,t){const n=fs(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=I1(o[s]);aC(e,s,a)}}function lC(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],l=t[c];let d=null;Array.isArray(l)&&(d=l[0]),d===null&&(d=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),d!=null&&(typeof d=="string"&&(hm(d)||fm(d))?d=parseFloat(d):!sC(d)&&Qn.test(l)&&(d=dm(c,l)),e.addValue(c,yr(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function uC(e,t){return t?(t[e]||t.default||t).from:void 0}function dC(e,t,n){const r={};for(const i in e){const o=uC(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function fC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Fc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(o=r);const l=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const m=e.getValue(f),p=a[f];if(!m||p===void 0||d&&fC(d,f))continue;const x={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!m.hasAnimated){const S=e.getProps()[tE];S&&(x.elapsed=window.HandoffAppearAnimations(S,f,m,ot))}m.start(Vc(f,m,p,e.shouldReduceMotion&&Er.has(f)?{type:!1}:x));const E=m.animation;Ii(c)&&(c.add(f),E.then(()=>c.remove(f))),l.push(E)}return s&&Promise.all(l).then(()=>{s&&cC(e,s)}),l}function Da(e,t,n={}){const r=fs(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Fc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return pC(e,t,l+c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function pC(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(hC).forEach((l,d)=>{l.notify("AnimationStart",t),s.push(Da(l,t,{...o,delay:n+c(d)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function hC(e,t){return e.sortNodePosition(t)}function mC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Da(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Da(e,t,n);else{const i=typeof t=="function"?fs(e,t,n.custom):t;r=Promise.all(Fc(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const vC=[...xc].reverse(),gC=xc.length;function yC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>mC(e,n,r)))}function bC(e){let t=yC(e);const n=wC();let r=!0;const i=(c,l)=>{const d=fs(e,l);if(d){const{transition:f,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(c){t=c(e)}function s(c,l){const d=e.getProps(),f=e.getVariantContext(!0)||{},m=[],p=new Set;let x={},E=1/0;for(let T=0;T<gC;T++){const h=vC[T],w=n[h],_=d[h]!==void 0?d[h]:f[h],$=Co(_),M=h===l?w.isActive:null;M===!1&&(E=T);let O=_===f[h]&&_!==d[h]&&$;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),w.protectedKeys={...x},!w.isActive&&M===null||!_&&!w.prevProp||as(_)||typeof _=="boolean")continue;const N=xC(w.prevProp,_);let V=N||h===l&&w.isActive&&!O&&$||T>E&&$;const z=Array.isArray(_)?_:[_];let j=z.reduce(i,{});M===!1&&(j={});const{prevResolvedValues:R={}}=w,v={...R,...j},C=I=>{V=!0,p.delete(I),w.needsAnimating[I]=!0};for(const I in v){const k=j[I],U=R[I];x.hasOwnProperty(I)||(k!==U?Ti(k)&&Ti(U)?!Vh(k,U)||N?C(I):w.protectedKeys[I]=!0:k!==void 0?C(I):p.add(I):k!==void 0&&p.has(I)?C(I):w.protectedKeys[I]=!0)}w.prevProp=_,w.prevResolvedValues=j,w.isActive&&(x={...x,...j}),r&&e.blockInitialAnimation&&(V=!1),V&&!O&&m.push(...z.map(I=>({animation:I,options:{type:h,...c}})))}if(p.size){const T={};p.forEach(h=>{const w=e.getBaseTarget(h);w!==void 0&&(T[h]=w)}),m.push({animation:T})}let S=!!m.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(m):Promise.resolve()}function a(c,l,d){var f;if(n[c].isActive===l)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var x;return(x=p.animationState)===null||x===void 0?void 0:x.setActive(c,l)}),n[c].isActive=l;const m=s(d,c);for(const p in n)n[p].protectedKeys={};return m}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function xC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vh(t,e):!1}function ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wC(){return{animate:ar(!0),whileInView:ar(),whileHover:ar(),whileTap:ar(),whileDrag:ar(),whileFocus:ar(),exit:ar()}}class EC extends tr{constructor(t){super(t),t.animationState||(t.animationState=bC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),as(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let CC=0;class _C extends tr{constructor(){super(...arguments),this.id=CC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const SC={animation:{Feature:EC},exit:{Feature:_C}},$d=(e,t)=>Math.abs(e-t);function TC(e,t){const n=$d(e.x,t.x),r=$d(e.y,t.y);return Math.sqrt(n**2+r**2)}class gm{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=Js(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=TC(l.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:m}=l,{timestamp:p}=At;this.history.push({...m,timestamp:p});const{onStart:x,onMove:E}=this.handlers;d||(x&&x(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,l)},this.handlePointerMove=(l,d)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=Qs(d,this.transformPagePoint),ot.update(this.updatePoint,!0)},this.handlePointerUp=(l,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:m}=this.handlers,p=Js(l.type==="pointercancel"?this.lastMoveEventInfo:Qs(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,p),m&&m(l,p)},!Oh(t))return;this.handlers=n,this.transformPagePoint=r;const i=ds(t),o=Qs(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=At;this.history=[{...s,timestamp:a}];const{onSessionStart:c}=n;c&&c(t,Js(o,this.history)),this.removeListeners=Kn(Rn(window,"pointermove",this.handlePointerMove),Rn(window,"pointerup",this.handlePointerUp),Rn(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),an(this.updatePoint)}}function Qs(e,t){return t?{point:t(e.point)}:e}function Rd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Js({point:e},t){return{point:e,delta:Rd(e,ym(t)),offset:Rd(e,$C(t)),velocity:RC(t,.1)}}function $C(e){return e[0]}function ym(e){return e[e.length-1]}function RC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ym(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Pn(t)));)n--;if(!r)return{x:0,y:0};const o=gn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zt(e){return e.max-e.min}function Ma(e,t=0,n=.01){return Math.abs(e-t)<=n}function Pd(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=zt(n)/zt(t),(Ma(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(Ma(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ho(e,t,n,r){Pd(e.x,t.x,n.x,r?r.originX:void 0),Pd(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+zt(t)}function PC(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Ad(e,t,n){e.min=t.min-n.min,e.max=e.min+zt(t)}function mo(e,t,n){Ad(e.x,t.x,n.x),Ad(e.y,t.y,n.y)}function IC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function Od(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AC(e,{top:t,left:n,bottom:r,right:i}){return{x:Od(e.x,n,i),y:Od(e.y,t,r)}}function Dd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function OC(e,t){return{x:Dd(e.x,t.x),y:Dd(e.y,t.y)}}function DC(e,t){let n=.5;const r=zt(e),i=zt(t);return i>r?n=Hr(t.min,t.max-r,e.min):r>i&&(n=Hr(e.min,e.max-i,t.min)),Zn(0,1,n)}function MC(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ka=.35;function kC(e=ka){return e===!1?e=0:e===!0&&(e=ka),{x:Md(e,"left","right"),y:Md(e,"top","bottom")}}function Md(e,t,n){return{min:kd(e,t),max:kd(e,n)}}function kd(e,t){return typeof e=="number"?e:e[t]||0}const Nd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mr=()=>({x:Nd(),y:Nd()}),Vd=()=>({min:0,max:0}),xt=()=>({x:Vd(),y:Vd()});function mn(e){return[e("x"),e("y")]}function bm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function NC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ea(e){return e===void 0||e===1}function Na({scale:e,scaleX:t,scaleY:n}){return!ea(e)||!ea(t)||!ea(n)}function dr(e){return Na(e)||xm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function xm(e){return jd(e.x)||jd(e.y)}function jd(e){return e&&e!=="0%"}function Ai(e,t,n){const r=e-n,i=t*r;return n+i}function Ld(e,t,n,r,i){return i!==void 0&&(e=Ai(e,i,r)),Ai(e,n,r)+t}function Va(e,t=0,n=1,r,i){e.min=Ld(e.min,t,n,r,i),e.max=Ld(e.max,t,n,r,i)}function wm(e,{x:t,y:n}){Va(e.x,t.translate,t.scale,t.originPoint),Va(e.y,n.translate,n.scale,n.originPoint)}function jC(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&kr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,wm(e,s)),r&&dr(o.latestValues)&&kr(e,o.latestValues))}t.x=Fd(t.x),t.y=Fd(t.y)}function Fd(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Un(e,t){e.min=e.min+t,e.max=e.max+t}function Bd(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=ft(e.min,e.max,o);Va(e,t[n],t[r],s,t.scale)}const LC=["x","scaleX","originX"],FC=["y","scaleY","originY"];function kr(e,t){Bd(e.x,t,LC),Bd(e.y,t,FC)}function Em(e,t){return bm(VC(e.getBoundingClientRect(),t))}function BC(e,t,n){const r=Em(e,n),{scroll:i}=t;return i&&(Un(r.x,i.offset.x),Un(r.y,i.offset.y)),r}const HC=new WeakMap;class WC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(ds(c,"page").point)},o=(c,l)=>{const{drag:d,dragPropagation:f,onDragStart:m}=this.getProps();if(d&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mh(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mn(x=>{let E=this.getAxisMotionValue(x).get()||0;if(vn.test(E)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[x];T&&(E=zt(T)*(parseFloat(E)/100))}}this.originPoint[x]=E}),m&&ot.update(()=>m(c,l),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},s=(c,l)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:x}=l;if(f&&this.currentDirection===null){this.currentDirection=UC(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",l.point,x),this.updateAxis("y",l.point,x),this.visualElement.render(),p&&p(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new gm(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ot.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!oi(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=IC(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Or(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=AC(r.layoutBox,t):this.constraints=!1,this.elastic=kC(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mn(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=MC(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Or(t))return!1;const r=t.current;Kt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=BC(r,i.root,this.visualElement.getTransformPagePoint());let s=OC(i.layout.layoutBox,o);if(n){const a=n(NC(s));this.hasMutatedConstraints=!!a,a&&(s=bm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=mn(d=>{if(!oi(d,n,this.currentDirection))return;let f=c&&c[d]||{};s&&(f={min:0,max:0});const m=i?200:1e6,p=i?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,x)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Vc(t,r,0,n))}stopAnimation(){mn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mn(n=>{const{drag:r}=this.getProps();if(!oi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-ft(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Or(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mn(s=>{const a=this.getAxisMotionValue(s);if(a){const c=a.get();i[s]=DC({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mn(s=>{if(!oi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(ft(c,l,i[s]))})}addListeners(){if(!this.visualElement.current)return;HC.set(this.visualElement,this);const t=this.visualElement.current,n=Rn(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Or(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Sn(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(mn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ka,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function oi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function UC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YC extends tr{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new WC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hd=e=>(t,n)=>{e&&ot.update(()=>e(t,n))};class KC extends tr{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new gm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hd(t),onStart:Hd(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ot.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Rn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function zC(){const e=u.useContext(os);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=u.useId();return u.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const hi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const oo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Oe.test(e))e=parseFloat(e);else return e;const n=Wd(e,t.target.x),r=Wd(e,t.target.y);return`${n}% ${r}%`}},XC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Qn.parse(e);if(i.length>5)return r;const o=Qn.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=c;const l=ft(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),o(i)}};class GC extends u.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;c1(qC),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),hi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ot.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cm(e){const[t,n]=zC(),r=u.useContext(Ec);return u.createElement(GC,{...e,layoutGroup:r,switchLayoutGroup:u.useContext(yh),isPresent:t,safeToRemove:n})}const qC={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:XC},_m=["TopLeft","TopRight","BottomLeft","BottomRight"],ZC=_m.length,Ud=e=>typeof e=="string"?parseFloat(e):e,Yd=e=>typeof e=="number"||Oe.test(e);function QC(e,t,n,r,i,o){i?(e.opacity=ft(0,n.opacity!==void 0?n.opacity:1,JC(r)),e.opacityExit=ft(t.opacity!==void 0?t.opacity:1,0,e_(r))):o&&(e.opacity=ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<ZC;s++){const a=`border${_m[s]}Radius`;let c=Kd(t,a),l=Kd(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Yd(c)===Yd(l)?(e[a]=Math.max(ft(Ud(c),Ud(l),r),0),(vn.test(l)||vn.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function Kd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JC=Sm(0,.5,Ac),e_=Sm(.5,.95,mt);function Sm(e,t,n){return r=>r<e?0:r>t?1:n(Hr(e,t,r))}function zd(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){zd(e.x,t.x),zd(e.y,t.y)}function Xd(e,t,n,r,i){return e-=t,e=Ai(e,1/n,r),i!==void 0&&(e=Ai(e,1/i,r)),e}function t_(e,t=0,n=1,r=.5,i,o=e,s=e){if(vn.test(t)&&(t=parseFloat(t),t=ft(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ft(o.min,o.max,r);e===o&&(a-=t),e.min=Xd(e.min,t,n,a,i),e.max=Xd(e.max,t,n,a,i)}function Gd(e,t,[n,r,i],o,s){t_(e,t[n],t[r],t[i],t.scale,o,s)}const n_=["x","scaleX","originX"],r_=["y","scaleY","originY"];function qd(e,t,n,r){Gd(e.x,t,n_,n?n.x:void 0,r?r.x:void 0),Gd(e.y,t,r_,n?n.y:void 0,r?r.y:void 0)}function Zd(e){return e.translate===0&&e.scale===1}function Tm(e){return Zd(e.x)&&Zd(e.y)}function o_(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function $m(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Qd(e){return zt(e.x)/zt(e.y)}class i_{constructor(){this.members=[]}add(t){jc(this.members,t),t.scheduleRender()}remove(t){if(ps(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jd(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:c,rotateX:l,rotateY:d}=n;c&&(r+=`rotate(${c}deg) `),l&&(r+=`rotateX(${l}deg) `),d&&(r+=`rotateY(${d}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const s_=(e,t)=>e.depth-t.depth;class a_{constructor(){this.children=[],this.isDirty=!1}add(t){jc(this.children,t),this.isDirty=!0}remove(t){ps(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(s_),this.isDirty=!1,this.children.forEach(t)}}function c_(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(an(r),e(o-t))};return ot.read(r,!0),()=>an(r)}function l_(e){window.MotionDebug&&window.MotionDebug.record(e)}function Rm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Bc(e,t,n){const r=Dt(e)?e:yr(e);return r.start(Vc("",r,t,n)),r.animation}const ef=["","X","Y","Z"],tf=1e3;let u_=0;const fr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Pm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=u_++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{fr.totalNodes=fr.resolvedTargetDeltas=fr.recalculatedProjection=0,this.nodes.forEach(p_),this.nodes.forEach(y_),this.nodes.forEach(b_),this.nodes.forEach(h_),l_(fr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new a_)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Lc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rm(s),this.instance=s;const{layoutId:c,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),e){let f;const m=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=c_(m,250),hi.hasAnimatedSinceResize&&(hi.hasAnimatedSinceResize=!1,this.nodes.forEach(rf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:m,hasRelativeTargetChanged:p,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||d.getDefaultTransition()||__,{onLayoutAnimationStart:S,onLayoutAnimationComplete:T}=d.getProps(),h=!this.targetLayout||!$m(this.targetLayout,x)||p,w=!m&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||m&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const _={...pm(E,"layout"),onPlay:S,onComplete:T};(d.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else m||rf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,an(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(x_),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nf);return}this.isUpdating||this.nodes.forEach(v_),this.isUpdating=!1,this.nodes.forEach(g_),this.nodes.forEach(d_),this.nodes.forEach(f_),this.clearAllSnapshots();const a=performance.now();At.delta=Zn(0,1e3/60,a-At.timestamp),At.timestamp=a,At.isProcessing=!0,Us.update.process(At),Us.preRender.process(At),Us.render.process(At),At.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(m_),this.sharedNodes.forEach(w_)}scheduleUpdateProjection(){ot.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Tm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;s&&(a||dr(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),S_(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return xt();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(Un(a.x,c.offset.x),Un(a.y,c.offset.y)),a}removeElementScroll(s){const a=xt();Qt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;if(l!==this.root&&d&&f.layoutScroll){if(d.isRoot){Qt(a,s);const{scroll:m}=this.root;m&&(Un(a.x,-m.offset.x),Un(a.y,-m.offset.y))}Un(a.x,d.offset.x),Un(a.y,d.offset.y)}}return a}applyTransform(s,a=!1){const c=xt();Qt(c,s);for(let l=0;l<this.path.length;l++){const d=this.path[l];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&kr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),dr(d.latestValues)&&kr(c,d.latestValues)}return dr(this.latestValues)&&kr(c,this.latestValues),c}removeTransform(s){const a=xt();Qt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!dr(l.latestValues))continue;Na(l.latestValues)&&l.updateSnapshot();const d=xt(),f=l.measurePageBox();Qt(d,f),qd(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return dr(this.latestValues)&&qd(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==At.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:m}=this.options;if(!(!this.layout||!(f||m))){if(this.resolvedRelativeTargetAt=At.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),mo(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=xt(),this.targetWithTransforms=xt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),wm(this.target,this.targetDelta)):Qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),mo(this.relativeTargetOrigin,this.target,p.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}fr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Na(this.parent.latestValues)||xm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===At.timestamp&&(l=!1),l)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Qt(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,p=this.treeScale.y;jC(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:x}=a;if(!x){this.projectionTransform&&(this.projectionDelta=Mr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Mr(),this.projectionDeltaWithTransform=Mr());const E=this.projectionTransform;ho(this.projectionDelta,this.layoutCorrected,x,this.latestValues),this.projectionTransform=Jd(this.projectionDelta,this.treeScale),(this.projectionTransform!==E||this.treeScale.x!==m||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),fr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=Mr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=xt(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,E=p!==x,S=this.getStack(),T=!S||S.members.length<=1,h=!!(E&&!T&&this.options.crossfade===!0&&!this.path.some(C_));this.animationProgress=0;let w;this.mixTargetDelta=_=>{const $=_/1e3;of(f.x,s.x,$),of(f.y,s.y,$),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mo(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),E_(this.relativeTarget,this.relativeTargetOrigin,m,$),w&&o_(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=xt()),Qt(w,this.relativeTarget)),E&&(this.animationValues=d,QC(d,l,this.latestValues,$,h,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=$},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(an(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ot.update(()=>{hi.hasAnimatedSinceResize=!0,this.currentAnimation=Bc(0,tf,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:d}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||xt();const f=zt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=zt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}Qt(a,c),kr(a,d),ho(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new i_),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let d=0;d<ef.length;d++){const f="rotate"+ef[d];c[f]&&(l[f]=c[f],s.setStaticValue(f,0))}s.render();for(const d in l)s.setStaticValue(d,l[d]);s.scheduleRender()}getProjectionStyles(s={}){var a,c;const l={};if(!this.instance||this.isSVG)return l;if(this.isVisible)l.visibility="";else return{visibility:"hidden"};const d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=pi(s.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none",l;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=pi(s.pointerEvents)||""),this.hasProjected&&!dr(this.latestValues)&&(E.transform=d?d({},""):"none",this.hasProjected=!1),E}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=Jd(this.projectionDeltaWithTransform,this.treeScale,m),d&&(l.transform=d(m,l.transform));const{x:p,y:x}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${x.origin*100}% 0`,f.animationValues?l.opacity=f===this?(c=(a=m.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const E in _i){if(m[E]===void 0)continue;const{correct:S,applyTo:T}=_i[E],h=l.transform==="none"?m[E]:S(m[E],f);if(T){const w=T.length;for(let _=0;_<w;_++)l[T[_]]=h}else l[E]=h}return this.options.layoutId&&(l.pointerEvents=f===this?pi(s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(nf),this.root.sharedNodes.clear()}}}function d_(e){e.updateLayout()}function f_(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?mn(f=>{const m=s?n.measuredBox[f]:n.layoutBox[f],p=zt(m);m.min=r[f].min,m.max=m.min+p}):Im(o,n.layoutBox,r)&&mn(f=>{const m=s?n.measuredBox[f]:n.layoutBox[f],p=zt(r[f]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=Mr();ho(a,r,n.layoutBox);const c=Mr();s?ho(c,e.applyTransform(i,!0),n.measuredBox):ho(c,r,n.layoutBox);const l=!Tm(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:p}=f;if(m&&p){const x=xt();mo(x,n.layoutBox,m.layoutBox);const E=xt();mo(E,r,p.layoutBox),$m(x,E)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function p_(e){fr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function h_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function m_(e){e.clearSnapshot()}function nf(e){e.clearMeasurements()}function v_(e){e.isLayoutDirty=!1}function g_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function y_(e){e.resolveTargetDelta()}function b_(e){e.calcProjection()}function x_(e){e.resetRotation()}function w_(e){e.removeLeadSnapshot()}function of(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sf(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function E_(e,t,n,r){sf(e.x,t.x,n.x,r),sf(e.y,t.y,n.y,r)}function C_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const __={duration:.45,ease:[.4,0,.1,1]},af=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),cf=af("applewebkit/")&&!af("chrome/")?Math.round:mt;function lf(e){e.min=cf(e.min),e.max=cf(e.max)}function S_(e){lf(e.x),lf(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ma(Qd(t),Qd(n),.2)}const T_=Pm({attachResizeListener:(e,t)=>Sn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ta={current:void 0},Am=Pm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ta.current){const e=new T_({});e.mount(window),e.setOptions({layoutScroll:!0}),ta.current=e}return ta.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$_={pan:{Feature:KC},drag:{Feature:YC,ProjectionNode:Am,MeasureLayout:Cm}},R_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function P_(e){const t=R_.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const I_=4;function ja(e,t,n=1){Kt(n<=I_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=P_(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return hm(s)?parseFloat(s):s}else return Sa(i)?ja(i,t,n+1):i}function A_(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Sa(o))return;const s=ja(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Sa(o))continue;const s=ja(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const O_=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Om=e=>O_.has(e),D_=e=>Object.keys(e).some(Om),ii=e=>e===Cr||e===Oe,uf=(e,t)=>parseFloat(e.split(", ")[t]),df=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return uf(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?uf(o[1],e):0}},M_=new Set(["x","y","z"]),k_=Ao.filter(e=>!M_.has(e));function N_(e){const t=[];return k_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Wr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:df(4,13),y:df(5,14)};Wr.translateX=Wr.x;Wr.translateY=Wr.y;const V_=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(l=>{a[l]=Wr[l](r,o)}),t.render();const c=t.measureViewportBox();return n.forEach(l=>{const d=t.getValue(l);d&&d.jump(a[l]),e[l]=Wr[l](c,o)}),e},j_=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Om);let o=[],s=!1;const a=[];if(i.forEach(c=>{const l=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],f=ro(d);const m=t[c];let p;if(Ti(m)){const x=m.length,E=m[0]===null?1:0;d=m[E],f=ro(d);for(let S=E;S<x&&m[S]!==null;S++)p?Kt(ro(m[S])===p,"All keyframes must be of the same type"):(p=ro(m[S]),Kt(p===f||ii(f)&&ii(p),"Keyframes must be of the same dimension as the current value"))}else p=ro(m);if(f!==p)if(ii(f)&&ii(p)){const x=l.get();typeof x=="string"&&l.set(parseFloat(x)),typeof m=="string"?t[c]=parseFloat(m):Array.isArray(m)&&p===Oe&&(t[c]=m.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(d===0||m===0)?d===0?l.set(p.transform(d)):t[c]=f.transform(m):(s||(o=N_(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],l.jump(m))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,l=V_(t,e,a);return o.length&&o.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),is&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function L_(e,t,n,r){return D_(t)?j_(e,t,n,r):{target:t,transitionEnd:r}}const F_=(e,t,n,r)=>{const i=A_(e,t,r);return t=i.target,r=i.transitionEnd,L_(e,t,n,r)},Oi={current:null},Hc={current:!1};function Dm(){if(Hc.current=!0,!!is)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Oi.current=e.matches;e.addListener(t),t()}else Oi.current=!1}function B_(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Dt(o))e.addValue(i,o),Ii(r)&&r.add(i),process.env.NODE_ENV==="development"&&hs(o.version==="10.16.1",`Attempting to mix Framer Motion versions ${o.version} with 10.16.1 may not work as expected.`);else if(Dt(s))e.addValue(i,yr(o,{owner:e})),Ii(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,yr(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const So=new WeakMap,Mm=Object.keys(_o),H_=Mm.length,ff=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],W_=wc.length;class U_{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ot.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=cs(n),this.isVariantNode=gh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const m=d[f];a[f]!==void 0&&Dt(m)&&(m.set(a[f],!1),Ii(l)&&l.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,So.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Hc.current||Dm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Oi.current,process.env.NODE_ENV!=="production"&&hs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){So.delete(this.current),this.projection&&this.projection.unmount(),an(this.notifyUpdate),an(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Er.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ot.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Mo(!1,c):Kt(!1,c)}for(let c=0;c<H_;c++){const l=Mm[c],{isEnabled:d,Feature:f,ProjectionNode:m,MeasureLayout:p}=_o[l];m&&(s=m),d(n)&&(!this.features[l]&&f&&(this.features[l]=new f(this)),p&&(a=p))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:l,drag:d,dragConstraints:f,layoutScroll:m,layoutRoot:p}=n;this.projection.setOptions({layoutId:c,layout:l,alwaysMeasureLayout:!!d||f&&Or(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ff.length;r++){const i=ff[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=B_(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<W_;r++){const i=wc[r],o=this.props[i];(Co(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=yr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ic(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Dt(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class km extends U_{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=dC(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){lC(this,r,s);const a=F_(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Y_(e){return window.getComputedStyle(e)}class Nm extends km{readValueFromInstance(t,n){if(Er.has(n)){const r=Nc(n);return r&&r.default||0}else{const r=Y_(t),i=(wh(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Em(t,n)}build(t,n,r,i){_c(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Pc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Dt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){$h(t,n,r,i)}}class Vm extends km{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Er.has(n)){const r=Nc(n);return r&&r.default||0}return n=Rh.has(n)?n:Rc(n),t.getAttribute(n)}measureInstanceViewportBox(){return xt()}scrapeMotionValuesFromProps(t,n){return Ih(t,n)}build(t,n,r,i){Tc(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Ph(t,n,r,i)}mount(t){this.isSVGTag=$c(t.tagName),super.mount(t)}}const K_=(e,t)=>Cc(e)?new Vm(t,{enableHardwareAcceleration:!1}):new Nm(t,{enableHardwareAcceleration:!0}),z_={layout:{ProjectionNode:Am,MeasureLayout:Cm}},X_={...SC,...Z1,...$_,...z_},zn=s1((e,t)=>j1(e,t,X_,K_));function jm(){const e=u.useRef(!1);return ss(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function G_(){const e=jm(),[t,n]=u.useState(0),r=u.useCallback(()=>{e.current&&n(t+1)},[t]);return[u.useCallback(()=>ot.postRender(r),[r]),t]}class q_ extends he.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Z_({children:e,isPresent:t}){const n=u.useId(),r=u.useRef(null),i=u.useRef({width:0,height:0,top:0,left:0});return u.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
113
113
  [data-motion-pop-id="${n}"] {
114
114
  position: absolute !important;
115
115
  width: ${o}px !important;
@@ -117,7 +117,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var Z=te(B,ee,X,ne,ae+".
117
117
  top: ${a}px !important;
118
118
  left: ${c}px !important;
119
119
  }
120
- `),()=>{document.head.removeChild(l)}},[t]),he.createElement(q_,{isPresent:t,childRef:r,sizeRef:i},he.cloneElement(e,{ref:r}))}const na=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=us(Q_),c=u.useId(),l=u.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return u.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),he.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=he.createElement(Z_,{isPresent:n},e)),he.createElement(os.Provider,{value:l},e)};function Q_(){return new Map}function J_(e){return u.useEffect(()=>()=>e(),[])}const Ar=e=>e.key||"";function eS(e,t){e.forEach(n=>{const r=Ar(n);t.set(r,n)})}function tS(e){const t=[];return u.Children.forEach(e,n=>{u.isValidElement(n)&&t.push(n)}),t}const nS=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Kt(!i,"Replace exitBeforeEnter with mode='wait'");const a=u.useContext(Ec).forceRender||G_()[0],c=jm(),l=tS(e);let d=l;const f=u.useRef(new Map).current,m=u.useRef(d),p=u.useRef(new Map).current,x=u.useRef(!0);if(ss(()=>{x.current=!1,eS(l,p),m.current=d}),J_(()=>{x.current=!0,p.clear(),f.clear()}),x.current)return he.createElement(he.Fragment,null,d.map(h=>he.createElement(na,{key:Ar(h),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},h)));d=[...d];const E=m.current.map(Ar),S=l.map(Ar),T=E.length;for(let h=0;h<T;h++){const w=E[h];S.indexOf(w)===-1&&!f.has(w)&&f.set(w,void 0)}return s==="wait"&&f.size&&(d=[]),f.forEach((h,w)=>{if(S.indexOf(w)!==-1)return;const _=p.get(w);if(!_)return;const $=E.indexOf(w);let M=h;if(!M){const O=()=>{p.delete(w),f.delete(w);const N=m.current.findIndex(V=>V.key===w);if(m.current.splice(N,1),!f.size){if(m.current=l,c.current===!1)return;a(),r&&r()}};M=he.createElement(na,{key:Ar(_),isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:s},_),f.set(w,M)}d.splice($,0,M)}),d=d.map(h=>{const w=h.key;return f.has(w)?h:he.createElement(na,{key:Ar(h),isPresent:!0,presenceAffectsLayout:o,mode:s},h)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),he.createElement(he.Fragment,null,f.size?d:d.map(h=>u.cloneElement(h)))};function La(e){const t=us(()=>yr(e)),{isStatic:n}=u.useContext(bc);if(n){const[,r]=u.useState(e);u.useEffect(()=>t.on("change",r),[])}return t}const rS=e=>typeof e=="object"&&e.mix,oS=e=>rS(e)?e.mix:void 0;function iS(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],o=e[2+n],s=e[3+n],a=Mc(i,o,{mixer:oS(o[0]),...s});return t?a(r):a}function Lm(e,t){const n=La(t()),r=()=>n.set(t());return r(),ss(()=>{const i=()=>ot.update(r,!1,!0),o=e.map(s=>s.on("change",i));return()=>{o.forEach(s=>s()),an(r)}}),n}function sS(e){po.current=[],e();const t=Lm(po.current,e);return po.current=void 0,t}function Di(e,t,n,r){if(typeof e=="function")return sS(e);const i=typeof t=="function"?t:iS(t,n,r);return Array.isArray(e)?pf(e,i):pf([e],([o])=>i(o))}function pf(e,t){const n=us(()=>[]);return Lm(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function Fm(e,t,n){var r;if(typeof e=="string"){let i=document;t&&(Kt(!!t.current,"Scope provided, but no element detected."),i=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=i.querySelectorAll(e)),e=n[e]):e=i.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function aS(){!Hc.current&&Dm();const[e]=u.useState(Oi.current);return process.env.NODE_ENV!=="production"&&hs(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),e}function cS(e,t){let n;const r=()=>{const{currentTime:i}=t,s=(i===null?0:i.value)/100;n!==s&&e(s),n=s};return ot.update(r,!0),()=>an(r)}const lS=um(()=>window.ScrollTimeline!==void 0);class Bm{constructor(t){this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(lS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),cS(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function uS(e){return typeof e=="object"&&!Array.isArray(e)}function dS(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Rm(e)?new Vm(t,{enableHardwareAcceleration:!1}):new Nm(t,{enableHardwareAcceleration:!0});n.mount(e),So.set(e,n)}function fS(e,t=100){const n=kc({keyframes:[0,t],...e}),r=Math.min(Ia(n),Pa);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:gn(r)}}function hf(e,t,n,r){var i;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(i=r.get(t))!==null&&i!==void 0?i:e}const pS=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function hS(e,t){return Uh(e)?e[pS(0,e.length,t)]:e}function mS(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];i.at>t&&i.at<n&&(ps(e,i),r--)}}function vS(e,t,n,r,i,o){mS(e,i,o);for(let s=0;s<t.length;s++)e.push({value:t[s],at:ft(i,o,r[s]),easing:hS(n,s)})}function gS(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const yS="easeInOut";function bS(e,{defaultTransition:t={},...n}={},r){const i=t.duration||.3,o=new Map,s=new Map,a={},c=new Map;let l=0,d=0,f=0;for(let m=0;m<e.length;m++){const p=e[m];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,hf(d,p.at,l,c));continue}let[x,E,S={}]=p;S.at!==void 0&&(d=hf(d,S.at,l,c));let T=0;const h=(w,_,$,M=0,O=0)=>{const N=xS(w),{delay:V=0,times:z=am(N),type:j="keyframes",...R}=_;let{ease:v=t.ease||"easeOut",duration:C}=_;const I=typeof V=="function"?V(M,O):V,k=N.length;if(k<=2&&j==="spring"){let W=100;if(k===2&&CS(N)){const G=N[1]-N[0];W=Math.abs(G)}const L={...R};C!==void 0&&(L.duration=Pn(C));const oe=fS(L,W);v=oe.ease,C=oe.duration}C??(C=i);const U=d+I,q=U+C;z.length===1&&z[0]===0&&(z[1]=1);const ue=z.length-N.length;ue>0&&sm(z,ue),N.length===1&&N.unshift(null),vS($,N,v,z,U,q),T=Math.max(I+C,T),f=Math.max(q,f)};if(Dt(x)){const w=mf(x,s);h(E,S,vf("default",w))}else{const w=Fm(x,r,a),_=w.length;for(let $=0;$<_;$++){E=E,S=S;const M=w[$],O=mf(M,s);for(const N in E)h(E[N],wS(S,N),vf(N,O),$,_)}l=d,d+=T}}return s.forEach((m,p)=>{for(const x in m){const E=m[x];E.sort(gS);const S=[],T=[],h=[];for(let _=0;_<E.length;_++){const{at:$,value:M,easing:O}=E[_];S.push(M),T.push(Hr(0,f,$)),h.push(O||"easeOut")}T[0]!==0&&(T.unshift(0),S.unshift(S[0]),h.unshift(yS)),T[T.length-1]!==1&&(T.push(1),S.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const w=o.get(p);w.keyframes[x]=S,w.transition[x]={...t,duration:f,ease:h,times:T,...n}}}),o}function mf(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function vf(e,t){return t[e]||(t[e]=[]),t[e]}function xS(e){return Array.isArray(e)?e:[e]}function wS(e,t){return e[t]?{...e,...e[t]}:{...e}}const ES=e=>typeof e=="number",CS=e=>e.every(ES);function Hm(e,t,n,r){const i=Fm(e,r),o=i.length;Kt(!!o,"No valid element provided.");const s=[];for(let a=0;a<o;a++){const c=i[a];So.has(c)||dS(c);const l=So.get(c),d={...n};typeof d.delay=="function"&&(d.delay=d.delay(a,o)),s.push(...Fc(l,{...t,transition:d},{}))}return new Bm(s)}const _S=e=>Array.isArray(e)&&Array.isArray(e[0]);function SS(e,t,n){const r=[];return bS(e,t,n).forEach(({keyframes:o,transition:s},a)=>{let c;Dt(a)?c=Bc(a,o.default,s.default):c=Hm(a,o,s),r.push(c)}),new Bm(r)}const TS=e=>{function t(n,r,i){let o;return _S(n)?o=SS(n,r,e):uS(r)?o=Hm(n,r,i,e):o=Bc(n,r,i),e&&e.animations.push(o),o}return t},gf=TS();var $S="dyt3ib1",RS="dyt3ib2",PS="dyt3ib6",IS="dyt3ib4",AS="dyt3ib3",yf="dyt3ib5",OS="dyt3ib7",DS="dyt3ib0";const bf=e=>!!e.onClick||!!e.onTap,MS=he.forwardRef(({style:e={},className:t="",...n},r)=>{const i=bf(n)?zn.button:zn.div,o=bf(n)?"auto":"none";return D.jsx(i,{...n,ref:r,className:$e(t,$S),style:{...e,pointerEvents:o},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})}),Wm=he.createContext(void 0),ms=()=>{const e=he.useContext(Wm);if(!e)throw Error("Sheet context error");return e},Um=he.createContext(void 0);function xf({children:e}){const t=ms(),[n,r]=he.useState(!!t.disableDrag);function i(){t.disableDrag||r(!1)}function o(){n||r(!0)}return D.jsx(Um.Provider,{value:{disableDrag:n,setDragEnabled:i,setDragDisabled:o},children:e})}const Ym=()=>{const e=he.useContext(Um);if(!e)throw Error("Sheet scroller context error");return e},wf="90%",Km=typeof window>"u",kS={ease:"easeOut",duration:.2},NS={ease:"linear",duration:.01},VS=.6,jS=500;function Ef(e,t){let n=e[0],r=Math.abs(e[0]-t);for(let i=1;i<e.length;i+=1){const o=Math.abs(e[i]-t);o<r&&(n=e[i],r=o)}return n}function LS(e){const t=document.querySelector("body"),n=document.querySelector(`#${e}`);if(n){const i=window.innerHeight,o=(i-24)/i;t.style.backgroundColor="#000",n.style.overflow="hidden",n.style.willChange="transform",n.style.transition="transform 200ms ease-in-out, border-radius 200ms linear",n.style.transform=`translateY(calc(env(safe-area-inset-top) + ${24/2}px)) scale(${o})`,n.style.borderTopRightRadius="10px",n.style.borderTopLeftRadius="10px"}}function Cf(e){const t=document.querySelector("body"),n=document.getElementById(e);function r(){n.style.removeProperty("overflow"),n.style.removeProperty("will-change"),n.style.removeProperty("transition"),t.style.removeProperty("background-color"),n.removeEventListener("transitionend",r)}n&&(n.style.removeProperty("border-top-right-radius"),n.style.removeProperty("border-top-left-radius"),n.style.removeProperty("transform"),n.addEventListener("transitionend",r))}function FS(e){for(let t=0;t<e.length;t+=1)if(e[t+1]>e[t])return!1;return!0}function _f({snapTo:e,sheetHeight:t}){return e<0&&console.warn(`Snap point is out of bounds. Sheet height is ${t} but snap point is ${t+Math.abs(e)}.`),Math.max(Math.round(e),0)}function BS(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})}}function HS(){return typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0}const Wc=Km?he.useEffect:he.useLayoutEffect;function WS(e,t){const n=zm(e);he.useEffect(()=>{t&&!n&&e?LS(t):t&&!e&&n&&Cf(t)},[e,n]),he.useEffect(()=>()=>{t&&e&&Cf(t)},[e])}function US(e,t){const n=zm(e),r=he.useRef(!1),i=he.useCallback(()=>{var o,s,a,c;r.current?((c=(a=t.current).onCloseEnd)==null||c.call(a),r.current=!1):((s=(o=t.current).onOpenEnd)==null||s.call(o),r.current=!0)},[e,n]);return he.useEffect(()=>{var o,s,a,c;!n&&e?(s=(o=t.current).onOpenStart)==null||s.call(o):!e&&n&&((c=(a=t.current).onCloseStart)==null||c.call(a))},[e,n]),{handleAnimationComplete:i}}function YS(){const[e,t]=he.useState(0);return Wc(()=>{const n=()=>t(window.innerHeight);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e}function zm(e){const t=he.useRef();return he.useEffect(()=>{t.current=e}),t.current}function Sf(e){const t=he.useRef();return Wc(()=>{t.current=e}),he.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const KS=he.forwardRef(({children:e,style:t={},className:n="",noPadding:r,...i},o)=>{const{y:s,isOpen:a,callbacks:c,snapPoints:l,initialSnap:d=0,sheetRef:f,windowHeight:m,detent:p,animationOptions:x,reduceMotion:E}=ms(),{handleAnimationComplete:S}=US(a,c),T=l?l[0]-l[d]:0,h=l?l[0]:null,w=h!==null?`min(${h}px, ${wf})`:wf;return D.jsx(zn.div,{...i,ref:BS([f,o]),className:$e(n,RS),style:{...t,...r?{padding:0}:{padding:dt.theme.space[16],paddingTop:0},...p==="full-height"&&{height:w},...p==="content-height"&&{maxHeight:w},y:s},initial:E?!1:{y:m},animate:{y:T,transition:x},exit:{y:m,transition:x},onAnimationComplete:S,children:e})}),zS=he.forwardRef(({children:e,style:t,disableDrag:n,disableDragContent:r,className:i="",...o},s)=>{const a=ms(),c=Ym(),l=n||c.disableDrag||r?void 0:a.dragProps;return D.jsx(zn.div,{...o,ref:s,className:$e(i,PS),style:{...t},...l,children:e})});var XS="aglyib0";const Gr=u.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:i,...o},s)=>{const a=e||"button";return D.jsx(a,{ref:s,as:e,"data-test-id":o["data-test-id"],className:$e(XS,n),disabled:i,style:r,...o,children:D.jsx(Ui,{size:16,color:i?dt.theme.colors.grey1:dt.theme.colors.black})})});Gr.displayName="Button";Gr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const GS=u.forwardRef(({children:e,style:t,disableDrag:n,showBack:r,onBack:i,showClose:o,title:s,onClose:a,noHandleBar:c,noHeader:l,...d},f)=>{const{indicatorRotation:m,dragProps:p}=ms(),x=n?void 0:p,E=Di(m,T=>`translateX(2px) rotate(${T}deg)`),S=Di(m,T=>`translateX(-2px) rotate(${-1*T}deg)`);return D.jsxs(D.Fragment,{children:[!c&&D.jsx(zn.div,{...d,ref:f,className:AS,style:{...t},...x,children:e||D.jsxs("div",{className:IS,children:[D.jsx(zn.span,{className:yf,style:{transform:E}}),D.jsx(zn.span,{className:yf,style:{transform:S}})]})}),!l&&D.jsxs(Rt,{alignItems:"center",justifyContent:"space-between",marginBottom:"$8",py:"$16",gap:"$16",children:[D.jsxs(Rt,{alignItems:"center",gap:"$16",children:[r&&D.jsx(x0,{cursor:"pointer",onClick:i,size:18,color:dt.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),s&&D.jsx(Nt,{fontWeight:"$bold",textStyle:"subtitle1",m:"$0",children:s})]}),o&&D.jsx(Gr,{onClick:a,"data-test-id":"vds-BS-close-btn"})]})]})}),qS=he.forwardRef(({draggableAt:e="top",children:t,style:n,className:r="",...i},o)=>{const s=Ym();function a(f){const{scrollTop:m,scrollHeight:p,clientHeight:x}=f;if(!(p>x))return;const S=m<=0,T=p-m===x;e==="top"&&S||e==="bottom"&&T||e==="both"&&(S||T)?s.setDragEnabled():s.setDragDisabled()}function c(f){a(f.currentTarget)}function l(f){a(f.currentTarget)}const d=HS()?{onScroll:c,onTouchStart:l}:void 0;return D.jsx("div",{...i,ref:o,className:$e(r,OS),style:{...n},...d,children:t})}),ZS=typeof document<"u"?u.useLayoutEffect:()=>{};function Fa(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}let io=new Map,Tf=new Set;function $f(){if(typeof window>"u")return;let e=n=>{let r=io.get(n.target);r||(r=new Set,io.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=io.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),io.delete(n.target)),io.size===0)){for(let i of Tf)i();Tf.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?$f():document.addEventListener("DOMContentLoaded",$f));function Xm(e){for(Rf(e)&&(e=e.parentElement);e&&!Rf(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Rf(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Uc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function QS(){return Uc(/^Mac/i)}function JS(){return Uc(/^iPhone/i)}function eT(){return Uc(/^iPad/i)||QS()&&navigator.maxTouchPoints>1}function tT(){return JS()||eT()}const ra=typeof window<"u"&&window.visualViewport,nT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let si=0,oa;function rT(e={}){const{isDisabled:t}=e;ZS(()=>{if(!t)return si+=1,si===1&&(tT()?oa=iT():oa=oT()),()=>{si-=1,si===0&&oa()}},[t])}function oT(){return Fa(vo(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),vo(document.documentElement,"overflow","hidden"))}function iT(){let e,t=0;const n=f=>{e=Xm(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(e===document.documentElement||e===document.body){f.preventDefault();return}const m=f.changedTouches[0].pageY,{scrollTop:p}=e,x=e.scrollHeight-e.clientHeight;x!==0&&((p<=0&&m>t||p>=x&&m<t)&&f.preventDefault(),t=m)},i=f=>{const m=f.target;If(m)&&m!==document.activeElement&&(f.preventDefault(),m.style.transform="translateY(-2000px)",m.focus(),requestAnimationFrame(()=>{m.style.transform=""}))},o=f=>{const m=f.target;If(m)&&(m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",ra&&(ra.height<window.innerHeight?requestAnimationFrame(()=>{Pf(m)}):ra.addEventListener("resize",()=>Pf(m),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},a=window.pageXOffset,c=window.pageYOffset,l=Fa(vo(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),vo(document.documentElement,"overflow","hidden"),vo(document.body,"marginTop",`-${c}px`));window.scrollTo(0,0);const d=Fa(so(document,"touchstart",n,{passive:!1,capture:!0}),so(document,"touchmove",r,{passive:!1,capture:!0}),so(document,"touchend",i,{passive:!1,capture:!0}),so(document,"focus",o,!0),so(window,"scroll",s));return()=>{l(),d(),window.scrollTo(a,c)}}function vo(e,t,n){const r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function so(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pf(e){const t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){const n=Xm(e);if(n!==document.documentElement&&n!==document.body&&n!==e){const r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function If(e){return e instanceof HTMLInputElement&&!nT.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const sT=u.forwardRef(({onOpenStart:e,onOpenEnd:t,onClose:n,onCloseStart:r,onCloseEnd:i,onSnap:o,children:s,isOpen:a,snapPoints:c,rootId:l,mountPoint:d,style:f,detent:m="content-height",initialSnap:p=0,disableDrag:x=!1,disableDragContent:E=!1,prefersReducedMotion:S=!1,tweenConfig:T=kS,showClose:h=!0,showBack:w,onBack:_,closeOnClickOutside:$=!0,noHandleBar:M,title:O,noHeader:N,"data-test-id":V,noPadding:z,...j},R)=>{const v=u.useRef(null),C=La(0),I=YS(),k=aS(),U=!!(S||k),q={type:"tween",...U?NS:T},ue=La(0),W=Di(ue,H=>H>=I?-1:dt.tokens.zIndices.modal),L=Di(ue,H=>H>=I?"hidden":"visible"),oe=u.useRef({onOpenStart:e,onOpenEnd:t,onCloseStart:r,onCloseEnd:i});Wc(()=>{oe.current={onOpenStart:e,onOpenEnd:t,onCloseStart:r,onCloseEnd:i}}),c&&(c=c.map(H=>H>0&&H<=1?Math.round(H*I):H<0?I+H:H),console.assert(FS(c)||I===0,`Snap points need to be in descending order got: [${c}]`));const G=Sf((H,{delta:J})=>{const ee=ue.getVelocity();ee>0&&C.set(10),ee<0&&C.set(-10),ue.set(Math.max(ue.get()+J.y,0))}),X=Sf((H,{velocity:J})=>{if(J.y>jS)n();else{const te=v.current.getBoundingClientRect().height,Z=ue.get();let ge=0;if(c){const Pe=c.map(Se=>te-Math.min(Se,te));m==="content-height"&&!Pe.includes(0)&&Pe.unshift(0),ge=Ef(Pe,Z)}else Z/te>VS&&(ge=te);if(ge=_f({snapTo:ge,sheetHeight:te}),gf(ue,ge,q),c&&o){const Pe=Math.abs(Math.round(c[0]-ge)),Se=c.indexOf(Ef(c,Pe));o(Se)}const Ce=Math.round(te);ge>=Ce&&n()}C.set(0)});u.useEffect(()=>{if(!c||!o)return;const H=a?p:c.length-1;o(H)},[a]),u.useImperativeHandle(R,()=>({y:ue,snapTo:H=>{const J=v.current;if(c&&c[H]!==void 0&&J!==null){const ee=J.getBoundingClientRect().height,te=c[H],Z=_f({snapTo:ee-te,sheetHeight:ee});gf(ue,Z,q),o&&o(H),Z>=ee&&n()}}})),WS(a,l),rT({isDisabled:!a});const ne=u.useMemo(()=>x?void 0:{drag:"y",dragElastic:0,dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragPropagation:!1,onDrag:G,onDragEnd:X},[x]),ae={y:ue,sheetRef:v,isOpen:a,initialSnap:p,snapPoints:c,detent:m,indicatorRotation:C,callbacks:oe,dragProps:ne,windowHeight:I,animationOptions:q,reduceMotion:U,disableDrag:x},B=D.jsx(Wm.Provider,{value:ae,children:D.jsx(zn.div,{...j,ref:R,className:DS,style:{zIndex:W,visibility:L,...f},children:D.jsx(nS,{children:a?D.jsx(xf,{children:D.jsxs(xf,{children:[D.jsxs(KS,{noPadding:z,children:[D.jsx(GS,{showBack:w,noHeader:N,onBack:_,showClose:h,title:O,onClose:n,noHandleBar:M}),D.jsx(zS,{disableDragContent:E,children:D.jsx(qS,{children:s})})]}),D.jsx(MS,{"data-test-id":"CT-BottomSheet-Overlay",onClick:()=>$?n():null})]})}):null})})});return Km?B:en.createPortal(B,d??document.body)}),qr=({size:e,color:t="inherit",thickness:n=3,...r})=>D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:D.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:D.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});qr.displayName="Spinner";qr.defaultProps={size:24,thickness:3};const aT=({value:e,delay:t=500})=>{const[n,r]=u.useState(e);return u.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n},cT=aT;process.env.NODE_ENV;var lT=it({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"]]}),uT={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},dT={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Af={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var fT="p9dczu0";const Yc=({ref:e,colorScheme:t="primary"})=>{const[n,r]=u.useState([]),i=cT({value:n,delay:1e3});return u.useEffect(()=>{if(e.current){const o=e.current,s=a=>{const c=o.getBoundingClientRect(),l=a.clientX-c.left,d=a.clientY-c.top,f=o.clientHeight,m=o.clientWidth,p=Math.max(m,f);r([...n,{top:d-p/2,left:l-p/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?dt.theme.colors.primary:uT[t]}])};return o.addEventListener("click",s),()=>{o.removeEventListener("click",s)}}return()=>!1},[e,n]),u.useEffect(()=>{i.length&&r([])},[i.length]),n==null?void 0:n.map((o,s)=>D.jsx("span",{className:fT,style:{...o}},s))},Ur=u.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:i,isLoading:o,variant:s,style:a,isDisabled:c,isFluid:l,unstyled:d,noRipple:f,...m},p)=>{const x=u.useRef(null),E=Yc({ref:x,colorScheme:r,variant:s});u.useImperativeHandle(p,()=>x.current);const S=e||"button";return D.jsx(S,{ref:x,as:e,"data-test-id":m["data-test-id"],className:$e(lT({colorScheme:r,size:i,variant:s,isFluid:l,unstyled:d}),s==="ghost"?dT[r||"primary"]:void 0,n),disabled:c,style:a,...m,children:o?D.jsx(qr,{color:s==="outline"||s==="ghost"?Af[r||"primary"]:Af.white}):D.jsxs(D.Fragment,{children:[!f&&E,t]})})});Ur.displayName="Button";Ur.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Gm="Checkbox",[pT,KI]=Xt(Gm),[hT,mT]=pT(Gm),vT=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:l,...d}=e,[f,m]=u.useState(null),p=Xe(t,w=>m(w)),x=u.useRef(!1),E=f?!!f.closest("form"):!0,[S=!1,T]=tn({prop:i,defaultProp:o,onChange:l}),h=u.useRef(S);return u.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const _=()=>T(h.current);return w.addEventListener("reset",_),()=>w.removeEventListener("reset",_)}},[f,T]),u.createElement(hT,{scope:n,state:S,disabled:a},u.createElement(Fe.button,ie({type:"button",role:"checkbox","aria-checked":vr(S)?"mixed":S,"aria-required":s,"data-state":qm(S),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onKeyDown:Ie(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ie(e.onClick,w=>{T(_=>vr(_)?!0:!_),E&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})})),E&&u.createElement(bT,{control:f,bubbles:!x.current,name:r,value:c,checked:S,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),gT="CheckboxIndicator",yT=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=mT(gT,n);return u.createElement(Jn,{present:r||vr(o.state)||o.state===!0},u.createElement(Fe.span,ie({"data-state":qm(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:t,style:{pointerEvents:"none",...e.style}})))}),bT=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=vr(n),f.call(c,vr(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"checkbox","aria-hidden":!0,defaultChecked:vr(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function vr(e){return e==="indeterminate"}function qm(e){return vr(e)?"indeterminate":e?"checked":"unchecked"}const xT=vT,wT=yT;var ET="glci2q0",Of="glci2q3",CT="glci2q4",Df={disabled:"glci2q1",enabled:"glci2q2"},_T=it({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 Zm=u.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:i,value:o,...s},a)=>{const c=`vds-checkbox-${u.useId()}`,[l,d]=u.useState(n);return u.useEffect(()=>{d(n)},[n]),D.jsxs("div",{className:ET,children:[D.jsx(xT,{id:c,disabled:i,"data-test-id":t,ref:a,value:l?"on":"off",checked:l,className:_T({checked:l,disabled:i}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...s,children:D.jsxs(wT,{className:CT,children:[l==="indeterminate"&&D.jsx(T0,{color:"white",className:Of}),l===!0&&D.jsx(rc,{color:"white",className:Of})]})}),e&&D.jsx("label",{htmlFor:c,className:i?Df.disabled:Df.enabled,children:e})]})});Zm.defaultProps={"data-test-id":"base"};const ST=e=>u.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var TT=it({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"]]}),$T="_5046e76";const Kc=u.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:i,prefixIcon:o,withCloseButton:s,className:a,disabled:c,style:l,...d},f)=>{const m=e||"button";return D.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:$e(TT({variant:n,isActive:r}),a),disabled:c,style:l,...d,children:[o&&o,i&&!o&&D.jsx(_0,{style:{marginRight:8},size:16,color:"inherit"}),t,s&&D.jsx(Gr,{"data-test-id":"chips-close-button",className:$T,isDisabled:c})]})});Kc.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};Kc.displayName="Chips";const Qm="Dialog",[Jm,zI]=Xt(Qm),[RT,nr]=Jm(Qm),PT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=u.useRef(null),c=u.useRef(null),[l=!1,d]=tn({prop:r,defaultProp:i,onChange:o});return u.createElement(RT,{scope:t,triggerRef:a,contentRef:c,contentId:$n(),titleId:$n(),descriptionId:$n(),open:l,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),modal:s},n)},IT="DialogTrigger",AT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(IT,n),o=Xe(t,i.triggerRef);return u.createElement(Fe.button,ie({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zc(i.open)},r,{ref:o,onClick:Ie(e.onClick,i.onOpenToggle)}))}),OT="DialogPortal",[XI,ev]=Jm(OT,{forceMount:void 0}),Ba="DialogOverlay",DT=u.forwardRef((e,t)=>{const n=ev(Ba,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=nr(Ba,e.__scopeDialog);return o.modal?u.createElement(Jn,{present:r||o.open},u.createElement(MT,ie({},i,{ref:t}))):null}),MT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(Ba,n);return u.createElement(oh,{as:Lr,allowPinchZoom:!0,shards:[i.contentRef]},u.createElement(Fe.div,ie({"data-state":zc(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),To="DialogContent",kT=u.forwardRef((e,t)=>{const n=ev(To,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=nr(To,e.__scopeDialog);return u.createElement(Jn,{present:r||o.open},o.modal?u.createElement(NT,ie({},i,{ref:t})):u.createElement(VT,ie({},i,{ref:t})))}),NT=u.forwardRef((e,t)=>{const n=nr(To,e.__scopeDialog),r=u.useRef(null),i=Xe(t,n.contentRef,r);return u.useEffect(()=>{const o=r.current;if(o)return Gp(o)},[]),u.createElement(tv,ie({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,o=>o.preventDefault())}))}),VT=u.forwardRef((e,t)=>{const n=nr(To,e.__scopeDialog),r=u.useRef(!1),i=u.useRef(!1);return u.createElement(tv,ie({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),tv=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=nr(To,n),c=u.useRef(null),l=Xe(t,c);return $p(),u.createElement(u.Fragment,null,u.createElement(Rp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},u.createElement(Yi,ie({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":zc(a.open)},s,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),jT="DialogClose",LT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(jT,n);return u.createElement(Fe.button,ie({type:"button"},r,{ref:t,onClick:Ie(e.onClick,()=>i.onOpenChange(!1))}))});function zc(e){return e?"open":"closed"}const FT=PT,BT=AT,HT=DT,WT=kT,UT=LT;var YT="_1jc0z8o4",KT="_1jc0z8o0",zT=it({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:[]}),XT="_1jc0z8o1",GT=it({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),qT=it({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const ZT=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(WT,{className:t,ref:r,...n,children:e})),QT=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(HT,{className:t,ref:r,...n,children:e})),JT=({children:e,className:t,...n})=>D.jsx(ns,{className:t,...n,children:e}),e$=({children:e,...t})=>D.jsx(FT,{...t,children:e});u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(BT,{className:t,...n,ref:r,children:e}));const No=u.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:i,destroyOnClose:o,noPadding:s,colorScheme:a,closeOnOverlayClick:c,closeIcon:l,classNameBody:d,isCloseWhenEscape:f,...m},p)=>!n&&o?null:D.jsx(e$,{open:n,onOpenChange:r,children:D.jsxs(JT,{children:[D.jsx(QT,{className:$e(qT())}),D.jsxs(ZT,{onInteractOutside:x=>!c&&x.preventDefault(),className:$e(zT({colorScheme:a,size:i,noPadding:s}),d),...m,onEscapeKeyDown:x=>f?r==null?void 0:r():x.preventDefault(),ref:p,children:[r&&!l&&D.jsx(UT,{asChild:!0,"aria-label":"Close",children:D.jsx(Gr,{className:YT,"data-test-id":"close-modal"})}),r&&l&&l,e]})]})}));No.displayName="Modal";No.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 vs=u.forwardRef(({as:e,children:t,"data-test-id":n,...r},i)=>{const o=e||"div";return D.jsx(o,{"data-test-id":n,as:e,ref:i,className:KT,...r,children:t})});vs.displayName="modalBody";vs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const gs=u.forwardRef(({as:e,children:t,"data-test-id":n,...r},i)=>{const o=e||"div";return D.jsx(o,{"data-test-id":n,as:e,className:XT,ref:i,...r,children:t})});gs.displayName="modalFooter";gs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Vo=u.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...i},o)=>{const s=e||"div";return D.jsx(s,{"data-test-id":r,as:e,ref:o,className:GT({bold:t}),...i,children:D.jsx(Nt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Vo.displayName="modalHeader";Vo.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};const Xc=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:i,confirmTestId:o,isLoading:s,confirmText:a="Confirm",cancelText:c="Cancel",closeOnOverlayClick:l,size:d,classNameBody:f})=>D.jsxs(No,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:l,onClose:n,closeIcon:D.jsx(at,{display:"none"}),children:[D.jsx(Vo,{children:i}),D.jsx(vs,{children:D.jsx(Nt,{mt:"$8",mb:"$24",textStyle:"body2",children:r})}),D.jsx(gs,{children:D.jsxs(Rt,{gap:"$16",justifyContent:"flex-end",children:[D.jsx(Ur,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",children:c}),D.jsx(Ur,{"data-test-id":o,onClick:t,isLoading:s,children:a})]})})]});Xc.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0};const Gc=u.createContext({}),t$=({children:e})=>{const[t,n]=u.useState(!1),[r,i]=u.useState(void 0),o=()=>{n(!1),i(void 0)},s=()=>{o(),r!=null&&r.actionCallback(!0)},a=()=>{o(),r!=null&&r.actionCallback(!1)},c=u.useMemo(()=>({openDialog:({title:d,message:f,confirmText:m,cancelText:p,actionCallback:x,confirmTestId:E,size:S,isLoading:T,closeOnOverlayClick:h,classNameBody:w})=>{n(!0),i({title:d,message:f,confirmText:m,cancelText:p,confirmTestId:E,size:S,isLoading:T,actionCallback:x,closeOnOverlayClick:h,classNameBody:w})}}),[n,i]);return D.jsxs(Gc.Provider,{value:c,children:[D.jsx(Xc,{title:(r==null?void 0:r.title)??"",message:(r==null?void 0:r.message)??"",confirmText:r==null?void 0:r.confirmText,cancelText:r==null?void 0:r.cancelText,isOpen:t,confirmTestId:r==null?void 0:r.confirmTestId,isLoading:r==null?void 0:r.isLoading,onConfirm:s,onCancel:a,size:r==null?void 0:r.size,closeOnOverlayClick:r==null?void 0:r.closeOnOverlayClick}),e]})},n$=()=>{const{openDialog:e}=u.useContext(Gc);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}},qc=({children:e,isDisabled:t,className:n})=>D.jsx("div",{className:$e(Ew({isDisabled:t}),n),children:e});qc.displayName="ActionIcon";qc.defaultProps={isDisabled:!1,className:void 0};const jo=u.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:i},o)=>D.jsxs("label",{ref:o,className:Iw({state:hc({isError:e,isDisabled:t}),isTextarea:r}),children:[i,n&&"*"]}));jo.displayName="Label";jo.defaultProps={isTextarea:!1};const Zc=u.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:i,isLoading:o,icon:s,isClearable:a=!0,required:c,containerStyles:l,...d},f)=>{const{addonLeft:m,addonRight:p,helperTextLeft:x,helperTextRight:E,isError:S,errorMessage:T,isDisabled:h,isValid:w,elementLeft:_,elementRight:$,className:M,...O}=d,N=!!s,V=u.useRef(null);u.useImperativeHandle(f,()=>V.current);const[z,j]=u.useState(!1),[R,v]=u.useState(!1),C=k=>{if(z){const U=V.current;U&&U.focus(),R&&(j(!1),v(!1))}else i==null||i(k)},I=()=>{const k=V.current;k&&k.focus(),R&&(j(!1),v(!1))};return u.useEffect(()=>{R&&j(!0)},[R]),D.jsxs(Xr,{addonLeft:m,addonRight:p,elementLeft:_,elementRight:$,helperTextLeft:x,helperTextRight:E,isError:S,errorMessage:T,isDisabled:h,isValid:w,className:l,inputAreaClassName:$w,children:[D.jsx("input",{ref:V,type:t,className:$e(Tw,M),value:e,disabled:h,"data-test-id":d["data-test-id"],required:c,onBlur:C,...O}),D.jsx(jo,{isError:S,isDisabled:h,required:c,children:n}),D.jsx("div",{className:$e(Rw),"data-test-id":"icon-input-area",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onTouchStart:()=>v(!0),onClick:I,"aria-hidden":"true",children:D.jsxs(qc,{isDisabled:h,className:$e(a&&!o&&!N&&Sw),children:[N&&!o&&s,a&&!o&&!N&&D.jsx(Ui,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),o&&D.jsx(qr,{color:dt.theme.colors.green1})]})})]})});Zc.displayName="Input";Zc.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const Qc=u.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:i,...o},s)=>{const{helperTextLeft:a,helperTextRight:c,isError:l,errorMessage:d,isDisabled:f,isValid:m,...p}=o,x=u.useRef(null);u.useImperativeHandle(s,()=>x.current);const E=()=>{var S;(S=x.current)==null||S.focus()};return D.jsxs(Xr,{"data-test-id":"CT_Field_Container",helperTextLeft:a,helperTextRight:c,isError:l,errorMessage:d,isDisabled:f,isValid:m,className:i,onClick:E,children:[D.jsx("textarea",{ref:x,className:$e(Aw),value:e,rows:n,disabled:f,"data-test-id":o["data-test-id"],required:r,...p}),D.jsx(jo,{isTextarea:!0,isError:l,isDisabled:f,required:r,children:t})]})});Qc.displayName="Textarea";Qc.defaultProps={containerStyles:void 0,"data-test-id":void 0};var r$=it({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"]]}),Mf={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const Jc=u.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:i,unstyled:o,variant:s,isDisabled:a,isLoading:c,...l},d)=>{const f=u.useRef(null),m=Yc({ref:f,colorScheme:r,variant:s});u.useImperativeHandle(d,()=>f.current);const p=e||"button";return D.jsx(p,{ref:f,as:e,"data-test-id":l["data-test-id"],className:$e(r$({colorScheme:r,unstyled:o,variant:s}),t),disabled:a,style:n,...l,children:c?D.jsx(qr,{color:s==="outline"?Mf[r||"primary"]:Mf.white}):D.jsxs(D.Fragment,{children:[m,i]})})});Jc.displayName="Button";Jc.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var o$=it({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const i$=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>D.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:D.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"})}),el=u.forwardRef(({as:e,src:t,fit:n,width:r,height:i,loading:o,isLoading:s,fallback:a,onLoad:c,onError:l,className:d,"data-test-id":f,...m},p)=>{const x=e||"img",E=u.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),S=u.useMemo(()=>`${parseInt(`${i??0}`,10)}px`,[i]),[T,h]=u.useState(!1),[w,_]=u.useState(n),$=O=>{_("fill"),h(!0),l==null||l(O)},M=O=>{h(!1),c==null||c(O)};return s&&!T?D.jsx(at,{bgColor:"$grey2",width:E,height:S}):T?a||D.jsx(i$,{width:E,height:S}):D.jsx(x,{"data-test-id":f,as:"img",width:E,height:S,src:t,loading:o,onLoad:M,onError:$,ref:p,className:$e(o$({fit:w})),...m})});el.displayName="Image";el.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 s$=it({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"},variant:{default:"_5y0pl5e",underline:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{variant:"default",isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const nv=({children:e,className:t,variant:n,textStyle:r="body2",isDisabled:i,isBold:o,...s})=>D.jsx("a",{className:$e(t,s$({isDisabled:i,variant:n,textStyle:r,isBold:o})),"data-disabled":i,...s,children:e});var a$="_1cq2k9i0";const tl=u.forwardRef(({children:e,as:t,className:n,...r},i)=>{const o=t||"ul";return D.jsx(o,{"data-test-id":r["data-test-id"],ref:i,className:$e(a$,n),...r,children:e})});tl.displayName="List";tl.defaultProps={"data-test-id":void 0,as:"ul"};var c$=it({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),kf="xw6nfa2",l$="xw6nfa3";const nl=u.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:i,as:o,className:s,...a},c)=>{const l=o||"li",d=!!r;return D.jsx(l,{"data-test-id":a["data-test-id"],className:$e(c$({hasLink:d}),s),...a,ref:c,children:r?D.jsxs("a",{href:r,target:i,className:l$,children:[t,D.jsx("div",{className:kf,children:e}),n]}):D.jsxs(D.Fragment,{children:[t,D.jsx("div",{className:kf,children:e}),n]})})});nl.displayName="ListItem";nl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rv={},ov={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Hg,()=>(()=>{var n=[,(s,a,c)=>{c.r(a),c.d(a,{default:()=>d});var l=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,x,E;p.ready=new Promise((b,g)=>{x=b,E=g});function S(){function b(ce){const se=A;P=g=0,A=new Map,se.forEach(de=>{try{de(ce)}catch(le){console.error(le)}}),this.Qa(),Y&&Y.nb()}let g=0,P=0,A=new Map,Y=null,re=null;this.requestAnimationFrame=function(ce){g||(g=requestAnimationFrame(b.bind(this)));const se=++P;return A.set(se,ce),se},this.cancelAnimationFrame=function(ce){A.delete(ce),g&&A.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ce){re&&(document.body.remove(re),re=null),ce||(re=document.createElement("div"),re.style.backgroundColor="black",re.style.position="fixed",re.style.right=0,re.style.top=0,re.style.color="white",re.style.padding="4px",re.innerHTML="RIVE FPS",ce=function(se){re.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(re)),Y=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ce(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){re&&(document.body.remove(re),re=null),Y=null},this.Qa=function(){}}function T(b){console.assert(!0);const g=new Map;let P=-1/0;this.push=function(A){return A=A+((1<<b)-1)>>b,g.has(A)&&clearTimeout(g.get(A)),g.set(A,setTimeout(function(){g.delete(A),g.length==0?P=-1/0:A==P&&(P=Math.max(...g.keys()),console.assert(P<A))},1e3)),P=Math.max(A,P),P<<b}}const h=new function(){function b(){if(!g){let st=function(vt,Ne,Le){if(Ne=ve.createShader(Ne),ve.shaderSource(Ne,Le),ve.compileShader(Ne),Le=ve.getShaderInfoLog(Ne),0<Le.length)throw Le;ve.attachShader(vt,Ne)};var Ee=document.createElement("canvas"),De={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ve=Ee.getContext("webgl2",De);if(ve)P=2;else if(ve=Ee.getContext("webgl",De))P=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(A=Math.min(ve.getParameter(ve.MAX_RENDERBUFFER_SIZE),ve.getParameter(ve.MAX_TEXTURE_SIZE)),Ee=ve.createProgram(),st(Ee,ve.VERTEX_SHADER,`attribute vec2 vertex;
120
+ `),()=>{document.head.removeChild(l)}},[t]),he.createElement(q_,{isPresent:t,childRef:r,sizeRef:i},he.cloneElement(e,{ref:r}))}const na=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=us(Q_),c=u.useId(),l=u.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return u.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),he.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=he.createElement(Z_,{isPresent:n},e)),he.createElement(os.Provider,{value:l},e)};function Q_(){return new Map}function J_(e){return u.useEffect(()=>()=>e(),[])}const Ar=e=>e.key||"";function eS(e,t){e.forEach(n=>{const r=Ar(n);t.set(r,n)})}function tS(e){const t=[];return u.Children.forEach(e,n=>{u.isValidElement(n)&&t.push(n)}),t}const nS=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Kt(!i,"Replace exitBeforeEnter with mode='wait'");const a=u.useContext(Ec).forceRender||G_()[0],c=jm(),l=tS(e);let d=l;const f=u.useRef(new Map).current,m=u.useRef(d),p=u.useRef(new Map).current,x=u.useRef(!0);if(ss(()=>{x.current=!1,eS(l,p),m.current=d}),J_(()=>{x.current=!0,p.clear(),f.clear()}),x.current)return he.createElement(he.Fragment,null,d.map(h=>he.createElement(na,{key:Ar(h),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},h)));d=[...d];const E=m.current.map(Ar),S=l.map(Ar),T=E.length;for(let h=0;h<T;h++){const w=E[h];S.indexOf(w)===-1&&!f.has(w)&&f.set(w,void 0)}return s==="wait"&&f.size&&(d=[]),f.forEach((h,w)=>{if(S.indexOf(w)!==-1)return;const _=p.get(w);if(!_)return;const $=E.indexOf(w);let M=h;if(!M){const O=()=>{p.delete(w),f.delete(w);const N=m.current.findIndex(V=>V.key===w);if(m.current.splice(N,1),!f.size){if(m.current=l,c.current===!1)return;a(),r&&r()}};M=he.createElement(na,{key:Ar(_),isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:s},_),f.set(w,M)}d.splice($,0,M)}),d=d.map(h=>{const w=h.key;return f.has(w)?h:he.createElement(na,{key:Ar(h),isPresent:!0,presenceAffectsLayout:o,mode:s},h)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),he.createElement(he.Fragment,null,f.size?d:d.map(h=>u.cloneElement(h)))};function La(e){const t=us(()=>yr(e)),{isStatic:n}=u.useContext(bc);if(n){const[,r]=u.useState(e);u.useEffect(()=>t.on("change",r),[])}return t}const rS=e=>typeof e=="object"&&e.mix,oS=e=>rS(e)?e.mix:void 0;function iS(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],o=e[2+n],s=e[3+n],a=Mc(i,o,{mixer:oS(o[0]),...s});return t?a(r):a}function Lm(e,t){const n=La(t()),r=()=>n.set(t());return r(),ss(()=>{const i=()=>ot.update(r,!1,!0),o=e.map(s=>s.on("change",i));return()=>{o.forEach(s=>s()),an(r)}}),n}function sS(e){po.current=[],e();const t=Lm(po.current,e);return po.current=void 0,t}function Di(e,t,n,r){if(typeof e=="function")return sS(e);const i=typeof t=="function"?t:iS(t,n,r);return Array.isArray(e)?pf(e,i):pf([e],([o])=>i(o))}function pf(e,t){const n=us(()=>[]);return Lm(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function Fm(e,t,n){var r;if(typeof e=="string"){let i=document;t&&(Kt(!!t.current,"Scope provided, but no element detected."),i=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=i.querySelectorAll(e)),e=n[e]):e=i.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function aS(){!Hc.current&&Dm();const[e]=u.useState(Oi.current);return process.env.NODE_ENV!=="production"&&hs(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),e}function cS(e,t){let n;const r=()=>{const{currentTime:i}=t,s=(i===null?0:i.value)/100;n!==s&&e(s),n=s};return ot.update(r,!0),()=>an(r)}const lS=um(()=>window.ScrollTimeline!==void 0);class Bm{constructor(t){this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(lS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),cS(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function uS(e){return typeof e=="object"&&!Array.isArray(e)}function dS(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Rm(e)?new Vm(t,{enableHardwareAcceleration:!1}):new Nm(t,{enableHardwareAcceleration:!0});n.mount(e),So.set(e,n)}function fS(e,t=100){const n=kc({keyframes:[0,t],...e}),r=Math.min(Ia(n),Pa);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:gn(r)}}function hf(e,t,n,r){var i;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(i=r.get(t))!==null&&i!==void 0?i:e}const pS=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function hS(e,t){return Uh(e)?e[pS(0,e.length,t)]:e}function mS(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];i.at>t&&i.at<n&&(ps(e,i),r--)}}function vS(e,t,n,r,i,o){mS(e,i,o);for(let s=0;s<t.length;s++)e.push({value:t[s],at:ft(i,o,r[s]),easing:hS(n,s)})}function gS(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const yS="easeInOut";function bS(e,{defaultTransition:t={},...n}={},r){const i=t.duration||.3,o=new Map,s=new Map,a={},c=new Map;let l=0,d=0,f=0;for(let m=0;m<e.length;m++){const p=e[m];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,hf(d,p.at,l,c));continue}let[x,E,S={}]=p;S.at!==void 0&&(d=hf(d,S.at,l,c));let T=0;const h=(w,_,$,M=0,O=0)=>{const N=xS(w),{delay:V=0,times:z=am(N),type:j="keyframes",...R}=_;let{ease:v=t.ease||"easeOut",duration:C}=_;const I=typeof V=="function"?V(M,O):V,k=N.length;if(k<=2&&j==="spring"){let W=100;if(k===2&&CS(N)){const G=N[1]-N[0];W=Math.abs(G)}const L={...R};C!==void 0&&(L.duration=Pn(C));const oe=fS(L,W);v=oe.ease,C=oe.duration}C??(C=i);const U=d+I,q=U+C;z.length===1&&z[0]===0&&(z[1]=1);const ue=z.length-N.length;ue>0&&sm(z,ue),N.length===1&&N.unshift(null),vS($,N,v,z,U,q),T=Math.max(I+C,T),f=Math.max(q,f)};if(Dt(x)){const w=mf(x,s);h(E,S,vf("default",w))}else{const w=Fm(x,r,a),_=w.length;for(let $=0;$<_;$++){E=E,S=S;const M=w[$],O=mf(M,s);for(const N in E)h(E[N],wS(S,N),vf(N,O),$,_)}l=d,d+=T}}return s.forEach((m,p)=>{for(const x in m){const E=m[x];E.sort(gS);const S=[],T=[],h=[];for(let _=0;_<E.length;_++){const{at:$,value:M,easing:O}=E[_];S.push(M),T.push(Hr(0,f,$)),h.push(O||"easeOut")}T[0]!==0&&(T.unshift(0),S.unshift(S[0]),h.unshift(yS)),T[T.length-1]!==1&&(T.push(1),S.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const w=o.get(p);w.keyframes[x]=S,w.transition[x]={...t,duration:f,ease:h,times:T,...n}}}),o}function mf(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function vf(e,t){return t[e]||(t[e]=[]),t[e]}function xS(e){return Array.isArray(e)?e:[e]}function wS(e,t){return e[t]?{...e,...e[t]}:{...e}}const ES=e=>typeof e=="number",CS=e=>e.every(ES);function Hm(e,t,n,r){const i=Fm(e,r),o=i.length;Kt(!!o,"No valid element provided.");const s=[];for(let a=0;a<o;a++){const c=i[a];So.has(c)||dS(c);const l=So.get(c),d={...n};typeof d.delay=="function"&&(d.delay=d.delay(a,o)),s.push(...Fc(l,{...t,transition:d},{}))}return new Bm(s)}const _S=e=>Array.isArray(e)&&Array.isArray(e[0]);function SS(e,t,n){const r=[];return bS(e,t,n).forEach(({keyframes:o,transition:s},a)=>{let c;Dt(a)?c=Bc(a,o.default,s.default):c=Hm(a,o,s),r.push(c)}),new Bm(r)}const TS=e=>{function t(n,r,i){let o;return _S(n)?o=SS(n,r,e):uS(r)?o=Hm(n,r,i,e):o=Bc(n,r,i),e&&e.animations.push(o),o}return t},gf=TS();var $S="dyt3ib1",RS="dyt3ib2",PS="dyt3ib6",IS="dyt3ib4",AS="dyt3ib3",yf="dyt3ib5",OS="dyt3ib7",DS="dyt3ib0";const bf=e=>!!e.onClick||!!e.onTap,MS=he.forwardRef(({style:e={},className:t="",...n},r)=>{const i=bf(n)?zn.button:zn.div,o=bf(n)?"auto":"none";return D.jsx(i,{...n,ref:r,className:Se(t,$S),style:{...e,pointerEvents:o},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})}),Wm=he.createContext(void 0),ms=()=>{const e=he.useContext(Wm);if(!e)throw Error("Sheet context error");return e},Um=he.createContext(void 0);function xf({children:e}){const t=ms(),[n,r]=he.useState(!!t.disableDrag);function i(){t.disableDrag||r(!1)}function o(){n||r(!0)}return D.jsx(Um.Provider,{value:{disableDrag:n,setDragEnabled:i,setDragDisabled:o},children:e})}const Ym=()=>{const e=he.useContext(Um);if(!e)throw Error("Sheet scroller context error");return e},wf="90%",Km=typeof window>"u",kS={ease:"easeOut",duration:.2},NS={ease:"linear",duration:.01},VS=.6,jS=500;function Ef(e,t){let n=e[0],r=Math.abs(e[0]-t);for(let i=1;i<e.length;i+=1){const o=Math.abs(e[i]-t);o<r&&(n=e[i],r=o)}return n}function LS(e){const t=document.querySelector("body"),n=document.querySelector(`#${e}`);if(n){const i=window.innerHeight,o=(i-24)/i;t.style.backgroundColor="#000",n.style.overflow="hidden",n.style.willChange="transform",n.style.transition="transform 200ms ease-in-out, border-radius 200ms linear",n.style.transform=`translateY(calc(env(safe-area-inset-top) + ${24/2}px)) scale(${o})`,n.style.borderTopRightRadius="10px",n.style.borderTopLeftRadius="10px"}}function Cf(e){const t=document.querySelector("body"),n=document.getElementById(e);function r(){n.style.removeProperty("overflow"),n.style.removeProperty("will-change"),n.style.removeProperty("transition"),t.style.removeProperty("background-color"),n.removeEventListener("transitionend",r)}n&&(n.style.removeProperty("border-top-right-radius"),n.style.removeProperty("border-top-left-radius"),n.style.removeProperty("transform"),n.addEventListener("transitionend",r))}function FS(e){for(let t=0;t<e.length;t+=1)if(e[t+1]>e[t])return!1;return!0}function _f({snapTo:e,sheetHeight:t}){return e<0&&console.warn(`Snap point is out of bounds. Sheet height is ${t} but snap point is ${t+Math.abs(e)}.`),Math.max(Math.round(e),0)}function BS(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})}}function HS(){return typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0}const Wc=Km?he.useEffect:he.useLayoutEffect;function WS(e,t){const n=zm(e);he.useEffect(()=>{t&&!n&&e?LS(t):t&&!e&&n&&Cf(t)},[e,n]),he.useEffect(()=>()=>{t&&e&&Cf(t)},[e])}function US(e,t){const n=zm(e),r=he.useRef(!1),i=he.useCallback(()=>{var o,s,a,c;r.current?((c=(a=t.current).onCloseEnd)==null||c.call(a),r.current=!1):((s=(o=t.current).onOpenEnd)==null||s.call(o),r.current=!0)},[e,n]);return he.useEffect(()=>{var o,s,a,c;!n&&e?(s=(o=t.current).onOpenStart)==null||s.call(o):!e&&n&&((c=(a=t.current).onCloseStart)==null||c.call(a))},[e,n]),{handleAnimationComplete:i}}function YS(){const[e,t]=he.useState(0);return Wc(()=>{const n=()=>t(window.innerHeight);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e}function zm(e){const t=he.useRef();return he.useEffect(()=>{t.current=e}),t.current}function Sf(e){const t=he.useRef();return Wc(()=>{t.current=e}),he.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const KS=he.forwardRef(({children:e,style:t={},className:n="",noPadding:r,...i},o)=>{const{y:s,isOpen:a,callbacks:c,snapPoints:l,initialSnap:d=0,sheetRef:f,windowHeight:m,detent:p,animationOptions:x,reduceMotion:E}=ms(),{handleAnimationComplete:S}=US(a,c),T=l?l[0]-l[d]:0,h=l?l[0]:null,w=h!==null?`min(${h}px, ${wf})`:wf;return D.jsx(zn.div,{...i,ref:BS([f,o]),className:Se(n,RS),style:{...t,...r?{padding:0}:{padding:dt.theme.space[16],paddingTop:0},...p==="full-height"&&{height:w},...p==="content-height"&&{maxHeight:w},y:s},initial:E?!1:{y:m},animate:{y:T,transition:x},exit:{y:m,transition:x},onAnimationComplete:S,children:e})}),zS=he.forwardRef(({children:e,style:t,disableDrag:n,disableDragContent:r,className:i="",...o},s)=>{const a=ms(),c=Ym(),l=n||c.disableDrag||r?void 0:a.dragProps;return D.jsx(zn.div,{...o,ref:s,className:Se(i,PS),style:{...t},...l,children:e})});var XS="aglyib0";const Gr=u.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:i,...o},s)=>{const a=e||"button";return D.jsx(a,{ref:s,as:e,"data-test-id":o["data-test-id"],className:Se(XS,n),disabled:i,style:r,...o,children:D.jsx(Ui,{size:16,color:i?dt.theme.colors.grey1:dt.theme.colors.black})})});Gr.displayName="Button";Gr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const GS=u.forwardRef(({children:e,style:t,disableDrag:n,showBack:r,onBack:i,showClose:o,title:s,onClose:a,noHandleBar:c,noHeader:l,...d},f)=>{const{indicatorRotation:m,dragProps:p}=ms(),x=n?void 0:p,E=Di(m,T=>`translateX(2px) rotate(${T}deg)`),S=Di(m,T=>`translateX(-2px) rotate(${-1*T}deg)`);return D.jsxs(D.Fragment,{children:[!c&&D.jsx(zn.div,{...d,ref:f,className:AS,style:{...t},...x,children:e||D.jsxs("div",{className:IS,children:[D.jsx(zn.span,{className:yf,style:{transform:E}}),D.jsx(zn.span,{className:yf,style:{transform:S}})]})}),!l&&D.jsxs(Rt,{alignItems:"center",justifyContent:"space-between",marginBottom:"$8",py:"$16",gap:"$16",children:[D.jsxs(Rt,{alignItems:"center",gap:"$16",children:[r&&D.jsx(x0,{cursor:"pointer",onClick:i,size:18,color:dt.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),s&&D.jsx(Nt,{fontWeight:"$bold",textStyle:"subtitle1",m:"$0",children:s})]}),o&&D.jsx(Gr,{onClick:a,"data-test-id":"vds-BS-close-btn"})]})]})}),qS=he.forwardRef(({draggableAt:e="top",children:t,style:n,className:r="",...i},o)=>{const s=Ym();function a(f){const{scrollTop:m,scrollHeight:p,clientHeight:x}=f;if(!(p>x))return;const S=m<=0,T=p-m===x;e==="top"&&S||e==="bottom"&&T||e==="both"&&(S||T)?s.setDragEnabled():s.setDragDisabled()}function c(f){a(f.currentTarget)}function l(f){a(f.currentTarget)}const d=HS()?{onScroll:c,onTouchStart:l}:void 0;return D.jsx("div",{...i,ref:o,className:Se(r,OS),style:{...n},...d,children:t})}),ZS=typeof document<"u"?u.useLayoutEffect:()=>{};function Fa(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}let io=new Map,Tf=new Set;function $f(){if(typeof window>"u")return;let e=n=>{let r=io.get(n.target);r||(r=new Set,io.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=io.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),io.delete(n.target)),io.size===0)){for(let i of Tf)i();Tf.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?$f():document.addEventListener("DOMContentLoaded",$f));function Xm(e){for(Rf(e)&&(e=e.parentElement);e&&!Rf(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Rf(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Uc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function QS(){return Uc(/^Mac/i)}function JS(){return Uc(/^iPhone/i)}function eT(){return Uc(/^iPad/i)||QS()&&navigator.maxTouchPoints>1}function tT(){return JS()||eT()}const ra=typeof window<"u"&&window.visualViewport,nT=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let si=0,oa;function rT(e={}){const{isDisabled:t}=e;ZS(()=>{if(!t)return si+=1,si===1&&(tT()?oa=iT():oa=oT()),()=>{si-=1,si===0&&oa()}},[t])}function oT(){return Fa(vo(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),vo(document.documentElement,"overflow","hidden"))}function iT(){let e,t=0;const n=f=>{e=Xm(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(e===document.documentElement||e===document.body){f.preventDefault();return}const m=f.changedTouches[0].pageY,{scrollTop:p}=e,x=e.scrollHeight-e.clientHeight;x!==0&&((p<=0&&m>t||p>=x&&m<t)&&f.preventDefault(),t=m)},i=f=>{const m=f.target;If(m)&&m!==document.activeElement&&(f.preventDefault(),m.style.transform="translateY(-2000px)",m.focus(),requestAnimationFrame(()=>{m.style.transform=""}))},o=f=>{const m=f.target;If(m)&&(m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",ra&&(ra.height<window.innerHeight?requestAnimationFrame(()=>{Pf(m)}):ra.addEventListener("resize",()=>Pf(m),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},a=window.pageXOffset,c=window.pageYOffset,l=Fa(vo(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),vo(document.documentElement,"overflow","hidden"),vo(document.body,"marginTop",`-${c}px`));window.scrollTo(0,0);const d=Fa(so(document,"touchstart",n,{passive:!1,capture:!0}),so(document,"touchmove",r,{passive:!1,capture:!0}),so(document,"touchend",i,{passive:!1,capture:!0}),so(document,"focus",o,!0),so(window,"scroll",s));return()=>{l(),d(),window.scrollTo(a,c)}}function vo(e,t,n){const r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function so(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pf(e){const t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){const n=Xm(e);if(n!==document.documentElement&&n!==document.body&&n!==e){const r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function If(e){return e instanceof HTMLInputElement&&!nT.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const sT=u.forwardRef(({onOpenStart:e,onOpenEnd:t,onClose:n,onCloseStart:r,onCloseEnd:i,onSnap:o,children:s,isOpen:a,snapPoints:c,rootId:l,mountPoint:d,style:f,detent:m="content-height",initialSnap:p=0,disableDrag:x=!1,disableDragContent:E=!1,prefersReducedMotion:S=!1,tweenConfig:T=kS,showClose:h=!0,showBack:w,onBack:_,closeOnClickOutside:$=!0,noHandleBar:M,title:O,noHeader:N,"data-test-id":V,noPadding:z,...j},R)=>{const v=u.useRef(null),C=La(0),I=YS(),k=aS(),U=!!(S||k),q={type:"tween",...U?NS:T},ue=La(0),W=Di(ue,H=>H>=I?-1:dt.tokens.zIndices.modal),L=Di(ue,H=>H>=I?"hidden":"visible"),oe=u.useRef({onOpenStart:e,onOpenEnd:t,onCloseStart:r,onCloseEnd:i});Wc(()=>{oe.current={onOpenStart:e,onOpenEnd:t,onCloseStart:r,onCloseEnd:i}}),c&&(c=c.map(H=>H>0&&H<=1?Math.round(H*I):H<0?I+H:H),console.assert(FS(c)||I===0,`Snap points need to be in descending order got: [${c}]`));const G=Sf((H,{delta:J})=>{const ee=ue.getVelocity();ee>0&&C.set(10),ee<0&&C.set(-10),ue.set(Math.max(ue.get()+J.y,0))}),X=Sf((H,{velocity:J})=>{if(J.y>jS)n();else{const te=v.current.getBoundingClientRect().height,Z=ue.get();let ge=0;if(c){const Pe=c.map(Te=>te-Math.min(Te,te));m==="content-height"&&!Pe.includes(0)&&Pe.unshift(0),ge=Ef(Pe,Z)}else Z/te>VS&&(ge=te);if(ge=_f({snapTo:ge,sheetHeight:te}),gf(ue,ge,q),c&&o){const Pe=Math.abs(Math.round(c[0]-ge)),Te=c.indexOf(Ef(c,Pe));o(Te)}const Ce=Math.round(te);ge>=Ce&&n()}C.set(0)});u.useEffect(()=>{if(!c||!o)return;const H=a?p:c.length-1;o(H)},[a]),u.useImperativeHandle(R,()=>({y:ue,snapTo:H=>{const J=v.current;if(c&&c[H]!==void 0&&J!==null){const ee=J.getBoundingClientRect().height,te=c[H],Z=_f({snapTo:ee-te,sheetHeight:ee});gf(ue,Z,q),o&&o(H),Z>=ee&&n()}}})),WS(a,l),rT({isDisabled:!a});const ne=u.useMemo(()=>x?void 0:{drag:"y",dragElastic:0,dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragPropagation:!1,onDrag:G,onDragEnd:X},[x]),ae={y:ue,sheetRef:v,isOpen:a,initialSnap:p,snapPoints:c,detent:m,indicatorRotation:C,callbacks:oe,dragProps:ne,windowHeight:I,animationOptions:q,reduceMotion:U,disableDrag:x},B=D.jsx(Wm.Provider,{value:ae,children:D.jsx(zn.div,{...j,ref:R,className:DS,style:{zIndex:W,visibility:L,...f},children:D.jsx(nS,{children:a?D.jsx(xf,{children:D.jsxs(xf,{children:[D.jsxs(KS,{noPadding:z,children:[D.jsx(GS,{showBack:w,noHeader:N,onBack:_,showClose:h,title:O,onClose:n,noHandleBar:M}),D.jsx(zS,{disableDragContent:E,children:D.jsx(qS,{children:s})})]}),D.jsx(MS,{"data-test-id":"CT-BottomSheet-Overlay",onClick:()=>$?n():null})]})}):null})})});return Km?B:en.createPortal(B,d??document.body)}),qr=({size:e,color:t="inherit",thickness:n=3,...r})=>D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:D.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:D.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});qr.displayName="Spinner";qr.defaultProps={size:24,thickness:3};const aT=({value:e,delay:t=500})=>{const[n,r]=u.useState(e);return u.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n},cT=aT;process.env.NODE_ENV;var lT=it({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"]]}),uT={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},dT={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Af={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var fT="p9dczu0";const Yc=({ref:e,colorScheme:t="primary"})=>{const[n,r]=u.useState([]),i=cT({value:n,delay:1e3});return u.useEffect(()=>{if(e.current){const o=e.current,s=a=>{const c=o.getBoundingClientRect(),l=a.clientX-c.left,d=a.clientY-c.top,f=o.clientHeight,m=o.clientWidth,p=Math.max(m,f);r([...n,{top:d-p/2,left:l-p/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?dt.theme.colors.primary:uT[t]}])};return o.addEventListener("click",s),()=>{o.removeEventListener("click",s)}}return()=>!1},[e,n]),u.useEffect(()=>{i.length&&r([])},[i.length]),n==null?void 0:n.map((o,s)=>D.jsx("span",{className:fT,style:{...o}},s))},Ur=u.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:i,isLoading:o,variant:s,style:a,isDisabled:c,isFluid:l,unstyled:d,noRipple:f,...m},p)=>{const x=u.useRef(null),E=Yc({ref:x,colorScheme:r,variant:s});u.useImperativeHandle(p,()=>x.current);const S=e||"button";return D.jsx(S,{ref:x,as:e,"data-test-id":m["data-test-id"],className:Se(lT({colorScheme:r,size:i,variant:s,isFluid:l,unstyled:d}),s==="ghost"?dT[r||"primary"]:void 0,n),disabled:c,style:a,...m,children:o?D.jsx(qr,{color:s==="outline"||s==="ghost"?Af[r||"primary"]:Af.white}):D.jsxs(D.Fragment,{children:[!f&&E,t]})})});Ur.displayName="Button";Ur.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Gm="Checkbox",[pT,KI]=Xt(Gm),[hT,mT]=pT(Gm),vT=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:l,...d}=e,[f,m]=u.useState(null),p=Xe(t,w=>m(w)),x=u.useRef(!1),E=f?!!f.closest("form"):!0,[S=!1,T]=tn({prop:i,defaultProp:o,onChange:l}),h=u.useRef(S);return u.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const _=()=>T(h.current);return w.addEventListener("reset",_),()=>w.removeEventListener("reset",_)}},[f,T]),u.createElement(hT,{scope:n,state:S,disabled:a},u.createElement(Fe.button,ie({type:"button",role:"checkbox","aria-checked":vr(S)?"mixed":S,"aria-required":s,"data-state":qm(S),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onKeyDown:Ie(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ie(e.onClick,w=>{T(_=>vr(_)?!0:!_),E&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})})),E&&u.createElement(bT,{control:f,bubbles:!x.current,name:r,value:c,checked:S,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),gT="CheckboxIndicator",yT=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=mT(gT,n);return u.createElement(Jn,{present:r||vr(o.state)||o.state===!0},u.createElement(Fe.span,ie({"data-state":qm(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:t,style:{pointerEvents:"none",...e.style}})))}),bT=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=vr(n),f.call(c,vr(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"checkbox","aria-hidden":!0,defaultChecked:vr(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function vr(e){return e==="indeterminate"}function qm(e){return vr(e)?"indeterminate":e?"checked":"unchecked"}const xT=vT,wT=yT;var ET="glci2q0",Of="glci2q3",CT="glci2q4",Df={disabled:"glci2q1",enabled:"glci2q2"},_T=it({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 Zm=u.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:i,value:o,...s},a)=>{const c=`vds-checkbox-${u.useId()}`,[l,d]=u.useState(n);return u.useEffect(()=>{d(n)},[n]),D.jsxs("div",{className:ET,children:[D.jsx(xT,{id:c,disabled:i,"data-test-id":t,ref:a,value:l?"on":"off",checked:l,className:_T({checked:l,disabled:i}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...s,children:D.jsxs(wT,{className:CT,children:[l==="indeterminate"&&D.jsx(T0,{color:"white",className:Of}),l===!0&&D.jsx(rc,{color:"white",className:Of})]})}),e&&D.jsx("label",{htmlFor:c,className:i?Df.disabled:Df.enabled,children:e})]})});Zm.defaultProps={"data-test-id":"base"};const ST=e=>u.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var TT=it({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"]]}),$T="_5046e76";const Kc=u.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:i,prefixIcon:o,withCloseButton:s,className:a,disabled:c,style:l,...d},f)=>{const m=e||"button";return D.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Se(TT({variant:n,isActive:r}),a),disabled:c,style:l,...d,children:[o&&o,i&&!o&&D.jsx(_0,{style:{marginRight:8},size:16,color:"inherit"}),t,s&&D.jsx(Gr,{"data-test-id":"chips-close-button",className:$T,isDisabled:c})]})});Kc.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};Kc.displayName="Chips";const Qm="Dialog",[Jm,zI]=Xt(Qm),[RT,nr]=Jm(Qm),PT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=u.useRef(null),c=u.useRef(null),[l=!1,d]=tn({prop:r,defaultProp:i,onChange:o});return u.createElement(RT,{scope:t,triggerRef:a,contentRef:c,contentId:$n(),titleId:$n(),descriptionId:$n(),open:l,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),modal:s},n)},IT="DialogTrigger",AT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(IT,n),o=Xe(t,i.triggerRef);return u.createElement(Fe.button,ie({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zc(i.open)},r,{ref:o,onClick:Ie(e.onClick,i.onOpenToggle)}))}),OT="DialogPortal",[XI,ev]=Jm(OT,{forceMount:void 0}),Ba="DialogOverlay",DT=u.forwardRef((e,t)=>{const n=ev(Ba,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=nr(Ba,e.__scopeDialog);return o.modal?u.createElement(Jn,{present:r||o.open},u.createElement(MT,ie({},i,{ref:t}))):null}),MT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(Ba,n);return u.createElement(oh,{as:Lr,allowPinchZoom:!0,shards:[i.contentRef]},u.createElement(Fe.div,ie({"data-state":zc(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),To="DialogContent",kT=u.forwardRef((e,t)=>{const n=ev(To,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=nr(To,e.__scopeDialog);return u.createElement(Jn,{present:r||o.open},o.modal?u.createElement(NT,ie({},i,{ref:t})):u.createElement(VT,ie({},i,{ref:t})))}),NT=u.forwardRef((e,t)=>{const n=nr(To,e.__scopeDialog),r=u.useRef(null),i=Xe(t,n.contentRef,r);return u.useEffect(()=>{const o=r.current;if(o)return Gp(o)},[]),u.createElement(tv,ie({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,o=>o.preventDefault())}))}),VT=u.forwardRef((e,t)=>{const n=nr(To,e.__scopeDialog),r=u.useRef(!1),i=u.useRef(!1);return u.createElement(tv,ie({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),tv=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=nr(To,n),c=u.useRef(null),l=Xe(t,c);return $p(),u.createElement(u.Fragment,null,u.createElement(Rp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},u.createElement(Yi,ie({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":zc(a.open)},s,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),jT="DialogClose",LT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nr(jT,n);return u.createElement(Fe.button,ie({type:"button"},r,{ref:t,onClick:Ie(e.onClick,()=>i.onOpenChange(!1))}))});function zc(e){return e?"open":"closed"}const FT=PT,BT=AT,HT=DT,WT=kT,UT=LT;var YT="_1jc0z8o4",KT="_1jc0z8o0",zT=it({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:[]}),XT="_1jc0z8o1",GT=it({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),qT=it({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const ZT=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(WT,{className:t,ref:r,...n,children:e})),QT=u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(HT,{className:t,ref:r,...n,children:e})),JT=({children:e,className:t,...n})=>D.jsx(ns,{className:t,...n,children:e}),e$=({children:e,...t})=>D.jsx(FT,{...t,children:e});u.forwardRef(({children:e,className:t,...n},r)=>D.jsx(BT,{className:t,...n,ref:r,children:e}));const No=u.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:i,destroyOnClose:o,noPadding:s,colorScheme:a,closeOnOverlayClick:c,closeIcon:l,classNameBody:d,isCloseWhenEscape:f,...m},p)=>!n&&o?null:D.jsx(e$,{open:n,onOpenChange:r,children:D.jsxs(JT,{children:[D.jsx(QT,{className:Se(qT())}),D.jsxs(ZT,{onInteractOutside:x=>!c&&x.preventDefault(),className:Se(zT({colorScheme:a,size:i,noPadding:s}),d),...m,onEscapeKeyDown:x=>f?r==null?void 0:r():x.preventDefault(),ref:p,children:[r&&!l&&D.jsx(UT,{asChild:!0,"aria-label":"Close",children:D.jsx(Gr,{className:YT,"data-test-id":"close-modal"})}),r&&l&&l,e]})]})}));No.displayName="Modal";No.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 vs=u.forwardRef(({as:e,children:t,"data-test-id":n,...r},i)=>{const o=e||"div";return D.jsx(o,{"data-test-id":n,as:e,ref:i,className:KT,...r,children:t})});vs.displayName="modalBody";vs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const gs=u.forwardRef(({as:e,children:t,"data-test-id":n,...r},i)=>{const o=e||"div";return D.jsx(o,{"data-test-id":n,as:e,className:XT,ref:i,...r,children:t})});gs.displayName="modalFooter";gs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Vo=u.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...i},o)=>{const s=e||"div";return D.jsx(s,{"data-test-id":r,as:e,ref:o,className:GT({bold:t}),...i,children:D.jsx(Nt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Vo.displayName="modalHeader";Vo.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};const Xc=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:i,confirmTestId:o,isLoading:s,confirmText:a="Confirm",cancelText:c="Cancel",closeOnOverlayClick:l,size:d,classNameBody:f})=>D.jsxs(No,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:l,onClose:n,closeIcon:D.jsx(at,{display:"none"}),children:[D.jsx(Vo,{children:i}),D.jsx(vs,{children:D.jsx(Nt,{mt:"$8",mb:"$24",textStyle:"body2",children:r})}),D.jsx(gs,{children:D.jsxs(Rt,{gap:"$16",justifyContent:"flex-end",children:[D.jsx(Ur,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",children:c}),D.jsx(Ur,{"data-test-id":o,onClick:t,isLoading:s,children:a})]})})]});Xc.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0};const Gc=u.createContext({}),t$=({children:e})=>{const[t,n]=u.useState(!1),[r,i]=u.useState(void 0),o=()=>{n(!1),i(void 0)},s=()=>{o(),r!=null&&r.actionCallback(!0)},a=()=>{o(),r!=null&&r.actionCallback(!1)},c=u.useMemo(()=>({openDialog:({title:d,message:f,confirmText:m,cancelText:p,actionCallback:x,confirmTestId:E,size:S,isLoading:T,closeOnOverlayClick:h,classNameBody:w})=>{n(!0),i({title:d,message:f,confirmText:m,cancelText:p,confirmTestId:E,size:S,isLoading:T,actionCallback:x,closeOnOverlayClick:h,classNameBody:w})}}),[n,i]);return D.jsxs(Gc.Provider,{value:c,children:[D.jsx(Xc,{title:(r==null?void 0:r.title)??"",message:(r==null?void 0:r.message)??"",confirmText:r==null?void 0:r.confirmText,cancelText:r==null?void 0:r.cancelText,isOpen:t,confirmTestId:r==null?void 0:r.confirmTestId,isLoading:r==null?void 0:r.isLoading,onConfirm:s,onCancel:a,size:r==null?void 0:r.size,closeOnOverlayClick:r==null?void 0:r.closeOnOverlayClick}),e]})},n$=()=>{const{openDialog:e}=u.useContext(Gc);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}},qc=({children:e,isDisabled:t,className:n})=>D.jsx("div",{className:Se(Ew({isDisabled:t}),n),children:e});qc.displayName="ActionIcon";qc.defaultProps={isDisabled:!1,className:void 0};const jo=u.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:i},o)=>D.jsxs("label",{ref:o,className:Iw({state:hc({isError:e,isDisabled:t}),isTextarea:r}),children:[i,n&&"*"]}));jo.displayName="Label";jo.defaultProps={isTextarea:!1};const Zc=u.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:i,isLoading:o,icon:s,isClearable:a=!0,required:c,containerStyles:l,...d},f)=>{const{addonLeft:m,addonRight:p,helperTextLeft:x,helperTextRight:E,isError:S,errorMessage:T,isDisabled:h,isValid:w,elementLeft:_,elementRight:$,className:M,...O}=d,N=!!s,V=u.useRef(null);u.useImperativeHandle(f,()=>V.current);const[z,j]=u.useState(!1),[R,v]=u.useState(!1),C=k=>{if(z){const U=V.current;U&&U.focus(),R&&(j(!1),v(!1))}else i==null||i(k)},I=()=>{const k=V.current;k&&k.focus(),R&&(j(!1),v(!1))};return u.useEffect(()=>{R&&j(!0)},[R]),D.jsxs(Xr,{addonLeft:m,addonRight:p,elementLeft:_,elementRight:$,helperTextLeft:x,helperTextRight:E,isError:S,errorMessage:T,isDisabled:h,isValid:w,className:l,inputAreaClassName:$w,children:[D.jsx("input",{ref:V,type:t,className:Se(Tw,M),value:e,disabled:h,"data-test-id":d["data-test-id"],required:c,onBlur:C,...O}),D.jsx(jo,{isError:S,isDisabled:h,required:c,children:n}),D.jsx("div",{className:Se(Rw),"data-test-id":"icon-input-area",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onTouchStart:()=>v(!0),onClick:I,"aria-hidden":"true",children:D.jsxs(qc,{isDisabled:h,className:Se(a&&!o&&!N&&Sw),children:[N&&!o&&s,a&&!o&&!N&&D.jsx(Ui,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),o&&D.jsx(qr,{color:dt.theme.colors.green1})]})})]})});Zc.displayName="Input";Zc.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const Qc=u.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:i,...o},s)=>{const{helperTextLeft:a,helperTextRight:c,isError:l,errorMessage:d,isDisabled:f,isValid:m,...p}=o,x=u.useRef(null);u.useImperativeHandle(s,()=>x.current);const E=()=>{var S;(S=x.current)==null||S.focus()};return D.jsxs(Xr,{"data-test-id":"CT_Field_Container",helperTextLeft:a,helperTextRight:c,isError:l,errorMessage:d,isDisabled:f,isValid:m,className:i,onClick:E,children:[D.jsx("textarea",{ref:x,className:Se(Aw),value:e,rows:n,disabled:f,"data-test-id":o["data-test-id"],required:r,...p}),D.jsx(jo,{isTextarea:!0,isError:l,isDisabled:f,required:r,children:t})]})});Qc.displayName="Textarea";Qc.defaultProps={containerStyles:void 0,"data-test-id":void 0};var r$=it({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"]]}),Mf={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const Jc=u.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:i,unstyled:o,variant:s,isDisabled:a,isLoading:c,...l},d)=>{const f=u.useRef(null),m=Yc({ref:f,colorScheme:r,variant:s});u.useImperativeHandle(d,()=>f.current);const p=e||"button";return D.jsx(p,{ref:f,as:e,"data-test-id":l["data-test-id"],className:Se(r$({colorScheme:r,unstyled:o,variant:s}),t),disabled:a,style:n,...l,children:c?D.jsx(qr,{color:s==="outline"?Mf[r||"primary"]:Mf.white}):D.jsxs(D.Fragment,{children:[m,i]})})});Jc.displayName="Button";Jc.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var o$=it({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const i$=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>D.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:D.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"})}),el=u.forwardRef(({as:e,src:t,fit:n,width:r,height:i,loading:o,isLoading:s,fallback:a,onLoad:c,onError:l,className:d,"data-test-id":f,...m},p)=>{const x=e||"img",E=u.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),S=u.useMemo(()=>`${parseInt(`${i??0}`,10)}px`,[i]),[T,h]=u.useState(!1),[w,_]=u.useState(n),$=O=>{_("fill"),h(!0),l==null||l(O)},M=O=>{h(!1),c==null||c(O)};return s&&!T?D.jsx(at,{bgColor:"$grey2",width:E,height:S}):T?a||D.jsx(i$,{width:E,height:S}):D.jsx(x,{"data-test-id":f,as:"img",width:E,height:S,src:t,loading:o,onLoad:M,onError:$,ref:p,className:Se(o$({fit:w})),...m})});el.displayName="Image";el.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 s$=it({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"},variant:{default:"_5y0pl5e",underline:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{variant:"default",isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const nv=({children:e,className:t,variant:n,textStyle:r="body2",isDisabled:i,isBold:o,...s})=>D.jsx("a",{className:Se(t,s$({isDisabled:i,variant:n,textStyle:r,isBold:o})),"data-disabled":i,...s,children:e});var a$="_1cq2k9i0";const tl=u.forwardRef(({children:e,as:t,className:n,...r},i)=>{const o=t||"ul";return D.jsx(o,{"data-test-id":r["data-test-id"],ref:i,className:Se(a$,n),...r,children:e})});tl.displayName="List";tl.defaultProps={"data-test-id":void 0,as:"ul"};var c$=it({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),kf="xw6nfa2",l$="xw6nfa3";const nl=u.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:i,as:o,className:s,...a},c)=>{const l=o||"li",d=!!r;return D.jsx(l,{"data-test-id":a["data-test-id"],className:Se(c$({hasLink:d}),s),...a,ref:c,children:r?D.jsxs("a",{href:r,target:i,className:l$,children:[t,D.jsx("div",{className:kf,children:e}),n]}):D.jsxs(D.Fragment,{children:[t,D.jsx("div",{className:kf,children:e}),n]})})});nl.displayName="ListItem";nl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rv={},ov={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Hg,()=>(()=>{var n=[,(s,a,c)=>{c.r(a),c.d(a,{default:()=>d});var l=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,x,E;p.ready=new Promise((b,g)=>{x=b,E=g});function S(){function b(ce){const se=A;P=g=0,A=new Map,se.forEach(de=>{try{de(ce)}catch(le){console.error(le)}}),this.Qa(),Y&&Y.nb()}let g=0,P=0,A=new Map,Y=null,re=null;this.requestAnimationFrame=function(ce){g||(g=requestAnimationFrame(b.bind(this)));const se=++P;return A.set(se,ce),se},this.cancelAnimationFrame=function(ce){A.delete(ce),g&&A.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ce){re&&(document.body.remove(re),re=null),ce||(re=document.createElement("div"),re.style.backgroundColor="black",re.style.position="fixed",re.style.right=0,re.style.top=0,re.style.color="white",re.style.padding="4px",re.innerHTML="RIVE FPS",ce=function(se){re.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(re)),Y=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ce(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){re&&(document.body.remove(re),re=null),Y=null},this.Qa=function(){}}function T(b){console.assert(!0);const g=new Map;let P=-1/0;this.push=function(A){return A=A+((1<<b)-1)>>b,g.has(A)&&clearTimeout(g.get(A)),g.set(A,setTimeout(function(){g.delete(A),g.length==0?P=-1/0:A==P&&(P=Math.max(...g.keys()),console.assert(P<A))},1e3)),P=Math.max(A,P),P<<b}}const h=new function(){function b(){if(!g){let st=function(vt,Ne,Le){if(Ne=ve.createShader(Ne),ve.shaderSource(Ne,Le),ve.compileShader(Ne),Le=ve.getShaderInfoLog(Ne),0<Le.length)throw Le;ve.attachShader(vt,Ne)};var Ee=document.createElement("canvas"),De={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ve=Ee.getContext("webgl2",De);if(ve)P=2;else if(ve=Ee.getContext("webgl",De))P=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(A=Math.min(ve.getParameter(ve.MAX_RENDERBUFFER_SIZE),ve.getParameter(ve.MAX_TEXTURE_SIZE)),Ee=ve.createProgram(),st(Ee,ve.VERTEX_SHADER,`attribute vec2 vertex;
121
121
  attribute vec2 uv;
122
122
  uniform vec4 mat;
123
123
  uniform vec2 translate;
@@ -130,8 +130,8 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var Z=te(B,ee,X,ne,ae+".
130
130
  varying vec2 st;
131
131
  void main() {
132
132
  gl_FragColor = texture2D(image, st);
133
- }`),ve.bindAttribLocation(Ee,0,"vertex"),ve.bindAttribLocation(Ee,1,"uv"),ve.linkProgram(Ee),De=ve.getProgramInfoLog(Ee),0<De.trim().length)throw De;Y=ve.getUniformLocation(Ee,"mat"),re=ve.getUniformLocation(Ee,"translate"),ve.useProgram(Ee),ve.bindBuffer(ve.ARRAY_BUFFER,ve.createBuffer()),ve.enableVertexAttribArray(0),ve.enableVertexAttribArray(1),ve.bindBuffer(ve.ELEMENT_ARRAY_BUFFER,ve.createBuffer()),ve.uniform1i(ve.getUniformLocation(Ee,"image"),0),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ve}return!0}let g=null,P=0,A=0,Y=null,re=null,ce=0,se=0;this.wb=function(){return b(),A},this.gb=function(Ee){if(!b())return null;const De=g.createTexture();return g.bindTexture(g.TEXTURE_2D,De),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ee),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),P==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),De};const de=new T(8),le=new T(8),me=new T(10),we=new T(10);this.kb=function(Ee,De,ve,st,vt){if(b()){var Ne=de.push(Ee),Le=le.push(De);(g.canvas.width!=Ne||g.canvas.height!=Le)&&(g.canvas.width=Ne,g.canvas.height=Le),g.viewport(0,Le-De,Ee,De),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ve.sort((Ue,Bn)=>Bn.Ua-Ue.Ua),Ne=me.push(st),ce!=Ne&&(g.bufferData(g.ARRAY_BUFFER,8*Ne,g.DYNAMIC_DRAW),ce=Ne),Ne=0;for(var gt of ve)g.bufferSubData(g.ARRAY_BUFFER,Ne,gt.Da),Ne+=4*gt.Da.length;console.assert(Ne==4*st);for(var Ht of ve)g.bufferSubData(g.ARRAY_BUFFER,Ne,Ht.Xa),Ne+=4*Ht.Xa.length;console.assert(Ne==8*st),Ne=we.push(vt),se!=Ne&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ne,g.DYNAMIC_DRAW),se=Ne),gt=0;for(var Cn of ve)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,gt,Cn.indices),gt+=2*Cn.indices.length;console.assert(gt==2*vt),Cn=0,Ht=!0,Ne=gt=0;for(const Ue of ve){Ue.image.za!=Cn&&(g.bindTexture(g.TEXTURE_2D,Ue.image.cb||null),Cn=Ue.image.za),Ue.zb?(g.scissor(Ue.Ia,Le-Ue.Ja-Ue.Pa,Ue.Gb,Ue.Pa),Ht=!0):Ht&&(g.scissor(0,Le-De,Ee,De),Ht=!1),ve=2/Ee;const Bn=-2/De;g.uniform4f(Y,Ue.oa[0]*ve*Ue.va,Ue.oa[1]*Bn*Ue.wa,Ue.oa[2]*ve*Ue.va,Ue.oa[3]*Bn*Ue.wa),g.uniform2f(re,Ue.oa[4]*ve*Ue.va+ve*(Ue.Ia-Ue.xb*Ue.va)-1,Ue.oa[5]*Bn*Ue.wa+Bn*(Ue.Ja-Ue.yb*Ue.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ne),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ne+4*st),g.drawElements(g.TRIANGLES,Ue.indices.length,g.UNSIGNED_SHORT,gt),Ne+=4*Ue.Da.length,gt+=2*Ue.indices.length}console.assert(Ne==4*st),console.assert(gt==2*vt)}},this.canvas=function(){return b()&&g.canvas}};p.onRuntimeInitialized=function(){function b(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 P(){0<gt.length&&(h.kb(Le.drawWidth(),Le.drawHeight(),gt,Ht,Cn),gt=[],Cn=Ht=0,Le.reset(512,512));for(const pe of Ne){for(const Ae of pe.da)Ae();pe.da=[]}Ne.clear()}var A=p.RenderPaintStyle;const Y=p.RenderPath,re=p.RenderPaint,ce=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,me=A.fill,we=A.stroke,Ee=p.FillRule.evenOdd;let De=1;var ve=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=De,De=De+1&2147483647||1},decode:function(pe){let Ae=Ps;Ae.total++;var et=this,Ge=new Image;Ge.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),Ge.onload=function(){if(et.ab=Ge,et.cb=h.gb(Ge),et.size(Ge.width,Ge.height),Ae.loaded++,Ae.loaded===Ae.total){const tt=Ae.ready;tt&&(tt(),Ae.ready=null)}}}}),st=Y.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,Ae,et,Ge,tt,pt,ze){var qe=this.ia,Zt=qe.addPath;pe=pe.ia;const wt=new DOMMatrix;wt.a=Ae,wt.b=et,wt.c=Ge,wt.d=tt,wt.e=pt,wt.f=ze,Zt.call(qe,pe,wt)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,Ae){this.ia.moveTo(pe,Ae)},lineTo:function(pe,Ae){this.ia.lineTo(pe,Ae)},cubicTo:function(pe,Ae,et,Ge,tt,pt){this.ia.bezierCurveTo(pe,Ae,et,Ge,tt,pt)},close:function(){this.ia.closePath()}}),vt=re.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=b(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,Ae,et,Ge){this.qa={Va:pe,Wa:Ae,La:et,Ma:Ge,Ca:[]}},radialGradient:function(pe,Ae,et,Ge){this.qa={Va:pe,Wa:Ae,La:et,Ma:Ge,Ca:[],ub:!0}},addStop:function(pe,Ae){this.qa.Ca.push({color:pe,stop:Ae})},completeGradient:function(){},draw:function(pe,Ae,et){let Ge=this.bb;var tt=this.Ha,pt=this.qa;if(pe.globalCompositeOperation=this.$a,pt!=null){tt=pt.Va;var ze=pt.Wa;const Zt=pt.La;var qe=pt.Ma;const wt=pt.Ca;pt.ub?(pt=Zt-tt,qe-=ze,tt=pe.createRadialGradient(tt,ze,0,tt,ze,Math.sqrt(pt*pt+qe*qe))):tt=pe.createLinearGradient(tt,ze,Zt,qe);for(let hn=0,_t=wt.length;hn<_t;hn++)ze=wt[hn],tt.addColorStop(ze.stop,g(ze.color));this.Ha=tt,this.qa=null}switch(Ge){case we:pe.strokeStyle=tt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(Ae);break;case me:pe.fillStyle=tt,pe.fill(Ae,et)}}});const Ne=new Set;let Le=null,gt=[],Ht=0,Cn=0;var Ue=p.CanvasRenderer=ce.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,Ae,et,Ge,tt,pt){const ze=this.ha,qe=ze.length-6;ze.splice(qe,6,ze[qe]*pe+ze[qe+2]*Ae,ze[qe+1]*pe+ze[qe+3]*Ae,ze[qe]*et+ze[qe+2]*Ge,ze[qe+1]*et+ze[qe+3]*Ge,ze[qe]*tt+ze[qe+2]*pt+ze[qe+4],ze[qe+1]*tt+ze[qe+3]*pt+ze[qe+5]),this.da.push(this.ba.transform.bind(this.ba,pe,Ae,et,Ge,tt,pt))},rotate:function(pe){const Ae=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,Ae,-Ae,pe,0,0)},_drawPath:function(pe,Ae){this.da.push(Ae.draw.bind(Ae,this.ba,pe.ia,pe.Ga===Ee?"evenodd":"nonzero"))},drawImage:function(pe,...Ae){var et=this.ba;this.da.push(function(){et.drawImage(pe,...Ae)})},_drawRiveImage:function(pe,Ae,et){var Ge=pe.ab;if(Ge){var tt=this.ba,pt=b(Ae);this.da.push(function(){tt.globalCompositeOperation=pt,tt.globalAlpha=et,tt.drawImage(Ge,0,0),tt.globalAlpha=1})}},_getMatrix:function(pe){const Ae=this.ha,et=Ae.length-6;for(let Ge=0;6>Ge;++Ge)pe[Ge]=Ae[et+Ge]},_drawImageMesh:function(pe,Ae,et,Ge,tt,pt,ze,qe,Zt,wt){var hn=this.ba.canvas.width,_t=this.ba.canvas.height;const uu=Zt-ze,du=wt-qe;ze=Math.max(ze,0),qe=Math.max(qe,0),Zt=Math.min(Zt,hn),wt=Math.min(wt,_t);const Qr=Zt-ze,Jr=wt-qe;if(console.assert(Qr<=Math.min(uu,hn)),console.assert(Jr<=Math.min(du,_t)),!(0>=Qr||0>=Jr)){Zt=Qr<uu||Jr<du,hn=wt=1;var ir=Math.ceil(Qr*wt),sr=Math.ceil(Jr*hn);_t=h.wb(),ir>_t&&(wt*=_t/ir,ir=_t),sr>_t&&(hn*=_t/sr,sr=_t),Le||(Le=new p.DynamicRectanizer(_t),Le.reset(512,512)),_t=Le.addRect(ir,sr),0>_t&&(P(),Ne.add(this),_t=Le.addRect(ir,sr),console.assert(0<=_t));var fu=_t&65535,pu=_t>>16;gt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:fu,Ja:pu,xb:ze,yb:qe,Gb:ir,Pa:sr,va:wt,wa:hn,Da:new Float32Array(Ge),Xa:new Float32Array(tt),indices:new Uint16Array(pt),zb:Zt,Ua:pe.za<<1|(Zt?1:0)}),Ht+=Ge.length,Cn+=pt.length;var Sr=this.ba,Fg=b(Ae);this.da.push(function(){Sr.save(),Sr.resetTransform(),Sr.globalCompositeOperation=Fg,Sr.globalAlpha=et,Sr.drawImage(h.canvas(),fu,pu,ir,sr,ze,qe,Qr,Jr),Sr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ee?"evenodd":"nonzero"))},clear:function(){Ne.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,Ae){this.transform(1,0,0,1,pe,Ae)}});p.makeRenderer=function(pe){return new Ue(pe)},p.renderFactory={makeRenderPaint:function(){return new vt},makeRenderPath:function(){return new st},makeRenderImage:function(){return new ve}};let Bn=p.load,Ps=null;p.load=function(pe){return new Promise(function(Ae){let et=null;Ps={total:0,loaded:0,ready:function(){Ae(et)}},et=Bn(pe),Ps.total==0&&Ae(et)})},A=new S,p.requestAnimationFrame=A.requestAnimationFrame.bind(A),p.cancelAnimationFrame=A.cancelAnimationFrame.bind(A),p.enableFPSCounter=A.lb.bind(A),p.disableFPSCounter=A.ib,A.Qa=P,p.cleanup=function(){Le&&Le.delete()}};var w=Object.assign({},p),_="./this.program",$=typeof window=="object",M=typeof importScripts=="function",O="",N,V;($||M)&&(M?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),f&&(O=f),O.indexOf("blob:")!==0?O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1):O="",M&&(V=b=>{var g=new XMLHttpRequest;return g.open("GET",b,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),N=(b,g,P)=>{var A=new XMLHttpRequest;A.open("GET",b,!0),A.responseType="arraybuffer",A.onload=()=>{A.status==200||A.status==0&&A.response?g(A.response):P()},A.onerror=P,A.send(null)});var z=p.print||console.log.bind(console),j=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(_=p.thisProgram);var R;p.wasmBinary&&(R=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&te("no native wasm support detected");var v,C=!1,I,k,U,q,ue,W,L,oe;function G(){var b=v.buffer;p.HEAP8=I=new Int8Array(b),p.HEAP16=U=new Int16Array(b),p.HEAP32=ue=new Int32Array(b),p.HEAPU8=k=new Uint8Array(b),p.HEAPU16=q=new Uint16Array(b),p.HEAPU32=W=new Uint32Array(b),p.HEAPF32=L=new Float32Array(b),p.HEAPF64=oe=new Float64Array(b)}var X,ne=[],ae=[],B=[];function H(){var b=p.preRun.shift();ne.unshift(b)}var J=0,ee=null;function te(b){throw p.onAbort&&p.onAbort(b),b="Aborted("+b+")",j(b),C=!0,b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info."),E(b),b}function Z(b){return b.startsWith("data:application/octet-stream;base64,")}var ge;if(ge="canvas_advanced.wasm",!Z(ge)){var Ce=ge;ge=p.locateFile?p.locateFile(Ce,O):O+Ce}function Re(b){if(b==ge&&R)return new Uint8Array(R);if(V)return V(b);throw"both async and sync fetching of the wasm failed"}function Pe(b){if(!R&&($||M)){if(typeof fetch=="function"&&!b.startsWith("file://"))return fetch(b,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+b+"'";return g.arrayBuffer()}).catch(()=>Re(b));if(N)return new Promise((g,P)=>{N(b,A=>g(new Uint8Array(A)),P)})}return Promise.resolve().then(()=>Re(b))}function Se(b,g,P){return Pe(b).then(A=>WebAssembly.instantiate(A,g)).then(A=>A).then(P,A=>{j("failed to asynchronously prepare wasm: "+A),te(A)})}function We(b,g){var P=ge;return R||typeof WebAssembly.instantiateStreaming!="function"||Z(P)||P.startsWith("file://")||typeof fetch!="function"?Se(P,b,g):fetch(P,{credentials:"same-origin"}).then(A=>WebAssembly.instantiateStreaming(A,b).then(g,function(Y){return j("wasm streaming compile failed: "+Y),j("falling back to ArrayBuffer instantiation"),Se(P,b,g)}))}var ke=b=>{for(;0<b.length;)b.shift()(p)};function lt(b){if(b===void 0)return"_unknown";b=b.replace(/[^a-zA-Z0-9_]/g,"$");var g=b.charCodeAt(0);return 48<=g&&57>=g?`_${b}`:b}function Ye(b,g){return b=lt(b),{[b]:function(){return g.apply(this,arguments)}}[b]}function yt(){this.ja=[void 0],this.Oa=[]}var Je=new yt,Pt=void 0;function Te(b){throw new Pt(b)}var Et=b=>(b||Te("Cannot use deleted val. handle = "+b),Je.get(b).value),ut=b=>{switch(b){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Je.Ya({Ta:1,value:b})}};function cn(b){var g=Error,P=Ye(b,function(A){this.name=b,this.message=A,A=Error(A).stack,A!==void 0&&(this.stack=this.toString()+`
134
- `+A.replace(/^Error(:[^\n]*)?\n/,""))});return P.prototype=Object.create(g.prototype),P.prototype.constructor=P,P.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},P}var jt=void 0,St=void 0;function je(b){for(var g="";k[b];)g+=St[k[b++]];return g}var Ct=[];function Lt(){for(;Ct.length;){var b=Ct.pop();b.W.na=!1,b.delete()}}var bn=void 0,Ft={};function rr(b,g){for(g===void 0&&Te("ptr should not be undefined");b.$;)g=b.ra(g),b=b.$;return g}var rn={};function _r(b){b=cu(b);var g=je(b);return En(b),g}function Bt(b,g){var P=rn[b];return P===void 0&&Te(g+" has unknown type "+_r(b)),P}function ln(){}var Tt=!1;function un(b){--b.count.value,b.count.value===0&&(b.ca?b.fa.ka(b.ca):b.Z.X.ka(b.Y))}function dn(b,g,P){return g===P?b:P.$===void 0?null:(b=dn(b,g,P.$),b===null?null:P.jb(b))}var kn={};function Zr(b,g){return g=rr(b,g),Ft[g]}var Nn=void 0;function Vn(b){throw new Nn(b)}function fn(b,g){return g.Z&&g.Y||Vn("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&Vn("Both smartPtrType and smartPtr must be specified"),g.count={value:1},qt(Object.create(b,{W:{value:g}}))}function qt(b){return typeof FinalizationRegistry>"u"?(qt=g=>g,b):(Tt=new FinalizationRegistry(g=>{un(g.W)}),qt=g=>{var P=g.W;return P.ca&&Tt.register(g,{W:P},g),g},ln=g=>{Tt.unregister(g)},qt(b))}var jn={};function xn(b){for(;b.length;){var g=b.pop();b.pop()(g)}}function on(b){return this.fromWireType(ue[b>>2])}var pn={},Ln={};function $t(b,g,P){function A(se){se=P(se),se.length!==b.length&&Vn("Mismatched type converter count");for(var de=0;de<b.length;++de)F(b[de],se[de])}b.forEach(function(se){Ln[se]=g});var Y=Array(g.length),re=[],ce=0;g.forEach((se,de)=>{rn.hasOwnProperty(se)?Y[de]=rn[se]:(re.push(se),pn.hasOwnProperty(se)||(pn[se]=[]),pn[se].push(()=>{Y[de]=rn[se],++ce,ce===re.length&&A(Y)}))}),re.length===0&&A(Y)}function Fn(b){switch(b){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${b}`)}}function y(b,g,P={}){var A=g.name;if(b||Te(`type "${A}" must have a positive integer typeid pointer`),rn.hasOwnProperty(b)){if(P.tb)return;Te(`Cannot register type '${A}' twice`)}rn[b]=g,delete Ln[b],pn.hasOwnProperty(b)&&(g=pn[b],delete pn[b],g.forEach(Y=>Y()))}function F(b,g,P={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");y(b,g,P)}function Q(b){Te(b.W.Z.X.name+" instance already deleted")}function fe(){}function xe(b,g,P){if(b[g].aa===void 0){var A=b[g];b[g]=function(){return b[g].aa.hasOwnProperty(arguments.length)||Te(`Function '${P}' called with an invalid number of arguments (${arguments.length}) - expects one of (${b[g].aa})!`),b[g].aa[arguments.length].apply(this,arguments)},b[g].aa=[],b[g].aa[A.ma]=A}}function _e(b,g,P){p.hasOwnProperty(b)?((P===void 0||p[b].aa!==void 0&&p[b].aa[P]!==void 0)&&Te(`Cannot register public name '${b}' twice`),xe(p,b,b),p.hasOwnProperty(P)&&Te(`Cannot register multiple overloads of a function with the same number of arguments (${P})!`),p[b].aa[P]=g):(p[b]=g,P!==void 0&&(p[b].Hb=P))}function be(b,g,P,A,Y,re,ce,se){this.name=b,this.constructor=g,this.ga=P,this.ka=A,this.$=Y,this.ob=re,this.ra=ce,this.jb=se,this.Ra=[]}function ye(b,g,P){for(;g!==P;)g.ra||Te(`Expected null or instance of ${P.name}, got an instance of ${g.name}`),b=g.ra(b),g=g.$;return b}function Ke(b,g){return g===null?(this.Aa&&Te(`null is not a valid ${this.name}`),0):(g.W||Te(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),ye(g.W.Y,g.W.Z.X,this.X))}function Me(b,g){if(g===null){if(this.Aa&&Te(`null is not a valid ${this.name}`),this.ua){var P=this.Ba();return b!==null&&b.push(this.ka,P),P}return 0}if(g.W||Te(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&Te(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),P=ye(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&Te("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?P=g.W.ca:Te(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:P=g.W.ca;break;case 2:if(g.W.fa===this)P=g.W.ca;else{var A=g.clone();P=this.Bb(P,ut(function(){A.delete()})),b!==null&&b.push(this.ka,P)}break;default:Te("Unsupporting sharing policy")}return P}function Ve(b,g){return g===null?(this.Aa&&Te(`null is not a valid ${this.name}`),0):(g.W||Te(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||Te(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&Te(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),ye(g.W.Y,g.W.Z.X,this.X))}function He(b,g,P,A){this.name=b,this.X=g,this.Aa=P,this.ta=A,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Me:(this.toWireType=A?Ke:Ve,this.ea=null)}function It(b,g,P){p.hasOwnProperty(b)||Vn("Replacing nonexistant public symbol"),p[b].aa!==void 0&&P!==void 0?p[b].aa[P]=g:(p[b]=g,p[b].ma=P)}var or=(b,g)=>{var P=[];return function(){if(P.length=0,Object.assign(P,arguments),b.includes("j")){var A=p["dynCall_"+b];A=P&&P.length?A.apply(null,[g].concat(P)):A.call(null,g)}else A=X.get(g).apply(null,P);return A}};function Be(b,g){b=je(b);var P=b.includes("j")?or(b,g):X.get(g);return typeof P!="function"&&Te(`unknown function pointer with signature ${b}: ${g}`),P}var eu=void 0;function wn(b,g){function P(re){Y[re]||rn[re]||(Ln[re]?Ln[re].forEach(P):(A.push(re),Y[re]=!0))}var A=[],Y={};throw g.forEach(P),new eu(`${b}: `+A.map(_r).join([", "]))}function Lo(b,g,P,A,Y){var re=g.length;2>re&&Te("argTypes array size mismatch! Must at least get return value and 'this' types!");var ce=g[1]!==null&&P!==null,se=!1;for(P=1;P<g.length;++P)if(g[P]!==null&&g[P].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=re-2,me=Array(le),we=[],Ee=[];return function(){if(arguments.length!==le&&Te(`function ${b} called with ${arguments.length} arguments, expected ${le} args!`),Ee.length=0,we.length=ce?2:1,we[0]=Y,ce){var De=g[1].toWireType(Ee,this);we[1]=De}for(var ve=0;ve<le;++ve)me[ve]=g[ve+2].toWireType(Ee,arguments[ve]),we.push(me[ve]);if(ve=A.apply(null,we),se)xn(Ee);else for(var st=ce?1:2;st<g.length;st++){var vt=st===1?De:me[st-2];g[st].ea!==null&&g[st].ea(vt)}return De=de?g[0].fromWireType(ve):void 0,De}}function Fo(b,g){for(var P=[],A=0;A<b;A++)P.push(W[g+4*A>>2]);return P}function tu(b,g,P){return b instanceof Object||Te(`${P} with invalid "this": ${b}`),b instanceof g.X.constructor||Te(`${P} incompatible with "this" of type ${b.constructor.name}`),b.W.Y||Te(`cannot call emscripten binding method ${P} on deleted object`),ye(b.W.Y,b.W.Z.X,g.X)}function _s(b){b>=Je.Ea&&--Je.get(b).Ta===0&&Je.Za(b)}function Tg(b,g,P){switch(g){case 0:return function(A){return this.fromWireType((P?I:k)[A])};case 1:return function(A){return this.fromWireType((P?U:q)[A>>1])};case 2:return function(A){return this.fromWireType((P?ue:W)[A>>2])};default:throw new TypeError("Unknown integer type: "+b)}}function Ss(b){if(b===null)return"null";var g=typeof b;return g==="object"||g==="array"||g==="function"?b.toString():""+b}function $g(b,g){switch(g){case 2:return function(P){return this.fromWireType(L[P>>2])};case 3:return function(P){return this.fromWireType(oe[P>>3])};default:throw new TypeError("Unknown float type: "+b)}}function Rg(b,g,P){switch(g){case 0:return P?function(A){return I[A]}:function(A){return k[A]};case 1:return P?function(A){return U[A>>1]}:function(A){return q[A>>1]};case 2:return P?function(A){return ue[A>>2]}:function(A){return W[A>>2]};default:throw new TypeError("Unknown integer type: "+b)}}var nu=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ru=(b,g,P)=>{var A=g+P;for(P=g;b[P]&&!(P>=A);)++P;if(16<P-g&&b.buffer&&nu)return nu.decode(b.subarray(g,P));for(A="";g<P;){var Y=b[g++];if(Y&128){var re=b[g++]&63;if((Y&224)==192)A+=String.fromCharCode((Y&31)<<6|re);else{var ce=b[g++]&63;Y=(Y&240)==224?(Y&15)<<12|re<<6|ce:(Y&7)<<18|re<<12|ce<<6|b[g++]&63,65536>Y?A+=String.fromCharCode(Y):(Y-=65536,A+=String.fromCharCode(55296|Y>>10,56320|Y&1023))}}else A+=String.fromCharCode(Y)}return A},ou=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Pg=(b,g)=>{for(var P=b>>1,A=P+g/2;!(P>=A)&&q[P];)++P;if(P<<=1,32<P-b&&ou)return ou.decode(k.subarray(b,P));for(P="",A=0;!(A>=g/2);++A){var Y=U[b+2*A>>1];if(Y==0)break;P+=String.fromCharCode(Y)}return P},Ig=(b,g,P)=>{if(P===void 0&&(P=2147483647),2>P)return 0;P-=2;var A=g;P=P<2*b.length?P/2:b.length;for(var Y=0;Y<P;++Y)U[g>>1]=b.charCodeAt(Y),g+=2;return U[g>>1]=0,g-A},Ag=b=>2*b.length,Og=(b,g)=>{for(var P=0,A="";!(P>=g/4);){var Y=ue[b+4*P>>2];if(Y==0)break;++P,65536<=Y?(Y-=65536,A+=String.fromCharCode(55296|Y>>10,56320|Y&1023)):A+=String.fromCharCode(Y)}return A},Dg=(b,g,P)=>{if(P===void 0&&(P=2147483647),4>P)return 0;var A=g;P=A+P-4;for(var Y=0;Y<b.length;++Y){var re=b.charCodeAt(Y);if(55296<=re&&57343>=re){var ce=b.charCodeAt(++Y);re=65536+((re&1023)<<10)|ce&1023}if(ue[g>>2]=re,g+=4,g+4>P)break}return ue[g>>2]=0,g-A},Mg=b=>{for(var g=0,P=0;P<b.length;++P){var A=b.charCodeAt(P);55296<=A&&57343>=A&&++P,g+=4}return g},kg={};function Bo(b){var g=kg[b];return g===void 0?je(b):g}var Ho=[];function Ng(b){var g=Ho.length;return Ho.push(b),g}function Vg(b,g){for(var P=Array(b),A=0;A<b;++A)P[A]=Bt(W[g+4*A>>2],"parameter "+A);return P}var iu=[],Ts={},su=()=>{if(!$s){var b={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",_:_||"./this.program"},g;for(g in Ts)Ts[g]===void 0?delete b[g]:b[g]=Ts[g];var P=[];for(g in b)P.push(`${g}=${b[g]}`);$s=P}return $s},$s,jg=[null,[],[]];Object.assign(yt.prototype,{get(b){return this.ja[b]},has(b){return this.ja[b]!==void 0},Ya(b){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=b,g},Za(b){this.ja[b]=void 0,this.Oa.push(b)}}),Pt=p.BindingError=class extends Error{constructor(b){super(b),this.name="BindingError"}},Je.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Je.Ea=Je.ja.length,p.count_emval_handles=function(){for(var b=0,g=Je.Ea;g<Je.ja.length;++g)Je.ja[g]!==void 0&&++b;return b},jt=p.PureVirtualError=cn("PureVirtualError");for(var au=Array(256),Wo=0;256>Wo;++Wo)au[Wo]=String.fromCharCode(Wo);St=au,p.getInheritedInstanceCount=function(){return Object.keys(Ft).length},p.getLiveInheritedInstances=function(){var b=[],g;for(g in Ft)Ft.hasOwnProperty(g)&&b.push(Ft[g]);return b},p.flushPendingDeletes=Lt,p.setDelayFunction=function(b){bn=b,Ct.length&&bn&&bn(Lt)},Nn=p.InternalError=class extends Error{constructor(b){super(b),this.name="InternalError"}},fe.prototype.isAliasOf=function(b){if(!(this instanceof fe&&b instanceof fe))return!1;var g=this.W.Z.X,P=this.W.Y,A=b.W.Z.X;for(b=b.W.Y;g.$;)P=g.ra(P),g=g.$;for(;A.$;)b=A.ra(b),A=A.$;return g===A&&P===b},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var b=qt,g=Object,P=g.create,A=Object.getPrototypeOf(this),Y=this.W;return b=b(P.call(g,A,{W:{value:{count:Y.count,na:Y.na,pa:Y.pa,Y:Y.Y,Z:Y.Z,ca:Y.ca,fa:Y.fa}}})),b.W.count.value+=1,b.W.na=!1,b},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&Te("Object already scheduled for deletion"),ln(this),un(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&Te("Object already scheduled for deletion"),Ct.push(this),Ct.length===1&&bn&&bn(Lt),this.W.na=!0,this},He.prototype.pb=function(b){return this.Sa&&(b=this.Sa(b)),b},He.prototype.Ka=function(b){this.ka&&this.ka(b)},He.prototype.argPackAdvance=8,He.prototype.readValueFromPointer=on,He.prototype.deleteObject=function(b){b!==null&&b.delete()},He.prototype.fromWireType=function(b){function g(){return this.ua?fn(this.X.ga,{Z:this.Ab,Y:P,fa:this,ca:b}):fn(this.X.ga,{Z:this,Y:b})}var P=this.pb(b);if(!P)return this.Ka(b),null;var A=Zr(this.X,P);if(A!==void 0)return A.W.count.value===0?(A.W.Y=P,A.W.ca=b,A.clone()):(A=A.clone(),this.Ka(b),A);if(A=this.X.ob(P),A=kn[A],!A)return g.call(this);A=this.ta?A.fb:A.pointerType;var Y=dn(P,this.X,A.X);return Y===null?g.call(this):this.ua?fn(A.X.ga,{Z:A,Y,fa:this,ca:b}):fn(A.X.ga,{Z:A,Y})},eu=p.UnboundTypeError=cn("UnboundTypeError");var Lg={I:function(b,g,P){b=je(b),g=Bt(g,"wrapper"),P=Et(P);var A=[].slice,Y=g.X,re=Y.ga,ce=Y.$.ga,se=Y.$.constructor;b=Ye(b,function(){Y.$.Ra.forEach((function(le){if(this[le]===ce[le])throw new jt(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:re}),this.__construct.apply(this,A.call(arguments))}),re.__construct=function(){this===re&&Te("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(A.call(arguments)));ln(le);var me=le.W;le.notifyOnDestruction(),me.pa=!0,Object.defineProperties(this,{W:{value:me}}),qt(this),le=me.Y,le=rr(Y,le),Ft.hasOwnProperty(le)?Te(`Tried to register registered instance: ${le}`):Ft[le]=this},re.__destruct=function(){this===re&&Te("Pass correct 'this' to __destruct"),ln(this);var le=this.W.Y;le=rr(Y,le),Ft.hasOwnProperty(le)?delete Ft[le]:Te(`Tried to unregister unregistered instance: ${le}`)},b.prototype=Object.create(re);for(var de in P)b.prototype[de]=P[de];return ut(b)},L:function(b){var g=jn[b];delete jn[b];var P=g.Ba,A=g.ka,Y=g.Na,re=Y.map(ce=>ce.sb).concat(Y.map(ce=>ce.Db));$t([b],re,ce=>{var se={};return Y.forEach((de,le)=>{var me=ce[le],we=de.qb,Ee=de.rb,De=ce[le+Y.length],ve=de.Cb,st=de.Eb;se[de.mb]={read:vt=>me.fromWireType(we(Ee,vt)),write:(vt,Ne)=>{var Le=[];ve(st,vt,De.toWireType(Le,Ne)),xn(Le)}}}),[{name:g.name,fromWireType:function(de){var le={},me;for(me in se)le[me]=se[me].read(de);return A(de),le},toWireType:function(de,le){for(var me in se)if(!(me in le))throw new TypeError(`Missing field: "${me}"`);var we=P();for(me in se)se[me].write(we,le[me]);return de!==null&&de.push(A,we),we},argPackAdvance:8,readValueFromPointer:on,ea:A}]})},z:function(){},G:function(b,g,P,A,Y){var re=Fn(P);g=je(g),F(b,{name:g,fromWireType:function(ce){return!!ce},toWireType:function(ce,se){return se?A:Y},argPackAdvance:8,readValueFromPointer:function(ce){if(P===1)var se=I;else if(P===2)se=U;else if(P===4)se=ue;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ce>>re])},ea:null})},e:function(b,g,P,A,Y,re,ce,se,de,le,me,we,Ee){me=je(me),re=Be(Y,re),se&&(se=Be(ce,se)),le&&(le=Be(de,le)),Ee=Be(we,Ee);var De=lt(me);_e(De,function(){wn(`Cannot construct ${me} due to unbound types`,[A])}),$t([b,g,P],A?[A]:[],function(ve){if(ve=ve[0],A)var st=ve.X,vt=st.ga;else vt=fe.prototype;ve=Ye(De,function(){if(Object.getPrototypeOf(this)!==Ne)throw new Pt("Use 'new' to construct "+me);if(Le.la===void 0)throw new Pt(me+" has no accessible constructor");var Ht=Le.la[arguments.length];if(Ht===void 0)throw new Pt(`Tried to invoke ctor of ${me} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Le.la).toString()}) parameters instead!`);return Ht.apply(this,arguments)});var Ne=Object.create(vt,{constructor:{value:ve}});ve.prototype=Ne;var Le=new be(me,ve,Ne,Ee,st,re,se,le);Le.$&&(Le.$.sa===void 0&&(Le.$.sa=[]),Le.$.sa.push(Le)),st=new He(me,Le,!0,!1),vt=new He(me+"*",Le,!1,!1);var gt=new He(me+" const*",Le,!1,!0);return kn[b]={pointerType:vt,fb:gt},It(De,ve),[st,vt,gt]})},k:function(b,g,P,A,Y,re,ce){var se=Fo(P,A);g=je(g),re=Be(Y,re),$t([],[b],function(de){function le(){wn(`Cannot call ${me} due to unbound types`,se)}de=de[0];var me=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var we=de.X.constructor;return we[g]===void 0?(le.ma=P-1,we[g]=le):(xe(we,g,me),we[g].aa[P-1]=le),$t([],se,function(Ee){if(Ee=Lo(me,[Ee[0],null].concat(Ee.slice(1)),null,re,ce),we[g].aa===void 0?(Ee.ma=P-1,we[g]=Ee):we[g].aa[P-1]=Ee,de.X.sa)for(const De of de.X.sa)De.constructor.hasOwnProperty(g)||(De.constructor[g]=Ee);return[]}),[]})},s:function(b,g,P,A,Y,re,ce,se){g=je(g),re=Be(Y,re),$t([],[b],function(de){de=de[0];var le=`${de.name}.${g}`,me={get(){wn(`Cannot access ${le} due to unbound types`,[P])},enumerable:!0,configurable:!0};return me.set=se?()=>{wn(`Cannot access ${le} due to unbound types`,[P])}:()=>{Te(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,me),$t([],[P],function(we){we=we[0];var Ee={get(){return we.fromWireType(re(A))},enumerable:!0};return se&&(se=Be(ce,se),Ee.set=De=>{var ve=[];se(A,we.toWireType(ve,De)),xn(ve)}),Object.defineProperty(de.X.constructor,g,Ee),[]}),[]})},o:function(b,g,P,A,Y,re){var ce=Fo(g,P);Y=Be(A,Y),$t([],[b],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]=()=>{wn(`Cannot construct ${se.name} due to unbound types`,ce)},$t([],ce,function(le){return le.splice(1,0,null),se.X.la[g-1]=Lo(de,le,null,Y,re),[]}),[]})},a:function(b,g,P,A,Y,re,ce,se){var de=Fo(P,A);g=je(g),re=Be(Y,re),$t([],[b],function(le){function me(){wn(`Cannot call ${we} due to unbound types`,de)}le=le[0];var we=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ee=le.X.ga,De=Ee[g];return De===void 0||De.aa===void 0&&De.className!==le.name&&De.ma===P-2?(me.ma=P-2,me.className=le.name,Ee[g]=me):(xe(Ee,g,we),Ee[g].aa[P-2]=me),$t([],de,function(ve){return ve=Lo(we,ve,le,re,ce),Ee[g].aa===void 0?(ve.ma=P-2,Ee[g]=ve):Ee[g].aa[P-2]=ve,[]}),[]})},d:function(b,g,P,A,Y,re,ce,se,de,le){g=je(g),Y=Be(A,Y),$t([],[b],function(me){me=me[0];var we=`${me.name}.${g}`,Ee={get(){wn(`Cannot access ${we} due to unbound types`,[P,ce])},enumerable:!0,configurable:!0};return Ee.set=de?()=>{wn(`Cannot access ${we} due to unbound types`,[P,ce])}:()=>{Te(we+" is a read-only property")},Object.defineProperty(me.X.ga,g,Ee),$t([],de?[P,ce]:[P],function(De){var ve=De[0],st={get(){var Ne=tu(this,me,we+" getter");return ve.fromWireType(Y(re,Ne))},enumerable:!0};if(de){de=Be(se,de);var vt=De[1];st.set=function(Ne){var Le=tu(this,me,we+" setter"),gt=[];de(le,Le,vt.toWireType(gt,Ne)),xn(gt)}}return Object.defineProperty(me.X.ga,g,st),[]}),[]})},F:function(b,g){g=je(g),F(b,{name:g,fromWireType:function(P){var A=Et(P);return _s(P),A},toWireType:function(P,A){return ut(A)},argPackAdvance:8,readValueFromPointer:on,ea:null})},l:function(b,g,P,A){function Y(){}P=Fn(P),g=je(g),Y.values={},F(b,{name:g,constructor:Y,fromWireType:function(re){return this.constructor.values[re]},toWireType:function(re,ce){return ce.value},argPackAdvance:8,readValueFromPointer:Tg(g,P,A),ea:null}),_e(g,Y)},c:function(b,g,P){var A=Bt(b,"enum");g=je(g),b=A.constructor,A=Object.create(A.constructor.prototype,{value:{value:P},constructor:{value:Ye(`${A.name}_${g}`,function(){})}}),b.values[P]=A,b[g]=A},u:function(b,g,P){P=Fn(P),g=je(g),F(b,{name:g,fromWireType:function(A){return A},toWireType:function(A,Y){return Y},argPackAdvance:8,readValueFromPointer:$g(g,P),ea:null})},q:function(b,g,P,A,Y,re){var ce=Fo(g,P);b=je(b),Y=Be(A,Y),_e(b,function(){wn(`Cannot call ${b} due to unbound types`,ce)},g-1),$t([],ce,function(se){return It(b,Lo(b,[se[0],null].concat(se.slice(1)),null,Y,re),g-1),[]})},j:function(b,g,P,A,Y){g=je(g),Y===-1&&(Y=4294967295),Y=Fn(P);var re=se=>se;if(A===0){var ce=32-8*P;re=se=>se<<ce>>>ce}P=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},F(b,{name:g,fromWireType:re,toWireType:P,argPackAdvance:8,readValueFromPointer:Rg(g,Y,A!==0),ea:null})},g:function(b,g,P){function A(re){re>>=2;var ce=W;return new Y(ce.buffer,ce[re+1],ce[re])}var Y=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];P=je(P),F(b,{name:P,fromWireType:A,argPackAdvance:8,readValueFromPointer:A},{tb:!0})},v:function(b,g){g=je(g);var P=g==="std::string";F(b,{name:g,fromWireType:function(A){var Y=W[A>>2],re=A+4;if(P)for(var ce=re,se=0;se<=Y;++se){var de=re+se;if(se==Y||k[de]==0){if(ce=ce?ru(k,ce,de-ce):"",le===void 0)var le=ce;else le+=String.fromCharCode(0),le+=ce;ce=de+1}}else{for(le=Array(Y),se=0;se<Y;++se)le[se]=String.fromCharCode(k[re+se]);le=le.join("")}return En(A),le},toWireType:function(A,Y){Y instanceof ArrayBuffer&&(Y=new Uint8Array(Y));var re,ce=typeof Y=="string";ce||Y instanceof Uint8Array||Y instanceof Uint8ClampedArray||Y instanceof Int8Array||Te("Cannot pass non-string to std::string");var se;if(P&&ce)for(re=se=0;re<Y.length;++re){var de=Y.charCodeAt(re);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++re):se+=3}else se=Y.length;if(re=se,se=Rs(4+re+1),de=se+4,W[se>>2]=re,P&&ce){if(ce=de,de=re+1,re=k,0<de){de=ce+de-1;for(var le=0;le<Y.length;++le){var me=Y.charCodeAt(le);if(55296<=me&&57343>=me){var we=Y.charCodeAt(++le);me=65536+((me&1023)<<10)|we&1023}if(127>=me){if(ce>=de)break;re[ce++]=me}else{if(2047>=me){if(ce+1>=de)break;re[ce++]=192|me>>6}else{if(65535>=me){if(ce+2>=de)break;re[ce++]=224|me>>12}else{if(ce+3>=de)break;re[ce++]=240|me>>18,re[ce++]=128|me>>12&63}re[ce++]=128|me>>6&63}re[ce++]=128|me&63}}re[ce]=0}}else if(ce)for(ce=0;ce<re;++ce)le=Y.charCodeAt(ce),255<le&&(En(de),Te("String has UTF-16 code units that do not fit in 8 bits")),k[de+ce]=le;else for(ce=0;ce<re;++ce)k[de+ce]=Y[ce];return A!==null&&A.push(En,se),se},argPackAdvance:8,readValueFromPointer:on,ea:function(A){En(A)}})},t:function(b,g,P){if(P=je(P),g===2)var A=Pg,Y=Ig,re=Ag,ce=()=>q,se=1;else g===4&&(A=Og,Y=Dg,re=Mg,ce=()=>W,se=2);F(b,{name:P,fromWireType:function(de){for(var le=W[de>>2],me=ce(),we,Ee=de+4,De=0;De<=le;++De){var ve=de+4+De*g;(De==le||me[ve>>se]==0)&&(Ee=A(Ee,ve-Ee),we===void 0?we=Ee:(we+=String.fromCharCode(0),we+=Ee),Ee=ve+g)}return En(de),we},toWireType:function(de,le){typeof le!="string"&&Te(`Cannot pass non-string to C++ string type ${P}`);var me=re(le),we=Rs(4+me+g);return W[we>>2]=me>>se,Y(le,we+4,me+g),de!==null&&de.push(En,we),we},argPackAdvance:8,readValueFromPointer:on,ea:function(de){En(de)}})},N:function(b,g,P,A,Y,re){jn[b]={name:je(g),Ba:Be(P,A),ka:Be(Y,re),Na:[]}},M:function(b,g,P,A,Y,re,ce,se,de,le){jn[b].Na.push({mb:je(g),sb:P,qb:Be(A,Y),rb:re,Db:ce,Cb:Be(se,de),Eb:le})},H:function(b,g){g=je(g),F(b,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(b,g,P){b=Et(b),g=Bt(g,"emval::as");var A=[],Y=ut(A);return W[P>>2]=Y,g.toWireType(A,b)},w:function(b,g,P,A,Y){b=Ho[b],g=Et(g),P=Bo(P);var re=[];return W[A>>2]=ut(re),b(g,P,re,Y)},i:function(b,g,P,A){b=Ho[b],g=Et(g),P=Bo(P),b(g,P,null,A)},f:_s,h:function(b,g){var P=Vg(b,g),A=P[0];g=A.name+"_$"+P.slice(1).map(function(ce){return ce.name}).join("_")+"$";var Y=iu[g];if(Y!==void 0)return Y;var re=Array(b-1);return Y=Ng((ce,se,de,le)=>{for(var me=0,we=0;we<b-1;++we)re[we]=P[we+1].readValueFromPointer(le+me),me+=P[we+1].argPackAdvance;for(ce=ce[se].apply(ce,re),we=0;we<b-1;++we)P[we+1].hb&&P[we+1].hb(re[we]);if(!A.vb)return A.toWireType(de,ce)}),iu[g]=Y},p:function(b){return b=Bo(b),ut(p[b])},K:function(b,g){return b=Et(b),g=Et(g),ut(b[g])},m:function(b){4<b&&(Je.get(b).Ta+=1)},J:function(b){return ut(Bo(b))},n:function(b){var g=Et(b);xn(g),_s(b)},x:function(b,g){return b=Bt(b,"_emval_take_value"),b=b.readValueFromPointer(g),ut(b)},b:()=>{te("")},A:b=>{var g=k.length;if(b>>>=0,2147483648<b)return!1;for(var P=1;4>=P;P*=2){var A=g*(1+.2/P);A=Math.min(A,b+100663296);var Y=Math;A=Math.max(b,A);e:{Y=Y.min.call(Y,2147483648,A+(65536-A%65536)%65536)-v.buffer.byteLength+65535>>>16;try{v.grow(Y),G();var re=1;break e}catch{}re=void 0}if(re)return!0}return!1},B:(b,g)=>{var P=0;return su().forEach(function(A,Y){var re=g+P;for(Y=W[b+4*Y>>2]=re,re=0;re<A.length;++re)I[Y++>>0]=A.charCodeAt(re);I[Y>>0]=0,P+=A.length+1}),0},C:(b,g)=>{var P=su();W[b>>2]=P.length;var A=0;return P.forEach(function(Y){A+=Y.length+1}),W[g>>2]=A,0},D:()=>52,y:function(){return 70},E:(b,g,P,A)=>{for(var Y=0,re=0;re<P;re++){var ce=W[g>>2],se=W[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=k[ce+de],me=jg[b];le===0||le===10?((b===1?z:j)(ru(me,0)),me.length=0):me.push(le)}Y+=se}return W[A>>2]=Y,0}};(function(){function b(P){if(P=P.exports,p.asm=P,v=p.asm.O,G(),X=p.asm.U,ae.unshift(p.asm.P),J--,p.monitorRunDependencies&&p.monitorRunDependencies(J),J==0&&ee){var A=ee;ee=null,A()}return P}var g={a:Lg};if(J++,p.monitorRunDependencies&&p.monitorRunDependencies(J),p.instantiateWasm)try{return p.instantiateWasm(g,b)}catch(P){j("Module.instantiateWasm callback failed with error: "+P),E(P)}return We(g,function(P){b(P.instance)}).catch(E),{}})();function En(){return(En=p.asm.Q).apply(null,arguments)}function Rs(){return(Rs=p.asm.R).apply(null,arguments)}function cu(){return(cu=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Uo;ee=function b(){Uo||lu(),Uo||(ee=b)};function lu(){function b(){if(!Uo&&(Uo=!0,p.calledRun=!0,!C)){if(ke(ae),x(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();B.unshift(g)}ke(B)}}if(!(0<J)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)H();ke(ne),0<J||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),b()},1)):b())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return lu(),m.ready}})();const d=l},s=>{s.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}}`)},(s,a,c)=>{c.r(a),c.d(a,{registerTouchInteractions:()=>l.registerTouchInteractions});var l=c(4)},(s,a,c)=>{c.r(a),c.d(a,{registerTouchInteractions:()=>f});var l=void 0,d=function(m){var p,x;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((x=m.changedTouches)===null||x===void 0)&&x.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var p=m.canvas,x=m.artboard,E=m.stateMachines,S=E===void 0?[]:E,T=m.renderer,h=m.rive,w=m.fit,_=m.alignment;if(!p||!S.length||!T||!h||!x||typeof window>"u")return null;var $=function(O){var N=O.currentTarget.getBoundingClientRect(),V=d(O),z=V.clientX,j=V.clientY;if(!(!z&&!j)){var R=z-N.left,v=j-N.top,C=h.computeAlignment(w,_,{minX:0,minY:0,maxX:N.width,maxY:N.height},x.bounds),I=new h.Mat2D;C.invert(I);var k=new h.Vec2D(R,v),U=h.mapXY(I,k),q=U.x(),ue=U.y();switch(U.delete(),I.delete(),k.delete(),C.delete(),O.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var W=0,L=S;W<L.length;W++){var oe=L[W];oe.pointerMove(q,ue)}break}case"touchstart":case"mousedown":{for(var G=0,X=S;G<X.length;G++){var oe=X[G];oe.pointerDown(q,ue)}break}case"touchend":case"mouseup":{for(var ne=0,ae=S;ne<ae.length;ne++){var oe=ae[ne];oe.pointerUp(q,ue)}break}}}},M=$.bind(l);return p.addEventListener("mouseover",M),p.addEventListener("mouseout",M),p.addEventListener("mousemove",M),p.addEventListener("mousedown",M),p.addEventListener("mouseup",M),p.addEventListener("touchmove",M),p.addEventListener("touchstart",M),p.addEventListener("touchend",M),function(){p.removeEventListener("mouseover",M),p.removeEventListener("mouseout",M),p.removeEventListener("mousemove",M),p.removeEventListener("mousedown",M),p.removeEventListener("mouseup",M),p.removeEventListener("touchmove",M),p.removeEventListener("touchstart",M),p.removeEventListener("touchend",M)}}}],r={};function i(s){var a=r[s];if(a!==void 0)return a.exports;var c=r[s]={exports:{}};return n[s](c,c.exports,i),c.exports}i.d=(s,a)=>{for(var c in a)i.o(a,c)&&!i.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:a[c]})},i.o=(s,a)=>Object.prototype.hasOwnProperty.call(s,a),i.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o={};return(()=>{i.r(o),i.d(o,{Alignment:()=>m,EventType:()=>_,Fit:()=>f,Layout:()=>p,LoopType:()=>$,Rive:()=>N,RuntimeLoader:()=>x,StateMachineInput:()=>T,StateMachineInputType:()=>S,Testing:()=>j});var s=i(1),a=i(2),c=i(3),l=function(R,v,C,I){function k(U){return U instanceof C?U:new C(function(q){q(U)})}return new(C||(C=Promise))(function(U,q){function ue(oe){try{L(I.next(oe))}catch(G){q(G)}}function W(oe){try{L(I.throw(oe))}catch(G){q(G)}}function L(oe){oe.done?U(oe.value):k(oe.value).then(ue,W)}L((I=I.apply(R,v||[])).next())})},d=function(R,v){var C={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,k,U,q;return q={next:ue(0),throw:ue(1),return:ue(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ue(L){return function(oe){return W([L,oe])}}function W(L){if(I)throw new TypeError("Generator is already executing.");for(;q&&(q=0,L[0]&&(C=0)),C;)try{if(I=1,k&&(U=L[0]&2?k.return:L[0]?k.throw||((U=k.return)&&U.call(k),0):k.next)&&!(U=U.call(k,L[1])).done)return U;switch(k=0,U&&(L=[L[0]&2,U.value]),L[0]){case 0:case 1:U=L;break;case 4:return C.label++,{value:L[1],done:!1};case 5:C.label++,k=L[1],L=[0];continue;case 7:L=C.ops.pop(),C.trys.pop();continue;default:if(U=C.trys,!(U=U.length>0&&U[U.length-1])&&(L[0]===6||L[0]===2)){C=0;continue}if(L[0]===3&&(!U||L[1]>U[0]&&L[1]<U[3])){C.label=L[1];break}if(L[0]===6&&C.label<U[1]){C.label=U[1],U=L;break}if(U&&C.label<U[2]){C.label=U[2],C.ops.push(L);break}U[2]&&C.ops.pop(),C.trys.pop();continue}L=v.call(R,C)}catch(oe){L=[6,oe],k=0}finally{I=U=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(R){R.Cover="cover",R.Contain="contain",R.Fill="fill",R.FitWidth="fitWidth",R.FitHeight="fitHeight",R.None="none",R.ScaleDown="scaleDown"})(f||(f={}));var m;(function(R){R.Center="center",R.TopLeft="topLeft",R.TopCenter="topCenter",R.TopRight="topRight",R.CenterLeft="centerLeft",R.CenterRight="centerRight",R.BottomLeft="bottomLeft",R.BottomCenter="bottomCenter",R.BottomRight="bottomRight"})(m||(m={}));var p=function(){function R(v){var C,I,k,U,q,ue;this.fit=(C=v==null?void 0:v.fit)!==null&&C!==void 0?C:f.Contain,this.alignment=(I=v==null?void 0:v.alignment)!==null&&I!==void 0?I:m.Center,this.minX=(k=v==null?void 0:v.minX)!==null&&k!==void 0?k:0,this.minY=(U=v==null?void 0:v.minY)!==null&&U!==void 0?U:0,this.maxX=(q=v==null?void 0:v.maxX)!==null&&q!==void 0?q:0,this.maxY=(ue=v==null?void 0:v.maxY)!==null&&ue!==void 0?ue:0}return R.new=function(v){var C=v.fit,I=v.alignment,k=v.minX,U=v.minY,q=v.maxX,ue=v.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new R({fit:C,alignment:I,minX:k,minY:U,maxX:q,maxY:ue})},R.prototype.copyWith=function(v){var C=v.fit,I=v.alignment,k=v.minX,U=v.minY,q=v.maxX,ue=v.maxY;return new R({fit:C??this.fit,alignment:I??this.alignment,minX:k??this.minX,minY:U??this.minY,maxX:q??this.maxX,maxY:ue??this.maxY})},R.prototype.runtimeFit=function(v){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var C;return this.fit===f.Cover?C=v.Fit.cover:this.fit===f.Contain?C=v.Fit.contain:this.fit===f.Fill?C=v.Fit.fill:this.fit===f.FitWidth?C=v.Fit.fitWidth:this.fit===f.FitHeight?C=v.Fit.fitHeight:this.fit===f.ScaleDown?C=v.Fit.scaleDown:C=v.Fit.none,this.cachedRuntimeFit=C,C},R.prototype.runtimeAlignment=function(v){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var C;return this.alignment===m.TopLeft?C=v.Alignment.topLeft:this.alignment===m.TopCenter?C=v.Alignment.topCenter:this.alignment===m.TopRight?C=v.Alignment.topRight:this.alignment===m.CenterLeft?C=v.Alignment.centerLeft:this.alignment===m.CenterRight?C=v.Alignment.centerRight:this.alignment===m.BottomLeft?C=v.Alignment.bottomLeft:this.alignment===m.BottomCenter?C=v.Alignment.bottomCenter:this.alignment===m.BottomRight?C=v.Alignment.bottomRight:C=v.Alignment.center,this.cachedRuntimeAlignment=C,C},R}(),x=function(){function R(){}return R.loadRuntime=function(){s.default({locateFile:function(){return R.wasmURL}}).then(function(v){var C;for(R.runtime=v;R.callBackQueue.length>0;)(C=R.callBackQueue.shift())===null||C===void 0||C(R.runtime)})},R.getInstance=function(v){R.isLoading||(R.isLoading=!0,R.loadRuntime()),R.runtime?v(R.runtime):R.callBackQueue.push(v)},R.awaitInstance=function(){return new Promise(function(v){return R.getInstance(function(C){return v(C)})})},R.setWasmUrl=function(v){R.wasmURL=v},R.isLoading=!1,R.callBackQueue=[],R.wasmURL="https://unpkg.com/".concat(a.name,"@").concat(a.version,"/rive.wasm"),R}(),E=function(){function R(v,C,I,k){this.animation=v,this.artboard=C,this.playing=k,this.loopCount=0,this.scrubTo=null,this.instance=new I.LinearAnimationInstance(v,C)}return Object.defineProperty(R.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"time",{get:function(){return this.instance.time},set:function(v){this.instance.time=v},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),R.prototype.advance=function(v){this.scrubTo===null?this.instance.advance(v):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},R.prototype.apply=function(v){this.instance.apply(v)},Object.defineProperty(R.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),R.prototype.cleanup=function(){this.instance.delete()},R}(),S;(function(R){R[R.Number=56]="Number",R[R.Trigger=58]="Trigger",R[R.Boolean=59]="Boolean"})(S||(S={}));var T=function(){function R(v,C){this.type=v,this.runtimeInput=C}return Object.defineProperty(R.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(v){this.runtimeInput.value=v},enumerable:!1,configurable:!0}),R.prototype.fire=function(){this.type===S.Trigger&&this.runtimeInput.fire()},R}(),h=function(){function R(v,C,I,k){this.stateMachine=v,this.playing=I,this.artboard=k,this.inputs=[],this.instance=new C.StateMachineInstance(v,k),this.initInputs(C)}return Object.defineProperty(R.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"statesChanged",{get:function(){for(var v=[],C=0;C<this.instance.stateChangedCount();C++)v.push(this.instance.stateChangedNameByIndex(C));return v},enumerable:!1,configurable:!0}),R.prototype.advance=function(v){this.instance.advance(v)},R.prototype.initInputs=function(v){for(var C=0;C<this.instance.inputCount();C++){var I=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(I,v))}},R.prototype.mapRuntimeInput=function(v,C){if(v.type===C.SMIInput.bool)return new T(S.Boolean,v.asBool());if(v.type===C.SMIInput.number)return new T(S.Number,v.asNumber());if(v.type===C.SMIInput.trigger)return new T(S.Trigger,v.asTrigger())},R.prototype.cleanup=function(){this.instance.delete()},R}(),w=function(){function R(v,C,I,k,U){k===void 0&&(k=[]),U===void 0&&(U=[]),this.runtime=v,this.artboard=C,this.eventManager=I,this.animations=k,this.stateMachines=U}return R.prototype.add=function(v,C,I){if(I===void 0&&(I=!0),v=z(v),v.length===0)this.animations.forEach(function(ne){return ne.playing=C}),this.stateMachines.forEach(function(ne){return ne.playing=C});else for(var k=this.animations.map(function(ne){return ne.name}),U=this.stateMachines.map(function(ne){return ne.name}),q=0;q<v.length;q++){var ue=k.indexOf(v[q]),W=U.indexOf(v[q]);if(ue>=0||W>=0)ue>=0?this.animations[ue].playing=C:this.stateMachines[W].playing=C;else{var L=this.artboard.animationByName(v[q]);if(L){var oe=new E(L,this.artboard,this.runtime,C);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(v[q]);if(G){var X=new h(G,this.runtime,C,this.artboard);this.stateMachines.push(X)}}}}return I&&(C?this.eventManager.fire({type:_.Play,data:this.playing}):this.eventManager.fire({type:_.Pause,data:this.paused})),C?this.playing:this.paused},R.prototype.play=function(v){return this.add(v,!0)},R.prototype.pause=function(v){return this.add(v,!1)},R.prototype.scrub=function(v,C){var I=this.animations.filter(function(k){return v.includes(k.name)});return I.forEach(function(k){return k.scrubTo=C}),I.map(function(k){return k.name})},Object.defineProperty(R.prototype,"playing",{get:function(){return this.animations.filter(function(v){return v.playing}).map(function(v){return v.name}).concat(this.stateMachines.filter(function(v){return v.playing}).map(function(v){return v.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"paused",{get:function(){return this.animations.filter(function(v){return!v.playing}).map(function(v){return v.name}).concat(this.stateMachines.filter(function(v){return!v.playing}).map(function(v){return v.name}))},enumerable:!1,configurable:!0}),R.prototype.stop=function(v){var C=this;v=z(v);var I=[];if(v.length===0)I=this.animations.map(function(q){return q.name}).concat(this.stateMachines.map(function(q){return q.name})),this.animations.forEach(function(q){return q.cleanup()}),this.stateMachines.forEach(function(q){return q.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var k=this.animations.filter(function(q){return v.includes(q.name)});k.forEach(function(q){q.cleanup(),C.animations.splice(C.animations.indexOf(q),1)});var U=this.stateMachines.filter(function(q){return v.includes(q.name)});U.forEach(function(q){q.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(q),1)}),I=k.map(function(q){return q.name}).concat(U.map(function(q){return q.name}))}return this.eventManager.fire({type:_.Stop,data:I}),I},Object.defineProperty(R.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(v,C){return v||C.playing},!1)||this.stateMachines.reduce(function(v,C){return v||C.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),R.prototype.atLeastOne=function(v,C){C===void 0&&(C=!0);var I;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([I=this.artboard.animationByIndex(0).name],v,C):this.artboard.stateMachineCount()>0&&this.add([I=this.artboard.stateMachineByIndex(0).name],v,C)),I},R.prototype.handleLooping=function(){for(var v=0,C=this.animations.filter(function(k){return k.playing});v<C.length;v++){var I=C[v];I.loopValue===0&&I.loopCount?(I.loopCount=0,this.stop(I.name)):I.loopValue===1&&I.loopCount?(this.eventManager.fire({type:_.Loop,data:{animation:I.name,type:$.Loop}}),I.loopCount=0):I.loopValue===2&&I.loopCount>1&&(this.eventManager.fire({type:_.Loop,data:{animation:I.name,type:$.PingPong}}),I.loopCount=0)}},R.prototype.handleStateChanges=function(){for(var v=[],C=0,I=this.stateMachines.filter(function(U){return U.playing});C<I.length;C++){var k=I[C];v.push.apply(v,k.statesChanged)}v.length>0&&this.eventManager.fire({type:_.StateChange,data:v})},R.prototype.handleAdvancing=function(v){this.eventManager.fire({type:_.Advance,data:v})},R}(),_;(function(R){R.Load="load",R.LoadError="loaderror",R.Play="play",R.Pause="pause",R.Stop="stop",R.Loop="loop",R.Draw="draw",R.Advance="advance",R.StateChange="statechange"})(_||(_={}));var $;(function(R){R.OneShot="oneshot",R.Loop="loop",R.PingPong="pingpong"})($||($={}));var M=function(){function R(v){v===void 0&&(v=[]),this.listeners=v}return R.prototype.getListeners=function(v){return this.listeners.filter(function(C){return C.type===v})},R.prototype.add=function(v){this.listeners.includes(v)||this.listeners.push(v)},R.prototype.remove=function(v){for(var C=0;C<this.listeners.length;C++){var I=this.listeners[C];if(I.type===v.type&&I.callback===v.callback){this.listeners.splice(C,1);break}}},R.prototype.removeAll=function(v){var C=this;v?this.listeners.filter(function(I){return I.type===v}).forEach(function(I){return C.remove(I)}):this.listeners.splice(0,this.listeners.length)},R.prototype.fire=function(v){var C=this.getListeners(v.type);C.forEach(function(I){return I.callback(v)})},R}(),O=function(){function R(v){this.eventManager=v,this.queue=[]}return R.prototype.add=function(v){this.queue.push(v)},R.prototype.process=function(){for(;this.queue.length>0;){var v=this.queue.shift();v!=null&&v.action&&v.action(),v!=null&&v.event&&this.eventManager.fire(v.event)}},R}(),N=function(){function R(v){var C;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=v.canvas,this.src=v.src,this.buffer=v.buffer,this.layout=(C=v.layout)!==null&&C!==void 0?C:new p,this.shouldDisableRiveListeners=!!v.shouldDisableRiveListeners,this.eventManager=new M,v.onLoad&&this.on(_.Load,v.onLoad),v.onLoadError&&this.on(_.LoadError,v.onLoadError),v.onPlay&&this.on(_.Play,v.onPlay),v.onPause&&this.on(_.Pause,v.onPause),v.onStop&&this.on(_.Stop,v.onStop),v.onLoop&&this.on(_.Loop,v.onLoop),v.onStateChange&&this.on(_.StateChange,v.onStateChange),v.onAdvance&&this.on(_.Advance,v.onAdvance),v.onload&&!v.onLoad&&this.on(_.Load,v.onload),v.onloaderror&&!v.onLoadError&&this.on(_.LoadError,v.onloaderror),v.onplay&&!v.onPlay&&this.on(_.Play,v.onplay),v.onpause&&!v.onPause&&this.on(_.Pause,v.onpause),v.onstop&&!v.onStop&&this.on(_.Stop,v.onstop),v.onloop&&!v.onLoop&&this.on(_.Loop,v.onloop),v.onstatechange&&!v.onStateChange&&this.on(_.StateChange,v.onstatechange),this.taskQueue=new O(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:v.autoplay,animations:v.animations,stateMachines:v.stateMachines,artboard:v.artboard,useOffscreenRenderer:v.useOffscreenRenderer})}return R.new=function(v){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new R(v)},R.prototype.init=function(v){var C=this,I=v.src,k=v.buffer,U=v.animations,q=v.stateMachines,ue=v.artboard,W=v.autoplay,L=W===void 0?!1:W,oe=v.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=I,this.buffer=k,!this.src&&!this.buffer)throw new Error(R.missingErrorMessage);var X=z(U),ne=z(q);this.loaded=!1,this.readyForPlaying=!1,x.awaitInstance().then(function(ae){C.runtime=ae,C.renderer=C.runtime.makeRenderer(C.canvas,G),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(ue,X,ne,L).then(function(){return C.setupRiveListeners()}).catch(function(B){console.error(B)})}).catch(function(ae){console.error(ae)})},R.prototype.setupRiveListeners=function(){var v=this;if(!this.shouldDisableRiveListeners){var C=(this.animator.stateMachines||[]).filter(function(I){return I.playing&&v.runtime.hasListeners(I.instance)}).map(function(I){return I.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:C,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},R.prototype.initData=function(v,C,I,k){var U;return l(this,void 0,void 0,function(){var q,ue,W;return d(this,function(L){switch(L.label){case 0:return this.src?(q=this,[4,V(this.src)]):[3,2];case 1:q.buffer=L.sent(),L.label=2;case 2:return ue=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ue.file=L.sent(),this.file?(this.initArtboard(v,C,I,k),this.loaded=!0,this.eventManager.fire({type:_.Load,data:(U=this.src)!==null&&U!==void 0?U:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(W="Problem loading file; may be corrupt!",console.warn(W),this.eventManager.fire({type:_.LoadError,data:W}),[2,Promise.reject(W)])}})})},R.prototype.initArtboard=function(v,C,I,k){var U=v?this.file.artboardByName(v):this.file.defaultArtboard();if(!U){var q="Invalid artboard name or no default artboard";console.warn(q),this.eventManager.fire({type:_.LoadError,data:q});return}if(this.artboard=U,this.artboard.animationCount()<1){var q="Artboard has no animations";throw this.eventManager.fire({type:_.LoadError,data:q}),q}this.animator=new w(this.runtime,this.artboard,this.eventManager);var ue;C.length>0||I.length>0?(ue=C.concat(I),this.animator.add(ue,k,!1)):ue=[this.animator.atLeastOne(k,!1)],this.taskQueue.add({event:{type:k?_.Play:_.Pause,data:ue}})},R.prototype.drawFrame=function(){this.startRendering()},R.prototype.draw=function(v,C){var I=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=v),this.renderSecondTimer+=v-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var k=(v-this.lastRenderTime)/1e3;this.lastRenderTime=v;for(var U=this.animator.animations.filter(function(B){return B.playing||B.needsScrub}).sort(function(B){return B.needsScrub?-1:1}),q=0,ue=U;q<ue.length;q++){var W=ue[q];W.advance(k),W.instance.didLoop&&(W.loopCount+=1),W.apply(1)}for(var L=this.animator.stateMachines.filter(function(B){return B.playing}),oe=0,G=L;oe<G.length;oe++){var X=G[oe];X.advance(k)}this.artboard.advance(k);var ne=this.renderer;ne.clear(),ne.save(),this.alignRenderer(),this.artboard.draw(ne),ne.restore(),ne.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(k),this.frameCount++;var ae=performance.now();for(this.frameTimes.push(ae),this.durations.push(ae-I);this.frameTimes[0]<=ae-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},R.prototype.alignRenderer=function(){var v=this,C=v.renderer,I=v.runtime,k=v._layout,U=v.artboard;C.align(k.runtimeFit(I),k.runtimeAlignment(I),{minX:k.minX,minY:k.minY,maxX:k.maxX,maxY:k.maxY},U.bounds)},Object.defineProperty(R.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(v,C){return v+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),R.prototype.cleanup=function(){var v,C;this.stopRendering(),this.cleanupInstances(),(v=this.renderer)===null||v===void 0||v.delete(),this.renderer=null,(C=this.file)===null||C===void 0||C.delete(),this.file=null},R.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},R.prototype.play=function(v,C){var I=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return I.play(v,C)}});return}this.animator.play(v),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},R.prototype.pause=function(v){var C=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(v)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(v)},R.prototype.scrub=function(v,C){var I=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return I.scrub(v,C)}});return}this.animator.scrub(v,C||0),this.drawFrame()},R.prototype.stop=function(v){var C=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(v)}});return}this.animator.stop(v),this.eventCleanup&&this.eventCleanup()},R.prototype.reset=function(v){var C,I=v==null?void 0:v.artboard,k=z(v==null?void 0:v.animations),U=z(v==null?void 0:v.stateMachines),q=(C=v==null?void 0:v.autoplay)!==null&&C!==void 0?C:!1;this.cleanupInstances(),this.initArtboard(I,k,U,q),this.taskQueue.process()},R.prototype.load=function(v){this.stop(),this.init(v)},Object.defineProperty(R.prototype,"layout",{get:function(){return this._layout},set:function(v){this._layout=v,(!v.maxX||!v.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),R.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},R.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var v=this.canvas.getBoundingClientRect(),C=v.width,I=v.height,k=window.devicePixelRatio||1;this.canvas.width=k*C,this.canvas.height=k*I,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(R.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var v=[],C=0;C<this.artboard.animationCount();C++)v.push(this.artboard.animationByIndex(C).name);return v},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var v=[],C=0;C<this.artboard.stateMachineCount();C++)v.push(this.artboard.stateMachineByIndex(C).name);return v},enumerable:!1,configurable:!0}),R.prototype.stateMachineInputs=function(v){if(this.loaded){var C=this.animator.stateMachines.find(function(I){return I.name===v});return C==null?void 0:C.inputs}},Object.defineProperty(R.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(v){return v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(v){return v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(v){return!v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(v){return!v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),R.prototype.on=function(v,C){this.eventManager.add({type:v,callback:C})},R.prototype.off=function(v,C){this.eventManager.remove({type:v,callback:C})},R.prototype.unsubscribe=function(v,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(v,C)},R.prototype.removeAllRiveEventListeners=function(v){this.eventManager.removeAll(v)},R.prototype.unsubscribeAll=function(v){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(v)},R.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},R.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)))},R.prototype.enableFPSCounter=function(v){this.runtime.enableFPSCounter(v)},R.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(R.prototype,"contents",{get:function(){if(this.loaded){for(var v={artboards:[]},C=0;C<this.file.artboardCount();C++){for(var I=this.file.artboardByIndex(C),k={name:I.name,animations:[],stateMachines:[]},U=0;U<I.animationCount();U++){var q=I.animationByIndex(U);k.animations.push(q.name)}for(var ue=0;ue<I.stateMachineCount();ue++){for(var W=I.stateMachineByIndex(ue),L=W.name,oe=new this.runtime.StateMachineInstance(W,I),G=[],X=0;X<oe.inputCount();X++){var ne=oe.input(X);G.push({name:ne.name,type:ne.type})}k.stateMachines.push({name:L,inputs:G})}v.artboards.push(k)}return v}},enumerable:!1,configurable:!0}),R.missingErrorMessage="Rive source file or data buffer required",R}(),V=function(R){return l(void 0,void 0,void 0,function(){var v,C,I;return d(this,function(k){switch(k.label){case 0:return v=new Request(R),[4,fetch(v)];case 1:return C=k.sent(),[4,C.arrayBuffer()];case 2:return I=k.sent(),[2,I]}})})},z=function(R){return typeof R=="string"?[R]:R instanceof Array?R:[]},j={EventManager:M,TaskQueueManager:O}})(),o})())})(ov);var u$=ov.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=u,n=u$;function r(h){return h&&typeof h=="object"&&"default"in h?h:{default:h}}var i=r(t),o=function(){return o=Object.assign||function(h){for(var w,_=1,$=arguments.length;_<$;_++)for(var M in w=arguments[_])Object.prototype.hasOwnProperty.call(w,M)&&(h[M]=w[M]);return h},o.apply(this,arguments)};function s(h,w){var _={};for(var $ in h)Object.prototype.hasOwnProperty.call(h,$)&&w.indexOf($)<0&&(_[$]=h[$]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var M=0;for($=Object.getOwnPropertySymbols(h);M<$.length;M++)w.indexOf($[M])<0&&Object.prototype.propertyIsEnumerable.call(h,$[M])&&(_[$[M]]=h[$[M]])}return _}function a(){var h=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,h),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function h(){}return h.prototype.observe=function(){},h.prototype.unobserve=function(){},h.prototype.disconnect=function(){},h}(),l=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(h,w){w===void 0&&(w=!0);var _=t.useState({width:0,height:0}),$=_[0],M=_[1];t.useEffect(function(){if(typeof window<"u"&&w){var j=function(){M({width:window.innerWidth,height:window.innerHeight})};return f&&(j(),window.addEventListener("resize",j)),function(){return window.removeEventListener("resize",j)}}},[]);var O,N,V,z=t.useRef(new l((O=function(j){d&&M({width:j[j.length-1].contentRect.width,height:j[j.length-1].contentRect.height})},N=0,V=0,function(){for(var j=this,R=[],v=0;v<arguments.length;v++)R[v]=arguments[v];clearTimeout(V),V=window.setTimeout(function(){return O.apply(j,R)},N)})));return t.useEffect(function(){var j=z.current;if(w){var R=h.current;return h.current&&d&&j.observe(h.current),function(){j.disconnect(),R&&d&&j.unobserve(R)}}j.disconnect()},[h,z]),$}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function x(h){return Object.assign({},p,h)}function E(h){var w=h.riveLoaded,_=w!==void 0&&w,$=h.canvasRef,M=h.containerRef,O=h.options,N=O===void 0?{}:O,V=h.onCanvasHasResized,z=h.artboardBounds,j=x(N),R=t.useState({height:0,width:0}),v=R[0],C=v.height,I=v.width,k=R[1],U=t.useState({height:0,width:0}),q=U[0],ue=q.height,W=q.width,L=U[1],oe=t.useState(!0),G=oe[0],X=oe[1],ne=j.fitCanvasToArtboardHeight,ae=j.shouldResizeCanvasToContainer,B=j.useDevicePixelRatio,H=m(M,ae),J=function(){var Ce=a(),Re=t.useState(Ce),Pe=Re[0],Se=Re[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var lt=a();Se(lt)},ke=window.matchMedia("screen and (resolution: ".concat(Pe,"dppx)"));return ke.hasOwnProperty("addEventListener")?ke.addEventListener("change",We):ke.addListener(We),function(){ke.hasOwnProperty("removeEventListener")?ke.removeEventListener("change",We):ke.removeListener(We)}}},[Pe]),Pe}(),ee=z??{},te=ee.maxX,Z=ee.maxY,ge=t.useCallback(function(){var Ce,Re,Pe,Se,We=(Re=(Ce=M.current)===null||Ce===void 0?void 0:Ce.clientWidth)!==null&&Re!==void 0?Re:0,ke=(Se=(Pe=M.current)===null||Pe===void 0?void 0:Pe.clientHeight)!==null&&Se!==void 0?Se:0;return ne&&z?{width:We,height:We*(z.maxY/z.maxX)}:{width:We,height:ke}},[M,ne,te,Z]);t.useEffect(function(){if(ae&&M.current&&_){var Ce=ge(),Re=Ce.width,Pe=Ce.height,Se=!1;if($.current){var We=Re!==I||Pe!==C;if(j.fitCanvasToArtboardHeight&&We&&(M.current.style.height=Pe+"px",Se=!0),j.useDevicePixelRatio){if(We||Re*J!==W||Pe*J!==ue){var ke=J*Re,lt=J*Pe;$.current.width=ke,$.current.height=lt,$.current.style.width=Re+"px",$.current.style.height=Pe+"px",L({width:ke,height:lt}),Se=!0}}else We&&($.current.width=Re,$.current.height=Pe,L({width:Re,height:Pe}),Se=!0);k({width:Re,height:Pe})}V&&(G||Se)&&V&&V(),G&&X(!1)}},[$,M,H,J,ge,G,X,ue,W,C,I,V,ae,ne,B,_])}function S(h){var w=h.setContainerRef,_=h.setCanvasRef,$=h.className,M=$===void 0?"":$,O=h.style,N=h.children,V=s(h,["setContainerRef","setCanvasRef","className","style","children"]),z=o({width:"100%",height:"100%"},O);return i.default.createElement("div",o({ref:w,className:M},!M&&{style:z}),i.default.createElement("canvas",o({ref:_,style:{verticalAlign:"top",width:0,height:0}},V),N))}function T(h,w){w===void 0&&(w={});var _=t.useRef(null),$=t.useRef(null),M=t.useState(null),O=M[0],N=M[1],V=!!h,z=x(w),j=t.useCallback(function(){O&&(O.startRendering(),O.resizeToCanvas())},[O]);E({riveLoaded:!!O,canvasRef:_,containerRef:$,options:z,onCanvasHasResized:j,artboardBounds:O==null?void 0:O.bounds});var R=t.useCallback(function(k){if(k&&h&&V){var U=z.useOffscreenRenderer,q=new n.Rive(o(o({useOffscreenRenderer:U},h),{canvas:k}));q.on(n.EventType.Load,function(){_.current?N(q):q.cleanup()})}else k===null&&_.current&&(_.current.height=0,_.current.width=0);_.current=k},[V]),v=t.useCallback(function(k){$.current=k},[]);t.useEffect(function(){var k=new IntersectionObserver(function(U){U[0].isIntersecting?O&&O.startRendering():O&&O.stopRendering()});return _.current&&k.observe(_.current),function(){k.disconnect()}},[O]),t.useEffect(function(){return function(){O&&(O.cleanup(),N(null))}},[O]);var C=h==null?void 0:h.animations;t.useEffect(function(){O&&C&&(O.isPlaying?(O.stop(O.animationNames),O.play(C)):O.isPaused&&(O.stop(O.animationNames),O.pause(C)))},[C,O]);var I=t.useCallback(function(k){return i.default.createElement(S,o({setContainerRef:v,setCanvasRef:R},k))},[R,v]);return{canvas:_.current,container:$.current,setCanvasRef:R,setContainerRef:v,rive:O,RiveComponent:I}}e.default=function(h){var w=h.src,_=h.artboard,$=h.animations,M=h.stateMachines,O=h.layout,N=h.useOffscreenRenderer,V=N===void 0||N,z=h.shouldDisableRiveListeners,j=z!==void 0&&z,R=h.shouldResizeCanvasToContainer,v=R===void 0||R,C=h.children,I=s(h,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),k=T({src:w,artboard:_,animations:$,layout:O,stateMachines:M,autoplay:!0,shouldDisableRiveListeners:j},{useOffscreenRenderer:V,shouldResizeCanvasToContainer:v}).RiveComponent;return i.default.createElement(k,o({},I),C)},e.useResizeCanvas=E,e.useRive=T,e.useStateMachineInput=function(h,w,_,$){var M=t.useState(null),O=M[0],N=M[1];return t.useEffect(function(){function V(){if(h&&w&&_||N(null),h&&w&&_){var z=h.stateMachineInputs(w);if(z){var j=z.find(function(R){return R.name===_});$!==void 0&&j&&(j.value=$),N(j||null)}}else N(null)}V(),h&&h.on(n.EventType.Play,function(){V()})},[h]),O},Object.keys(n).forEach(function(h){h==="default"||e.hasOwnProperty(h)||Object.defineProperty(e,h,{enumerable:!0,get:function(){return n[h]}})})})(rv);const d$=dp(rv),rl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...i})=>D.jsx(at,{width:t,height:n,style:r,children:D.jsx(d$,{src:e,...i})});rl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const iv=({isLoading:e,className:t,width:n,height:r,onClose:i,src:o,noScroll:s="noscroll",...a})=>(u.useEffect(()=>(e?document.body.classList.add(s):document.body.classList.remove(s),()=>{document.body.classList.remove(s)}),[e,s]),e?D.jsx(at,{className:t,"data-test-id":a["data-testid-backdrop"],onClick:i,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:D.jsx(at,{"data-test-id":a["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:D.jsx(rl,{src:o,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);iv.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var f$=it({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const p$=({color:e,size:t,...n})=>D.jsx(at,{...n,className:$e(f$({color:e,size:t}))});function h$(e){return class extends u.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?u.Children.map(n,i=>{const o=u.Children.toArray(i.children||i.props.children);return o&&o[0]&&o[0].props.value}):[]},this.onChange=(n,r,i)=>{const o=this.getValue().concat();o[n]=r,i&&i(o,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 D.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var m$="_1ypj0tt5",v$="_1ypj0tt4",g$="_1ypj0tt3",Nf="_1ypj0tt1",y$="_1ypj0tt0",b$="_1ypj0tt2";const x$=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:i})=>{const o=n==null?void 0:n(),s=u.Children.map(t,(a,c)=>u.cloneElement(a,{selectedValue:o==null?void 0:o[c],onValueChange:(...l)=>i==null?void 0:i(c,...l),onScrollChange:(...l)=>r==null?void 0:r(c,...l)}));return D.jsx(at,{className:$e(m$,e),children:s})},sv=h$(x$),w$=e=>null;function E$(e){var t;const n=(r,i,o)=>{const s=Math.round(r/i);return Math.min(s,o-1)};return t=class extends u.Component{constructor(){super(...arguments),this.selectByIndex=(r,i,o)=>{r<0||r>=u.Children.count(this.props.children)||!i||o(r*i)},this.doScrollingComplete=(r,i,o)=>{const s=u.Children.toArray(this.props.children),a=n(r,i,s.length),c=s[a];c?o(c.props.value):console.warn&&console.warn("child not found",s,a)},this.select=(r,i,o)=>{const s=u.Children.toArray(this.props.children);for(let a=0,c=s.length;a<c;a+=1)if(s[a].props.value===r){this.selectByIndex(a,i,o);return}this.selectByIndex(0,i,o)}}render(){return D.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=w$,t}const C$=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:i,doScrollingComplete:o,onValueChange:s,computeChildIndex:a,disabled:c,className:l}=e,d=u.useRef(null),f=u.useRef(null),m=u.useRef(null),p=u.useRef(0),x=u.useRef(0),E=u.useMemo(()=>{if(n||r)return n||r;const V=u.Children.toArray(t);return V&&V[0]&&V[0].props.value},[t,r,n]),[S,T]=u.useState(E),h=(()=>{let V=-1,z=0,j=0,R=!1,v=!1;const C=(L,oe)=>{L.transform=oe},I=(L,oe)=>{L.transition=oe},k=(L,oe,G=.3)=>{var X,ne;V!==oe&&(V=oe,I((X=f.current)==null?void 0:X.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),C((ne=f.current)==null?void 0:ne.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{O(),f.current&&I(f.current.style,"")},+G*1e3))},U=((L=30,oe=100)=>{let G=0,X=0,ne=0;const ae={record:B=>{const H=+new Date;ne=(B-X)/(H-G),H-G>=L&&(ne=H-G<=oe?ne:0,X=B,G=H)},getVelocity:B=>(B!==X&&ae.record(B),ne)};return ae})(),q=()=>{v=!1;let L=V;const oe=(t.length-1)*p.current;let G=.3;const X=U.getVelocity(L)*4;X&&(L=X*40+L,G=Math.abs(X)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>oe&&(L=oe),k(0,L,G<.3?.3:G),M()},ue=L=>{R||(v=!0,j=L,z=V)},W=L=>{var oe;R||!v||(V=z-L+j,U.record(V),M(),C((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-V}px,0)`))};return{touchstart:L=>ue(L.touches[0].pageY),mousedown:L=>ue(L.pageY),touchmove:L=>{L.preventDefault(),W(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),W(L.pageY)},touchend:()=>q(),touchcancel:()=>q(),mouseup:()=>q(),getValue:()=>V,scrollTo:k,setDisabled:(L=!1)=>{R=L}}})(),w=u.useCallback(V=>{h.scrollTo(0,V)},[h]),_=u.useCallback(V=>{h.scrollTo(0,V,0)},[h]),$=V=>{V!==S&&("selectedValue"in e||T(V),s&&s(V))},M=()=>{const V=h.getValue();if(V>=0){const z=u.Children.toArray(t),j=a(V,p.current,z.length);if(x.current!==j){x.current=j;const R=z[j];R&&e.onScrollChange?e.onScrollChange(R.props.value):!z&&console.warn&&console.warn("child not found",t,j)}}},O=()=>{const V=h.getValue();V>=0&&o(V,p.current,$)},N=()=>{const V=`${Nf} ${b$}`,z=R=>{const{className:v="",style:C,value:I}=R.props,k=S===I;return D.jsx("div",{style:{...C},"data-selected":k?"true":void 0,className:`${k?V:Nf} ${v}`,children:R.props.children},I)};return u.Children?u.Children.map(t,z):[].concat(t).map(z)};return u.useEffect(()=>{var R,v,C;const V=((R=d.current)==null?void 0:R.getBoundingClientRect().height)??0,z=((v=m.current)==null?void 0:v.getBoundingClientRect().height)??0;p.current=((C=m.current)==null?void 0:C.getBoundingClientRect().height)??0;let j=Math.floor(V/z);return j%2===0&&(j-=1),j-=1,j/=2,f.current.style.padding=`${z*j}px 0`,m.current.style.top=`${z*j}px`,h.setDisabled(c),i(S,p.current,w),Object.keys(h).forEach(I=>{var k;if(I.indexOf("touch")===0||I.indexOf("mouse")===0){const U=I.indexOf("move")>=0?{passive:!1}:{passive:!0};(k=d.current)==null||k.addEventListener(I,h[I],U)}}),()=>{Object.keys(h).forEach(I=>{var k;(I.indexOf("touch")===0||I.indexOf("mouse")===0)&&((k=d.current)==null||k.removeEventListener(I,h[I]))})}},[c,h,w,i,S]),u.useEffect(()=>{"selectedValue"in e&&S!==n&&T(n),h.setDisabled(c)},[n,S,e,h,c]),u.useEffect(()=>{i(S,p.current,_)},[_,i,S]),D.jsxs("div",{className:$e(y$,l),ref:d,children:[D.jsx("div",{className:$e(g$,l),ref:m}),D.jsx("div",{className:v$,ref:f,children:N()})]})},Ha=E$(C$);var bt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(bt||{});const Mi=24*60*60*1e3,_$={am:"AM",pm:"PM"},av=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),ia=e=>e<10?`0${e}`:`${e}`,cr=e=>new Date(+e),S$=(e,t)=>{e.setDate(Math.min(e.getDate(),av(new Date(e.getFullYear(),t)))),e.setMonth(t)},Vf=(e,t,n)=>{if(n){const r=e.getHours();let i=t;i=r>=12?t+12:t,i=i>=24?0:i,e.setHours(i)}else e.setHours(t)},jf=(e,t)=>{t===0?e.setTime(+e-Mi/2):e.setTime(+e+Mi/2)},Lf=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),T$=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],$$=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=_$,mode:i="date",disabled:o=!1,className:s,minuteStep:a=1,use12Hours:c=!1,minDate:l,maxDate:d,formatDay:f,formatMonth:m}=e,[p,x]=u.useState(t||n),E=u.useRef(new Date(-1)),S=u.useRef(new Date);u.useEffect(()=>{"date"in e&&x(t||n)},[t,n,e]);const T=()=>C(p||E.current),h=()=>R().getFullYear(),w=()=>v().getFullYear(),_=()=>R().getMonth(),$=()=>v().getMonth(),M=()=>R().getDate(),O=()=>v().getDate(),N=()=>R().getHours(),V=()=>v().getHours(),z=()=>R().getMinutes(),j=()=>v().getMinutes(),R=()=>l||E.current,v=()=>d||S.current,C=G=>{const X=R(),ne=v();if(i===bt.DATE_TIME){if(G<X)return cr(X);if(G>ne)return cr(ne)}else if(i===bt.DATE||i===bt.YEAR||i===bt.MONTH){if(+G+Mi<=X)return cr(X);if(G>=+ne+Mi)return cr(ne)}else if(i===bt.TIME){const ae=ne.getHours(),B=ne.getMinutes(),H=X.getHours(),J=X.getMinutes(),ee=G.getHours(),te=G.getMinutes();if(ee<H||ee===H&&te<J)return cr(X);if(ee>ae||ee===ae&&te>B)return cr(ne)}return G},I=(G,X)=>{const ne=parseInt(G[X],10),ae=cr(T());if(i===bt.DATE_TIME||i===bt.DATE||i===bt.YEAR||i===bt.MONTH)switch(X){case 0:ae.setDate(ne);break;case 1:S$(ae,ne);break;case 2:ae.setFullYear(ne);break;case 3:Vf(ae,ne);break;case 4:ae.setMinutes(ne);break;case 5:jf(ae,ne);break}else if(i===bt.TIME)switch(X){case 0:Vf(ae,ne);break;case 1:ae.setMinutes(ne);break;case 2:jf(ae,ne);break}return C(ae)},k=(G,X)=>{const ne=I(G,X);"date"in e||x(ne),e.onDateChange&&e.onDateChange(ne),e.onValueChange&&e.onValueChange(G,X)},U=(G,X)=>{if(e.onScrollChange){const ne=I(G,X);e.onScrollChange(ne,G,X)}},q=()=>{const G=T(),X=G.getFullYear(),ne=G.getMonth(),ae=h(),B=w(),H=_(),J=$(),ee=M(),te=O(),Z=[];for(let Ye=ae;Ye<=B;Ye+=1)Z.push({value:`${Ye}`,label:`${Ye}`});const ge={key:"year",props:{children:Z}};if(i===bt.YEAR)return[ge];const Ce=[];let Re=0,Pe=11;ae===X&&(Re=H),B===X&&(Pe=J);for(let Ye=Re;Ye<=Pe;Ye+=1){const yt=m?m(Ye,G):T$(Ye);Ce.push({value:`${Ye}`,label:yt})}const Se={key:"month",props:{children:Ce}};if(i===bt.MONTH)return[Se,ge];const We=[];let ke=1,lt=av(G);ae===X&&H===ne&&(ke=ee),B===X&&J===ne&&(lt=te);for(let Ye=ke;Ye<=lt;Ye+=1){const yt=f?f(Ye,G):`${Ye}`;We.push({value:`${Ye}`,label:yt})}return[{key:"day",props:{children:We}},Se,ge]},ue=G=>{let{minHour:X=0,maxHour:ne=23,minMinute:ae=0,maxMinute:B=59}=e;const H=z(),J=j(),ee=N(),te=V(),Z=G.getHours();if(i===bt.DATE_TIME){const Se=G.getFullYear(),We=G.getMonth(),ke=G.getDate(),lt=h(),Ye=w(),yt=_(),Je=$(),Pt=M(),Te=O();lt===Se&&yt===We&&Pt===ke&&(X=ee,ee===Z&&(ae=H)),Ye===Se&&Je===We&&Te===ke&&(ne=te,te===Z&&(B=J))}else X=ee,ee===Z&&(ae=H),ne=te,te===Z&&(B=J);const ge=[];X===0&&ne===0||X!==0&&ne!==0?X=Lf(X):X===0&&c&&(X=1,ge.push({value:"0",label:"12"})),ne=Lf(ne);for(let Se=X;Se<=ne;Se+=1)ge.push({value:`${Se}`,label:ia(Se)});const Ce=[],Re=G.getMinutes();for(let Se=ae;Se<=B;Se+=a)Ce.push({value:`${Se}`,label:ia(Se)}),Re>Se&&Re<Se+a&&Ce.push({value:`${Re}`,label:ia(Re)});return{cols:[{key:"hours",props:{children:ge}},{key:"minutes",props:{children:Ce}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Re}},W=()=>{const G=T();let X=[],ne=[];if(i===bt.YEAR)return{cols:q(),value:[`${G.getFullYear()}`]};if(i===bt.MONTH)return{cols:q(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((i===bt.DATE_TIME||i===bt.DATE)&&(X=q(),ne=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),i===bt.DATE_TIME||i===bt.TIME){const ae=ue(G);X=X.concat(ae.cols);const B=G.getHours();let H=[`${B}`,`${ae.selMinute}`],J=B;c&&(J=B>12?B-12:B,H=[`${J}`,`${ae.selMinute}`,`${B>=12?1:0}`]),ne=ne.concat(H)}return{value:ne,cols:X}},{value:L,cols:oe}=W();return D.jsx(sv,{className:s,selectedValue:L,onValueChange:k,onScrollChange:U,children:oe.map(G=>D.jsx(Ha,{disabled:o,className:`picker-item-${G.key}`,children:G.props.children.map(X=>D.jsx(Ha.Item,{value:X.value,children:X.label},X.value))},G.key))})};var Wa={exports:{}},nt={};/** @license React v17.0.2
133
+ }`),ve.bindAttribLocation(Ee,0,"vertex"),ve.bindAttribLocation(Ee,1,"uv"),ve.linkProgram(Ee),De=ve.getProgramInfoLog(Ee),0<De.trim().length)throw De;Y=ve.getUniformLocation(Ee,"mat"),re=ve.getUniformLocation(Ee,"translate"),ve.useProgram(Ee),ve.bindBuffer(ve.ARRAY_BUFFER,ve.createBuffer()),ve.enableVertexAttribArray(0),ve.enableVertexAttribArray(1),ve.bindBuffer(ve.ELEMENT_ARRAY_BUFFER,ve.createBuffer()),ve.uniform1i(ve.getUniformLocation(Ee,"image"),0),ve.pixelStorei(ve.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ve}return!0}let g=null,P=0,A=0,Y=null,re=null,ce=0,se=0;this.wb=function(){return b(),A},this.gb=function(Ee){if(!b())return null;const De=g.createTexture();return g.bindTexture(g.TEXTURE_2D,De),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ee),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),P==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),De};const de=new T(8),le=new T(8),me=new T(10),we=new T(10);this.kb=function(Ee,De,ve,st,vt){if(b()){var Ne=de.push(Ee),Le=le.push(De);(g.canvas.width!=Ne||g.canvas.height!=Le)&&(g.canvas.width=Ne,g.canvas.height=Le),g.viewport(0,Le-De,Ee,De),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ve.sort((Ue,Bn)=>Bn.Ua-Ue.Ua),Ne=me.push(st),ce!=Ne&&(g.bufferData(g.ARRAY_BUFFER,8*Ne,g.DYNAMIC_DRAW),ce=Ne),Ne=0;for(var gt of ve)g.bufferSubData(g.ARRAY_BUFFER,Ne,gt.Da),Ne+=4*gt.Da.length;console.assert(Ne==4*st);for(var Ht of ve)g.bufferSubData(g.ARRAY_BUFFER,Ne,Ht.Xa),Ne+=4*Ht.Xa.length;console.assert(Ne==8*st),Ne=we.push(vt),se!=Ne&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ne,g.DYNAMIC_DRAW),se=Ne),gt=0;for(var Cn of ve)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,gt,Cn.indices),gt+=2*Cn.indices.length;console.assert(gt==2*vt),Cn=0,Ht=!0,Ne=gt=0;for(const Ue of ve){Ue.image.za!=Cn&&(g.bindTexture(g.TEXTURE_2D,Ue.image.cb||null),Cn=Ue.image.za),Ue.zb?(g.scissor(Ue.Ia,Le-Ue.Ja-Ue.Pa,Ue.Gb,Ue.Pa),Ht=!0):Ht&&(g.scissor(0,Le-De,Ee,De),Ht=!1),ve=2/Ee;const Bn=-2/De;g.uniform4f(Y,Ue.oa[0]*ve*Ue.va,Ue.oa[1]*Bn*Ue.wa,Ue.oa[2]*ve*Ue.va,Ue.oa[3]*Bn*Ue.wa),g.uniform2f(re,Ue.oa[4]*ve*Ue.va+ve*(Ue.Ia-Ue.xb*Ue.va)-1,Ue.oa[5]*Bn*Ue.wa+Bn*(Ue.Ja-Ue.yb*Ue.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ne),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ne+4*st),g.drawElements(g.TRIANGLES,Ue.indices.length,g.UNSIGNED_SHORT,gt),Ne+=4*Ue.Da.length,gt+=2*Ue.indices.length}console.assert(Ne==4*st),console.assert(gt==2*vt)}},this.canvas=function(){return b()&&g.canvas}};p.onRuntimeInitialized=function(){function b(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 P(){0<gt.length&&(h.kb(Le.drawWidth(),Le.drawHeight(),gt,Ht,Cn),gt=[],Cn=Ht=0,Le.reset(512,512));for(const pe of Ne){for(const Ae of pe.da)Ae();pe.da=[]}Ne.clear()}var A=p.RenderPaintStyle;const Y=p.RenderPath,re=p.RenderPaint,ce=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,me=A.fill,we=A.stroke,Ee=p.FillRule.evenOdd;let De=1;var ve=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=De,De=De+1&2147483647||1},decode:function(pe){let Ae=Ps;Ae.total++;var et=this,Ge=new Image;Ge.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),Ge.onload=function(){if(et.ab=Ge,et.cb=h.gb(Ge),et.size(Ge.width,Ge.height),Ae.loaded++,Ae.loaded===Ae.total){const tt=Ae.ready;tt&&(tt(),Ae.ready=null)}}}}),st=Y.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,Ae,et,Ge,tt,pt,ze){var qe=this.ia,Zt=qe.addPath;pe=pe.ia;const wt=new DOMMatrix;wt.a=Ae,wt.b=et,wt.c=Ge,wt.d=tt,wt.e=pt,wt.f=ze,Zt.call(qe,pe,wt)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,Ae){this.ia.moveTo(pe,Ae)},lineTo:function(pe,Ae){this.ia.lineTo(pe,Ae)},cubicTo:function(pe,Ae,et,Ge,tt,pt){this.ia.bezierCurveTo(pe,Ae,et,Ge,tt,pt)},close:function(){this.ia.closePath()}}),vt=re.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=b(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,Ae,et,Ge){this.qa={Va:pe,Wa:Ae,La:et,Ma:Ge,Ca:[]}},radialGradient:function(pe,Ae,et,Ge){this.qa={Va:pe,Wa:Ae,La:et,Ma:Ge,Ca:[],ub:!0}},addStop:function(pe,Ae){this.qa.Ca.push({color:pe,stop:Ae})},completeGradient:function(){},draw:function(pe,Ae,et){let Ge=this.bb;var tt=this.Ha,pt=this.qa;if(pe.globalCompositeOperation=this.$a,pt!=null){tt=pt.Va;var ze=pt.Wa;const Zt=pt.La;var qe=pt.Ma;const wt=pt.Ca;pt.ub?(pt=Zt-tt,qe-=ze,tt=pe.createRadialGradient(tt,ze,0,tt,ze,Math.sqrt(pt*pt+qe*qe))):tt=pe.createLinearGradient(tt,ze,Zt,qe);for(let hn=0,_t=wt.length;hn<_t;hn++)ze=wt[hn],tt.addColorStop(ze.stop,g(ze.color));this.Ha=tt,this.qa=null}switch(Ge){case we:pe.strokeStyle=tt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(Ae);break;case me:pe.fillStyle=tt,pe.fill(Ae,et)}}});const Ne=new Set;let Le=null,gt=[],Ht=0,Cn=0;var Ue=p.CanvasRenderer=ce.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,Ae,et,Ge,tt,pt){const ze=this.ha,qe=ze.length-6;ze.splice(qe,6,ze[qe]*pe+ze[qe+2]*Ae,ze[qe+1]*pe+ze[qe+3]*Ae,ze[qe]*et+ze[qe+2]*Ge,ze[qe+1]*et+ze[qe+3]*Ge,ze[qe]*tt+ze[qe+2]*pt+ze[qe+4],ze[qe+1]*tt+ze[qe+3]*pt+ze[qe+5]),this.da.push(this.ba.transform.bind(this.ba,pe,Ae,et,Ge,tt,pt))},rotate:function(pe){const Ae=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,Ae,-Ae,pe,0,0)},_drawPath:function(pe,Ae){this.da.push(Ae.draw.bind(Ae,this.ba,pe.ia,pe.Ga===Ee?"evenodd":"nonzero"))},drawImage:function(pe,...Ae){var et=this.ba;this.da.push(function(){et.drawImage(pe,...Ae)})},_drawRiveImage:function(pe,Ae,et){var Ge=pe.ab;if(Ge){var tt=this.ba,pt=b(Ae);this.da.push(function(){tt.globalCompositeOperation=pt,tt.globalAlpha=et,tt.drawImage(Ge,0,0),tt.globalAlpha=1})}},_getMatrix:function(pe){const Ae=this.ha,et=Ae.length-6;for(let Ge=0;6>Ge;++Ge)pe[Ge]=Ae[et+Ge]},_drawImageMesh:function(pe,Ae,et,Ge,tt,pt,ze,qe,Zt,wt){var hn=this.ba.canvas.width,_t=this.ba.canvas.height;const uu=Zt-ze,du=wt-qe;ze=Math.max(ze,0),qe=Math.max(qe,0),Zt=Math.min(Zt,hn),wt=Math.min(wt,_t);const Qr=Zt-ze,Jr=wt-qe;if(console.assert(Qr<=Math.min(uu,hn)),console.assert(Jr<=Math.min(du,_t)),!(0>=Qr||0>=Jr)){Zt=Qr<uu||Jr<du,hn=wt=1;var ir=Math.ceil(Qr*wt),sr=Math.ceil(Jr*hn);_t=h.wb(),ir>_t&&(wt*=_t/ir,ir=_t),sr>_t&&(hn*=_t/sr,sr=_t),Le||(Le=new p.DynamicRectanizer(_t),Le.reset(512,512)),_t=Le.addRect(ir,sr),0>_t&&(P(),Ne.add(this),_t=Le.addRect(ir,sr),console.assert(0<=_t));var fu=_t&65535,pu=_t>>16;gt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:fu,Ja:pu,xb:ze,yb:qe,Gb:ir,Pa:sr,va:wt,wa:hn,Da:new Float32Array(Ge),Xa:new Float32Array(tt),indices:new Uint16Array(pt),zb:Zt,Ua:pe.za<<1|(Zt?1:0)}),Ht+=Ge.length,Cn+=pt.length;var Sr=this.ba,Fg=b(Ae);this.da.push(function(){Sr.save(),Sr.resetTransform(),Sr.globalCompositeOperation=Fg,Sr.globalAlpha=et,Sr.drawImage(h.canvas(),fu,pu,ir,sr,ze,qe,Qr,Jr),Sr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ee?"evenodd":"nonzero"))},clear:function(){Ne.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,Ae){this.transform(1,0,0,1,pe,Ae)}});p.makeRenderer=function(pe){return new Ue(pe)},p.renderFactory={makeRenderPaint:function(){return new vt},makeRenderPath:function(){return new st},makeRenderImage:function(){return new ve}};let Bn=p.load,Ps=null;p.load=function(pe){return new Promise(function(Ae){let et=null;Ps={total:0,loaded:0,ready:function(){Ae(et)}},et=Bn(pe),Ps.total==0&&Ae(et)})},A=new S,p.requestAnimationFrame=A.requestAnimationFrame.bind(A),p.cancelAnimationFrame=A.cancelAnimationFrame.bind(A),p.enableFPSCounter=A.lb.bind(A),p.disableFPSCounter=A.ib,A.Qa=P,p.cleanup=function(){Le&&Le.delete()}};var w=Object.assign({},p),_="./this.program",$=typeof window=="object",M=typeof importScripts=="function",O="",N,V;($||M)&&(M?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),f&&(O=f),O.indexOf("blob:")!==0?O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1):O="",M&&(V=b=>{var g=new XMLHttpRequest;return g.open("GET",b,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),N=(b,g,P)=>{var A=new XMLHttpRequest;A.open("GET",b,!0),A.responseType="arraybuffer",A.onload=()=>{A.status==200||A.status==0&&A.response?g(A.response):P()},A.onerror=P,A.send(null)});var z=p.print||console.log.bind(console),j=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(_=p.thisProgram);var R;p.wasmBinary&&(R=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&te("no native wasm support detected");var v,C=!1,I,k,U,q,ue,W,L,oe;function G(){var b=v.buffer;p.HEAP8=I=new Int8Array(b),p.HEAP16=U=new Int16Array(b),p.HEAP32=ue=new Int32Array(b),p.HEAPU8=k=new Uint8Array(b),p.HEAPU16=q=new Uint16Array(b),p.HEAPU32=W=new Uint32Array(b),p.HEAPF32=L=new Float32Array(b),p.HEAPF64=oe=new Float64Array(b)}var X,ne=[],ae=[],B=[];function H(){var b=p.preRun.shift();ne.unshift(b)}var J=0,ee=null;function te(b){throw p.onAbort&&p.onAbort(b),b="Aborted("+b+")",j(b),C=!0,b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info."),E(b),b}function Z(b){return b.startsWith("data:application/octet-stream;base64,")}var ge;if(ge="canvas_advanced.wasm",!Z(ge)){var Ce=ge;ge=p.locateFile?p.locateFile(Ce,O):O+Ce}function Re(b){if(b==ge&&R)return new Uint8Array(R);if(V)return V(b);throw"both async and sync fetching of the wasm failed"}function Pe(b){if(!R&&($||M)){if(typeof fetch=="function"&&!b.startsWith("file://"))return fetch(b,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+b+"'";return g.arrayBuffer()}).catch(()=>Re(b));if(N)return new Promise((g,P)=>{N(b,A=>g(new Uint8Array(A)),P)})}return Promise.resolve().then(()=>Re(b))}function Te(b,g,P){return Pe(b).then(A=>WebAssembly.instantiate(A,g)).then(A=>A).then(P,A=>{j("failed to asynchronously prepare wasm: "+A),te(A)})}function We(b,g){var P=ge;return R||typeof WebAssembly.instantiateStreaming!="function"||Z(P)||P.startsWith("file://")||typeof fetch!="function"?Te(P,b,g):fetch(P,{credentials:"same-origin"}).then(A=>WebAssembly.instantiateStreaming(A,b).then(g,function(Y){return j("wasm streaming compile failed: "+Y),j("falling back to ArrayBuffer instantiation"),Te(P,b,g)}))}var ke=b=>{for(;0<b.length;)b.shift()(p)};function lt(b){if(b===void 0)return"_unknown";b=b.replace(/[^a-zA-Z0-9_]/g,"$");var g=b.charCodeAt(0);return 48<=g&&57>=g?`_${b}`:b}function Ye(b,g){return b=lt(b),{[b]:function(){return g.apply(this,arguments)}}[b]}function yt(){this.ja=[void 0],this.Oa=[]}var Je=new yt,Pt=void 0;function $e(b){throw new Pt(b)}var Et=b=>(b||$e("Cannot use deleted val. handle = "+b),Je.get(b).value),ut=b=>{switch(b){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Je.Ya({Ta:1,value:b})}};function cn(b){var g=Error,P=Ye(b,function(A){this.name=b,this.message=A,A=Error(A).stack,A!==void 0&&(this.stack=this.toString()+`
134
+ `+A.replace(/^Error(:[^\n]*)?\n/,""))});return P.prototype=Object.create(g.prototype),P.prototype.constructor=P,P.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},P}var jt=void 0,St=void 0;function je(b){for(var g="";k[b];)g+=St[k[b++]];return g}var Ct=[];function Lt(){for(;Ct.length;){var b=Ct.pop();b.W.na=!1,b.delete()}}var bn=void 0,Ft={};function rr(b,g){for(g===void 0&&$e("ptr should not be undefined");b.$;)g=b.ra(g),b=b.$;return g}var rn={};function _r(b){b=cu(b);var g=je(b);return En(b),g}function Bt(b,g){var P=rn[b];return P===void 0&&$e(g+" has unknown type "+_r(b)),P}function ln(){}var Tt=!1;function un(b){--b.count.value,b.count.value===0&&(b.ca?b.fa.ka(b.ca):b.Z.X.ka(b.Y))}function dn(b,g,P){return g===P?b:P.$===void 0?null:(b=dn(b,g,P.$),b===null?null:P.jb(b))}var kn={};function Zr(b,g){return g=rr(b,g),Ft[g]}var Nn=void 0;function Vn(b){throw new Nn(b)}function fn(b,g){return g.Z&&g.Y||Vn("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&Vn("Both smartPtrType and smartPtr must be specified"),g.count={value:1},qt(Object.create(b,{W:{value:g}}))}function qt(b){return typeof FinalizationRegistry>"u"?(qt=g=>g,b):(Tt=new FinalizationRegistry(g=>{un(g.W)}),qt=g=>{var P=g.W;return P.ca&&Tt.register(g,{W:P},g),g},ln=g=>{Tt.unregister(g)},qt(b))}var jn={};function xn(b){for(;b.length;){var g=b.pop();b.pop()(g)}}function on(b){return this.fromWireType(ue[b>>2])}var pn={},Ln={};function $t(b,g,P){function A(se){se=P(se),se.length!==b.length&&Vn("Mismatched type converter count");for(var de=0;de<b.length;++de)F(b[de],se[de])}b.forEach(function(se){Ln[se]=g});var Y=Array(g.length),re=[],ce=0;g.forEach((se,de)=>{rn.hasOwnProperty(se)?Y[de]=rn[se]:(re.push(se),pn.hasOwnProperty(se)||(pn[se]=[]),pn[se].push(()=>{Y[de]=rn[se],++ce,ce===re.length&&A(Y)}))}),re.length===0&&A(Y)}function Fn(b){switch(b){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${b}`)}}function y(b,g,P={}){var A=g.name;if(b||$e(`type "${A}" must have a positive integer typeid pointer`),rn.hasOwnProperty(b)){if(P.tb)return;$e(`Cannot register type '${A}' twice`)}rn[b]=g,delete Ln[b],pn.hasOwnProperty(b)&&(g=pn[b],delete pn[b],g.forEach(Y=>Y()))}function F(b,g,P={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");y(b,g,P)}function Q(b){$e(b.W.Z.X.name+" instance already deleted")}function fe(){}function xe(b,g,P){if(b[g].aa===void 0){var A=b[g];b[g]=function(){return b[g].aa.hasOwnProperty(arguments.length)||$e(`Function '${P}' called with an invalid number of arguments (${arguments.length}) - expects one of (${b[g].aa})!`),b[g].aa[arguments.length].apply(this,arguments)},b[g].aa=[],b[g].aa[A.ma]=A}}function _e(b,g,P){p.hasOwnProperty(b)?((P===void 0||p[b].aa!==void 0&&p[b].aa[P]!==void 0)&&$e(`Cannot register public name '${b}' twice`),xe(p,b,b),p.hasOwnProperty(P)&&$e(`Cannot register multiple overloads of a function with the same number of arguments (${P})!`),p[b].aa[P]=g):(p[b]=g,P!==void 0&&(p[b].Hb=P))}function be(b,g,P,A,Y,re,ce,se){this.name=b,this.constructor=g,this.ga=P,this.ka=A,this.$=Y,this.ob=re,this.ra=ce,this.jb=se,this.Ra=[]}function ye(b,g,P){for(;g!==P;)g.ra||$e(`Expected null or instance of ${P.name}, got an instance of ${g.name}`),b=g.ra(b),g=g.$;return b}function Ke(b,g){return g===null?(this.Aa&&$e(`null is not a valid ${this.name}`),0):(g.W||$e(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),ye(g.W.Y,g.W.Z.X,this.X))}function Me(b,g){if(g===null){if(this.Aa&&$e(`null is not a valid ${this.name}`),this.ua){var P=this.Ba();return b!==null&&b.push(this.ka,P),P}return 0}if(g.W||$e(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&$e(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),P=ye(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&$e("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?P=g.W.ca:$e(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:P=g.W.ca;break;case 2:if(g.W.fa===this)P=g.W.ca;else{var A=g.clone();P=this.Bb(P,ut(function(){A.delete()})),b!==null&&b.push(this.ka,P)}break;default:$e("Unsupporting sharing policy")}return P}function Ve(b,g){return g===null?(this.Aa&&$e(`null is not a valid ${this.name}`),0):(g.W||$e(`Cannot pass "${Ss(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&$e(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),ye(g.W.Y,g.W.Z.X,this.X))}function He(b,g,P,A){this.name=b,this.X=g,this.Aa=P,this.ta=A,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Me:(this.toWireType=A?Ke:Ve,this.ea=null)}function It(b,g,P){p.hasOwnProperty(b)||Vn("Replacing nonexistant public symbol"),p[b].aa!==void 0&&P!==void 0?p[b].aa[P]=g:(p[b]=g,p[b].ma=P)}var or=(b,g)=>{var P=[];return function(){if(P.length=0,Object.assign(P,arguments),b.includes("j")){var A=p["dynCall_"+b];A=P&&P.length?A.apply(null,[g].concat(P)):A.call(null,g)}else A=X.get(g).apply(null,P);return A}};function Be(b,g){b=je(b);var P=b.includes("j")?or(b,g):X.get(g);return typeof P!="function"&&$e(`unknown function pointer with signature ${b}: ${g}`),P}var eu=void 0;function wn(b,g){function P(re){Y[re]||rn[re]||(Ln[re]?Ln[re].forEach(P):(A.push(re),Y[re]=!0))}var A=[],Y={};throw g.forEach(P),new eu(`${b}: `+A.map(_r).join([", "]))}function Lo(b,g,P,A,Y){var re=g.length;2>re&&$e("argTypes array size mismatch! Must at least get return value and 'this' types!");var ce=g[1]!==null&&P!==null,se=!1;for(P=1;P<g.length;++P)if(g[P]!==null&&g[P].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=re-2,me=Array(le),we=[],Ee=[];return function(){if(arguments.length!==le&&$e(`function ${b} called with ${arguments.length} arguments, expected ${le} args!`),Ee.length=0,we.length=ce?2:1,we[0]=Y,ce){var De=g[1].toWireType(Ee,this);we[1]=De}for(var ve=0;ve<le;++ve)me[ve]=g[ve+2].toWireType(Ee,arguments[ve]),we.push(me[ve]);if(ve=A.apply(null,we),se)xn(Ee);else for(var st=ce?1:2;st<g.length;st++){var vt=st===1?De:me[st-2];g[st].ea!==null&&g[st].ea(vt)}return De=de?g[0].fromWireType(ve):void 0,De}}function Fo(b,g){for(var P=[],A=0;A<b;A++)P.push(W[g+4*A>>2]);return P}function tu(b,g,P){return b instanceof Object||$e(`${P} with invalid "this": ${b}`),b instanceof g.X.constructor||$e(`${P} incompatible with "this" of type ${b.constructor.name}`),b.W.Y||$e(`cannot call emscripten binding method ${P} on deleted object`),ye(b.W.Y,b.W.Z.X,g.X)}function _s(b){b>=Je.Ea&&--Je.get(b).Ta===0&&Je.Za(b)}function Tg(b,g,P){switch(g){case 0:return function(A){return this.fromWireType((P?I:k)[A])};case 1:return function(A){return this.fromWireType((P?U:q)[A>>1])};case 2:return function(A){return this.fromWireType((P?ue:W)[A>>2])};default:throw new TypeError("Unknown integer type: "+b)}}function Ss(b){if(b===null)return"null";var g=typeof b;return g==="object"||g==="array"||g==="function"?b.toString():""+b}function $g(b,g){switch(g){case 2:return function(P){return this.fromWireType(L[P>>2])};case 3:return function(P){return this.fromWireType(oe[P>>3])};default:throw new TypeError("Unknown float type: "+b)}}function Rg(b,g,P){switch(g){case 0:return P?function(A){return I[A]}:function(A){return k[A]};case 1:return P?function(A){return U[A>>1]}:function(A){return q[A>>1]};case 2:return P?function(A){return ue[A>>2]}:function(A){return W[A>>2]};default:throw new TypeError("Unknown integer type: "+b)}}var nu=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ru=(b,g,P)=>{var A=g+P;for(P=g;b[P]&&!(P>=A);)++P;if(16<P-g&&b.buffer&&nu)return nu.decode(b.subarray(g,P));for(A="";g<P;){var Y=b[g++];if(Y&128){var re=b[g++]&63;if((Y&224)==192)A+=String.fromCharCode((Y&31)<<6|re);else{var ce=b[g++]&63;Y=(Y&240)==224?(Y&15)<<12|re<<6|ce:(Y&7)<<18|re<<12|ce<<6|b[g++]&63,65536>Y?A+=String.fromCharCode(Y):(Y-=65536,A+=String.fromCharCode(55296|Y>>10,56320|Y&1023))}}else A+=String.fromCharCode(Y)}return A},ou=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Pg=(b,g)=>{for(var P=b>>1,A=P+g/2;!(P>=A)&&q[P];)++P;if(P<<=1,32<P-b&&ou)return ou.decode(k.subarray(b,P));for(P="",A=0;!(A>=g/2);++A){var Y=U[b+2*A>>1];if(Y==0)break;P+=String.fromCharCode(Y)}return P},Ig=(b,g,P)=>{if(P===void 0&&(P=2147483647),2>P)return 0;P-=2;var A=g;P=P<2*b.length?P/2:b.length;for(var Y=0;Y<P;++Y)U[g>>1]=b.charCodeAt(Y),g+=2;return U[g>>1]=0,g-A},Ag=b=>2*b.length,Og=(b,g)=>{for(var P=0,A="";!(P>=g/4);){var Y=ue[b+4*P>>2];if(Y==0)break;++P,65536<=Y?(Y-=65536,A+=String.fromCharCode(55296|Y>>10,56320|Y&1023)):A+=String.fromCharCode(Y)}return A},Dg=(b,g,P)=>{if(P===void 0&&(P=2147483647),4>P)return 0;var A=g;P=A+P-4;for(var Y=0;Y<b.length;++Y){var re=b.charCodeAt(Y);if(55296<=re&&57343>=re){var ce=b.charCodeAt(++Y);re=65536+((re&1023)<<10)|ce&1023}if(ue[g>>2]=re,g+=4,g+4>P)break}return ue[g>>2]=0,g-A},Mg=b=>{for(var g=0,P=0;P<b.length;++P){var A=b.charCodeAt(P);55296<=A&&57343>=A&&++P,g+=4}return g},kg={};function Bo(b){var g=kg[b];return g===void 0?je(b):g}var Ho=[];function Ng(b){var g=Ho.length;return Ho.push(b),g}function Vg(b,g){for(var P=Array(b),A=0;A<b;++A)P[A]=Bt(W[g+4*A>>2],"parameter "+A);return P}var iu=[],Ts={},su=()=>{if(!$s){var b={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",_:_||"./this.program"},g;for(g in Ts)Ts[g]===void 0?delete b[g]:b[g]=Ts[g];var P=[];for(g in b)P.push(`${g}=${b[g]}`);$s=P}return $s},$s,jg=[null,[],[]];Object.assign(yt.prototype,{get(b){return this.ja[b]},has(b){return this.ja[b]!==void 0},Ya(b){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=b,g},Za(b){this.ja[b]=void 0,this.Oa.push(b)}}),Pt=p.BindingError=class extends Error{constructor(b){super(b),this.name="BindingError"}},Je.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Je.Ea=Je.ja.length,p.count_emval_handles=function(){for(var b=0,g=Je.Ea;g<Je.ja.length;++g)Je.ja[g]!==void 0&&++b;return b},jt=p.PureVirtualError=cn("PureVirtualError");for(var au=Array(256),Wo=0;256>Wo;++Wo)au[Wo]=String.fromCharCode(Wo);St=au,p.getInheritedInstanceCount=function(){return Object.keys(Ft).length},p.getLiveInheritedInstances=function(){var b=[],g;for(g in Ft)Ft.hasOwnProperty(g)&&b.push(Ft[g]);return b},p.flushPendingDeletes=Lt,p.setDelayFunction=function(b){bn=b,Ct.length&&bn&&bn(Lt)},Nn=p.InternalError=class extends Error{constructor(b){super(b),this.name="InternalError"}},fe.prototype.isAliasOf=function(b){if(!(this instanceof fe&&b instanceof fe))return!1;var g=this.W.Z.X,P=this.W.Y,A=b.W.Z.X;for(b=b.W.Y;g.$;)P=g.ra(P),g=g.$;for(;A.$;)b=A.ra(b),A=A.$;return g===A&&P===b},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var b=qt,g=Object,P=g.create,A=Object.getPrototypeOf(this),Y=this.W;return b=b(P.call(g,A,{W:{value:{count:Y.count,na:Y.na,pa:Y.pa,Y:Y.Y,Z:Y.Z,ca:Y.ca,fa:Y.fa}}})),b.W.count.value+=1,b.W.na=!1,b},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&$e("Object already scheduled for deletion"),ln(this),un(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&$e("Object already scheduled for deletion"),Ct.push(this),Ct.length===1&&bn&&bn(Lt),this.W.na=!0,this},He.prototype.pb=function(b){return this.Sa&&(b=this.Sa(b)),b},He.prototype.Ka=function(b){this.ka&&this.ka(b)},He.prototype.argPackAdvance=8,He.prototype.readValueFromPointer=on,He.prototype.deleteObject=function(b){b!==null&&b.delete()},He.prototype.fromWireType=function(b){function g(){return this.ua?fn(this.X.ga,{Z:this.Ab,Y:P,fa:this,ca:b}):fn(this.X.ga,{Z:this,Y:b})}var P=this.pb(b);if(!P)return this.Ka(b),null;var A=Zr(this.X,P);if(A!==void 0)return A.W.count.value===0?(A.W.Y=P,A.W.ca=b,A.clone()):(A=A.clone(),this.Ka(b),A);if(A=this.X.ob(P),A=kn[A],!A)return g.call(this);A=this.ta?A.fb:A.pointerType;var Y=dn(P,this.X,A.X);return Y===null?g.call(this):this.ua?fn(A.X.ga,{Z:A,Y,fa:this,ca:b}):fn(A.X.ga,{Z:A,Y})},eu=p.UnboundTypeError=cn("UnboundTypeError");var Lg={I:function(b,g,P){b=je(b),g=Bt(g,"wrapper"),P=Et(P);var A=[].slice,Y=g.X,re=Y.ga,ce=Y.$.ga,se=Y.$.constructor;b=Ye(b,function(){Y.$.Ra.forEach((function(le){if(this[le]===ce[le])throw new jt(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:re}),this.__construct.apply(this,A.call(arguments))}),re.__construct=function(){this===re&&$e("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(A.call(arguments)));ln(le);var me=le.W;le.notifyOnDestruction(),me.pa=!0,Object.defineProperties(this,{W:{value:me}}),qt(this),le=me.Y,le=rr(Y,le),Ft.hasOwnProperty(le)?$e(`Tried to register registered instance: ${le}`):Ft[le]=this},re.__destruct=function(){this===re&&$e("Pass correct 'this' to __destruct"),ln(this);var le=this.W.Y;le=rr(Y,le),Ft.hasOwnProperty(le)?delete Ft[le]:$e(`Tried to unregister unregistered instance: ${le}`)},b.prototype=Object.create(re);for(var de in P)b.prototype[de]=P[de];return ut(b)},L:function(b){var g=jn[b];delete jn[b];var P=g.Ba,A=g.ka,Y=g.Na,re=Y.map(ce=>ce.sb).concat(Y.map(ce=>ce.Db));$t([b],re,ce=>{var se={};return Y.forEach((de,le)=>{var me=ce[le],we=de.qb,Ee=de.rb,De=ce[le+Y.length],ve=de.Cb,st=de.Eb;se[de.mb]={read:vt=>me.fromWireType(we(Ee,vt)),write:(vt,Ne)=>{var Le=[];ve(st,vt,De.toWireType(Le,Ne)),xn(Le)}}}),[{name:g.name,fromWireType:function(de){var le={},me;for(me in se)le[me]=se[me].read(de);return A(de),le},toWireType:function(de,le){for(var me in se)if(!(me in le))throw new TypeError(`Missing field: "${me}"`);var we=P();for(me in se)se[me].write(we,le[me]);return de!==null&&de.push(A,we),we},argPackAdvance:8,readValueFromPointer:on,ea:A}]})},z:function(){},G:function(b,g,P,A,Y){var re=Fn(P);g=je(g),F(b,{name:g,fromWireType:function(ce){return!!ce},toWireType:function(ce,se){return se?A:Y},argPackAdvance:8,readValueFromPointer:function(ce){if(P===1)var se=I;else if(P===2)se=U;else if(P===4)se=ue;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ce>>re])},ea:null})},e:function(b,g,P,A,Y,re,ce,se,de,le,me,we,Ee){me=je(me),re=Be(Y,re),se&&(se=Be(ce,se)),le&&(le=Be(de,le)),Ee=Be(we,Ee);var De=lt(me);_e(De,function(){wn(`Cannot construct ${me} due to unbound types`,[A])}),$t([b,g,P],A?[A]:[],function(ve){if(ve=ve[0],A)var st=ve.X,vt=st.ga;else vt=fe.prototype;ve=Ye(De,function(){if(Object.getPrototypeOf(this)!==Ne)throw new Pt("Use 'new' to construct "+me);if(Le.la===void 0)throw new Pt(me+" has no accessible constructor");var Ht=Le.la[arguments.length];if(Ht===void 0)throw new Pt(`Tried to invoke ctor of ${me} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Le.la).toString()}) parameters instead!`);return Ht.apply(this,arguments)});var Ne=Object.create(vt,{constructor:{value:ve}});ve.prototype=Ne;var Le=new be(me,ve,Ne,Ee,st,re,se,le);Le.$&&(Le.$.sa===void 0&&(Le.$.sa=[]),Le.$.sa.push(Le)),st=new He(me,Le,!0,!1),vt=new He(me+"*",Le,!1,!1);var gt=new He(me+" const*",Le,!1,!0);return kn[b]={pointerType:vt,fb:gt},It(De,ve),[st,vt,gt]})},k:function(b,g,P,A,Y,re,ce){var se=Fo(P,A);g=je(g),re=Be(Y,re),$t([],[b],function(de){function le(){wn(`Cannot call ${me} due to unbound types`,se)}de=de[0];var me=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var we=de.X.constructor;return we[g]===void 0?(le.ma=P-1,we[g]=le):(xe(we,g,me),we[g].aa[P-1]=le),$t([],se,function(Ee){if(Ee=Lo(me,[Ee[0],null].concat(Ee.slice(1)),null,re,ce),we[g].aa===void 0?(Ee.ma=P-1,we[g]=Ee):we[g].aa[P-1]=Ee,de.X.sa)for(const De of de.X.sa)De.constructor.hasOwnProperty(g)||(De.constructor[g]=Ee);return[]}),[]})},s:function(b,g,P,A,Y,re,ce,se){g=je(g),re=Be(Y,re),$t([],[b],function(de){de=de[0];var le=`${de.name}.${g}`,me={get(){wn(`Cannot access ${le} due to unbound types`,[P])},enumerable:!0,configurable:!0};return me.set=se?()=>{wn(`Cannot access ${le} due to unbound types`,[P])}:()=>{$e(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,me),$t([],[P],function(we){we=we[0];var Ee={get(){return we.fromWireType(re(A))},enumerable:!0};return se&&(se=Be(ce,se),Ee.set=De=>{var ve=[];se(A,we.toWireType(ve,De)),xn(ve)}),Object.defineProperty(de.X.constructor,g,Ee),[]}),[]})},o:function(b,g,P,A,Y,re){var ce=Fo(g,P);Y=Be(A,Y),$t([],[b],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]=()=>{wn(`Cannot construct ${se.name} due to unbound types`,ce)},$t([],ce,function(le){return le.splice(1,0,null),se.X.la[g-1]=Lo(de,le,null,Y,re),[]}),[]})},a:function(b,g,P,A,Y,re,ce,se){var de=Fo(P,A);g=je(g),re=Be(Y,re),$t([],[b],function(le){function me(){wn(`Cannot call ${we} due to unbound types`,de)}le=le[0];var we=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ee=le.X.ga,De=Ee[g];return De===void 0||De.aa===void 0&&De.className!==le.name&&De.ma===P-2?(me.ma=P-2,me.className=le.name,Ee[g]=me):(xe(Ee,g,we),Ee[g].aa[P-2]=me),$t([],de,function(ve){return ve=Lo(we,ve,le,re,ce),Ee[g].aa===void 0?(ve.ma=P-2,Ee[g]=ve):Ee[g].aa[P-2]=ve,[]}),[]})},d:function(b,g,P,A,Y,re,ce,se,de,le){g=je(g),Y=Be(A,Y),$t([],[b],function(me){me=me[0];var we=`${me.name}.${g}`,Ee={get(){wn(`Cannot access ${we} due to unbound types`,[P,ce])},enumerable:!0,configurable:!0};return Ee.set=de?()=>{wn(`Cannot access ${we} due to unbound types`,[P,ce])}:()=>{$e(we+" is a read-only property")},Object.defineProperty(me.X.ga,g,Ee),$t([],de?[P,ce]:[P],function(De){var ve=De[0],st={get(){var Ne=tu(this,me,we+" getter");return ve.fromWireType(Y(re,Ne))},enumerable:!0};if(de){de=Be(se,de);var vt=De[1];st.set=function(Ne){var Le=tu(this,me,we+" setter"),gt=[];de(le,Le,vt.toWireType(gt,Ne)),xn(gt)}}return Object.defineProperty(me.X.ga,g,st),[]}),[]})},F:function(b,g){g=je(g),F(b,{name:g,fromWireType:function(P){var A=Et(P);return _s(P),A},toWireType:function(P,A){return ut(A)},argPackAdvance:8,readValueFromPointer:on,ea:null})},l:function(b,g,P,A){function Y(){}P=Fn(P),g=je(g),Y.values={},F(b,{name:g,constructor:Y,fromWireType:function(re){return this.constructor.values[re]},toWireType:function(re,ce){return ce.value},argPackAdvance:8,readValueFromPointer:Tg(g,P,A),ea:null}),_e(g,Y)},c:function(b,g,P){var A=Bt(b,"enum");g=je(g),b=A.constructor,A=Object.create(A.constructor.prototype,{value:{value:P},constructor:{value:Ye(`${A.name}_${g}`,function(){})}}),b.values[P]=A,b[g]=A},u:function(b,g,P){P=Fn(P),g=je(g),F(b,{name:g,fromWireType:function(A){return A},toWireType:function(A,Y){return Y},argPackAdvance:8,readValueFromPointer:$g(g,P),ea:null})},q:function(b,g,P,A,Y,re){var ce=Fo(g,P);b=je(b),Y=Be(A,Y),_e(b,function(){wn(`Cannot call ${b} due to unbound types`,ce)},g-1),$t([],ce,function(se){return It(b,Lo(b,[se[0],null].concat(se.slice(1)),null,Y,re),g-1),[]})},j:function(b,g,P,A,Y){g=je(g),Y===-1&&(Y=4294967295),Y=Fn(P);var re=se=>se;if(A===0){var ce=32-8*P;re=se=>se<<ce>>>ce}P=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},F(b,{name:g,fromWireType:re,toWireType:P,argPackAdvance:8,readValueFromPointer:Rg(g,Y,A!==0),ea:null})},g:function(b,g,P){function A(re){re>>=2;var ce=W;return new Y(ce.buffer,ce[re+1],ce[re])}var Y=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];P=je(P),F(b,{name:P,fromWireType:A,argPackAdvance:8,readValueFromPointer:A},{tb:!0})},v:function(b,g){g=je(g);var P=g==="std::string";F(b,{name:g,fromWireType:function(A){var Y=W[A>>2],re=A+4;if(P)for(var ce=re,se=0;se<=Y;++se){var de=re+se;if(se==Y||k[de]==0){if(ce=ce?ru(k,ce,de-ce):"",le===void 0)var le=ce;else le+=String.fromCharCode(0),le+=ce;ce=de+1}}else{for(le=Array(Y),se=0;se<Y;++se)le[se]=String.fromCharCode(k[re+se]);le=le.join("")}return En(A),le},toWireType:function(A,Y){Y instanceof ArrayBuffer&&(Y=new Uint8Array(Y));var re,ce=typeof Y=="string";ce||Y instanceof Uint8Array||Y instanceof Uint8ClampedArray||Y instanceof Int8Array||$e("Cannot pass non-string to std::string");var se;if(P&&ce)for(re=se=0;re<Y.length;++re){var de=Y.charCodeAt(re);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++re):se+=3}else se=Y.length;if(re=se,se=Rs(4+re+1),de=se+4,W[se>>2]=re,P&&ce){if(ce=de,de=re+1,re=k,0<de){de=ce+de-1;for(var le=0;le<Y.length;++le){var me=Y.charCodeAt(le);if(55296<=me&&57343>=me){var we=Y.charCodeAt(++le);me=65536+((me&1023)<<10)|we&1023}if(127>=me){if(ce>=de)break;re[ce++]=me}else{if(2047>=me){if(ce+1>=de)break;re[ce++]=192|me>>6}else{if(65535>=me){if(ce+2>=de)break;re[ce++]=224|me>>12}else{if(ce+3>=de)break;re[ce++]=240|me>>18,re[ce++]=128|me>>12&63}re[ce++]=128|me>>6&63}re[ce++]=128|me&63}}re[ce]=0}}else if(ce)for(ce=0;ce<re;++ce)le=Y.charCodeAt(ce),255<le&&(En(de),$e("String has UTF-16 code units that do not fit in 8 bits")),k[de+ce]=le;else for(ce=0;ce<re;++ce)k[de+ce]=Y[ce];return A!==null&&A.push(En,se),se},argPackAdvance:8,readValueFromPointer:on,ea:function(A){En(A)}})},t:function(b,g,P){if(P=je(P),g===2)var A=Pg,Y=Ig,re=Ag,ce=()=>q,se=1;else g===4&&(A=Og,Y=Dg,re=Mg,ce=()=>W,se=2);F(b,{name:P,fromWireType:function(de){for(var le=W[de>>2],me=ce(),we,Ee=de+4,De=0;De<=le;++De){var ve=de+4+De*g;(De==le||me[ve>>se]==0)&&(Ee=A(Ee,ve-Ee),we===void 0?we=Ee:(we+=String.fromCharCode(0),we+=Ee),Ee=ve+g)}return En(de),we},toWireType:function(de,le){typeof le!="string"&&$e(`Cannot pass non-string to C++ string type ${P}`);var me=re(le),we=Rs(4+me+g);return W[we>>2]=me>>se,Y(le,we+4,me+g),de!==null&&de.push(En,we),we},argPackAdvance:8,readValueFromPointer:on,ea:function(de){En(de)}})},N:function(b,g,P,A,Y,re){jn[b]={name:je(g),Ba:Be(P,A),ka:Be(Y,re),Na:[]}},M:function(b,g,P,A,Y,re,ce,se,de,le){jn[b].Na.push({mb:je(g),sb:P,qb:Be(A,Y),rb:re,Db:ce,Cb:Be(se,de),Eb:le})},H:function(b,g){g=je(g),F(b,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(b,g,P){b=Et(b),g=Bt(g,"emval::as");var A=[],Y=ut(A);return W[P>>2]=Y,g.toWireType(A,b)},w:function(b,g,P,A,Y){b=Ho[b],g=Et(g),P=Bo(P);var re=[];return W[A>>2]=ut(re),b(g,P,re,Y)},i:function(b,g,P,A){b=Ho[b],g=Et(g),P=Bo(P),b(g,P,null,A)},f:_s,h:function(b,g){var P=Vg(b,g),A=P[0];g=A.name+"_$"+P.slice(1).map(function(ce){return ce.name}).join("_")+"$";var Y=iu[g];if(Y!==void 0)return Y;var re=Array(b-1);return Y=Ng((ce,se,de,le)=>{for(var me=0,we=0;we<b-1;++we)re[we]=P[we+1].readValueFromPointer(le+me),me+=P[we+1].argPackAdvance;for(ce=ce[se].apply(ce,re),we=0;we<b-1;++we)P[we+1].hb&&P[we+1].hb(re[we]);if(!A.vb)return A.toWireType(de,ce)}),iu[g]=Y},p:function(b){return b=Bo(b),ut(p[b])},K:function(b,g){return b=Et(b),g=Et(g),ut(b[g])},m:function(b){4<b&&(Je.get(b).Ta+=1)},J:function(b){return ut(Bo(b))},n:function(b){var g=Et(b);xn(g),_s(b)},x:function(b,g){return b=Bt(b,"_emval_take_value"),b=b.readValueFromPointer(g),ut(b)},b:()=>{te("")},A:b=>{var g=k.length;if(b>>>=0,2147483648<b)return!1;for(var P=1;4>=P;P*=2){var A=g*(1+.2/P);A=Math.min(A,b+100663296);var Y=Math;A=Math.max(b,A);e:{Y=Y.min.call(Y,2147483648,A+(65536-A%65536)%65536)-v.buffer.byteLength+65535>>>16;try{v.grow(Y),G();var re=1;break e}catch{}re=void 0}if(re)return!0}return!1},B:(b,g)=>{var P=0;return su().forEach(function(A,Y){var re=g+P;for(Y=W[b+4*Y>>2]=re,re=0;re<A.length;++re)I[Y++>>0]=A.charCodeAt(re);I[Y>>0]=0,P+=A.length+1}),0},C:(b,g)=>{var P=su();W[b>>2]=P.length;var A=0;return P.forEach(function(Y){A+=Y.length+1}),W[g>>2]=A,0},D:()=>52,y:function(){return 70},E:(b,g,P,A)=>{for(var Y=0,re=0;re<P;re++){var ce=W[g>>2],se=W[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=k[ce+de],me=jg[b];le===0||le===10?((b===1?z:j)(ru(me,0)),me.length=0):me.push(le)}Y+=se}return W[A>>2]=Y,0}};(function(){function b(P){if(P=P.exports,p.asm=P,v=p.asm.O,G(),X=p.asm.U,ae.unshift(p.asm.P),J--,p.monitorRunDependencies&&p.monitorRunDependencies(J),J==0&&ee){var A=ee;ee=null,A()}return P}var g={a:Lg};if(J++,p.monitorRunDependencies&&p.monitorRunDependencies(J),p.instantiateWasm)try{return p.instantiateWasm(g,b)}catch(P){j("Module.instantiateWasm callback failed with error: "+P),E(P)}return We(g,function(P){b(P.instance)}).catch(E),{}})();function En(){return(En=p.asm.Q).apply(null,arguments)}function Rs(){return(Rs=p.asm.R).apply(null,arguments)}function cu(){return(cu=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Uo;ee=function b(){Uo||lu(),Uo||(ee=b)};function lu(){function b(){if(!Uo&&(Uo=!0,p.calledRun=!0,!C)){if(ke(ae),x(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();B.unshift(g)}ke(B)}}if(!(0<J)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)H();ke(ne),0<J||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),b()},1)):b())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return lu(),m.ready}})();const d=l},s=>{s.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}}`)},(s,a,c)=>{c.r(a),c.d(a,{registerTouchInteractions:()=>l.registerTouchInteractions});var l=c(4)},(s,a,c)=>{c.r(a),c.d(a,{registerTouchInteractions:()=>f});var l=void 0,d=function(m){var p,x;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((x=m.changedTouches)===null||x===void 0)&&x.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var p=m.canvas,x=m.artboard,E=m.stateMachines,S=E===void 0?[]:E,T=m.renderer,h=m.rive,w=m.fit,_=m.alignment;if(!p||!S.length||!T||!h||!x||typeof window>"u")return null;var $=function(O){var N=O.currentTarget.getBoundingClientRect(),V=d(O),z=V.clientX,j=V.clientY;if(!(!z&&!j)){var R=z-N.left,v=j-N.top,C=h.computeAlignment(w,_,{minX:0,minY:0,maxX:N.width,maxY:N.height},x.bounds),I=new h.Mat2D;C.invert(I);var k=new h.Vec2D(R,v),U=h.mapXY(I,k),q=U.x(),ue=U.y();switch(U.delete(),I.delete(),k.delete(),C.delete(),O.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var W=0,L=S;W<L.length;W++){var oe=L[W];oe.pointerMove(q,ue)}break}case"touchstart":case"mousedown":{for(var G=0,X=S;G<X.length;G++){var oe=X[G];oe.pointerDown(q,ue)}break}case"touchend":case"mouseup":{for(var ne=0,ae=S;ne<ae.length;ne++){var oe=ae[ne];oe.pointerUp(q,ue)}break}}}},M=$.bind(l);return p.addEventListener("mouseover",M),p.addEventListener("mouseout",M),p.addEventListener("mousemove",M),p.addEventListener("mousedown",M),p.addEventListener("mouseup",M),p.addEventListener("touchmove",M),p.addEventListener("touchstart",M),p.addEventListener("touchend",M),function(){p.removeEventListener("mouseover",M),p.removeEventListener("mouseout",M),p.removeEventListener("mousemove",M),p.removeEventListener("mousedown",M),p.removeEventListener("mouseup",M),p.removeEventListener("touchmove",M),p.removeEventListener("touchstart",M),p.removeEventListener("touchend",M)}}}],r={};function i(s){var a=r[s];if(a!==void 0)return a.exports;var c=r[s]={exports:{}};return n[s](c,c.exports,i),c.exports}i.d=(s,a)=>{for(var c in a)i.o(a,c)&&!i.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:a[c]})},i.o=(s,a)=>Object.prototype.hasOwnProperty.call(s,a),i.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o={};return(()=>{i.r(o),i.d(o,{Alignment:()=>m,EventType:()=>_,Fit:()=>f,Layout:()=>p,LoopType:()=>$,Rive:()=>N,RuntimeLoader:()=>x,StateMachineInput:()=>T,StateMachineInputType:()=>S,Testing:()=>j});var s=i(1),a=i(2),c=i(3),l=function(R,v,C,I){function k(U){return U instanceof C?U:new C(function(q){q(U)})}return new(C||(C=Promise))(function(U,q){function ue(oe){try{L(I.next(oe))}catch(G){q(G)}}function W(oe){try{L(I.throw(oe))}catch(G){q(G)}}function L(oe){oe.done?U(oe.value):k(oe.value).then(ue,W)}L((I=I.apply(R,v||[])).next())})},d=function(R,v){var C={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,k,U,q;return q={next:ue(0),throw:ue(1),return:ue(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ue(L){return function(oe){return W([L,oe])}}function W(L){if(I)throw new TypeError("Generator is already executing.");for(;q&&(q=0,L[0]&&(C=0)),C;)try{if(I=1,k&&(U=L[0]&2?k.return:L[0]?k.throw||((U=k.return)&&U.call(k),0):k.next)&&!(U=U.call(k,L[1])).done)return U;switch(k=0,U&&(L=[L[0]&2,U.value]),L[0]){case 0:case 1:U=L;break;case 4:return C.label++,{value:L[1],done:!1};case 5:C.label++,k=L[1],L=[0];continue;case 7:L=C.ops.pop(),C.trys.pop();continue;default:if(U=C.trys,!(U=U.length>0&&U[U.length-1])&&(L[0]===6||L[0]===2)){C=0;continue}if(L[0]===3&&(!U||L[1]>U[0]&&L[1]<U[3])){C.label=L[1];break}if(L[0]===6&&C.label<U[1]){C.label=U[1],U=L;break}if(U&&C.label<U[2]){C.label=U[2],C.ops.push(L);break}U[2]&&C.ops.pop(),C.trys.pop();continue}L=v.call(R,C)}catch(oe){L=[6,oe],k=0}finally{I=U=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(R){R.Cover="cover",R.Contain="contain",R.Fill="fill",R.FitWidth="fitWidth",R.FitHeight="fitHeight",R.None="none",R.ScaleDown="scaleDown"})(f||(f={}));var m;(function(R){R.Center="center",R.TopLeft="topLeft",R.TopCenter="topCenter",R.TopRight="topRight",R.CenterLeft="centerLeft",R.CenterRight="centerRight",R.BottomLeft="bottomLeft",R.BottomCenter="bottomCenter",R.BottomRight="bottomRight"})(m||(m={}));var p=function(){function R(v){var C,I,k,U,q,ue;this.fit=(C=v==null?void 0:v.fit)!==null&&C!==void 0?C:f.Contain,this.alignment=(I=v==null?void 0:v.alignment)!==null&&I!==void 0?I:m.Center,this.minX=(k=v==null?void 0:v.minX)!==null&&k!==void 0?k:0,this.minY=(U=v==null?void 0:v.minY)!==null&&U!==void 0?U:0,this.maxX=(q=v==null?void 0:v.maxX)!==null&&q!==void 0?q:0,this.maxY=(ue=v==null?void 0:v.maxY)!==null&&ue!==void 0?ue:0}return R.new=function(v){var C=v.fit,I=v.alignment,k=v.minX,U=v.minY,q=v.maxX,ue=v.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new R({fit:C,alignment:I,minX:k,minY:U,maxX:q,maxY:ue})},R.prototype.copyWith=function(v){var C=v.fit,I=v.alignment,k=v.minX,U=v.minY,q=v.maxX,ue=v.maxY;return new R({fit:C??this.fit,alignment:I??this.alignment,minX:k??this.minX,minY:U??this.minY,maxX:q??this.maxX,maxY:ue??this.maxY})},R.prototype.runtimeFit=function(v){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var C;return this.fit===f.Cover?C=v.Fit.cover:this.fit===f.Contain?C=v.Fit.contain:this.fit===f.Fill?C=v.Fit.fill:this.fit===f.FitWidth?C=v.Fit.fitWidth:this.fit===f.FitHeight?C=v.Fit.fitHeight:this.fit===f.ScaleDown?C=v.Fit.scaleDown:C=v.Fit.none,this.cachedRuntimeFit=C,C},R.prototype.runtimeAlignment=function(v){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var C;return this.alignment===m.TopLeft?C=v.Alignment.topLeft:this.alignment===m.TopCenter?C=v.Alignment.topCenter:this.alignment===m.TopRight?C=v.Alignment.topRight:this.alignment===m.CenterLeft?C=v.Alignment.centerLeft:this.alignment===m.CenterRight?C=v.Alignment.centerRight:this.alignment===m.BottomLeft?C=v.Alignment.bottomLeft:this.alignment===m.BottomCenter?C=v.Alignment.bottomCenter:this.alignment===m.BottomRight?C=v.Alignment.bottomRight:C=v.Alignment.center,this.cachedRuntimeAlignment=C,C},R}(),x=function(){function R(){}return R.loadRuntime=function(){s.default({locateFile:function(){return R.wasmURL}}).then(function(v){var C;for(R.runtime=v;R.callBackQueue.length>0;)(C=R.callBackQueue.shift())===null||C===void 0||C(R.runtime)})},R.getInstance=function(v){R.isLoading||(R.isLoading=!0,R.loadRuntime()),R.runtime?v(R.runtime):R.callBackQueue.push(v)},R.awaitInstance=function(){return new Promise(function(v){return R.getInstance(function(C){return v(C)})})},R.setWasmUrl=function(v){R.wasmURL=v},R.isLoading=!1,R.callBackQueue=[],R.wasmURL="https://unpkg.com/".concat(a.name,"@").concat(a.version,"/rive.wasm"),R}(),E=function(){function R(v,C,I,k){this.animation=v,this.artboard=C,this.playing=k,this.loopCount=0,this.scrubTo=null,this.instance=new I.LinearAnimationInstance(v,C)}return Object.defineProperty(R.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"time",{get:function(){return this.instance.time},set:function(v){this.instance.time=v},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),R.prototype.advance=function(v){this.scrubTo===null?this.instance.advance(v):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},R.prototype.apply=function(v){this.instance.apply(v)},Object.defineProperty(R.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),R.prototype.cleanup=function(){this.instance.delete()},R}(),S;(function(R){R[R.Number=56]="Number",R[R.Trigger=58]="Trigger",R[R.Boolean=59]="Boolean"})(S||(S={}));var T=function(){function R(v,C){this.type=v,this.runtimeInput=C}return Object.defineProperty(R.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(v){this.runtimeInput.value=v},enumerable:!1,configurable:!0}),R.prototype.fire=function(){this.type===S.Trigger&&this.runtimeInput.fire()},R}(),h=function(){function R(v,C,I,k){this.stateMachine=v,this.playing=I,this.artboard=k,this.inputs=[],this.instance=new C.StateMachineInstance(v,k),this.initInputs(C)}return Object.defineProperty(R.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"statesChanged",{get:function(){for(var v=[],C=0;C<this.instance.stateChangedCount();C++)v.push(this.instance.stateChangedNameByIndex(C));return v},enumerable:!1,configurable:!0}),R.prototype.advance=function(v){this.instance.advance(v)},R.prototype.initInputs=function(v){for(var C=0;C<this.instance.inputCount();C++){var I=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(I,v))}},R.prototype.mapRuntimeInput=function(v,C){if(v.type===C.SMIInput.bool)return new T(S.Boolean,v.asBool());if(v.type===C.SMIInput.number)return new T(S.Number,v.asNumber());if(v.type===C.SMIInput.trigger)return new T(S.Trigger,v.asTrigger())},R.prototype.cleanup=function(){this.instance.delete()},R}(),w=function(){function R(v,C,I,k,U){k===void 0&&(k=[]),U===void 0&&(U=[]),this.runtime=v,this.artboard=C,this.eventManager=I,this.animations=k,this.stateMachines=U}return R.prototype.add=function(v,C,I){if(I===void 0&&(I=!0),v=z(v),v.length===0)this.animations.forEach(function(ne){return ne.playing=C}),this.stateMachines.forEach(function(ne){return ne.playing=C});else for(var k=this.animations.map(function(ne){return ne.name}),U=this.stateMachines.map(function(ne){return ne.name}),q=0;q<v.length;q++){var ue=k.indexOf(v[q]),W=U.indexOf(v[q]);if(ue>=0||W>=0)ue>=0?this.animations[ue].playing=C:this.stateMachines[W].playing=C;else{var L=this.artboard.animationByName(v[q]);if(L){var oe=new E(L,this.artboard,this.runtime,C);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(v[q]);if(G){var X=new h(G,this.runtime,C,this.artboard);this.stateMachines.push(X)}}}}return I&&(C?this.eventManager.fire({type:_.Play,data:this.playing}):this.eventManager.fire({type:_.Pause,data:this.paused})),C?this.playing:this.paused},R.prototype.play=function(v){return this.add(v,!0)},R.prototype.pause=function(v){return this.add(v,!1)},R.prototype.scrub=function(v,C){var I=this.animations.filter(function(k){return v.includes(k.name)});return I.forEach(function(k){return k.scrubTo=C}),I.map(function(k){return k.name})},Object.defineProperty(R.prototype,"playing",{get:function(){return this.animations.filter(function(v){return v.playing}).map(function(v){return v.name}).concat(this.stateMachines.filter(function(v){return v.playing}).map(function(v){return v.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"paused",{get:function(){return this.animations.filter(function(v){return!v.playing}).map(function(v){return v.name}).concat(this.stateMachines.filter(function(v){return!v.playing}).map(function(v){return v.name}))},enumerable:!1,configurable:!0}),R.prototype.stop=function(v){var C=this;v=z(v);var I=[];if(v.length===0)I=this.animations.map(function(q){return q.name}).concat(this.stateMachines.map(function(q){return q.name})),this.animations.forEach(function(q){return q.cleanup()}),this.stateMachines.forEach(function(q){return q.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var k=this.animations.filter(function(q){return v.includes(q.name)});k.forEach(function(q){q.cleanup(),C.animations.splice(C.animations.indexOf(q),1)});var U=this.stateMachines.filter(function(q){return v.includes(q.name)});U.forEach(function(q){q.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(q),1)}),I=k.map(function(q){return q.name}).concat(U.map(function(q){return q.name}))}return this.eventManager.fire({type:_.Stop,data:I}),I},Object.defineProperty(R.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(v,C){return v||C.playing},!1)||this.stateMachines.reduce(function(v,C){return v||C.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),R.prototype.atLeastOne=function(v,C){C===void 0&&(C=!0);var I;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([I=this.artboard.animationByIndex(0).name],v,C):this.artboard.stateMachineCount()>0&&this.add([I=this.artboard.stateMachineByIndex(0).name],v,C)),I},R.prototype.handleLooping=function(){for(var v=0,C=this.animations.filter(function(k){return k.playing});v<C.length;v++){var I=C[v];I.loopValue===0&&I.loopCount?(I.loopCount=0,this.stop(I.name)):I.loopValue===1&&I.loopCount?(this.eventManager.fire({type:_.Loop,data:{animation:I.name,type:$.Loop}}),I.loopCount=0):I.loopValue===2&&I.loopCount>1&&(this.eventManager.fire({type:_.Loop,data:{animation:I.name,type:$.PingPong}}),I.loopCount=0)}},R.prototype.handleStateChanges=function(){for(var v=[],C=0,I=this.stateMachines.filter(function(U){return U.playing});C<I.length;C++){var k=I[C];v.push.apply(v,k.statesChanged)}v.length>0&&this.eventManager.fire({type:_.StateChange,data:v})},R.prototype.handleAdvancing=function(v){this.eventManager.fire({type:_.Advance,data:v})},R}(),_;(function(R){R.Load="load",R.LoadError="loaderror",R.Play="play",R.Pause="pause",R.Stop="stop",R.Loop="loop",R.Draw="draw",R.Advance="advance",R.StateChange="statechange"})(_||(_={}));var $;(function(R){R.OneShot="oneshot",R.Loop="loop",R.PingPong="pingpong"})($||($={}));var M=function(){function R(v){v===void 0&&(v=[]),this.listeners=v}return R.prototype.getListeners=function(v){return this.listeners.filter(function(C){return C.type===v})},R.prototype.add=function(v){this.listeners.includes(v)||this.listeners.push(v)},R.prototype.remove=function(v){for(var C=0;C<this.listeners.length;C++){var I=this.listeners[C];if(I.type===v.type&&I.callback===v.callback){this.listeners.splice(C,1);break}}},R.prototype.removeAll=function(v){var C=this;v?this.listeners.filter(function(I){return I.type===v}).forEach(function(I){return C.remove(I)}):this.listeners.splice(0,this.listeners.length)},R.prototype.fire=function(v){var C=this.getListeners(v.type);C.forEach(function(I){return I.callback(v)})},R}(),O=function(){function R(v){this.eventManager=v,this.queue=[]}return R.prototype.add=function(v){this.queue.push(v)},R.prototype.process=function(){for(;this.queue.length>0;){var v=this.queue.shift();v!=null&&v.action&&v.action(),v!=null&&v.event&&this.eventManager.fire(v.event)}},R}(),N=function(){function R(v){var C;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=v.canvas,this.src=v.src,this.buffer=v.buffer,this.layout=(C=v.layout)!==null&&C!==void 0?C:new p,this.shouldDisableRiveListeners=!!v.shouldDisableRiveListeners,this.eventManager=new M,v.onLoad&&this.on(_.Load,v.onLoad),v.onLoadError&&this.on(_.LoadError,v.onLoadError),v.onPlay&&this.on(_.Play,v.onPlay),v.onPause&&this.on(_.Pause,v.onPause),v.onStop&&this.on(_.Stop,v.onStop),v.onLoop&&this.on(_.Loop,v.onLoop),v.onStateChange&&this.on(_.StateChange,v.onStateChange),v.onAdvance&&this.on(_.Advance,v.onAdvance),v.onload&&!v.onLoad&&this.on(_.Load,v.onload),v.onloaderror&&!v.onLoadError&&this.on(_.LoadError,v.onloaderror),v.onplay&&!v.onPlay&&this.on(_.Play,v.onplay),v.onpause&&!v.onPause&&this.on(_.Pause,v.onpause),v.onstop&&!v.onStop&&this.on(_.Stop,v.onstop),v.onloop&&!v.onLoop&&this.on(_.Loop,v.onloop),v.onstatechange&&!v.onStateChange&&this.on(_.StateChange,v.onstatechange),this.taskQueue=new O(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:v.autoplay,animations:v.animations,stateMachines:v.stateMachines,artboard:v.artboard,useOffscreenRenderer:v.useOffscreenRenderer})}return R.new=function(v){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new R(v)},R.prototype.init=function(v){var C=this,I=v.src,k=v.buffer,U=v.animations,q=v.stateMachines,ue=v.artboard,W=v.autoplay,L=W===void 0?!1:W,oe=v.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=I,this.buffer=k,!this.src&&!this.buffer)throw new Error(R.missingErrorMessage);var X=z(U),ne=z(q);this.loaded=!1,this.readyForPlaying=!1,x.awaitInstance().then(function(ae){C.runtime=ae,C.renderer=C.runtime.makeRenderer(C.canvas,G),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(ue,X,ne,L).then(function(){return C.setupRiveListeners()}).catch(function(B){console.error(B)})}).catch(function(ae){console.error(ae)})},R.prototype.setupRiveListeners=function(){var v=this;if(!this.shouldDisableRiveListeners){var C=(this.animator.stateMachines||[]).filter(function(I){return I.playing&&v.runtime.hasListeners(I.instance)}).map(function(I){return I.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:C,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},R.prototype.initData=function(v,C,I,k){var U;return l(this,void 0,void 0,function(){var q,ue,W;return d(this,function(L){switch(L.label){case 0:return this.src?(q=this,[4,V(this.src)]):[3,2];case 1:q.buffer=L.sent(),L.label=2;case 2:return ue=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ue.file=L.sent(),this.file?(this.initArtboard(v,C,I,k),this.loaded=!0,this.eventManager.fire({type:_.Load,data:(U=this.src)!==null&&U!==void 0?U:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(W="Problem loading file; may be corrupt!",console.warn(W),this.eventManager.fire({type:_.LoadError,data:W}),[2,Promise.reject(W)])}})})},R.prototype.initArtboard=function(v,C,I,k){var U=v?this.file.artboardByName(v):this.file.defaultArtboard();if(!U){var q="Invalid artboard name or no default artboard";console.warn(q),this.eventManager.fire({type:_.LoadError,data:q});return}if(this.artboard=U,this.artboard.animationCount()<1){var q="Artboard has no animations";throw this.eventManager.fire({type:_.LoadError,data:q}),q}this.animator=new w(this.runtime,this.artboard,this.eventManager);var ue;C.length>0||I.length>0?(ue=C.concat(I),this.animator.add(ue,k,!1)):ue=[this.animator.atLeastOne(k,!1)],this.taskQueue.add({event:{type:k?_.Play:_.Pause,data:ue}})},R.prototype.drawFrame=function(){this.startRendering()},R.prototype.draw=function(v,C){var I=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=v),this.renderSecondTimer+=v-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var k=(v-this.lastRenderTime)/1e3;this.lastRenderTime=v;for(var U=this.animator.animations.filter(function(B){return B.playing||B.needsScrub}).sort(function(B){return B.needsScrub?-1:1}),q=0,ue=U;q<ue.length;q++){var W=ue[q];W.advance(k),W.instance.didLoop&&(W.loopCount+=1),W.apply(1)}for(var L=this.animator.stateMachines.filter(function(B){return B.playing}),oe=0,G=L;oe<G.length;oe++){var X=G[oe];X.advance(k)}this.artboard.advance(k);var ne=this.renderer;ne.clear(),ne.save(),this.alignRenderer(),this.artboard.draw(ne),ne.restore(),ne.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(k),this.frameCount++;var ae=performance.now();for(this.frameTimes.push(ae),this.durations.push(ae-I);this.frameTimes[0]<=ae-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},R.prototype.alignRenderer=function(){var v=this,C=v.renderer,I=v.runtime,k=v._layout,U=v.artboard;C.align(k.runtimeFit(I),k.runtimeAlignment(I),{minX:k.minX,minY:k.minY,maxX:k.maxX,maxY:k.maxY},U.bounds)},Object.defineProperty(R.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(v,C){return v+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),R.prototype.cleanup=function(){var v,C;this.stopRendering(),this.cleanupInstances(),(v=this.renderer)===null||v===void 0||v.delete(),this.renderer=null,(C=this.file)===null||C===void 0||C.delete(),this.file=null},R.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},R.prototype.play=function(v,C){var I=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return I.play(v,C)}});return}this.animator.play(v),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},R.prototype.pause=function(v){var C=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(v)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(v)},R.prototype.scrub=function(v,C){var I=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return I.scrub(v,C)}});return}this.animator.scrub(v,C||0),this.drawFrame()},R.prototype.stop=function(v){var C=this;if(v=z(v),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(v)}});return}this.animator.stop(v),this.eventCleanup&&this.eventCleanup()},R.prototype.reset=function(v){var C,I=v==null?void 0:v.artboard,k=z(v==null?void 0:v.animations),U=z(v==null?void 0:v.stateMachines),q=(C=v==null?void 0:v.autoplay)!==null&&C!==void 0?C:!1;this.cleanupInstances(),this.initArtboard(I,k,U,q),this.taskQueue.process()},R.prototype.load=function(v){this.stop(),this.init(v)},Object.defineProperty(R.prototype,"layout",{get:function(){return this._layout},set:function(v){this._layout=v,(!v.maxX||!v.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),R.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},R.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var v=this.canvas.getBoundingClientRect(),C=v.width,I=v.height,k=window.devicePixelRatio||1;this.canvas.width=k*C,this.canvas.height=k*I,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(R.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var v=[],C=0;C<this.artboard.animationCount();C++)v.push(this.artboard.animationByIndex(C).name);return v},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var v=[],C=0;C<this.artboard.stateMachineCount();C++)v.push(this.artboard.stateMachineByIndex(C).name);return v},enumerable:!1,configurable:!0}),R.prototype.stateMachineInputs=function(v){if(this.loaded){var C=this.animator.stateMachines.find(function(I){return I.name===v});return C==null?void 0:C.inputs}},Object.defineProperty(R.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(v){return v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(v){return v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(v){return!v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(v){return!v.playing}).map(function(v){return v.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),R.prototype.on=function(v,C){this.eventManager.add({type:v,callback:C})},R.prototype.off=function(v,C){this.eventManager.remove({type:v,callback:C})},R.prototype.unsubscribe=function(v,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(v,C)},R.prototype.removeAllRiveEventListeners=function(v){this.eventManager.removeAll(v)},R.prototype.unsubscribeAll=function(v){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(v)},R.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},R.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)))},R.prototype.enableFPSCounter=function(v){this.runtime.enableFPSCounter(v)},R.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(R.prototype,"contents",{get:function(){if(this.loaded){for(var v={artboards:[]},C=0;C<this.file.artboardCount();C++){for(var I=this.file.artboardByIndex(C),k={name:I.name,animations:[],stateMachines:[]},U=0;U<I.animationCount();U++){var q=I.animationByIndex(U);k.animations.push(q.name)}for(var ue=0;ue<I.stateMachineCount();ue++){for(var W=I.stateMachineByIndex(ue),L=W.name,oe=new this.runtime.StateMachineInstance(W,I),G=[],X=0;X<oe.inputCount();X++){var ne=oe.input(X);G.push({name:ne.name,type:ne.type})}k.stateMachines.push({name:L,inputs:G})}v.artboards.push(k)}return v}},enumerable:!1,configurable:!0}),R.missingErrorMessage="Rive source file or data buffer required",R}(),V=function(R){return l(void 0,void 0,void 0,function(){var v,C,I;return d(this,function(k){switch(k.label){case 0:return v=new Request(R),[4,fetch(v)];case 1:return C=k.sent(),[4,C.arrayBuffer()];case 2:return I=k.sent(),[2,I]}})})},z=function(R){return typeof R=="string"?[R]:R instanceof Array?R:[]},j={EventManager:M,TaskQueueManager:O}})(),o})())})(ov);var u$=ov.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=u,n=u$;function r(h){return h&&typeof h=="object"&&"default"in h?h:{default:h}}var i=r(t),o=function(){return o=Object.assign||function(h){for(var w,_=1,$=arguments.length;_<$;_++)for(var M in w=arguments[_])Object.prototype.hasOwnProperty.call(w,M)&&(h[M]=w[M]);return h},o.apply(this,arguments)};function s(h,w){var _={};for(var $ in h)Object.prototype.hasOwnProperty.call(h,$)&&w.indexOf($)<0&&(_[$]=h[$]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var M=0;for($=Object.getOwnPropertySymbols(h);M<$.length;M++)w.indexOf($[M])<0&&Object.prototype.propertyIsEnumerable.call(h,$[M])&&(_[$[M]]=h[$[M]])}return _}function a(){var h=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,h),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function h(){}return h.prototype.observe=function(){},h.prototype.unobserve=function(){},h.prototype.disconnect=function(){},h}(),l=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(h,w){w===void 0&&(w=!0);var _=t.useState({width:0,height:0}),$=_[0],M=_[1];t.useEffect(function(){if(typeof window<"u"&&w){var j=function(){M({width:window.innerWidth,height:window.innerHeight})};return f&&(j(),window.addEventListener("resize",j)),function(){return window.removeEventListener("resize",j)}}},[]);var O,N,V,z=t.useRef(new l((O=function(j){d&&M({width:j[j.length-1].contentRect.width,height:j[j.length-1].contentRect.height})},N=0,V=0,function(){for(var j=this,R=[],v=0;v<arguments.length;v++)R[v]=arguments[v];clearTimeout(V),V=window.setTimeout(function(){return O.apply(j,R)},N)})));return t.useEffect(function(){var j=z.current;if(w){var R=h.current;return h.current&&d&&j.observe(h.current),function(){j.disconnect(),R&&d&&j.unobserve(R)}}j.disconnect()},[h,z]),$}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function x(h){return Object.assign({},p,h)}function E(h){var w=h.riveLoaded,_=w!==void 0&&w,$=h.canvasRef,M=h.containerRef,O=h.options,N=O===void 0?{}:O,V=h.onCanvasHasResized,z=h.artboardBounds,j=x(N),R=t.useState({height:0,width:0}),v=R[0],C=v.height,I=v.width,k=R[1],U=t.useState({height:0,width:0}),q=U[0],ue=q.height,W=q.width,L=U[1],oe=t.useState(!0),G=oe[0],X=oe[1],ne=j.fitCanvasToArtboardHeight,ae=j.shouldResizeCanvasToContainer,B=j.useDevicePixelRatio,H=m(M,ae),J=function(){var Ce=a(),Re=t.useState(Ce),Pe=Re[0],Te=Re[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var lt=a();Te(lt)},ke=window.matchMedia("screen and (resolution: ".concat(Pe,"dppx)"));return ke.hasOwnProperty("addEventListener")?ke.addEventListener("change",We):ke.addListener(We),function(){ke.hasOwnProperty("removeEventListener")?ke.removeEventListener("change",We):ke.removeListener(We)}}},[Pe]),Pe}(),ee=z??{},te=ee.maxX,Z=ee.maxY,ge=t.useCallback(function(){var Ce,Re,Pe,Te,We=(Re=(Ce=M.current)===null||Ce===void 0?void 0:Ce.clientWidth)!==null&&Re!==void 0?Re:0,ke=(Te=(Pe=M.current)===null||Pe===void 0?void 0:Pe.clientHeight)!==null&&Te!==void 0?Te:0;return ne&&z?{width:We,height:We*(z.maxY/z.maxX)}:{width:We,height:ke}},[M,ne,te,Z]);t.useEffect(function(){if(ae&&M.current&&_){var Ce=ge(),Re=Ce.width,Pe=Ce.height,Te=!1;if($.current){var We=Re!==I||Pe!==C;if(j.fitCanvasToArtboardHeight&&We&&(M.current.style.height=Pe+"px",Te=!0),j.useDevicePixelRatio){if(We||Re*J!==W||Pe*J!==ue){var ke=J*Re,lt=J*Pe;$.current.width=ke,$.current.height=lt,$.current.style.width=Re+"px",$.current.style.height=Pe+"px",L({width:ke,height:lt}),Te=!0}}else We&&($.current.width=Re,$.current.height=Pe,L({width:Re,height:Pe}),Te=!0);k({width:Re,height:Pe})}V&&(G||Te)&&V&&V(),G&&X(!1)}},[$,M,H,J,ge,G,X,ue,W,C,I,V,ae,ne,B,_])}function S(h){var w=h.setContainerRef,_=h.setCanvasRef,$=h.className,M=$===void 0?"":$,O=h.style,N=h.children,V=s(h,["setContainerRef","setCanvasRef","className","style","children"]),z=o({width:"100%",height:"100%"},O);return i.default.createElement("div",o({ref:w,className:M},!M&&{style:z}),i.default.createElement("canvas",o({ref:_,style:{verticalAlign:"top",width:0,height:0}},V),N))}function T(h,w){w===void 0&&(w={});var _=t.useRef(null),$=t.useRef(null),M=t.useState(null),O=M[0],N=M[1],V=!!h,z=x(w),j=t.useCallback(function(){O&&(O.startRendering(),O.resizeToCanvas())},[O]);E({riveLoaded:!!O,canvasRef:_,containerRef:$,options:z,onCanvasHasResized:j,artboardBounds:O==null?void 0:O.bounds});var R=t.useCallback(function(k){if(k&&h&&V){var U=z.useOffscreenRenderer,q=new n.Rive(o(o({useOffscreenRenderer:U},h),{canvas:k}));q.on(n.EventType.Load,function(){_.current?N(q):q.cleanup()})}else k===null&&_.current&&(_.current.height=0,_.current.width=0);_.current=k},[V]),v=t.useCallback(function(k){$.current=k},[]);t.useEffect(function(){var k=new IntersectionObserver(function(U){U[0].isIntersecting?O&&O.startRendering():O&&O.stopRendering()});return _.current&&k.observe(_.current),function(){k.disconnect()}},[O]),t.useEffect(function(){return function(){O&&(O.cleanup(),N(null))}},[O]);var C=h==null?void 0:h.animations;t.useEffect(function(){O&&C&&(O.isPlaying?(O.stop(O.animationNames),O.play(C)):O.isPaused&&(O.stop(O.animationNames),O.pause(C)))},[C,O]);var I=t.useCallback(function(k){return i.default.createElement(S,o({setContainerRef:v,setCanvasRef:R},k))},[R,v]);return{canvas:_.current,container:$.current,setCanvasRef:R,setContainerRef:v,rive:O,RiveComponent:I}}e.default=function(h){var w=h.src,_=h.artboard,$=h.animations,M=h.stateMachines,O=h.layout,N=h.useOffscreenRenderer,V=N===void 0||N,z=h.shouldDisableRiveListeners,j=z!==void 0&&z,R=h.shouldResizeCanvasToContainer,v=R===void 0||R,C=h.children,I=s(h,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),k=T({src:w,artboard:_,animations:$,layout:O,stateMachines:M,autoplay:!0,shouldDisableRiveListeners:j},{useOffscreenRenderer:V,shouldResizeCanvasToContainer:v}).RiveComponent;return i.default.createElement(k,o({},I),C)},e.useResizeCanvas=E,e.useRive=T,e.useStateMachineInput=function(h,w,_,$){var M=t.useState(null),O=M[0],N=M[1];return t.useEffect(function(){function V(){if(h&&w&&_||N(null),h&&w&&_){var z=h.stateMachineInputs(w);if(z){var j=z.find(function(R){return R.name===_});$!==void 0&&j&&(j.value=$),N(j||null)}}else N(null)}V(),h&&h.on(n.EventType.Play,function(){V()})},[h]),O},Object.keys(n).forEach(function(h){h==="default"||e.hasOwnProperty(h)||Object.defineProperty(e,h,{enumerable:!0,get:function(){return n[h]}})})})(rv);const d$=dp(rv),rl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...i})=>D.jsx(at,{width:t,height:n,style:r,children:D.jsx(d$,{src:e,...i})});rl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const iv=({isLoading:e,className:t,width:n,height:r,onClose:i,src:o,noScroll:s="noscroll",...a})=>(u.useEffect(()=>(e?document.body.classList.add(s):document.body.classList.remove(s),()=>{document.body.classList.remove(s)}),[e,s]),e?D.jsx(at,{className:t,"data-test-id":a["data-testid-backdrop"],onClick:i,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:D.jsx(at,{"data-test-id":a["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:D.jsx(rl,{src:o,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);iv.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var f$=it({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const p$=({color:e,size:t,...n})=>D.jsx(at,{...n,className:Se(f$({color:e,size:t}))});function h$(e){return class extends u.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?u.Children.map(n,i=>{const o=u.Children.toArray(i.children||i.props.children);return o&&o[0]&&o[0].props.value}):[]},this.onChange=(n,r,i)=>{const o=this.getValue().concat();o[n]=r,i&&i(o,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 D.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var m$="_1ypj0tt5",v$="_1ypj0tt4",g$="_1ypj0tt3",Nf="_1ypj0tt1",y$="_1ypj0tt0",b$="_1ypj0tt2";const x$=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:i})=>{const o=n==null?void 0:n(),s=u.Children.map(t,(a,c)=>u.cloneElement(a,{selectedValue:o==null?void 0:o[c],onValueChange:(...l)=>i==null?void 0:i(c,...l),onScrollChange:(...l)=>r==null?void 0:r(c,...l)}));return D.jsx(at,{className:Se(m$,e),children:s})},sv=h$(x$),w$=e=>null;function E$(e){var t;const n=(r,i,o)=>{const s=Math.round(r/i);return Math.min(s,o-1)};return t=class extends u.Component{constructor(){super(...arguments),this.selectByIndex=(r,i,o)=>{r<0||r>=u.Children.count(this.props.children)||!i||o(r*i)},this.doScrollingComplete=(r,i,o)=>{const s=u.Children.toArray(this.props.children),a=n(r,i,s.length),c=s[a];c?o(c.props.value):console.warn&&console.warn("child not found",s,a)},this.select=(r,i,o)=>{const s=u.Children.toArray(this.props.children);for(let a=0,c=s.length;a<c;a+=1)if(s[a].props.value===r){this.selectByIndex(a,i,o);return}this.selectByIndex(0,i,o)}}render(){return D.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=w$,t}const C$=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:i,doScrollingComplete:o,onValueChange:s,computeChildIndex:a,disabled:c,className:l}=e,d=u.useRef(null),f=u.useRef(null),m=u.useRef(null),p=u.useRef(0),x=u.useRef(0),E=u.useMemo(()=>{if(n||r)return n||r;const V=u.Children.toArray(t);return V&&V[0]&&V[0].props.value},[t,r,n]),[S,T]=u.useState(E),h=(()=>{let V=-1,z=0,j=0,R=!1,v=!1;const C=(L,oe)=>{L.transform=oe},I=(L,oe)=>{L.transition=oe},k=(L,oe,G=.3)=>{var X,ne;V!==oe&&(V=oe,I((X=f.current)==null?void 0:X.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),C((ne=f.current)==null?void 0:ne.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{O(),f.current&&I(f.current.style,"")},+G*1e3))},U=((L=30,oe=100)=>{let G=0,X=0,ne=0;const ae={record:B=>{const H=+new Date;ne=(B-X)/(H-G),H-G>=L&&(ne=H-G<=oe?ne:0,X=B,G=H)},getVelocity:B=>(B!==X&&ae.record(B),ne)};return ae})(),q=()=>{v=!1;let L=V;const oe=(t.length-1)*p.current;let G=.3;const X=U.getVelocity(L)*4;X&&(L=X*40+L,G=Math.abs(X)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>oe&&(L=oe),k(0,L,G<.3?.3:G),M()},ue=L=>{R||(v=!0,j=L,z=V)},W=L=>{var oe;R||!v||(V=z-L+j,U.record(V),M(),C((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-V}px,0)`))};return{touchstart:L=>ue(L.touches[0].pageY),mousedown:L=>ue(L.pageY),touchmove:L=>{L.preventDefault(),W(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),W(L.pageY)},touchend:()=>q(),touchcancel:()=>q(),mouseup:()=>q(),getValue:()=>V,scrollTo:k,setDisabled:(L=!1)=>{R=L}}})(),w=u.useCallback(V=>{h.scrollTo(0,V)},[h]),_=u.useCallback(V=>{h.scrollTo(0,V,0)},[h]),$=V=>{V!==S&&("selectedValue"in e||T(V),s&&s(V))},M=()=>{const V=h.getValue();if(V>=0){const z=u.Children.toArray(t),j=a(V,p.current,z.length);if(x.current!==j){x.current=j;const R=z[j];R&&e.onScrollChange?e.onScrollChange(R.props.value):!z&&console.warn&&console.warn("child not found",t,j)}}},O=()=>{const V=h.getValue();V>=0&&o(V,p.current,$)},N=()=>{const V=`${Nf} ${b$}`,z=R=>{const{className:v="",style:C,value:I}=R.props,k=S===I;return D.jsx("div",{style:{...C},"data-selected":k?"true":void 0,className:`${k?V:Nf} ${v}`,children:R.props.children},I)};return u.Children?u.Children.map(t,z):[].concat(t).map(z)};return u.useEffect(()=>{var R,v,C;const V=((R=d.current)==null?void 0:R.getBoundingClientRect().height)??0,z=((v=m.current)==null?void 0:v.getBoundingClientRect().height)??0;p.current=((C=m.current)==null?void 0:C.getBoundingClientRect().height)??0;let j=Math.floor(V/z);return j%2===0&&(j-=1),j-=1,j/=2,f.current.style.padding=`${z*j}px 0`,m.current.style.top=`${z*j}px`,h.setDisabled(c),i(S,p.current,w),Object.keys(h).forEach(I=>{var k;if(I.indexOf("touch")===0||I.indexOf("mouse")===0){const U=I.indexOf("move")>=0?{passive:!1}:{passive:!0};(k=d.current)==null||k.addEventListener(I,h[I],U)}}),()=>{Object.keys(h).forEach(I=>{var k;(I.indexOf("touch")===0||I.indexOf("mouse")===0)&&((k=d.current)==null||k.removeEventListener(I,h[I]))})}},[c,h,w,i,S]),u.useEffect(()=>{"selectedValue"in e&&S!==n&&T(n),h.setDisabled(c)},[n,S,e,h,c]),u.useEffect(()=>{i(S,p.current,_)},[_,i,S]),D.jsxs("div",{className:Se(y$,l),ref:d,children:[D.jsx("div",{className:Se(g$,l),ref:m}),D.jsx("div",{className:v$,ref:f,children:N()})]})},Ha=E$(C$);var bt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(bt||{});const Mi=24*60*60*1e3,_$={am:"AM",pm:"PM"},av=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),ia=e=>e<10?`0${e}`:`${e}`,cr=e=>new Date(+e),S$=(e,t)=>{e.setDate(Math.min(e.getDate(),av(new Date(e.getFullYear(),t)))),e.setMonth(t)},Vf=(e,t,n)=>{if(n){const r=e.getHours();let i=t;i=r>=12?t+12:t,i=i>=24?0:i,e.setHours(i)}else e.setHours(t)},jf=(e,t)=>{t===0?e.setTime(+e-Mi/2):e.setTime(+e+Mi/2)},Lf=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),T$=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],$$=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=_$,mode:i="date",disabled:o=!1,className:s,minuteStep:a=1,use12Hours:c=!1,minDate:l,maxDate:d,formatDay:f,formatMonth:m}=e,[p,x]=u.useState(t||n),E=u.useRef(new Date(-1)),S=u.useRef(new Date);u.useEffect(()=>{"date"in e&&x(t||n)},[t,n,e]);const T=()=>C(p||E.current),h=()=>R().getFullYear(),w=()=>v().getFullYear(),_=()=>R().getMonth(),$=()=>v().getMonth(),M=()=>R().getDate(),O=()=>v().getDate(),N=()=>R().getHours(),V=()=>v().getHours(),z=()=>R().getMinutes(),j=()=>v().getMinutes(),R=()=>l||E.current,v=()=>d||S.current,C=G=>{const X=R(),ne=v();if(i===bt.DATE_TIME){if(G<X)return cr(X);if(G>ne)return cr(ne)}else if(i===bt.DATE||i===bt.YEAR||i===bt.MONTH){if(+G+Mi<=X)return cr(X);if(G>=+ne+Mi)return cr(ne)}else if(i===bt.TIME){const ae=ne.getHours(),B=ne.getMinutes(),H=X.getHours(),J=X.getMinutes(),ee=G.getHours(),te=G.getMinutes();if(ee<H||ee===H&&te<J)return cr(X);if(ee>ae||ee===ae&&te>B)return cr(ne)}return G},I=(G,X)=>{const ne=parseInt(G[X],10),ae=cr(T());if(i===bt.DATE_TIME||i===bt.DATE||i===bt.YEAR||i===bt.MONTH)switch(X){case 0:ae.setDate(ne);break;case 1:S$(ae,ne);break;case 2:ae.setFullYear(ne);break;case 3:Vf(ae,ne);break;case 4:ae.setMinutes(ne);break;case 5:jf(ae,ne);break}else if(i===bt.TIME)switch(X){case 0:Vf(ae,ne);break;case 1:ae.setMinutes(ne);break;case 2:jf(ae,ne);break}return C(ae)},k=(G,X)=>{const ne=I(G,X);"date"in e||x(ne),e.onDateChange&&e.onDateChange(ne),e.onValueChange&&e.onValueChange(G,X)},U=(G,X)=>{if(e.onScrollChange){const ne=I(G,X);e.onScrollChange(ne,G,X)}},q=()=>{const G=T(),X=G.getFullYear(),ne=G.getMonth(),ae=h(),B=w(),H=_(),J=$(),ee=M(),te=O(),Z=[];for(let Ye=ae;Ye<=B;Ye+=1)Z.push({value:`${Ye}`,label:`${Ye}`});const ge={key:"year",props:{children:Z}};if(i===bt.YEAR)return[ge];const Ce=[];let Re=0,Pe=11;ae===X&&(Re=H),B===X&&(Pe=J);for(let Ye=Re;Ye<=Pe;Ye+=1){const yt=m?m(Ye,G):T$(Ye);Ce.push({value:`${Ye}`,label:yt})}const Te={key:"month",props:{children:Ce}};if(i===bt.MONTH)return[Te,ge];const We=[];let ke=1,lt=av(G);ae===X&&H===ne&&(ke=ee),B===X&&J===ne&&(lt=te);for(let Ye=ke;Ye<=lt;Ye+=1){const yt=f?f(Ye,G):`${Ye}`;We.push({value:`${Ye}`,label:yt})}return[{key:"day",props:{children:We}},Te,ge]},ue=G=>{let{minHour:X=0,maxHour:ne=23,minMinute:ae=0,maxMinute:B=59}=e;const H=z(),J=j(),ee=N(),te=V(),Z=G.getHours();if(i===bt.DATE_TIME){const Te=G.getFullYear(),We=G.getMonth(),ke=G.getDate(),lt=h(),Ye=w(),yt=_(),Je=$(),Pt=M(),$e=O();lt===Te&&yt===We&&Pt===ke&&(X=ee,ee===Z&&(ae=H)),Ye===Te&&Je===We&&$e===ke&&(ne=te,te===Z&&(B=J))}else X=ee,ee===Z&&(ae=H),ne=te,te===Z&&(B=J);const ge=[];X===0&&ne===0||X!==0&&ne!==0?X=Lf(X):X===0&&c&&(X=1,ge.push({value:"0",label:"12"})),ne=Lf(ne);for(let Te=X;Te<=ne;Te+=1)ge.push({value:`${Te}`,label:ia(Te)});const Ce=[],Re=G.getMinutes();for(let Te=ae;Te<=B;Te+=a)Ce.push({value:`${Te}`,label:ia(Te)}),Re>Te&&Re<Te+a&&Ce.push({value:`${Re}`,label:ia(Re)});return{cols:[{key:"hours",props:{children:ge}},{key:"minutes",props:{children:Ce}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Re}},W=()=>{const G=T();let X=[],ne=[];if(i===bt.YEAR)return{cols:q(),value:[`${G.getFullYear()}`]};if(i===bt.MONTH)return{cols:q(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((i===bt.DATE_TIME||i===bt.DATE)&&(X=q(),ne=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),i===bt.DATE_TIME||i===bt.TIME){const ae=ue(G);X=X.concat(ae.cols);const B=G.getHours();let H=[`${B}`,`${ae.selMinute}`],J=B;c&&(J=B>12?B-12:B,H=[`${J}`,`${ae.selMinute}`,`${B>=12?1:0}`]),ne=ne.concat(H)}return{value:ne,cols:X}},{value:L,cols:oe}=W();return D.jsx(sv,{className:s,selectedValue:L,onValueChange:k,onScrollChange:U,children:oe.map(G=>D.jsx(Ha,{disabled:o,className:`picker-item-${G.key}`,children:G.props.children.map(X=>D.jsx(Ha.Item,{value:X.value,children:X.label},X.value))},G.key))})};var Wa={exports:{}},nt={};/** @license React v17.0.2
135
135
  * react-is.production.min.js
136
136
  *
137
137
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -145,4 +145,4 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var Z=te(B,ee,X,ne,ae+".
145
145
  *
146
146
  * This source code is licensed under the MIT license found in the
147
147
  * LICENSE file in the root directory of this source tree.
148
- */var Bf;function P$(){return Bf||(Bf=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,s=60110,a=60112,c=60113,l=60120,d=60115,f=60116,m=60121,p=60122,x=60117,E=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var T=Symbol.for;e=T("react.element"),t=T("react.portal"),n=T("react.fragment"),r=T("react.strict_mode"),i=T("react.profiler"),o=T("react.provider"),s=T("react.context"),a=T("react.forward_ref"),c=T("react.suspense"),l=T("react.suspense_list"),d=T("react.memo"),f=T("react.lazy"),m=T("react.block"),p=T("react.server.block"),x=T("react.fundamental"),T("react.scope"),T("react.opaque.id"),E=T("react.debug_trace_mode"),T("react.offscreen"),S=T("react.legacy_hidden")}var h=!1;function w(te){return!!(typeof te=="string"||typeof te=="function"||te===n||te===i||te===E||te===r||te===c||te===l||te===S||h||typeof te=="object"&&te!==null&&(te.$$typeof===f||te.$$typeof===d||te.$$typeof===o||te.$$typeof===s||te.$$typeof===a||te.$$typeof===x||te.$$typeof===m||te[0]===p))}function _(te){if(typeof te=="object"&&te!==null){var Z=te.$$typeof;switch(Z){case e:var ge=te.type;switch(ge){case n:case i:case r:case c:case l:return ge;default:var Ce=ge&&ge.$$typeof;switch(Ce){case s:case a:case f:case d:case o:return Ce;default:return Z}}case t:return Z}}}var $=s,M=o,O=e,N=a,V=n,z=f,j=d,R=t,v=i,C=r,I=c,k=!1,U=!1;function q(te){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ue(te){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(te){return _(te)===s}function L(te){return _(te)===o}function oe(te){return typeof te=="object"&&te!==null&&te.$$typeof===e}function G(te){return _(te)===a}function X(te){return _(te)===n}function ne(te){return _(te)===f}function ae(te){return _(te)===d}function B(te){return _(te)===t}function H(te){return _(te)===i}function J(te){return _(te)===r}function ee(te){return _(te)===c}rt.ContextConsumer=$,rt.ContextProvider=M,rt.Element=O,rt.ForwardRef=N,rt.Fragment=V,rt.Lazy=z,rt.Memo=j,rt.Portal=R,rt.Profiler=v,rt.StrictMode=C,rt.Suspense=I,rt.isAsyncMode=q,rt.isConcurrentMode=ue,rt.isContextConsumer=W,rt.isContextProvider=L,rt.isElement=oe,rt.isForwardRef=G,rt.isFragment=X,rt.isLazy=ne,rt.isMemo=ae,rt.isPortal=B,rt.isProfiler=H,rt.isStrictMode=J,rt.isSuspense=ee,rt.isValidElementType=w,rt.typeOf=_}()),rt}process.env.NODE_ENV==="production"?Wa.exports=R$():Wa.exports=P$();var Hf=Wa.exports;let Wf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Uf=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",sa=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Uf(n.overflowY,t)||Uf(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},ai=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,I$=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var A$=(e,t)=>{var n,r,i,o,s,a;if(typeof document>"u")return[];let{scrollMode:c,block:l,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:C=>C!==f;if(!Wf(e))throw new TypeError("Invalid target");let x=document.scrollingElement||document.documentElement,E=[],S=e;for(;Wf(S)&&p(S);){if(S=I$(S),S===x){E.push(S);break}S!=null&&S===document.body&&sa(S)&&!sa(document.documentElement)||S!=null&&sa(S,m)&&E.push(S)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,h=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,w=(s=window.scrollX)!=null?s:pageXOffset,_=(a=window.scrollY)!=null?a:pageYOffset,{height:$,width:M,top:O,right:N,bottom:V,left:z}=e.getBoundingClientRect(),j=l==="start"||l==="nearest"?O:l==="end"?V:O+$/2,R=d==="center"?z+M/2:d==="end"?N:z,v=[];for(let C=0;C<E.length;C++){let I=E[C],{height:k,width:U,top:q,right:ue,bottom:W,left:L}=I.getBoundingClientRect();if(c==="if-needed"&&O>=0&&z>=0&&V<=h&&N<=T&&O>=q&&V<=W&&z>=L&&N<=ue)return v;let oe=getComputedStyle(I),G=parseInt(oe.borderLeftWidth,10),X=parseInt(oe.borderTopWidth,10),ne=parseInt(oe.borderRightWidth,10),ae=parseInt(oe.borderBottomWidth,10),B=0,H=0,J="offsetWidth"in I?I.offsetWidth-I.clientWidth-G-ne:0,ee="offsetHeight"in I?I.offsetHeight-I.clientHeight-X-ae:0,te="offsetWidth"in I?I.offsetWidth===0?0:U/I.offsetWidth:0,Z="offsetHeight"in I?I.offsetHeight===0?0:k/I.offsetHeight:0;if(x===I)B=l==="start"?j:l==="end"?j-h:l==="nearest"?ai(_,_+h,h,X,ae,_+j,_+j+$,$):j-h/2,H=d==="start"?R:d==="center"?R-T/2:d==="end"?R-T:ai(w,w+T,T,G,ne,w+R,w+R+M,M),B=Math.max(0,B+_),H=Math.max(0,H+w);else{B=l==="start"?j-q-X:l==="end"?j-W+ae+ee:l==="nearest"?ai(q,W,k,X,ae+ee,j,j+$,$):j-(q+k/2)+ee/2,H=d==="start"?R-L-G:d==="center"?R-(L+U/2)+J/2:d==="end"?R-ue+ne+J:ai(L,ue,U,G,ne+J,R,R+M,M);let{scrollLeft:ge,scrollTop:Ce}=I;B=Math.max(0,Math.min(Ce+B/Z,I.scrollHeight-k/Z+ee)),H=Math.max(0,Math.min(ge+H/te,I.scrollWidth-U/te+J)),j+=Ce-B,R+=ge-H}v.push({el:I,top:B,left:H})}return v},O$=0;function Yf(e){return typeof e=="function"?e:Wt}function Wt(){}function cv(e,t){if(e){var n=A$(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Kf(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function ol(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function ht(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(a){return a&&a.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function lv(){return String(O$++)}function uv(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 zf(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function dv(e){return typeof e.type=="string"}function fv(e){return e.props}function D$(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var M$=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ci(e){e===void 0&&(e={});var t={};return M$.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function $o(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=ki(t,r)?t[r]:e[r],n},{})}function ki(e,t){return e[t]!==void 0}function Ro(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function k$(e){return Object.prototype.toString.call(e)==="[object Object]"}function hr(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var a=br(e,s,n,r,i);return a===-1?t>=n?-1:t:a}function br(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?br(1,0,n,r,!1):br(-1,n-1,n,r,!1):-1}function Ni(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Kf(i,e,n)||r&&Kf(i,n.document.activeElement,n))})}var il=Wt;process.env.NODE_ENV!=="production"&&(il=function(t,n,r){var i="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(o){n[o]!==void 0&&r[o]===void 0?console.error('downshift: A component has changed the controlled prop "'+o+'" to be uncontrolled. '+i):n[o]===void 0&&r[o]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+o+'" to be controlled. '+i)})});var N$=ol(function(e){pv(e).textContent=""},500);function sl(e,t){var n=pv(t);e&&(n.textContent=e,N$(t))}function pv(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 hv=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mv=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,vv=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,mi=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,vi=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,gv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,yv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,bv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,xv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,wv=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Ev=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Cv=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,_v=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Ua=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Sv=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tv=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,$v=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,V$=Object.freeze({__proto__:null,unknown:hv,mouseUp:mv,itemMouseEnter:vv,keyDownArrowUp:mi,keyDownArrowDown:vi,keyDownEscape:gv,keyDownEnter:yv,keyDownHome:bv,keyDownEnd:xv,clickItem:wv,blurInput:Ev,changeInput:Cv,keyDownSpaceButton:_v,clickButton:Ua,blurButton:Sv,controlledPropUpdatedSelectedItem:Tv,touchEnd:$v}),j$=["refKey","ref"],L$=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],F$=["onKeyDown","onBlur","onChange","onInput","onChangeText"],B$=["refKey","ref"],H$=["onMouseMove","onMouseDown","onClick","onPress","index","item"],W$=function(){var e=function(t){mc(n,t);function n(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+lv(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(h){return o.id+"-item-"+h},o.input=null,o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(h,w){var _=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function($){return $!==_}),h()},w);o.timeoutIds.push(_)},o.setItemCount=function(h){o.itemCount=h},o.unsetItemCount=function(){o.itemCount=null},o.setHighlightedIndex=function(h,w){h===void 0&&(h=o.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ci(w),o.internalSetState(ie({highlightedIndex:h},w))},o.clearSelection=function(h){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},h)},o.selectItem=function(h,w,_){w=ci(w),o.internalSetState(ie({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:h,inputValue:o.props.itemToString(h)},w),_)},o.selectItemAtIndex=function(h,w,_){var $=o.items[h];$!=null&&o.selectItem($,w,_)},o.selectHighlightedItem=function(h,w){return o.selectItemAtIndex(o.getState().highlightedIndex,h,w)},o.internalSetState=function(h,w){var _,$,M={},O=typeof h=="function";return!O&&h.hasOwnProperty("inputValue")&&o.props.onInputValueChange(h.inputValue,ie({},o.getStateAndHelpers(),h)),o.setState(function(N){N=o.getState(N);var V=O?h(N):h;V=o.props.stateReducer(N,V),_=V.hasOwnProperty("selectedItem");var z={};return _&&V.selectedItem!==N.selectedItem&&($=V.selectedItem),V.type=V.type||hv,Object.keys(V).forEach(function(j){N[j]!==V[j]&&(M[j]=V[j]),j!=="type"&&(V[j],ki(o.props,j)||(z[j]=V[j]))}),O&&V.hasOwnProperty("inputValue")&&o.props.onInputValueChange(V.inputValue,ie({},o.getStateAndHelpers(),V)),z},function(){Yf(w)();var N=Object.keys(M).length>1;N&&o.props.onStateChange(M,o.getStateAndHelpers()),_&&o.props.onSelect(h.selectedItem,o.getStateAndHelpers()),$!==void 0&&o.props.onChange($,o.getStateAndHelpers()),o.props.onUserAction(M,o.getStateAndHelpers())})},o.rootRef=function(h){return o._rootNode=h},o.getRootProps=function(h,w){var _,$=h===void 0?{}:h,M=$.refKey,O=M===void 0?"ref":M,N=$.ref,V=kt($,j$),z=w===void 0?{}:w,j=z.suppressRefError,R=j===void 0?!1:j;o.getRootProps.called=!0,o.getRootProps.refKey=O,o.getRootProps.suppressRefError=R;var v=o.getState(),C=v.isOpen;return ie((_={},_[O]=Yn(N,o.rootRef),_.role="combobox",_["aria-expanded"]=C,_["aria-haspopup"]="listbox",_["aria-owns"]=C?o.menuId:null,_["aria-labelledby"]=o.labelId,_),V)},o.keyDownHandlers={ArrowDown:function(w){var _=this;if(w.preventDefault(),this.getState().isOpen){var $=w.shiftKey?5:1;this.moveHighlightedIndex($,{type:vi})}else this.internalSetState({isOpen:!0,type:vi},function(){var M=_.getItemCount();if(M>0){var O=_.getState(),N=O.highlightedIndex,V=hr(1,N,M,function(z){return _.getItemNodeFromIndex(z)});_.setHighlightedIndex(V,{type:vi})}})},ArrowUp:function(w){var _=this;if(w.preventDefault(),this.getState().isOpen){var $=w.shiftKey?-5:-1;this.moveHighlightedIndex($,{type:mi})}else this.internalSetState({isOpen:!0,type:mi},function(){var M=_.getItemCount();if(M>0){var O=_.getState(),N=O.highlightedIndex,V=hr(-1,N,M,function(z){return _.getItemNodeFromIndex(z)});_.setHighlightedIndex(V,{type:mi})}})},Enter:function(w){if(w.which!==229){var _=this.getState(),$=_.isOpen,M=_.highlightedIndex;if($&&M!=null){w.preventDefault();var O=this.items[M],N=this.getItemNodeFromIndex(M);if(O==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:yv})}}},Escape:function(w){w.preventDefault(),this.reset(ie({type:gv},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ie({},o.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:_v})}}),o.inputKeyDownHandlers=ie({},o.keyDownHandlers,{Home:function(w){var _=this,$=this.getState(),M=$.isOpen;if(M){w.preventDefault();var O=this.getItemCount();if(!(O<=0||!M)){var N=br(1,0,O,function(V){return _.getItemNodeFromIndex(V)},!1);this.setHighlightedIndex(N,{type:bv})}}},End:function(w){var _=this,$=this.getState(),M=$.isOpen;if(M){w.preventDefault();var O=this.getItemCount();if(!(O<=0||!M)){var N=br(-1,O-1,O,function(V){return _.getItemNodeFromIndex(V)},!1);this.setHighlightedIndex(N,{type:xv})}}}}),o.getToggleButtonProps=function(h){var w=h===void 0?{}:h,_=w.onClick;w.onPress;var $=w.onKeyDown,M=w.onKeyUp,O=w.onBlur,N=kt(w,L$),V=o.getState(),z=V.isOpen,j={onClick:ht(_,o.buttonHandleClick),onKeyDown:ht($,o.buttonHandleKeyDown),onKeyUp:ht(M,o.buttonHandleKeyUp),onBlur:ht(O,o.buttonHandleBlur)},R=N.disabled?{}:j;return ie({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},R,N)},o.buttonHandleKeyUp=function(h){h.preventDefault()},o.buttonHandleKeyDown=function(h){var w=Ro(h);o.buttonKeyDownHandlers[w]&&o.buttonKeyDownHandlers[w].call(ud(o),h)},o.buttonHandleClick=function(h){h.preventDefault(),o.props.environment.document.activeElement===o.props.environment.document.body&&h.target.focus(),process.env.NODE_ENV==="test"?o.toggleMenu({type:Ua}):o.internalSetTimeout(function(){return o.toggleMenu({type:Ua})})},o.buttonHandleBlur=function(h){var w=h.target;o.internalSetTimeout(function(){!o.isMouseDown&&(o.props.environment.document.activeElement==null||o.props.environment.document.activeElement.id!==o.inputId)&&o.props.environment.document.activeElement!==w&&o.reset({type:Sv})})},o.getLabelProps=function(h){return ie({htmlFor:o.inputId,id:o.labelId},h)},o.getInputProps=function(h){var w=h===void 0?{}:h,_=w.onKeyDown,$=w.onBlur,M=w.onChange,O=w.onInput;w.onChangeText;var N=kt(w,F$),V,z={};V="onChange";var j=o.getState(),R=j.inputValue,v=j.isOpen,C=j.highlightedIndex;if(!N.disabled){var I;z=(I={},I[V]=ht(M,O,o.inputHandleChange),I.onKeyDown=ht(_,o.inputHandleKeyDown),I.onBlur=ht($,o.inputHandleBlur),I)}return ie({"aria-autocomplete":"list","aria-activedescendant":v&&typeof C=="number"&&C>=0?o.getItemId(C):null,"aria-controls":v?o.menuId:null,"aria-labelledby":N&&N["aria-label"]?void 0:o.labelId,autoComplete:"off",value:R,id:o.inputId},z,N)},o.inputHandleKeyDown=function(h){var w=Ro(h);w&&o.inputKeyDownHandlers[w]&&o.inputKeyDownHandlers[w].call(ud(o),h)},o.inputHandleChange=function(h){o.internalSetState({type:Cv,isOpen:!0,inputValue:h.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var h=o.props.environment.document&&!!o.props.environment.document.activeElement&&!!o.props.environment.document.activeElement.dataset&&o.props.environment.document.activeElement.dataset.toggle&&o._rootNode&&o._rootNode.contains(o.props.environment.document.activeElement);!o.isMouseDown&&!h&&o.reset({type:Ev})})},o.menuRef=function(h){o._menuNode=h},o.getMenuProps=function(h,w){var _,$=h===void 0?{}:h,M=$.refKey,O=M===void 0?"ref":M,N=$.ref,V=kt($,B$),z=w===void 0?{}:w,j=z.suppressRefError,R=j===void 0?!1:j;return o.getMenuProps.called=!0,o.getMenuProps.refKey=O,o.getMenuProps.suppressRefError=R,ie((_={},_[O]=Yn(N,o.menuRef),_.role="listbox",_["aria-labelledby"]=V&&V["aria-label"]?null:o.labelId,_.id=o.menuId,_),V)},o.getItemProps=function(h){var w,_=h===void 0?{}:h,$=_.onMouseMove,M=_.onMouseDown,O=_.onClick;_.onPress;var N=_.index,V=_.item,z=V===void 0?process.env.NODE_ENV==="production"?void 0:D$("getItemProps","item"):V,j=kt(_,H$);N===void 0?(o.items.push(z),N=o.items.indexOf(z)):o.items[N]=z;var R="onClick",v=O,C=(w={onMouseMove:ht($,function(){N!==o.getState().highlightedIndex&&(o.setHighlightedIndex(N,{type:vv}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:ht(M,function(k){k.preventDefault()})},w[R]=ht(v,function(){o.selectItemAtIndex(N,{type:wv})}),w),I=j.disabled?{onMouseDown:C.onMouseDown}:C;return ie({id:o.getItemId(N),role:"option","aria-selected":o.getState().highlightedIndex===N},I,j)},o.clearItems=function(){o.items=[]},o.reset=function(h,w){h===void 0&&(h={}),h=ci(h),o.internalSetState(function(_){var $=_.selectedItem;return ie({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString($)},h)},w)},o.toggleMenu=function(h,w){h===void 0&&(h={}),h=ci(h),o.internalSetState(function(_){var $=_.isOpen;return ie({isOpen:!$},$&&{highlightedIndex:o.props.defaultHighlightedIndex},h)},function(){var _=o.getState(),$=_.isOpen,M=_.highlightedIndex;$&&o.getItemCount()>0&&typeof M=="number"&&o.setHighlightedIndex(M,h),Yf(w)()})},o.openMenu=function(h){o.internalSetState({isOpen:!0},h)},o.closeMenu=function(h){o.internalSetState({isOpen:!1},h)},o.updateStatus=ol(function(){var h=o.getState(),w=o.items[h.highlightedIndex],_=o.getItemCount(),$=o.props.getA11yStatusMessage(ie({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:_,highlightedItem:w},h));o.previousResultCount=_,sl($,o.props.environment.document)},200);var s=o.props,a=s.defaultHighlightedIndex,c=s.initialHighlightedIndex,l=c===void 0?a:c,d=s.defaultIsOpen,f=s.initialIsOpen,m=f===void 0?d:f,p=s.initialInputValue,x=p===void 0?"":p,E=s.initialSelectedItem,S=E===void 0?null:E,T=o.getState({highlightedIndex:l,isOpen:m,inputValue:x,selectedItem:S});return T.selectedItem!=null&&o.props.initialInputValue===void 0&&(T.inputValue=o.props.itemToString(T.selectedItem)),o.state=T,o}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(o){clearTimeout(o)}),this.timeoutIds=[]},r.getState=function(o){return o===void 0&&(o=this.state),$o(o,this.props)},r.getItemCount=function(){var o=this.items.length;return this.itemCount!=null?o=this.itemCount:this.props.itemCount!==void 0&&(o=this.props.itemCount),o},r.getItemNodeFromIndex=function(o){return this.props.environment.document.getElementById(this.getItemId(o))},r.scrollHighlightedItemIntoView=function(){{var o=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(o,this._menuNode)}},r.moveHighlightedIndex=function(o,s){var a=this,c=this.getItemCount(),l=this.getState(),d=l.highlightedIndex;if(c>0){var f=hr(o,d,c,function(m){return a.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,s)}},r.getStateAndHelpers=function(){var o=this.getState(),s=o.highlightedIndex,a=o.inputValue,c=o.selectedItem,l=o.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,p=this.getToggleButtonProps,x=this.getLabelProps,E=this.getMenuProps,S=this.getInputProps,T=this.getItemProps,h=this.openMenu,w=this.closeMenu,_=this.toggleMenu,$=this.selectItem,M=this.selectItemAtIndex,O=this.selectHighlightedItem,N=this.setHighlightedIndex,V=this.clearSelection,z=this.clearItems,j=this.reset,R=this.setItemCount,v=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:x,getMenuProps:E,getInputProps:S,getItemProps:T,reset:j,openMenu:h,closeMenu:w,toggleMenu:_,selectItem:$,selectItemAtIndex:M,selectHighlightedItem:O,setHighlightedIndex:N,clearSelection:V,clearItems:z,setItemCount:R,unsetItemCount:v,setState:C,itemToString:d,id:f,highlightedIndex:s,inputValue:a,isOpen:l,selectedItem:c}},r.componentDidMount=function(){var o=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Xf(this._menuNode,this.getMenuProps);{var s=function(){o.isMouseDown=!0},a=function(p){o.isMouseDown=!1;var x=Ni(p.target,[o._rootNode,o._menuNode],o.props.environment);!x&&o.getState().isOpen&&o.reset({type:mv},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},c=function(){o.isTouchMove=!1},l=function(){o.isTouchMove=!0},d=function(p){var x=Ni(p.target,[o._rootNode,o._menuNode],o.props.environment,!1);!o.isTouchMove&&!x&&o.getState().isOpen&&o.reset({type:$v},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",s),f.addEventListener("mouseup",a),f.addEventListener("touchstart",c),f.addEventListener("touchmove",l),f.addEventListener("touchend",d),this.cleanup=function(){o.internalClearTimeouts(),o.updateStatus.cancel(),f.removeEventListener("mousedown",s),f.removeEventListener("mouseup",a),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",l),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(o,s){var a=this.props.highlightedIndex===void 0?this.getState():this.props,c=a.highlightedIndex,l=s.highlightedIndex===void 0?o:s,d=l.highlightedIndex,f=c&&this.getState().isOpen&&!o.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(o,s){process.env.NODE_ENV!=="production"&&(il(this.state,o,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Xf(this._menuNode,this.getMenuProps)),ki(this.props,"selectedItem")&&this.props.selectedItemChanged(o.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tv,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(s,o)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var o=zf(this.props.children,Wt);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 s=zf(o(this.getStateAndHelpers()));if(!s)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&U$(s,this.getRootProps),s;if(dv(s))return u.cloneElement(s,this.getRootProps(fv(s)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(u.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:uv,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&k$(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:Wt,onInputValueChange:Wt,onUserAction:Wt,onChange:Wt,onSelect:Wt,onOuterClick:Wt,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:cv},e.stateChangeTypes=V$,e}();process.env.NODE_ENV!=="production"&&(W$.propTypes={children:K.func,defaultHighlightedIndex:K.number,defaultIsOpen:K.bool,initialHighlightedIndex:K.number,initialSelectedItem:K.any,initialInputValue:K.string,initialIsOpen:K.bool,getA11yStatusMessage:K.func,itemToString:K.func,onChange:K.func,onSelect:K.func,onStateChange:K.func,onInputValueChange:K.func,onUserAction:K.func,onOuterClick:K.func,selectedItemChanged:K.func,stateReducer:K.func,itemCount:K.number,id:K.string,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})}),suppressRefError:K.bool,scrollIntoView:K.func,selectedItem:K.any,isOpen:K.bool,inputValue:K.string,highlightedIndex:K.number,labelId:K.string,inputId:K.string,menuId:K.string,getItemId:K.func});function Xf(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 U$(e,t){var n=t.refKey,r=n!=="ref",i=!dv(e);i&&!r&&!Hf.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Hf.isForwardRef(e)&&!fv(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var Y$=["isInitialMount","highlightedIndex","items","environment"],Rv={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function K$(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){z$(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(ie({type:i},o))}function z$(e,t,n,r){var i=t.props,o=t.type,s="on"+al(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](ie({type:o},r))}function X$(e,t){return t.changes}function G$(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var q$=ol(function(e,t){sl(e(),t)},200),Z$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?u.useLayoutEffect:u.useEffect;function Q$(e){var t=e.id,n=t===void 0?"downshift-"+lv():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,a=e.inputId,c=u.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(l){return n+"-item-"+l},toggleButtonId:s||n+"-toggle-button",inputId:a||n+"-input"});return c.current}function Pv(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function J$(e){return e?String(e):""}function al(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function cl(e){var t=u.useRef(e);return t.current=e,t}function Iv(e,t,n){var r=u.useRef(),i=u.useRef(),o=u.useCallback(function(m,p){i.current=p,m=$o(m,p.props);var x=e(m,p),E=p.props.stateReducer(m,ie({},p,{changes:x}));return E},[e]),s=u.useReducer(o,t),a=s[0],c=s[1],l=cl(n),d=u.useCallback(function(m){return c(ie({props:l.current},m))},[l]),f=i.current;return u.useEffect(function(){f&&r.current&&r.current!==a&&K$(f,$o(r.current,f.props),a),r.current=a},[a,n,f]),[a,d]}function eR(e,t,n){var r=Iv(e,t,n),i=r[0],o=r[1];return[$o(i,n),o]}var go={itemToString:J$,stateReducer:X$,getA11ySelectionMessage:G$,scrollIntoView:cv,environment:typeof window>"u"?{}:window};function sn(e,t,n){n===void 0&&(n=Rv);var r=e["default"+al(t)];return r!==void 0?r:n[t]}function lo(e,t,n){n===void 0&&(n=Rv);var r=e[t];if(r!==void 0)return r;var i=e["initial"+al(t)];return i!==void 0?i:sn(e,t,n)}function tR(e){var t=lo(e,"selectedItem"),n=lo(e,"isOpen"),r=lo(e,"highlightedIndex"),i=lo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function yo(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,a=t.highlightedIndex;return r.length===0?-1:i!==void 0&&a===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function nR(e,t,n,r){var i=u.useRef({isMouseDown:!1,isTouchMove:!1});return u.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var o=function(){i.current.isMouseDown=!0},s=function(f){i.current.isMouseDown=!1,e&&!Ni(f.target,t.map(function(m){return m.current}),n)&&r()},a=function(){i.current.isTouchMove=!1},c=function(){i.current.isTouchMove=!0},l=function(f){e&&!i.current.isTouchMove&&!Ni(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",a),n.addEventListener("touchmove",c),n.addEventListener("touchend",l),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",l)}}},[e,n]),i}var ll=function(){return Wt};process.env.NODE_ENV!=="production"&&(ll=function(){for(var t=u.useRef(!0),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=u.useRef(r.reduce(function(a,c){return a[c]={},a},{}));u.useEffect(function(){Object.keys(o.current).forEach(function(a){var c=o.current[a];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+a+" getter function on your component / element.");return}var l=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!l&&console.error('downshift: The ref prop "'+d+'" from '+a+" was not applied correctly on your element.")}),t.current=!1});var s=u.useCallback(function(a,c,l,d){o.current[a]={suppressRefError:c,refKey:l,elementRef:d}},[]);return s});function Gf(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,a=kt(n,Y$);u.useEffect(function(){r||q$(function(){return e(ie({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},a))},s.document)},t)}function rR(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,a=u.useRef(!0);return Z$(function(){t<0||!n||!Object.keys(r.current).length||(a.current===!1?a.current=!0:s(i(t),o))},[t]),a}var ul=Wt;process.env.NODE_ENV!=="production"&&(ul=function(t){var n=t.isInitialMount,r=t.props,i=t.state,o=u.useRef(r);u.useEffect(function(){n||(il(i,o.current,r),o.current=r)},[i,r,n])});function qf(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return ie({isOpen:!1,highlightedIndex:-1},i&&ie({selectedItem:e.items[t],isOpen:sn(e,"isOpen"),highlightedIndex:sn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function oR(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:yo(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:yo(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:sn(i,"highlightedIndex"),isOpen:sn(i,"isOpen"),selectedItem:sn(i,"selectedItem"),inputValue:sn(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,o)}K.array.isRequired,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.func,K.string,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function iR(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.":""}Jt(Jt({},go),{getA11yStatusMessage:iR});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 dl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,fl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,hl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,ml=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,vl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,gl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,yl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,bl=process.env.NODE_ENV!=="production"?"__input_change__":8,Vi=process.env.NODE_ENV!=="production"?"__input_blur__":9,xl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Av=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Ov=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,wl=process.env.NODE_ENV!=="production"?"__item_click__":13,Dv=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Mv=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,kv=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Nv=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Vv=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,El=process.env.NODE_ENV!=="production"?"__function_select_item__":19,jv=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Lv=process.env.NODE_ENV!=="production"?"__function_reset__":21,Cl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Fv=Object.freeze({__proto__:null,InputKeyDownArrowDown:dl,InputKeyDownArrowUp:fl,InputKeyDownEscape:pl,InputKeyDownHome:hl,InputKeyDownEnd:ml,InputKeyDownPageUp:vl,InputKeyDownPageDown:gl,InputKeyDownEnter:yl,InputChange:bl,InputBlur:Vi,InputFocus:xl,MenuMouseLeave:Av,ItemMouseMove:Ov,ItemClick:wl,ToggleButtonClick:Dv,FunctionToggleMenu:Mv,FunctionOpenMenu:kv,FunctionCloseMenu:Nv,FunctionSetHighlightedIndex:Vv,FunctionSelectItem:El,FunctionSetInputValue:jv,FunctionReset:Lv,ControlledPropUpdatedSelectedItem:Cl});function sR(e){var t=tR(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)),ie({},t,{inputValue:r})}var aR={items:K.array.isRequired,itemToString:K.func,selectedItemChanged:K.func,getA11yStatusMessage:K.func,getA11ySelectionMessage:K.func,highlightedIndex:K.number,defaultHighlightedIndex:K.number,initialHighlightedIndex:K.number,isOpen:K.bool,defaultIsOpen:K.bool,initialIsOpen:K.bool,selectedItem:K.any,initialSelectedItem:K.any,defaultSelectedItem:K.any,inputValue:K.string,defaultInputValue:K.string,initialInputValue:K.string,id:K.string,labelId:K.string,menuId:K.string,getItemId:K.func,inputId:K.string,toggleButtonId:K.string,stateReducer:K.func,onSelectedItemChange:K.func,onHighlightedIndexChange:K.func,onStateChange:K.func,onIsOpenChange:K.func,onInputValueChange:K.func,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})})};function cR(e,t,n){var r=u.useRef(),i=Iv(e,t,n),o=i[0],s=i[1];return u.useEffect(function(){ki(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:Cl,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[$o(o,n),s]}var Bv=Wt;process.env.NODE_ENV!=="production"&&(Bv=function(t,n){K.checkPropTypes(aR,t,"prop",n.name)});var lR=ie({},go,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:uv});function uR(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case wl:s={isOpen:sn(i,"isOpen"),highlightedIndex:sn(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case dl:e.isOpen?s={highlightedIndex:hr(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:yo(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case fl:e.isOpen?o?s=qf(i,e.highlightedIndex):s={highlightedIndex:hr(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:yo(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case yl:s=qf(i,e.highlightedIndex);break;case pl:s=ie({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case vl:s={highlightedIndex:hr(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case gl:s={highlightedIndex:hr(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case hl:s={highlightedIndex:br(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case ml:s={highlightedIndex:br(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Vi:s=ie({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case bl:s={isOpen:!0,highlightedIndex:sn(i,"highlightedIndex"),inputValue:t.inputValue};break;case xl:s={isOpen:!0,highlightedIndex:yo(i,e,0)};break;case El:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case Cl:s={inputValue:t.inputValue};break;default:return oR(e,t,Fv)}return ie({},e,s)}var dR=["onMouseLeave","refKey","ref"],fR=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],pR=["onClick","onPress","refKey","ref"],hR=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Nr.stateChangeTypes=Fv;function Nr(e){e===void 0&&(e={}),Bv(e,Nr);var t=ie({},lR,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,a=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,l=t.itemToString,d=sR(t),f=cR(uR,d,t),m=f[0],p=f[1],x=m.isOpen,E=m.highlightedIndex,S=m.selectedItem,T=m.inputValue,h=u.useRef(null),w=u.useRef({}),_=u.useRef(null),$=u.useRef(null),M=u.useRef(!0),O=Q$(t),N=u.useRef(),V=cl({state:m,props:t}),z=u.useCallback(function(B){return w.current[O.getItemId(B)]},[O]);Gf(a,[x,E,T,i],ie({isInitialMount:M.current,previousResultCount:N.current,items:i,environment:s,itemToString:l},m)),Gf(c,[S],ie({isInitialMount:M.current,previousResultCount:N.current,items:i,environment:s,itemToString:l},m));var j=rR({menuElement:h.current,highlightedIndex:E,isOpen:x,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:z});ul({isInitialMount:M.current,props:t,state:m}),u.useEffect(function(){var B=n||r||x;B&&_.current&&_.current.focus()},[]),u.useEffect(function(){M.current||(N.current=i.length)});var R=nR(x,[_,h,$],s,function(){p({type:Vi,selectItem:!1})}),v=ll("getInputProps","getMenuProps");u.useEffect(function(){return M.current=!1,function(){M.current=!0}},[]),u.useEffect(function(){var B;if(!x)w.current={};else if(((B=s.document)==null?void 0:B.activeElement)!==_.current){var H;_==null||(H=_.current)==null||H.focus()}},[x,s]);var C=u.useMemo(function(){return{ArrowDown:function(H){H.preventDefault(),p({type:dl,altKey:H.altKey,getItemNodeFromIndex:z})},ArrowUp:function(H){H.preventDefault(),p({type:fl,altKey:H.altKey,getItemNodeFromIndex:z})},Home:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:hl,getItemNodeFromIndex:z}))},End:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:ml,getItemNodeFromIndex:z}))},Escape:function(H){var J=V.current.state;(J.isOpen||J.inputValue||J.selectedItem||J.highlightedIndex>-1)&&(H.preventDefault(),p({type:pl}))},Enter:function(H){var J=V.current.state;!J.isOpen||H.which===229||(H.preventDefault(),p({type:yl,getItemNodeFromIndex:z}))},PageUp:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:vl,getItemNodeFromIndex:z}))},PageDown:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:gl,getItemNodeFromIndex:z}))}}},[p,V,z]),I=u.useCallback(function(B){return ie({id:O.labelId,htmlFor:O.inputId},B)},[O]),k=u.useCallback(function(B,H){var J,ee=B===void 0?{}:B,te=ee.onMouseLeave,Z=ee.refKey,ge=Z===void 0?"ref":Z,Ce=ee.ref,Re=kt(ee,dR),Pe=H===void 0?{}:H,Se=Pe.suppressRefError,We=Se===void 0?!1:Se;return v("getMenuProps",We,ge,h),ie((J={},J[ge]=Yn(Ce,function(ke){h.current=ke}),J.id=O.menuId,J.role="listbox",J["aria-labelledby"]=Re&&Re["aria-label"]?void 0:""+O.labelId,J.onMouseLeave=ht(te,function(){p({type:Av})}),J),Re)},[p,v,O]),U=u.useCallback(function(B){var H,J,ee=B===void 0?{}:B,te=ee.item,Z=ee.index,ge=ee.refKey,Ce=ge===void 0?"ref":ge,Re=ee.ref,Pe=ee.onMouseMove,Se=ee.onMouseDown,We=ee.onClick;ee.onPress;var ke=ee.disabled,lt=kt(ee,fR),Ye=V.current,yt=Ye.props,Je=Ye.state,Pt=Pv(te,Z,yt.items,"Pass either item or index to getItemProps!"),Te=Pt[1],Et="onClick",ut=We,cn=function(){Te!==Je.highlightedIndex&&(j.current=!1,p({type:Ov,index:Te,disabled:ke}))},jt=function(){p({type:wl,index:Te})},St=function(Ct){return Ct.preventDefault()};return ie((H={},H[Ce]=Yn(Re,function(je){je&&(w.current[O.getItemId(Te)]=je)}),H.disabled=ke,H.role="option",H["aria-selected"]=""+(Te===Je.highlightedIndex),H.id=O.getItemId(Te),H),!ke&&(J={},J[Et]=ht(ut,jt),J),{onMouseMove:ht(Pe,cn),onMouseDown:ht(Se,St)},lt)},[p,V,j,O]),q=u.useCallback(function(B){var H,J=B===void 0?{}:B,ee=J.onClick;J.onPress;var te=J.refKey,Z=te===void 0?"ref":te,ge=J.ref,Ce=kt(J,pR),Re=V.current.state,Pe=function(){p({type:Dv})};return ie((H={},H[Z]=Yn(ge,function(Se){$.current=Se}),H["aria-controls"]=O.menuId,H["aria-expanded"]=Re.isOpen,H.id=O.toggleButtonId,H.tabIndex=-1,H),!Ce.disabled&&ie({},{onClick:ht(ee,Pe)}),Ce)},[p,V,O]),ue=u.useCallback(function(B,H){var J,ee=B===void 0?{}:B,te=ee.onKeyDown,Z=ee.onChange,ge=ee.onInput,Ce=ee.onFocus,Re=ee.onBlur;ee.onChangeText;var Pe=ee.refKey,Se=Pe===void 0?"ref":Pe,We=ee.ref,ke=kt(ee,hR),lt=H===void 0?{}:H,Ye=lt.suppressRefError,yt=Ye===void 0?!1:Ye;v("getInputProps",yt,Se,_);var Je=V.current.state,Pt=function(Ct){var Lt=Ro(Ct);Lt&&C[Lt]&&C[Lt](Ct)},Te=function(Ct){p({type:bl,inputValue:Ct.target.value})},Et=function(Ct){if(Je.isOpen&&!R.current.isMouseDown){var Lt=Ct.relatedTarget===null&&s.document.activeElement!==s.document.body;p({type:Vi,selectItem:!Lt})}},ut=function(){Je.isOpen||p({type:xl})},cn="onChange",jt={};if(!ke.disabled){var St;jt=(St={},St[cn]=ht(Z,ge,Te),St.onKeyDown=ht(te,Pt),St.onBlur=ht(Re,Et),St.onFocus=ht(Ce,ut),St)}return ie((J={},J[Se]=Yn(We,function(je){_.current=je}),J["aria-activedescendant"]=Je.isOpen&&Je.highlightedIndex>-1?O.getItemId(Je.highlightedIndex):"",J["aria-autocomplete"]="list",J["aria-controls"]=O.menuId,J["aria-expanded"]=Je.isOpen,J["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+O.labelId,J.autoComplete="off",J.id=O.inputId,J.role="combobox",J.value=Je.inputValue,J),jt,ke)},[v,V,O,C,p,R,s]),W=u.useCallback(function(){p({type:Mv})},[p]),L=u.useCallback(function(){p({type:Nv})},[p]),oe=u.useCallback(function(){p({type:kv})},[p]),G=u.useCallback(function(B){p({type:Vv,highlightedIndex:B})},[p]),X=u.useCallback(function(B){p({type:El,selectedItem:B})},[p]),ne=u.useCallback(function(B){p({type:jv,inputValue:B})},[p]),ae=u.useCallback(function(){p({type:Lv})},[p]);return{getItemProps:U,getLabelProps:I,getMenuProps:k,getInputProps:ue,getToggleButtonProps:q,toggleMenu:W,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:ne,selectItem:X,reset:ae,highlightedIndex:E,isOpen:x,selectedItem:S,inputValue:T}}var Hv={activeIndex:-1,selectedItems:[]};function Zf(e,t){return lo(e,t,Hv)}function Qf(e,t){return sn(e,t,Hv)}function mR(e){var t=Zf(e,"activeIndex"),n=Zf(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function Jf(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 vR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var gR={selectedItems:K.array,initialSelectedItems:K.array,defaultSelectedItems:K.array,itemToString:K.func,getA11yRemovalMessage:K.func,stateReducer:K.func,activeIndex:K.number,initialActiveIndex:K.number,defaultActiveIndex:K.number,onActiveIndexChange:K.func,onSelectedItemsChange:K.func,keyNavigationNext:K.string,keyNavigationPrevious:K.string,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})})},yR={itemToString:go.itemToString,stateReducer:go.stateReducer,environment:go.environment,getA11yRemovalMessage:vR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Wv=Wt;process.env.NODE_ENV!=="production"&&(Wv=function(t,n){K.checkPropTypes(gR,t,"prop",n.name)});var _l=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Sl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Tl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,$l=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Rl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Pl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Il=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Al=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Ol=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Dl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ml=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,kl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Nl=process.env.NODE_ENV!=="production"?"__function_reset__":12,bR=Object.freeze({__proto__:null,SelectedItemClick:_l,SelectedItemKeyDownDelete:Sl,SelectedItemKeyDownBackspace:Tl,SelectedItemKeyDownNavigationNext:$l,SelectedItemKeyDownNavigationPrevious:Rl,DropdownKeyDownNavigationPrevious:Pl,DropdownKeyDownBackspace:Il,DropdownClick:Al,FunctionAddSelectedItem:Ol,FunctionRemoveSelectedItem:Dl,FunctionSetSelectedItems:Ml,FunctionSetActiveIndex:kl,FunctionReset:Nl});function xR(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,s=e.activeIndex,a=e.selectedItems,c;switch(n){case _l:c={activeIndex:r};break;case Rl:c={activeIndex:s-1<0?0:s-1};break;case $l:c={activeIndex:s+1>=a.length?-1:s+1};break;case Tl:case Sl:{if(s<0)break;var l=s;a.length===1?l=-1:s===a.length-1&&(l=a.length-2),c=ie({selectedItems:[].concat(a.slice(0,s),a.slice(s+1))},{activeIndex:l});break}case Pl:c={activeIndex:a.length-1};break;case Il:c={selectedItems:a.slice(0,a.length-1)};break;case Ol:c={selectedItems:[].concat(a,[o])};break;case Al:c={activeIndex:-1};break;case Dl:{var d=s,f=a.indexOf(o);if(f<0)break;a.length===1?d=-1:f===a.length-1&&(d=a.length-2),c={selectedItems:[].concat(a.slice(0,f),a.slice(f+1)),activeIndex:d};break}case Ml:{var m=t.selectedItems;c={selectedItems:m};break}case kl:{var p=t.activeIndex;c={activeIndex:p};break}case Nl:c={activeIndex:Qf(i,"activeIndex"),selectedItems:Qf(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,c)}var wR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],ER=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Vl.stateChangeTypes=bR;function Vl(e){e===void 0&&(e={}),Wv(e,Vl);var t=ie({},yR,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,s=t.keyNavigationPrevious,a=eR(xR,mR(t),t),c=a[0],l=a[1],d=c.activeIndex,f=c.selectedItems,m=u.useRef(!0),p=u.useRef(null),x=u.useRef(f),E=u.useRef();E.current=[];var S=cl({state:c,props:t});u.useEffect(function(){if(!m.current){if(f.length<x.current.length){var j=x.current.find(function(R){return f.indexOf(R)<0});sl(n({itemToString:r,resultCount:f.length,removedSelectedItem:j,activeIndex:d,activeSelectedItem:f[d]}),i.document)}x.current=f}},[f.length]),u.useEffect(function(){m.current||(d===-1&&p.current?p.current.focus():E.current[d]&&E.current[d].focus())},[d]),ul({isInitialMount:m.current,props:t,state:c});var T=ll("getDropdownProps");u.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var h=u.useMemo(function(){var j;return j={},j[s]=function(){l({type:Rl})},j[o]=function(){l({type:$l})},j.Delete=function(){l({type:Sl})},j.Backspace=function(){l({type:Tl})},j},[l,o,s]),w=u.useMemo(function(){var j;return j={},j[s]=function(R){Jf(R)&&l({type:Pl})},j.Backspace=function(v){Jf(v)&&l({type:Il})},j},[l,s]),_=u.useCallback(function(j){var R,v=j===void 0?{}:j,C=v.refKey,I=C===void 0?"ref":C,k=v.ref,U=v.onClick,q=v.onKeyDown,ue=v.selectedItem,W=v.index,L=kt(v,wR),oe=S.current.state,G=Pv(ue,W,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),X=G[1],ne=X>-1&&X===oe.activeIndex,ae=function(){l({type:_l,index:X})},B=function(J){var ee=Ro(J);ee&&h[ee]&&h[ee](J)};return ie((R={},R[I]=Yn(k,function(H){H&&E.current.push(H)}),R.tabIndex=ne?0:-1,R.onClick=ht(U,ae),R.onKeyDown=ht(q,B),R),L)},[l,S,h]),$=u.useCallback(function(j,R){var v,C=j===void 0?{}:j,I=C.refKey,k=I===void 0?"ref":I,U=C.ref,q=C.onKeyDown,ue=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,oe=kt(C,ER),G=R===void 0?{}:R,X=G.suppressRefError,ne=X===void 0?!1:X;T("getDropdownProps",ne,k,p);var ae=function(J){var ee=Ro(J);ee&&w[ee]&&w[ee](J)},B=function(){l({type:Al})};return ie((v={},v[k]=Yn(U,function(H){H&&(p.current=H)}),v),!L&&{onKeyDown:ht(q,ae),onClick:ht(ue,B)},oe)},[l,w,T]),M=u.useCallback(function(j){l({type:Ol,selectedItem:j})},[l]),O=u.useCallback(function(j){l({type:Dl,selectedItem:j})},[l]),N=u.useCallback(function(j){l({type:Ml,selectedItems:j})},[l]),V=u.useCallback(function(j){l({type:kl,activeIndex:j})},[l]),z=u.useCallback(function(){l({type:Nl})},[l]);return{getSelectedItemProps:_,getDropdownProps:$,addSelectedItem:M,removeSelectedItem:O,setSelectedItems:N,setActiveIndex:V,reset:z,selectedItems:f,activeIndex:d}}var CR="jbnkvn0",ep=it({defaultClassName:"jbnkvn7",variantClassNames:{highlighted:{true:"jbnkvn8"},selected:{true:"jbnkvn9"},multiSelected:{true:"jbnkvna"},isDisabled:{true:"jbnkvnb"}},defaultVariants:{},compoundVariants:[]}),tp="jbnkvn6",_R="jbnkvn1",SR=it({defaultClassName:"jbnkvn2",variantClassNames:{isMobile:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),TR="jbnkvn5",np="jbnkvnc";const Uv=u.createContext(void 0),$R=({children:e,contextValue:t})=>D.jsx(Uv.Provider,{value:t,children:e}),jl=()=>{const e=u.useContext(Uv);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yv=({children:e,renderer:t})=>{const{getMenuProps:n}=jl();return t?t({children:e,defaultClassName:tp,innerProps:n()}):D.jsx("div",{className:tp,...n(),children:e})};Yv.defaultProps={renderer:void 0};const Kv=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:i,multipleSelectedItems:o,highlightedIndex:s,getItemProps:a,onClickItem:c}=jl(),l=s===n,d=i===t&&!r,f=r&&o.includes(t)||!1,m=a({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:ep({highlighted:s===n,selected:i===t&&!r,multiSelected:o.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:l,isSelected:d,isChecked:f}):D.jsxs("div",{className:ep({highlighted:l,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[D.jsx("span",{children:t.label}),r&&o.includes(t)&&D.jsx(rc,{size:16,color:dt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kv.defaultProps={renderer:void 0};const zv=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:i,isDisabled:o}=jl();if(e)return e({innerProps:i(),defaultClassName:np,isOpen:r});const s=n==="disabled"?dt.theme.colors.black:dt.theme.colors.grey1;return D.jsx("div",{className:np,...i({disabled:o}),"data-disabled":o,children:r?D.jsx(oc,{color:s,...t}):D.jsx(wo,{color:s,...t})})};zv.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const jr=u.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:i,components:o,required:s,containerStyles:a,isMulti:c,isReadOnly:l,isMobile:d,onClickItem:f,...m},p)=>{const{addonLeft:x,addonRight:E,helperTextLeft:S,helperTextRight:T,isError:h,errorMessage:w,isDisabled:_,isValid:$}=m,[M,O]=u.useState(e),N=hc({isError:h,isDisabled:_,isValid:$}),V=u.useRef(null),{removeSelectedItem:z,selectedItems:j,addSelectedItem:R,getDropdownProps:v}=Vl({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(B){c&&r(B.selectedItems)}}),C=u.useMemo(()=>j.length,[j]),I=u.useCallback(B=>{let H=B;(c&&!d||l)&&(H="");const J=new RegExp(H.toLowerCase());return e.filter(ee=>J.test(ee.label.toLowerCase()))},[e]),{isOpen:k,getToggleButtonProps:U,getLabelProps:q,getMenuProps:ue,getInputProps:W,highlightedIndex:L,getItemProps:oe,selectedItem:G,openMenu:X,closeMenu:ne}=Nr({items:M,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:B})=>{O(I(B||""))},itemToString(B){return B?B.label:""},onSelectedItemChange(B){var H;c||(r(B.selectedItem),l&&((H=V.current)==null||H.blur()),ne())},stateReducer:(B,H)=>{const{changes:J,type:ee}=H,te=M.find((Z,ge)=>ge===B.highlightedIndex);switch(ee){case Nr.stateChangeTypes.InputKeyDownEnter:case Nr.stateChangeTypes.ItemClick:if(c){let Z=C;return j.includes(te)?(Z-=1,z(te)):(Z+=1,R(te)),{...J,isOpen:!0,highlightedIndex:B.highlightedIndex,inputValue:!d&&Z>0?`${Z} items selected`:""}}return{...J,isOpen:!1,highlightedIndex:B.highlightedIndex,inputValue:J.inputValue};case Nr.stateChangeTypes.InputBlur:{let Z=J.inputValue;return c&&!d&&(C>0?Z=`${C} items selected`:Z=""),{...J,inputValue:Z}}default:return J}}});u.useImperativeHandle(p,()=>V.current);const ae={isOpen:k,formState:N,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:_,totalSelected:C,highlightedIndex:L,getMenuProps:ue,getItemProps:oe,getToggleButtonProps:U,onClickItem:f};return D.jsx($R,{contextValue:ae,children:D.jsxs(at,{position:"relative",w:"$full",children:[D.jsxs(Xr,{addonLeft:x,addonRight:E,helperTextLeft:S,helperTextRight:T,isError:h,errorMessage:w,isDisabled:_,isValid:$,inputAreaClassName:CR,children:[D.jsxs("div",{className:_R,children:[D.jsx("input",{"data-test-id":m["data-test-id"],...W(v({preventKeyAction:k,ref:V,placeholder:n,readOnly:l,disabled:_,className:SR({isMobile:d}),onClick:()=>{k||X()}}))}),d&&c&&D.jsx("div",{className:TR,children:C>0?`${C} items selected`:""}),d&&D.jsx(jo,{isSelect:!0,isError:h,isDisabled:_,required:s,...q(),children:n})]}),D.jsx(zv,{renderer:o==null?void 0:o.Toggle})]}),k&&D.jsx(Yv,{renderer:o==null?void 0:o.List,children:M.map((B,H)=>D.jsx(Kv,{renderer:o==null?void 0:o.ListItem,itemIndex:H,item:B}))})]})})});jr.displayName="Select";jr.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};const Xv=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},RR=Array.from({length:31},(e,t)=>({label:Xv(t+1),value:String(t+1),isDisabled:!1})),ji=["January","February","March","April","May","June","July","August","September","October","November","December"],PR=ji.map(e=>({label:e,value:e,isDisabled:!1})),IR=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}))},aa=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xv(n.getDate()),value:n.getDate().toString()};if(e==="month")return{label:ji[n.getMonth()],value:ji[n.getMonth()]};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r}}}},bo=e=>ji.findIndex(t=>t===e),rp=(e,t)=>new Date(e,bo(t)+1,0).getDate(),AR=({date:e,month:t,year:n,maxDate:r})=>{const i=r?new Date(r):new Date;return i.setHours(0,0,0,0),e&&t&&n&&e<=rp(n,t)&&i>new Date(n,bo(t),e,0,0,0,0)?!0:e&&t&&!n?bo(t)===1?e<=29:e<=rp(0,t):!e&&t&&n?n===i.getFullYear()?bo(t)<=i.getMonth():!0:e&&!t&&n?i.getMonth()===0&&n===i.getFullYear()?e<i.getDate():!0:!1},Gv=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:i,onClose:o,isOpen:s,buttonText:a,errorMessage:c,...l})=>{const[d,f]=u.useState(),[m,p]=u.useState(),[x,E]=u.useState(),S=u.useRef(null),T=()=>{f(void 0),p(void 0),E(void 0)},h=u.useMemo(()=>{if(s){if(d)return d;if(r)return aa("date",r)}},[r,d,s]),w=u.useMemo(()=>{if(s){if(m)return m;if(r)return aa("month",r)}},[r,m,s]),_=u.useMemo(()=>{if(s){if(x)return x;if(r)return aa("year",r)}},[r,x,s]),$=u.useMemo(()=>h||w||_?AR({date:h?Number(h==null?void 0:h.value):0,month:w?w.value:"",year:_?Number(_.value):0,maxDate:t}):!1,[h,w,_,t]),M=h&&w&&!_&&!$,O=h&&!w&&_&&!$,N=!h&&w&&_&&!$,V=h&&w&&_&&!$,z=()=>D.jsx(at,{as:"button",ref:S,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:D.jsx(at,{display:"none"})}),j=()=>{S.current&&S.current.focus()};return D.jsx(No,{...l,isOpen:s,onClose:()=>{o==null||o(),T()},children:D.jsxs(mr,{gap:"$24",children:[D.jsxs(mr,{gap:"$8",children:[D.jsx(at,{height:"$40",children:D.jsx(Vo,{children:e})}),D.jsxs(mr,{children:[D.jsxs(Rt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[D.jsx(jr,{isReadOnly:!0,name:"date",label:"Date",value:h,isMobile:n,options:RR,onClickItem:j,onChange:f,isError:M||O||V,"data-test-id":"CT_Component_SelectPicker_dateField"}),D.jsx(jr,{isReadOnly:!0,name:"month",label:"Month",value:w,isMobile:n,options:PR,onClickItem:j,onChange:p,isError:N||M||V,"data-test-id":"CT_Component_SelectPicker_monthField"}),D.jsx(jr,{isReadOnly:!0,name:"year",label:"Year",value:_,isMobile:n,options:IR(t),onClickItem:j,onChange:E,isError:N||O||V,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(V||N||O||M)&&D.jsx(Nt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),z(),D.jsx(Ur,{onClick:()=>{i(new Date(Number(_==null?void 0:_.value),bo(w==null?void 0:w.value),Number(h==null?void 0:h.value))),T()},isDisabled:!_||!w||!h||!$,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:a})]})})};Gv.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};const ca="rovingFocusGroup.onEntryFocus",OR={bubbles:!1,cancelable:!0},Ll="RovingFocusGroup",[Ya,qv,DR]=Li(Ll),[MR,Zv]=Xt(Ll,[DR]),[kR,NR]=MR(Ll),VR=u.forwardRef((e,t)=>u.createElement(Ya.Provider,{scope:e.__scopeRovingFocusGroup},u.createElement(Ya.Slot,{scope:e.__scopeRovingFocusGroup},u.createElement(jR,ie({},e,{ref:t}))))),jR=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...d}=e,f=u.useRef(null),m=Xe(t,f),p=Fi(o),[x=null,E]=tn({prop:s,defaultProp:a,onChange:c}),[S,T]=u.useState(!1),h=Vt(l),w=qv(n),_=u.useRef(!1),[$,M]=u.useState(0);return u.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(ca,h),()=>O.removeEventListener(ca,h)},[h]),u.createElement(kR,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:x,onItemFocus:u.useCallback(O=>E(O),[E]),onItemShiftTab:u.useCallback(()=>T(!0),[]),onFocusableItemAdd:u.useCallback(()=>M(O=>O+1),[]),onFocusableItemRemove:u.useCallback(()=>M(O=>O-1),[])},u.createElement(Fe.div,ie({tabIndex:S||$===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{_.current=!0}),onFocus:Ie(e.onFocus,O=>{const N=!_.current;if(O.target===O.currentTarget&&N&&!S){const V=new CustomEvent(ca,OR);if(O.currentTarget.dispatchEvent(V),!V.defaultPrevented){const z=w().filter(I=>I.focusable),j=z.find(I=>I.active),R=z.find(I=>I.id===x),C=[j,R,...z].filter(Boolean).map(I=>I.ref.current);Qv(C)}}_.current=!1}),onBlur:Ie(e.onBlur,()=>T(!1))})))}),LR="RovingFocusGroupItem",FR=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=$n(),c=o||a,l=NR(LR,n),d=l.currentTabStopId===c,f=qv(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=l;return u.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),u.createElement(Ya.ItemSlot,{scope:n,id:c,focusable:r,active:i},u.createElement(Fe.span,ie({tabIndex:d?0:-1,"data-orientation":l.orientation},s,{ref:t,onMouseDown:Ie(e.onMouseDown,x=>{r?l.onItemFocus(c):x.preventDefault()}),onFocus:Ie(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:Ie(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){l.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const E=WR(x,l.orientation,l.dir);if(E!==void 0){x.preventDefault();let T=f().filter(h=>h.focusable).map(h=>h.ref.current);if(E==="last")T.reverse();else if(E==="prev"||E==="next"){E==="prev"&&T.reverse();const h=T.indexOf(x.currentTarget);T=l.loop?UR(T,h+1):T.slice(h+1)}setTimeout(()=>Qv(T))}})})))}),BR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function WR(e,t,n){const r=HR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return BR[r]}function Qv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function UR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const YR=VR,KR=FR,Jv="Radio",[zR,eg]=Xt(Jv),[XR,GR]=zR(Jv),qR=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...l}=e,[d,f]=u.useState(null),m=Xe(t,E=>f(E)),p=u.useRef(!1),x=d?!!d.closest("form"):!0;return u.createElement(XR,{scope:n,checked:i,disabled:s},u.createElement(Fe.button,ie({type:"button",role:"radio","aria-checked":i,"data-state":tg(i),"data-disabled":s?"":void 0,disabled:s,value:a},l,{ref:m,onClick:Ie(e.onClick,E=>{i||c==null||c(),x&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})),x&&u.createElement(JR,{control:d,bubbles:!p.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),ZR="RadioIndicator",QR=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=GR(ZR,n);return u.createElement(Jn,{present:r||o.checked},u.createElement(Fe.span,ie({"data-state":tg(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),JR=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function tg(e){return e?"checked":"unchecked"}const eP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ng="RadioGroup",[tP,qI]=Xt(ng,[Zv,eg]),rg=Zv(),og=eg(),[nP,rP]=tP(ng),oP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:l,loop:d=!0,onValueChange:f,...m}=e,p=rg(n),x=Fi(l),[E,S]=tn({prop:o,defaultProp:i,onChange:f});return u.createElement(nP,{scope:n,name:r,required:s,disabled:a,value:E,onValueChange:S},u.createElement(YR,ie({asChild:!0},p,{orientation:c,dir:x,loop:d}),u.createElement(Fe.div,ie({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x},m,{ref:t}))))}),iP="RadioGroupItem",sP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=rP(iP,n),s=o.disabled||r,a=rg(n),c=og(n),l=u.useRef(null),d=Xe(t,l),f=o.value===i.value,m=u.useRef(!1);return u.useEffect(()=>{const p=E=>{eP.includes(E.key)&&(m.current=!0)},x=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",x)}},[]),u.createElement(KR,ie({asChild:!0},a,{focusable:!s,active:f}),u.createElement(qR,ie({disabled:s,required:o.required,checked:f},c,i,{name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:Ie(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ie(i.onFocus,()=>{var p;m.current&&((p=l.current)===null||p===void 0||p.click())})})))}),aP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=og(n);return u.createElement(QR,ie({},i,r,{ref:t}))}),cP=oP,lP=sP,uP=aP;var dP=it({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),fP="d6umgr1",pP=it({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),hP="d6umgr0";const ig=({children:e,className:t,disabled:n,...r})=>{const i=u.useId();return D.jsxs(Rt,{alignItems:"center",children:[D.jsx(lP,{...r,disabled:n,className:$e(t,hP),id:i,children:D.jsx(uP,{className:$e("radio-indicator",pP({disabled:n}))})}),e&&D.jsx("label",{className:$e("radio-label",dP({disabled:n})),htmlFor:i,children:e})]})};ig.defaultProps={children:void 0};const mP=({className:e,children:t,...n})=>D.jsx(cP,{...n,className:$e(e,fP),children:t});var vP="_846x3h0",gP="_846x3h1",yP=it({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const Fl=u.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:i,...o},s)=>{const[a,c]=u.useState(!1),l=()=>c(!0),d=()=>c(!1),f=u.useMemo(()=>!!(i||e&&a),[a,e,i]);return D.jsxs(at,{position:"relative",children:[D.jsx(at,{className:$e(vP),children:D.jsx(R0,{size:24})}),D.jsx("input",{className:$e(yP({size:n,isHasIcon:f,isDisabled:r})),ref:s,value:e,"data-test-id":o["data-test-id"],onFocus:l,onBlur:d,disabled:r,...o}),f&&D.jsx(at,{className:$e(gP),children:i&&(!a||a&&!e)?i:D.jsx(Ui,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});Fl.displayName="Search";Fl.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const sg="Switch",[bP,ZI]=Xt(sg),[xP,wP]=bP(sg),EP=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:l,...d}=e,[f,m]=u.useState(null),p=Xe(t,h=>m(h)),x=u.useRef(!1),E=f?!!f.closest("form"):!0,[S=!1,T]=tn({prop:i,defaultProp:o,onChange:l});return u.createElement(xP,{scope:n,checked:S,disabled:a},u.createElement(Fe.button,ie({type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":ag(S),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onClick:Ie(e.onClick,h=>{T(w=>!w),E&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})})),E&&u.createElement(SP,{control:f,bubbles:!x.current,name:r,value:c,checked:S,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),CP="SwitchThumb",_P=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=wP(CP,n);return u.createElement(Fe.span,ie({"data-state":ag(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),SP=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ag(e){return e?"checked":"unchecked"}const TP=EP,$P=_P;var RP="b7c0j12",PP="b7c0j10",IP="b7c0j11";const cg=u.forwardRef((e,t)=>D.jsx(TP,{ref:t,className:PP,...e,children:D.jsx($P,{className:IP,children:D.jsx(rc,{className:RP,size:16})})}));cg.displayName="Switch";const lg=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const i=t.by===e,o=t.order==="DESC",s=t.order==="ASC";return n?D.jsxs(Rt,{flexDirection:"column","data-test-id":r,children:[D.jsx(oc,{size:10,color:i&&o?"white":"grey"}),D.jsx(wo,{size:10,color:i&&s?"white":"grey"})]}):null};lg.defaultProps={sortable:!1,"data-test-id":""};var AP="_94c6vs1",OP="_94c6vs3",op="_94c6vs2",DP="_94c6vs0";const ug=({data:e,columns:t})=>{const[n,r]=u.useState([]),[i,o]=u.useState([]),[s,a]=u.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,p=f.sortable,x=s.by===m;return p?x&&s.order==="ASC"?a({by:m,order:"DESC"}):x&&s.order==="DESC"?a({by:"",order:""}):a({by:m,order:"ASC"}):null},l=f=>typeof f=="object"?"":f,d=u.useCallback((f,m)=>{const p=[...f];return m.order==="ASC"?p.sort((E,S)=>String(S[m.by]).localeCompare(String(E[m.by]))):m.order==="DESC"?p.sort((E,S)=>String(E[m.by]).localeCompare(String(S[m.by]))):[...f]},[]);return u.useEffect(()=>{const f=t.map(x=>({...x,sortable:x.sortable??!1}));r(f);const p=d(e,{by:s.by,order:s.order}).map(x=>f.map(E=>({accessor:E.accessor,sortable:E.sortable??!1,value:l(x[E.accessor]),...E.cellRenderer&&{CellRenderer:E.cellRenderer({origin:x,value:x[E.accessor]})}})));o(p)},[t,e,d,s.by,s.order]),{headers:n,rows:i,handleHeaderClick:c,sortColumn:s}},dg=u.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:i,...o},s)=>{const a=t||"table",{rows:c,headers:l,handleHeaderClick:d,sortColumn:f}=ug({data:r,columns:e});return u.useEffect(()=>{i&&i(f)},[i,f]),D.jsxs(a,{ref:s,as:t,className:DP,"data-test-id":n,...o,children:[D.jsx("thead",{children:D.jsx("tr",{className:OP,children:l.map(m=>D.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:op,onClick:()=>d(m),children:D.jsxs(Rt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[D.jsx(at,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),D.jsx(lg,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),D.jsx("tbody",{children:c.map((m,p)=>D.jsx("tr",{className:AP,children:m.map((x,E)=>D.jsx(at,{as:"td","data-test-id":`table-${n}-row${p}-col${E}`,className:op,w:"33%",children:x.CellRenderer??x.value}))}))})]})});dg.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var MP=it({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var kP=it({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const Bl=u.createContext({index:0,setIndex:()=>null}),Hl=u.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:i,align:o,onChange:s,...a},c)=>{const[l,d]=u.useState(i??0),f=u.useMemo(()=>u.Children.map(t,(x,E)=>u.cloneElement(x,{"data-index":E})),[t]);u.useEffect(()=>d(r??0),[r]);const m=u.useMemo(()=>({index:l,setIndex:E=>{d(E),s==null||s(E)}}),[l,s]),p=e||"ul";return D.jsx(p,{"data-test-id":a["data-test-id"],as:e,ref:c,className:$e(kP({withShadow:n,align:o})),...a,children:D.jsx(Bl.Provider,{value:m,children:f})})});Hl.displayName="Tabs";Hl.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const Wl=u.forwardRef(({as:e,children:t,...n},r)=>{const{index:i,setIndex:o}=u.useContext(Bl),s=u.useCallback(l=>{o==null||o(l)},[o]),a=n["data-index"]===i,c=e||"li";return D.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>s(n["data-index"]||0),className:$e(MP({isActive:a})),...n,children:D.jsx(Nt,{as:"span",textStyle:"body2",children:t})})});Wl.displayName="TabItem";Wl.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const fg="ToastProvider",[Ul,NP,VP]=Li("Toast"),[pg,QI]=Xt("Toast",[VP]),[jP,ys]=pg(fg),hg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=e,[a,c]=u.useState(null),[l,d]=u.useState(0),f=u.useRef(!1),m=u.useRef(!1);return u.createElement(Ul.Provider,{scope:t},u.createElement(jP,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:u.useCallback(()=>d(p=>p+1),[]),onToastRemove:u.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},s))};hg.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${fg}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const LP="ToastViewport",FP=["F8"],Ka="toast.viewportPause",za="toast.viewportResume",BP=u.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=FP,label:i="Notifications ({hotkey})",...o}=e,s=ys(LP,n),a=NP(n),c=u.useRef(null),l=u.useRef(null),d=u.useRef(null),f=u.useRef(null),m=Xe(t,f,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;u.useEffect(()=>{const S=T=>{var h;r.every(_=>T[_]||T.code===_)&&((h=f.current)===null||h===void 0||h.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),u.useEffect(()=>{const S=c.current,T=f.current;if(x&&S&&T){const h=()=>{if(!s.isClosePausedRef.current){const M=new CustomEvent(Ka);T.dispatchEvent(M),s.isClosePausedRef.current=!0}},w=()=>{if(s.isClosePausedRef.current){const M=new CustomEvent(za);T.dispatchEvent(M),s.isClosePausedRef.current=!1}},_=M=>{!S.contains(M.relatedTarget)&&w()},$=()=>{S.contains(document.activeElement)||w()};return S.addEventListener("focusin",h),S.addEventListener("focusout",_),S.addEventListener("pointermove",h),S.addEventListener("pointerleave",$),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{S.removeEventListener("focusin",h),S.removeEventListener("focusout",_),S.removeEventListener("pointermove",h),S.removeEventListener("pointerleave",$),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[x,s.isClosePausedRef]);const E=u.useCallback(({tabbingDirection:S})=>{const h=a().map(w=>{const _=w.ref.current,$=[_,...nI(_)];return S==="forwards"?$:$.reverse()});return(S==="forwards"?h.reverse():h).flat()},[a]);return u.useEffect(()=>{const S=f.current;if(S){const T=h=>{const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const N=document.activeElement,V=h.shiftKey;if(h.target===S&&V){var $;($=l.current)===null||$===void 0||$.focus();return}const R=E({tabbingDirection:V?"backwards":"forwards"}),v=R.findIndex(C=>C===N);if(la(R.slice(v+1)))h.preventDefault();else{var M,O;V?(M=l.current)===null||M===void 0||M.focus():(O=d.current)===null||O===void 0||O.focus()}}};return S.addEventListener("keydown",T),()=>S.removeEventListener("keydown",T)}},[a,E]),u.createElement(q0,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"}},x&&u.createElement(ip,{ref:l,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"forwards"});la(S)}}),u.createElement(Ul.Slot,{scope:n},u.createElement(Fe.ol,ie({tabIndex:-1},o,{ref:m}))),x&&u.createElement(ip,{ref:d,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"backwards"});la(S)}}))}),HP="ToastFocusProxy",ip=u.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=ys(HP,n);return u.createElement(Zi,ie({"aria-hidden":!0,tabIndex:0},i,{ref:t,style:{position:"fixed"},onFocus:s=>{var a;const c=s.relatedTarget;!((a=o.viewport)!==null&&a!==void 0&&a.contains(c))&&r()}}))}),bs="Toast",WP="toast.swipeStart",UP="toast.swipeMove",YP="toast.swipeCancel",KP="toast.swipeEnd",zP=u.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=e,[a=!0,c]=tn({prop:r,defaultProp:i,onChange:o});return u.createElement(Jn,{present:n||a},u.createElement(mg,ie({open:a},s,{ref:t,onClose:()=>c(!1),onPause:Vt(e.onPause),onResume:Vt(e.onResume),onSwipeStart:Ie(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ie(e.onSwipeMove,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ie(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ie(e.onSwipeEnd,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[XP,GP]=pg(bs,{onClose(){}}),mg=u.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:p,...x}=e,E=ys(bs,n),[S,T]=u.useState(null),h=Xe(t,C=>T(C)),w=u.useRef(null),_=u.useRef(null),$=i||E.duration,M=u.useRef(0),O=u.useRef($),N=u.useRef(0),{onToastAdd:V,onToastRemove:z}=E,j=Vt(()=>{var C;(S==null?void 0:S.contains(document.activeElement))&&((C=E.viewport)===null||C===void 0||C.focus()),s()}),R=u.useCallback(C=>{!C||C===1/0||(window.clearTimeout(N.current),M.current=new Date().getTime(),N.current=window.setTimeout(j,C))},[j]);u.useEffect(()=>{const C=E.viewport;if(C){const I=()=>{R(O.current),l==null||l()},k=()=>{const U=new Date().getTime()-M.current;O.current=O.current-U,window.clearTimeout(N.current),c==null||c()};return C.addEventListener(Ka,k),C.addEventListener(za,I),()=>{C.removeEventListener(Ka,k),C.removeEventListener(za,I)}}},[E.viewport,$,c,l,R]),u.useEffect(()=>{o&&!E.isClosePausedRef.current&&R($)},[o,$,E.isClosePausedRef,R]),u.useEffect(()=>(V(),()=>z()),[V,z]);const v=u.useMemo(()=>S?gg(S):null,[S]);return E.viewport?u.createElement(u.Fragment,null,v&&u.createElement(qP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},v),u.createElement(XP,{scope:n,onClose:j},en.createPortal(u.createElement(Ul.ItemSlot,{scope:n},u.createElement(G0,{asChild:!0,onEscapeKeyDown:Ie(a,()=>{E.isFocusedToastEscapeKeyDownRef.current||j(),E.isFocusedToastEscapeKeyDownRef.current=!1})},u.createElement(Fe.li,ie({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":E.swipeDirection},x,{ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ie(e.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Ie(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ie(e.onPointerMove,C=>{if(!w.current)return;const I=C.clientX-w.current.x,k=C.clientY-w.current.y,U=!!_.current,q=["left","right"].includes(E.swipeDirection),ue=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,W=q?ue(0,I):0,L=q?0:ue(0,k),oe=C.pointerType==="touch"?10:2,G={x:W,y:L},X={originalEvent:C,delta:G};U?(_.current=G,li(UP,f,X,{discrete:!1})):sp(G,E.swipeDirection,oe)?(_.current=G,li(WP,d,X,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(I)>oe||Math.abs(k)>oe)&&(w.current=null)}),onPointerUp:Ie(e.onPointerUp,C=>{const I=_.current,k=C.target;if(k.hasPointerCapture(C.pointerId)&&k.releasePointerCapture(C.pointerId),_.current=null,w.current=null,I){const U=C.currentTarget,q={originalEvent:C,delta:I};sp(I,E.swipeDirection,E.swipeThreshold)?li(KP,p,q,{discrete:!0}):li(YP,m,q,{discrete:!0}),U.addEventListener("click",ue=>ue.preventDefault(),{once:!0})}})})))),E.viewport))):null});mg.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${bs}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const qP=e=>{const{__scopeToast:t,children:n,...r}=e,i=ys(bs,t),[o,s]=u.useState(!1),[a,c]=u.useState(!1);return eI(()=>s(!0)),u.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:u.createElement(zp,{asChild:!0},u.createElement(Zi,r,o&&u.createElement(u.Fragment,null,i.label," ",n)))},ZP="ToastAction",Yl=u.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?u.createElement(vg,{altText:n,asChild:!0},u.createElement(JP,ie({},r,{ref:t}))):null});Yl.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${ZP}\``)}};const QP="ToastClose",JP=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=GP(QP,n);return u.createElement(vg,{asChild:!0},u.createElement(Fe.button,ie({type:"button"},r,{ref:t,onClick:Ie(e.onClick,i.onClose)})))}),vg=u.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return u.createElement(Fe.div,ie({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},i,{ref:t}))});function gg(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),tI(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...gg(r))}}),t}function li(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hp(i,o):i.dispatchEvent(o)}const sp=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function eI(e=()=>{}){const t=Vt(e);Ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function tI(e){return e.nodeType===e.ELEMENT_NODE}function nI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function la(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const rI=hg,yg=BP,bg=zP,oI=Yl;var iI="_10z4js28",sI=it({defaultClassName:"_10z4js24",variantClassNames:{color:{neutral:"_10z4js25",negative:"_10z4js26"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),aI="_10z4js27",cI="_10z4js29";const xg=rI,Kl=u.forwardRef(({className:e,...t},n)=>D.jsx(yg,{ref:n,className:$e(cI,e),...t}));Kl.displayName=yg.displayName;const xs=u.forwardRef(({className:e,color:t="neutral",...n},r)=>D.jsx(bg,{ref:r,className:$e(sI({color:t}),e),...n}));xs.displayName=bg.displayName;xs.defaultProps={viewPort:void 0};const zl=u.forwardRef(({className:e,...t},n)=>D.jsx(Yl,{ref:n,className:$e(e),...t}));zl.displayName=oI.displayName;const lI=1,uI=1e6,Tn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let ua=0;function dI(){return ua=(ua+1)%Number.MAX_VALUE,ua.toString()}const da=new Map,ap=e=>{if(da.has(e))return;const t=setTimeout(()=>{da.delete(e),xo({type:Tn.REMOVE_TOAST,toastId:e})},uI);da.set(e,t)};function wg(e,t){switch(t.type){case Tn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,lI)};case Tn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Tn.DISMISS_TOAST:{const{toastId:n}=t;return n?ap(n):e.toasts.forEach(r=>{ap(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Tn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const gi=[];let yi={toasts:[]};function xo(e){yi=wg(yi,e),gi.forEach(t=>{t(yi)})}function Eg({...e}){const t=dI(),n=i=>xo({type:Tn.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>xo({type:Tn.DISMISS_TOAST,toastId:t});return xo({type:Tn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Cg(){const[e,t]=u.useState(yi);return u.useEffect(()=>(gi.push(t),()=>{const n=gi.indexOf(t);n>-1&&gi.splice(n,1)}),[e]),{...e,toast:Eg,dismiss:n=>xo({type:Tn.DISMISS_TOAST,toastId:n})}}const Xl=u.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Cg();return D.jsx(xg,{children:n.map(({id:i,description:o,action:s,actionText:a,actionClick:c,duration:l=3e3,type:d="foreground",color:f="neutral",viewPort:m,isDismissable:p=!0,...x})=>D.jsxs("div",{children:[D.jsxs(xs,{ref:t,color:f,duration:l,type:d,"data-test-id":`toast-${x["data-test-id"]??""}`,...x,children:[D.jsx(at,{"data-test-id":`toast-${x["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:p?"pointer":"auto",onClick:()=>{p&&r(i)},children:D.jsx(Nt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:aI,children:o})}),!s&&c&&a?D.jsx(zl,{altText:a,asChild:!0,children:D.jsx(nv,{"data-test-id":`action-toast-${x["data-test-id"]??""}`,onClick:c,className:iI,children:a})}):s]},i),D.jsx(Kl,{...m})]},i))})});Xl.displayName="Toaster";const[ws,JI]=Xt("Tooltip",[Gi]),Es=Gi(),fI="TooltipProvider",pI=700,Xa="tooltip.open",[hI,Gl]=ws(fI),mI=e=>{const{__scopeTooltip:t,delayDuration:n=pI,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[s,a]=u.useState(!0),c=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.createElement(hI,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:u.useCallback(d=>{c.current=d},[]),disableHoverableContent:i},o)},ql="Tooltip",[vI,Cs]=ws(ql),gI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,c=Gl(ql,e.__scopeTooltip),l=Es(t),[d,f]=u.useState(null),m=$n(),p=u.useRef(0),x=s??c.disableHoverableContent,E=a??c.delayDuration,S=u.useRef(!1),[T=!1,h]=tn({prop:r,defaultProp:i,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xa))):c.onClose(),o==null||o(O)}}),w=u.useMemo(()=>T?S.current?"delayed-open":"instant-open":"closed",[T]),_=u.useCallback(()=>{window.clearTimeout(p.current),S.current=!1,h(!0)},[h]),$=u.useCallback(()=>{window.clearTimeout(p.current),h(!1)},[h]),M=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{S.current=!0,h(!0)},E)},[E,h]);return u.useEffect(()=>()=>window.clearTimeout(p.current),[]),u.createElement(Up,l,u.createElement(vI,{scope:t,contentId:m,open:T,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayed?M():_()},[c.isOpenDelayed,M,_]),onTriggerLeave:u.useCallback(()=>{x?$():window.clearTimeout(p.current)},[$,x]),onOpen:_,onClose:$,disableHoverableContent:x},n))},cp="TooltipTrigger",yI=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Cs(cp,n),o=Gl(cp,n),s=Es(n),a=u.useRef(null),c=Xe(t,a,i.onTriggerChange),l=u.useRef(!1),d=u.useRef(!1),f=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.createElement(Yp,ie({asChild:!0},s),u.createElement(Fe.button,ie({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:Ie(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ie(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Ie(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ie(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ie(e.onBlur,i.onClose),onClick:Ie(e.onClick,i.onClose)})))}),bI="TooltipPortal",[eA,xI]=ws(bI,{forceMount:void 0}),Po="TooltipContent",wI=u.forwardRef((e,t)=>{const n=xI(Po,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Cs(Po,e.__scopeTooltip);return u.createElement(Jn,{present:r||s.open},s.disableHoverableContent?u.createElement(_g,ie({side:i},o,{ref:t})):u.createElement(EI,ie({side:i},o,{ref:t})))}),EI=u.forwardRef((e,t)=>{const n=Cs(Po,e.__scopeTooltip),r=Gl(Po,e.__scopeTooltip),i=u.useRef(null),o=Xe(t,i),[s,a]=u.useState(null),{trigger:c,onClose:l}=n,d=i.current,{onPointerInTransitChange:f}=r,m=u.useCallback(()=>{a(null),f(!1)},[f]),p=u.useCallback((x,E)=>{const S=x.currentTarget,T={x:x.clientX,y:x.clientY},h=$I(T,S.getBoundingClientRect()),w=RI(T,h),_=PI(E.getBoundingClientRect()),$=AI([...w,..._]);a($),f(!0)},[f]);return u.useEffect(()=>()=>m(),[m]),u.useEffect(()=>{if(c&&d){const x=S=>p(S,d),E=S=>p(S,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",E),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",E)}}},[c,d,p,m]),u.useEffect(()=>{if(s){const x=E=>{const S=E.target,T={x:E.clientX,y:E.clientY},h=(c==null?void 0:c.contains(S))||(d==null?void 0:d.contains(S)),w=!II(T,s);h?m():w&&(m(),l())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,s,l,m]),u.createElement(_g,ie({},e,{ref:o}))}),[CI,_I]=ws(ql,{isInside:!1}),_g=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,c=Cs(Po,n),l=Es(n),{onClose:d}=c;return u.useEffect(()=>(document.addEventListener(Xa,d),()=>document.removeEventListener(Xa,d)),[d]),u.useEffect(()=>{if(c.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),u.createElement(Yi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d},u.createElement(Kp,ie({"data-state":c.stateAttribute},l,a,{ref:t,style:{...a.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)"}}),u.createElement(pp,null,r),u.createElement(CI,{scope:n,isInside:!0},u.createElement(nx,{id:c.contentId,role:"tooltip"},i||r))))}),SI="TooltipArrow",TI=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Es(n);return _I(SI,n).isInside?null:u.createElement(ex,ie({},i,r,{ref:t}))});function $I(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function RI(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 PI(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function II(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,l=t[s].x,d=t[s].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(i=!i)}return i}function AI(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),OI(t)}function OI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}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 DI=mI,MI=gI,kI=yI,NI=wI,VI=TI;function lp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function jI(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 Sg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var i in e){var o=e[i],s=[...n,i];typeof o=="string"||typeof o=="number"||o==null?r[i]=t(o,s):typeof o=="object"&&!Array.isArray(o)?r[i]=Sg(o,t,s):console.warn('Skipping invalid key "'.concat(s.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(o)?"Array":typeof o,'"'))}return r}function LI(e,t){var n={};if(typeof t=="object"){var r=e;Sg(t,(s,a)=>{var c=jI(r,a);n[lp(c)]=String(s)})}else{var i=e;for(var o in i)n[lp(o)]=i[o]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(a=>"".concat(a,":").concat(this[a])).join(";")},writable:!1}),n}var FI="var(--_4goys34)",BI="_4goys35",HI="_4goys36";const Zl=u.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:i,content:o,defaultOpen:s,delayDuration:a=700,disableHoverableContent:c,onOpenChange:l,open:d,position:f,positionOffset:m,withIcon:p,...x},E)=>{const S=dt.atoms.commonAtoms({color:r,bgColor:i}).className,T=dt.atoms.borderAtoms({borderColor:i}).className,w=i.replace("$","");return D.jsxs(MI,{defaultOpen:s,delayDuration:a,disableHoverableContent:c,onOpenChange:l,open:d,children:[D.jsx(kI,{asChild:!0,ref:E,children:n}),D.jsx(ns,{children:D.jsxs(NI,{align:e,alignOffset:t,side:f,sideOffset:m,...x,className:$e(HI,S,T),children:[D.jsxs(Rt,{gap:"$6",children:[p&&D.jsx(Rt,{width:"$24",children:D.jsx(O0,{size:24})}),o]}),D.jsx(VI,{className:BI,style:LI({[FI]:dt.theme.colors[w]})})]})})]})});Zl.displayName="Tooltip";Zl.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 Ql=({children:e})=>D.jsxs(DI,{children:[e,D.jsx(Xl,{})]});Ql.displayName="RadixProvider";const Jl=({children:e,withScrollStyles:t})=>D.jsx("div",{id:"voila-ui",style:{fontFamily:dt.theme.fonts.poppins},className:$e(t??dt.scrollbarStyle),children:D.jsx(Ql,{children:e})});Jl.displayName="Provider";Jl.defaultProps={withScrollStyles:!1};exports.Accordion=Oy;exports.AccordionContent=f0;exports.AccordionItem=p0;exports.AccordionTrigger=L0;exports.Alert=_p;exports.Badge=ic;exports.BaseSelect=yc;exports.BottomSheet=sT;exports.Box=at;exports.Button=Ur;exports.Card=ec;exports.Checkbox=Zm;exports.Chips=Kc;exports.CloseButton=Gr;exports.ConfirmDialogContext=Gc;exports.ConfirmDialogProvider=t$;exports.Container=tc;exports.DatePicker=$$;exports.Dialog=Xc;exports.Flex=Rt;exports.FullLoader=iv;exports.Grid=nc;exports.IconButton=Jc;exports.Image=el;exports.Input=Zc;exports.Link=nv;exports.List=tl;exports.ListItem=nl;exports.Loader=p$;exports.LoaderAnimated=rl;exports.Modal=No;exports.ModalBody=vs;exports.ModalFooter=gs;exports.ModalHeader=Vo;exports.MultiPicker=sv;exports.Overlay=Xw;exports.Picker=Ha;exports.Portal=ns;exports.Provider=Jl;exports.Radio=ig;exports.RadioGroup=mP;exports.RadixProvider=Ql;exports.Search=Fl;exports.Select=jr;exports.SelectPicker=Gv;exports.Spinner=qr;exports.Stack=mr;exports.Switch=cg;exports.TabItem=Wl;exports.Table=dg;exports.Tabs=Hl;exports.TabsContext=Bl;exports.Text=Nt;exports.Textarea=Qc;exports.Toast=xs;exports.ToastAction=zl;exports.ToastProvider=xg;exports.ToastViewport=Kl;exports.Toaster=Xl;exports.Tooltip=Zl;exports.reducer=wg;exports.toast=Eg;exports.useDialog=n$;exports.useIndeterminate=ST;exports.useOnMount=mh;exports.useRipple=Yc;exports.useTableRenderer=ug;exports.useToast=Cg;
148
+ */var Bf;function P$(){return Bf||(Bf=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,i=60114,o=60109,s=60110,a=60112,c=60113,l=60120,d=60115,f=60116,m=60121,p=60122,x=60117,E=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var T=Symbol.for;e=T("react.element"),t=T("react.portal"),n=T("react.fragment"),r=T("react.strict_mode"),i=T("react.profiler"),o=T("react.provider"),s=T("react.context"),a=T("react.forward_ref"),c=T("react.suspense"),l=T("react.suspense_list"),d=T("react.memo"),f=T("react.lazy"),m=T("react.block"),p=T("react.server.block"),x=T("react.fundamental"),T("react.scope"),T("react.opaque.id"),E=T("react.debug_trace_mode"),T("react.offscreen"),S=T("react.legacy_hidden")}var h=!1;function w(te){return!!(typeof te=="string"||typeof te=="function"||te===n||te===i||te===E||te===r||te===c||te===l||te===S||h||typeof te=="object"&&te!==null&&(te.$$typeof===f||te.$$typeof===d||te.$$typeof===o||te.$$typeof===s||te.$$typeof===a||te.$$typeof===x||te.$$typeof===m||te[0]===p))}function _(te){if(typeof te=="object"&&te!==null){var Z=te.$$typeof;switch(Z){case e:var ge=te.type;switch(ge){case n:case i:case r:case c:case l:return ge;default:var Ce=ge&&ge.$$typeof;switch(Ce){case s:case a:case f:case d:case o:return Ce;default:return Z}}case t:return Z}}}var $=s,M=o,O=e,N=a,V=n,z=f,j=d,R=t,v=i,C=r,I=c,k=!1,U=!1;function q(te){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ue(te){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(te){return _(te)===s}function L(te){return _(te)===o}function oe(te){return typeof te=="object"&&te!==null&&te.$$typeof===e}function G(te){return _(te)===a}function X(te){return _(te)===n}function ne(te){return _(te)===f}function ae(te){return _(te)===d}function B(te){return _(te)===t}function H(te){return _(te)===i}function J(te){return _(te)===r}function ee(te){return _(te)===c}rt.ContextConsumer=$,rt.ContextProvider=M,rt.Element=O,rt.ForwardRef=N,rt.Fragment=V,rt.Lazy=z,rt.Memo=j,rt.Portal=R,rt.Profiler=v,rt.StrictMode=C,rt.Suspense=I,rt.isAsyncMode=q,rt.isConcurrentMode=ue,rt.isContextConsumer=W,rt.isContextProvider=L,rt.isElement=oe,rt.isForwardRef=G,rt.isFragment=X,rt.isLazy=ne,rt.isMemo=ae,rt.isPortal=B,rt.isProfiler=H,rt.isStrictMode=J,rt.isSuspense=ee,rt.isValidElementType=w,rt.typeOf=_}()),rt}process.env.NODE_ENV==="production"?Wa.exports=R$():Wa.exports=P$();var Hf=Wa.exports;let Wf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Uf=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",sa=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Uf(n.overflowY,t)||Uf(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},ai=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,I$=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var A$=(e,t)=>{var n,r,i,o,s,a;if(typeof document>"u")return[];let{scrollMode:c,block:l,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,p=typeof f=="function"?f:C=>C!==f;if(!Wf(e))throw new TypeError("Invalid target");let x=document.scrollingElement||document.documentElement,E=[],S=e;for(;Wf(S)&&p(S);){if(S=I$(S),S===x){E.push(S);break}S!=null&&S===document.body&&sa(S)&&!sa(document.documentElement)||S!=null&&sa(S,m)&&E.push(S)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,h=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,w=(s=window.scrollX)!=null?s:pageXOffset,_=(a=window.scrollY)!=null?a:pageYOffset,{height:$,width:M,top:O,right:N,bottom:V,left:z}=e.getBoundingClientRect(),j=l==="start"||l==="nearest"?O:l==="end"?V:O+$/2,R=d==="center"?z+M/2:d==="end"?N:z,v=[];for(let C=0;C<E.length;C++){let I=E[C],{height:k,width:U,top:q,right:ue,bottom:W,left:L}=I.getBoundingClientRect();if(c==="if-needed"&&O>=0&&z>=0&&V<=h&&N<=T&&O>=q&&V<=W&&z>=L&&N<=ue)return v;let oe=getComputedStyle(I),G=parseInt(oe.borderLeftWidth,10),X=parseInt(oe.borderTopWidth,10),ne=parseInt(oe.borderRightWidth,10),ae=parseInt(oe.borderBottomWidth,10),B=0,H=0,J="offsetWidth"in I?I.offsetWidth-I.clientWidth-G-ne:0,ee="offsetHeight"in I?I.offsetHeight-I.clientHeight-X-ae:0,te="offsetWidth"in I?I.offsetWidth===0?0:U/I.offsetWidth:0,Z="offsetHeight"in I?I.offsetHeight===0?0:k/I.offsetHeight:0;if(x===I)B=l==="start"?j:l==="end"?j-h:l==="nearest"?ai(_,_+h,h,X,ae,_+j,_+j+$,$):j-h/2,H=d==="start"?R:d==="center"?R-T/2:d==="end"?R-T:ai(w,w+T,T,G,ne,w+R,w+R+M,M),B=Math.max(0,B+_),H=Math.max(0,H+w);else{B=l==="start"?j-q-X:l==="end"?j-W+ae+ee:l==="nearest"?ai(q,W,k,X,ae+ee,j,j+$,$):j-(q+k/2)+ee/2,H=d==="start"?R-L-G:d==="center"?R-(L+U/2)+J/2:d==="end"?R-ue+ne+J:ai(L,ue,U,G,ne+J,R,R+M,M);let{scrollLeft:ge,scrollTop:Ce}=I;B=Math.max(0,Math.min(Ce+B/Z,I.scrollHeight-k/Z+ee)),H=Math.max(0,Math.min(ge+H/te,I.scrollWidth-U/te+J)),j+=Ce-B,R+=ge-H}v.push({el:I,top:B,left:H})}return v},O$=0;function Yf(e){return typeof e=="function"?e:Wt}function Wt(){}function cv(e,t){if(e){var n=A$(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Kf(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function ol(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function ht(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(a){return a&&a.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function lv(){return String(O$++)}function uv(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 zf(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function dv(e){return typeof e.type=="string"}function fv(e){return e.props}function D$(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var M$=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ci(e){e===void 0&&(e={});var t={};return M$.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function $o(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=ki(t,r)?t[r]:e[r],n},{})}function ki(e,t){return e[t]!==void 0}function Ro(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function k$(e){return Object.prototype.toString.call(e)==="[object Object]"}function hr(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var a=br(e,s,n,r,i);return a===-1?t>=n?-1:t:a}function br(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?br(1,0,n,r,!1):br(-1,n-1,n,r,!1):-1}function Ni(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Kf(i,e,n)||r&&Kf(i,n.document.activeElement,n))})}var il=Wt;process.env.NODE_ENV!=="production"&&(il=function(t,n,r){var i="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(o){n[o]!==void 0&&r[o]===void 0?console.error('downshift: A component has changed the controlled prop "'+o+'" to be uncontrolled. '+i):n[o]===void 0&&r[o]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+o+'" to be controlled. '+i)})});var N$=ol(function(e){pv(e).textContent=""},500);function sl(e,t){var n=pv(t);e&&(n.textContent=e,N$(t))}function pv(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 hv=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mv=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,vv=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,mi=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,vi=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,gv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,yv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,bv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,xv=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,wv=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Ev=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Cv=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,_v=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Ua=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Sv=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tv=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,$v=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,V$=Object.freeze({__proto__:null,unknown:hv,mouseUp:mv,itemMouseEnter:vv,keyDownArrowUp:mi,keyDownArrowDown:vi,keyDownEscape:gv,keyDownEnter:yv,keyDownHome:bv,keyDownEnd:xv,clickItem:wv,blurInput:Ev,changeInput:Cv,keyDownSpaceButton:_v,clickButton:Ua,blurButton:Sv,controlledPropUpdatedSelectedItem:Tv,touchEnd:$v}),j$=["refKey","ref"],L$=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],F$=["onKeyDown","onBlur","onChange","onInput","onChangeText"],B$=["refKey","ref"],H$=["onMouseMove","onMouseDown","onClick","onPress","index","item"],W$=function(){var e=function(t){mc(n,t);function n(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+lv(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(h){return o.id+"-item-"+h},o.input=null,o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(h,w){var _=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function($){return $!==_}),h()},w);o.timeoutIds.push(_)},o.setItemCount=function(h){o.itemCount=h},o.unsetItemCount=function(){o.itemCount=null},o.setHighlightedIndex=function(h,w){h===void 0&&(h=o.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ci(w),o.internalSetState(ie({highlightedIndex:h},w))},o.clearSelection=function(h){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},h)},o.selectItem=function(h,w,_){w=ci(w),o.internalSetState(ie({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:h,inputValue:o.props.itemToString(h)},w),_)},o.selectItemAtIndex=function(h,w,_){var $=o.items[h];$!=null&&o.selectItem($,w,_)},o.selectHighlightedItem=function(h,w){return o.selectItemAtIndex(o.getState().highlightedIndex,h,w)},o.internalSetState=function(h,w){var _,$,M={},O=typeof h=="function";return!O&&h.hasOwnProperty("inputValue")&&o.props.onInputValueChange(h.inputValue,ie({},o.getStateAndHelpers(),h)),o.setState(function(N){N=o.getState(N);var V=O?h(N):h;V=o.props.stateReducer(N,V),_=V.hasOwnProperty("selectedItem");var z={};return _&&V.selectedItem!==N.selectedItem&&($=V.selectedItem),V.type=V.type||hv,Object.keys(V).forEach(function(j){N[j]!==V[j]&&(M[j]=V[j]),j!=="type"&&(V[j],ki(o.props,j)||(z[j]=V[j]))}),O&&V.hasOwnProperty("inputValue")&&o.props.onInputValueChange(V.inputValue,ie({},o.getStateAndHelpers(),V)),z},function(){Yf(w)();var N=Object.keys(M).length>1;N&&o.props.onStateChange(M,o.getStateAndHelpers()),_&&o.props.onSelect(h.selectedItem,o.getStateAndHelpers()),$!==void 0&&o.props.onChange($,o.getStateAndHelpers()),o.props.onUserAction(M,o.getStateAndHelpers())})},o.rootRef=function(h){return o._rootNode=h},o.getRootProps=function(h,w){var _,$=h===void 0?{}:h,M=$.refKey,O=M===void 0?"ref":M,N=$.ref,V=kt($,j$),z=w===void 0?{}:w,j=z.suppressRefError,R=j===void 0?!1:j;o.getRootProps.called=!0,o.getRootProps.refKey=O,o.getRootProps.suppressRefError=R;var v=o.getState(),C=v.isOpen;return ie((_={},_[O]=Yn(N,o.rootRef),_.role="combobox",_["aria-expanded"]=C,_["aria-haspopup"]="listbox",_["aria-owns"]=C?o.menuId:null,_["aria-labelledby"]=o.labelId,_),V)},o.keyDownHandlers={ArrowDown:function(w){var _=this;if(w.preventDefault(),this.getState().isOpen){var $=w.shiftKey?5:1;this.moveHighlightedIndex($,{type:vi})}else this.internalSetState({isOpen:!0,type:vi},function(){var M=_.getItemCount();if(M>0){var O=_.getState(),N=O.highlightedIndex,V=hr(1,N,M,function(z){return _.getItemNodeFromIndex(z)});_.setHighlightedIndex(V,{type:vi})}})},ArrowUp:function(w){var _=this;if(w.preventDefault(),this.getState().isOpen){var $=w.shiftKey?-5:-1;this.moveHighlightedIndex($,{type:mi})}else this.internalSetState({isOpen:!0,type:mi},function(){var M=_.getItemCount();if(M>0){var O=_.getState(),N=O.highlightedIndex,V=hr(-1,N,M,function(z){return _.getItemNodeFromIndex(z)});_.setHighlightedIndex(V,{type:mi})}})},Enter:function(w){if(w.which!==229){var _=this.getState(),$=_.isOpen,M=_.highlightedIndex;if($&&M!=null){w.preventDefault();var O=this.items[M],N=this.getItemNodeFromIndex(M);if(O==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:yv})}}},Escape:function(w){w.preventDefault(),this.reset(ie({type:gv},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ie({},o.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:_v})}}),o.inputKeyDownHandlers=ie({},o.keyDownHandlers,{Home:function(w){var _=this,$=this.getState(),M=$.isOpen;if(M){w.preventDefault();var O=this.getItemCount();if(!(O<=0||!M)){var N=br(1,0,O,function(V){return _.getItemNodeFromIndex(V)},!1);this.setHighlightedIndex(N,{type:bv})}}},End:function(w){var _=this,$=this.getState(),M=$.isOpen;if(M){w.preventDefault();var O=this.getItemCount();if(!(O<=0||!M)){var N=br(-1,O-1,O,function(V){return _.getItemNodeFromIndex(V)},!1);this.setHighlightedIndex(N,{type:xv})}}}}),o.getToggleButtonProps=function(h){var w=h===void 0?{}:h,_=w.onClick;w.onPress;var $=w.onKeyDown,M=w.onKeyUp,O=w.onBlur,N=kt(w,L$),V=o.getState(),z=V.isOpen,j={onClick:ht(_,o.buttonHandleClick),onKeyDown:ht($,o.buttonHandleKeyDown),onKeyUp:ht(M,o.buttonHandleKeyUp),onBlur:ht(O,o.buttonHandleBlur)},R=N.disabled?{}:j;return ie({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},R,N)},o.buttonHandleKeyUp=function(h){h.preventDefault()},o.buttonHandleKeyDown=function(h){var w=Ro(h);o.buttonKeyDownHandlers[w]&&o.buttonKeyDownHandlers[w].call(ud(o),h)},o.buttonHandleClick=function(h){h.preventDefault(),o.props.environment.document.activeElement===o.props.environment.document.body&&h.target.focus(),process.env.NODE_ENV==="test"?o.toggleMenu({type:Ua}):o.internalSetTimeout(function(){return o.toggleMenu({type:Ua})})},o.buttonHandleBlur=function(h){var w=h.target;o.internalSetTimeout(function(){!o.isMouseDown&&(o.props.environment.document.activeElement==null||o.props.environment.document.activeElement.id!==o.inputId)&&o.props.environment.document.activeElement!==w&&o.reset({type:Sv})})},o.getLabelProps=function(h){return ie({htmlFor:o.inputId,id:o.labelId},h)},o.getInputProps=function(h){var w=h===void 0?{}:h,_=w.onKeyDown,$=w.onBlur,M=w.onChange,O=w.onInput;w.onChangeText;var N=kt(w,F$),V,z={};V="onChange";var j=o.getState(),R=j.inputValue,v=j.isOpen,C=j.highlightedIndex;if(!N.disabled){var I;z=(I={},I[V]=ht(M,O,o.inputHandleChange),I.onKeyDown=ht(_,o.inputHandleKeyDown),I.onBlur=ht($,o.inputHandleBlur),I)}return ie({"aria-autocomplete":"list","aria-activedescendant":v&&typeof C=="number"&&C>=0?o.getItemId(C):null,"aria-controls":v?o.menuId:null,"aria-labelledby":N&&N["aria-label"]?void 0:o.labelId,autoComplete:"off",value:R,id:o.inputId},z,N)},o.inputHandleKeyDown=function(h){var w=Ro(h);w&&o.inputKeyDownHandlers[w]&&o.inputKeyDownHandlers[w].call(ud(o),h)},o.inputHandleChange=function(h){o.internalSetState({type:Cv,isOpen:!0,inputValue:h.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var h=o.props.environment.document&&!!o.props.environment.document.activeElement&&!!o.props.environment.document.activeElement.dataset&&o.props.environment.document.activeElement.dataset.toggle&&o._rootNode&&o._rootNode.contains(o.props.environment.document.activeElement);!o.isMouseDown&&!h&&o.reset({type:Ev})})},o.menuRef=function(h){o._menuNode=h},o.getMenuProps=function(h,w){var _,$=h===void 0?{}:h,M=$.refKey,O=M===void 0?"ref":M,N=$.ref,V=kt($,B$),z=w===void 0?{}:w,j=z.suppressRefError,R=j===void 0?!1:j;return o.getMenuProps.called=!0,o.getMenuProps.refKey=O,o.getMenuProps.suppressRefError=R,ie((_={},_[O]=Yn(N,o.menuRef),_.role="listbox",_["aria-labelledby"]=V&&V["aria-label"]?null:o.labelId,_.id=o.menuId,_),V)},o.getItemProps=function(h){var w,_=h===void 0?{}:h,$=_.onMouseMove,M=_.onMouseDown,O=_.onClick;_.onPress;var N=_.index,V=_.item,z=V===void 0?process.env.NODE_ENV==="production"?void 0:D$("getItemProps","item"):V,j=kt(_,H$);N===void 0?(o.items.push(z),N=o.items.indexOf(z)):o.items[N]=z;var R="onClick",v=O,C=(w={onMouseMove:ht($,function(){N!==o.getState().highlightedIndex&&(o.setHighlightedIndex(N,{type:vv}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:ht(M,function(k){k.preventDefault()})},w[R]=ht(v,function(){o.selectItemAtIndex(N,{type:wv})}),w),I=j.disabled?{onMouseDown:C.onMouseDown}:C;return ie({id:o.getItemId(N),role:"option","aria-selected":o.getState().highlightedIndex===N},I,j)},o.clearItems=function(){o.items=[]},o.reset=function(h,w){h===void 0&&(h={}),h=ci(h),o.internalSetState(function(_){var $=_.selectedItem;return ie({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString($)},h)},w)},o.toggleMenu=function(h,w){h===void 0&&(h={}),h=ci(h),o.internalSetState(function(_){var $=_.isOpen;return ie({isOpen:!$},$&&{highlightedIndex:o.props.defaultHighlightedIndex},h)},function(){var _=o.getState(),$=_.isOpen,M=_.highlightedIndex;$&&o.getItemCount()>0&&typeof M=="number"&&o.setHighlightedIndex(M,h),Yf(w)()})},o.openMenu=function(h){o.internalSetState({isOpen:!0},h)},o.closeMenu=function(h){o.internalSetState({isOpen:!1},h)},o.updateStatus=ol(function(){var h=o.getState(),w=o.items[h.highlightedIndex],_=o.getItemCount(),$=o.props.getA11yStatusMessage(ie({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:_,highlightedItem:w},h));o.previousResultCount=_,sl($,o.props.environment.document)},200);var s=o.props,a=s.defaultHighlightedIndex,c=s.initialHighlightedIndex,l=c===void 0?a:c,d=s.defaultIsOpen,f=s.initialIsOpen,m=f===void 0?d:f,p=s.initialInputValue,x=p===void 0?"":p,E=s.initialSelectedItem,S=E===void 0?null:E,T=o.getState({highlightedIndex:l,isOpen:m,inputValue:x,selectedItem:S});return T.selectedItem!=null&&o.props.initialInputValue===void 0&&(T.inputValue=o.props.itemToString(T.selectedItem)),o.state=T,o}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(o){clearTimeout(o)}),this.timeoutIds=[]},r.getState=function(o){return o===void 0&&(o=this.state),$o(o,this.props)},r.getItemCount=function(){var o=this.items.length;return this.itemCount!=null?o=this.itemCount:this.props.itemCount!==void 0&&(o=this.props.itemCount),o},r.getItemNodeFromIndex=function(o){return this.props.environment.document.getElementById(this.getItemId(o))},r.scrollHighlightedItemIntoView=function(){{var o=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(o,this._menuNode)}},r.moveHighlightedIndex=function(o,s){var a=this,c=this.getItemCount(),l=this.getState(),d=l.highlightedIndex;if(c>0){var f=hr(o,d,c,function(m){return a.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,s)}},r.getStateAndHelpers=function(){var o=this.getState(),s=o.highlightedIndex,a=o.inputValue,c=o.selectedItem,l=o.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,p=this.getToggleButtonProps,x=this.getLabelProps,E=this.getMenuProps,S=this.getInputProps,T=this.getItemProps,h=this.openMenu,w=this.closeMenu,_=this.toggleMenu,$=this.selectItem,M=this.selectItemAtIndex,O=this.selectHighlightedItem,N=this.setHighlightedIndex,V=this.clearSelection,z=this.clearItems,j=this.reset,R=this.setItemCount,v=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:x,getMenuProps:E,getInputProps:S,getItemProps:T,reset:j,openMenu:h,closeMenu:w,toggleMenu:_,selectItem:$,selectItemAtIndex:M,selectHighlightedItem:O,setHighlightedIndex:N,clearSelection:V,clearItems:z,setItemCount:R,unsetItemCount:v,setState:C,itemToString:d,id:f,highlightedIndex:s,inputValue:a,isOpen:l,selectedItem:c}},r.componentDidMount=function(){var o=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Xf(this._menuNode,this.getMenuProps);{var s=function(){o.isMouseDown=!0},a=function(p){o.isMouseDown=!1;var x=Ni(p.target,[o._rootNode,o._menuNode],o.props.environment);!x&&o.getState().isOpen&&o.reset({type:mv},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},c=function(){o.isTouchMove=!1},l=function(){o.isTouchMove=!0},d=function(p){var x=Ni(p.target,[o._rootNode,o._menuNode],o.props.environment,!1);!o.isTouchMove&&!x&&o.getState().isOpen&&o.reset({type:$v},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",s),f.addEventListener("mouseup",a),f.addEventListener("touchstart",c),f.addEventListener("touchmove",l),f.addEventListener("touchend",d),this.cleanup=function(){o.internalClearTimeouts(),o.updateStatus.cancel(),f.removeEventListener("mousedown",s),f.removeEventListener("mouseup",a),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",l),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(o,s){var a=this.props.highlightedIndex===void 0?this.getState():this.props,c=a.highlightedIndex,l=s.highlightedIndex===void 0?o:s,d=l.highlightedIndex,f=c&&this.getState().isOpen&&!o.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(o,s){process.env.NODE_ENV!=="production"&&(il(this.state,o,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Xf(this._menuNode,this.getMenuProps)),ki(this.props,"selectedItem")&&this.props.selectedItemChanged(o.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tv,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(s,o)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var o=zf(this.props.children,Wt);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 s=zf(o(this.getStateAndHelpers()));if(!s)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&U$(s,this.getRootProps),s;if(dv(s))return u.cloneElement(s,this.getRootProps(fv(s)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(u.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:uv,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&k$(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:Wt,onInputValueChange:Wt,onUserAction:Wt,onChange:Wt,onSelect:Wt,onOuterClick:Wt,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:cv},e.stateChangeTypes=V$,e}();process.env.NODE_ENV!=="production"&&(W$.propTypes={children:K.func,defaultHighlightedIndex:K.number,defaultIsOpen:K.bool,initialHighlightedIndex:K.number,initialSelectedItem:K.any,initialInputValue:K.string,initialIsOpen:K.bool,getA11yStatusMessage:K.func,itemToString:K.func,onChange:K.func,onSelect:K.func,onStateChange:K.func,onInputValueChange:K.func,onUserAction:K.func,onOuterClick:K.func,selectedItemChanged:K.func,stateReducer:K.func,itemCount:K.number,id:K.string,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})}),suppressRefError:K.bool,scrollIntoView:K.func,selectedItem:K.any,isOpen:K.bool,inputValue:K.string,highlightedIndex:K.number,labelId:K.string,inputId:K.string,menuId:K.string,getItemId:K.func});function Xf(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 U$(e,t){var n=t.refKey,r=n!=="ref",i=!dv(e);i&&!r&&!Hf.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Hf.isForwardRef(e)&&!fv(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var Y$=["isInitialMount","highlightedIndex","items","environment"],Rv={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function K$(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){z$(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(ie({type:i},o))}function z$(e,t,n,r){var i=t.props,o=t.type,s="on"+al(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](ie({type:o},r))}function X$(e,t){return t.changes}function G$(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var q$=ol(function(e,t){sl(e(),t)},200),Z$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?u.useLayoutEffect:u.useEffect;function Q$(e){var t=e.id,n=t===void 0?"downshift-"+lv():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,a=e.inputId,c=u.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(l){return n+"-item-"+l},toggleButtonId:s||n+"-toggle-button",inputId:a||n+"-input"});return c.current}function Pv(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function J$(e){return e?String(e):""}function al(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function cl(e){var t=u.useRef(e);return t.current=e,t}function Iv(e,t,n){var r=u.useRef(),i=u.useRef(),o=u.useCallback(function(m,p){i.current=p,m=$o(m,p.props);var x=e(m,p),E=p.props.stateReducer(m,ie({},p,{changes:x}));return E},[e]),s=u.useReducer(o,t),a=s[0],c=s[1],l=cl(n),d=u.useCallback(function(m){return c(ie({props:l.current},m))},[l]),f=i.current;return u.useEffect(function(){f&&r.current&&r.current!==a&&K$(f,$o(r.current,f.props),a),r.current=a},[a,n,f]),[a,d]}function eR(e,t,n){var r=Iv(e,t,n),i=r[0],o=r[1];return[$o(i,n),o]}var go={itemToString:J$,stateReducer:X$,getA11ySelectionMessage:G$,scrollIntoView:cv,environment:typeof window>"u"?{}:window};function sn(e,t,n){n===void 0&&(n=Rv);var r=e["default"+al(t)];return r!==void 0?r:n[t]}function lo(e,t,n){n===void 0&&(n=Rv);var r=e[t];if(r!==void 0)return r;var i=e["initial"+al(t)];return i!==void 0?i:sn(e,t,n)}function tR(e){var t=lo(e,"selectedItem"),n=lo(e,"isOpen"),r=lo(e,"highlightedIndex"),i=lo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function yo(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,a=t.highlightedIndex;return r.length===0?-1:i!==void 0&&a===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function nR(e,t,n,r){var i=u.useRef({isMouseDown:!1,isTouchMove:!1});return u.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var o=function(){i.current.isMouseDown=!0},s=function(f){i.current.isMouseDown=!1,e&&!Ni(f.target,t.map(function(m){return m.current}),n)&&r()},a=function(){i.current.isTouchMove=!1},c=function(){i.current.isTouchMove=!0},l=function(f){e&&!i.current.isTouchMove&&!Ni(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",a),n.addEventListener("touchmove",c),n.addEventListener("touchend",l),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",l)}}},[e,n]),i}var ll=function(){return Wt};process.env.NODE_ENV!=="production"&&(ll=function(){for(var t=u.useRef(!0),n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=u.useRef(r.reduce(function(a,c){return a[c]={},a},{}));u.useEffect(function(){Object.keys(o.current).forEach(function(a){var c=o.current[a];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+a+" getter function on your component / element.");return}var l=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!l&&console.error('downshift: The ref prop "'+d+'" from '+a+" was not applied correctly on your element.")}),t.current=!1});var s=u.useCallback(function(a,c,l,d){o.current[a]={suppressRefError:c,refKey:l,elementRef:d}},[]);return s});function Gf(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,a=kt(n,Y$);u.useEffect(function(){r||q$(function(){return e(ie({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},a))},s.document)},t)}function rR(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,a=u.useRef(!0);return Z$(function(){t<0||!n||!Object.keys(r.current).length||(a.current===!1?a.current=!0:s(i(t),o))},[t]),a}var ul=Wt;process.env.NODE_ENV!=="production"&&(ul=function(t){var n=t.isInitialMount,r=t.props,i=t.state,o=u.useRef(r);u.useEffect(function(){n||(il(i,o.current,r),o.current=r)},[i,r,n])});function qf(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return ie({isOpen:!1,highlightedIndex:-1},i&&ie({selectedItem:e.items[t],isOpen:sn(e,"isOpen"),highlightedIndex:sn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function oR(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:yo(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:yo(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:sn(i,"highlightedIndex"),isOpen:sn(i,"isOpen"),selectedItem:sn(i,"selectedItem"),inputValue:sn(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,o)}K.array.isRequired,K.func,K.func,K.func,K.number,K.number,K.number,K.bool,K.bool,K.bool,K.any,K.any,K.any,K.string,K.string,K.string,K.func,K.string,K.func,K.func,K.func,K.func,K.func,K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})});function iR(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.":""}Jt(Jt({},go),{getA11yStatusMessage:iR});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 dl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,fl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,hl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,ml=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,vl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,gl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,yl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,bl=process.env.NODE_ENV!=="production"?"__input_change__":8,Vi=process.env.NODE_ENV!=="production"?"__input_blur__":9,xl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Av=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Ov=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,wl=process.env.NODE_ENV!=="production"?"__item_click__":13,Dv=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Mv=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,kv=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Nv=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Vv=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,El=process.env.NODE_ENV!=="production"?"__function_select_item__":19,jv=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Lv=process.env.NODE_ENV!=="production"?"__function_reset__":21,Cl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Fv=Object.freeze({__proto__:null,InputKeyDownArrowDown:dl,InputKeyDownArrowUp:fl,InputKeyDownEscape:pl,InputKeyDownHome:hl,InputKeyDownEnd:ml,InputKeyDownPageUp:vl,InputKeyDownPageDown:gl,InputKeyDownEnter:yl,InputChange:bl,InputBlur:Vi,InputFocus:xl,MenuMouseLeave:Av,ItemMouseMove:Ov,ItemClick:wl,ToggleButtonClick:Dv,FunctionToggleMenu:Mv,FunctionOpenMenu:kv,FunctionCloseMenu:Nv,FunctionSetHighlightedIndex:Vv,FunctionSelectItem:El,FunctionSetInputValue:jv,FunctionReset:Lv,ControlledPropUpdatedSelectedItem:Cl});function sR(e){var t=tR(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)),ie({},t,{inputValue:r})}var aR={items:K.array.isRequired,itemToString:K.func,selectedItemChanged:K.func,getA11yStatusMessage:K.func,getA11ySelectionMessage:K.func,highlightedIndex:K.number,defaultHighlightedIndex:K.number,initialHighlightedIndex:K.number,isOpen:K.bool,defaultIsOpen:K.bool,initialIsOpen:K.bool,selectedItem:K.any,initialSelectedItem:K.any,defaultSelectedItem:K.any,inputValue:K.string,defaultInputValue:K.string,initialInputValue:K.string,id:K.string,labelId:K.string,menuId:K.string,getItemId:K.func,inputId:K.string,toggleButtonId:K.string,stateReducer:K.func,onSelectedItemChange:K.func,onHighlightedIndexChange:K.func,onStateChange:K.func,onIsOpenChange:K.func,onInputValueChange:K.func,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})})};function cR(e,t,n){var r=u.useRef(),i=Iv(e,t,n),o=i[0],s=i[1];return u.useEffect(function(){ki(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:Cl,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[$o(o,n),s]}var Bv=Wt;process.env.NODE_ENV!=="production"&&(Bv=function(t,n){K.checkPropTypes(aR,t,"prop",n.name)});var lR=ie({},go,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:uv});function uR(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case wl:s={isOpen:sn(i,"isOpen"),highlightedIndex:sn(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case dl:e.isOpen?s={highlightedIndex:hr(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:yo(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case fl:e.isOpen?o?s=qf(i,e.highlightedIndex):s={highlightedIndex:hr(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:yo(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case yl:s=qf(i,e.highlightedIndex);break;case pl:s=ie({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case vl:s={highlightedIndex:hr(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case gl:s={highlightedIndex:hr(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case hl:s={highlightedIndex:br(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case ml:s={highlightedIndex:br(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Vi:s=ie({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case bl:s={isOpen:!0,highlightedIndex:sn(i,"highlightedIndex"),inputValue:t.inputValue};break;case xl:s={isOpen:!0,highlightedIndex:yo(i,e,0)};break;case El:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case Cl:s={inputValue:t.inputValue};break;default:return oR(e,t,Fv)}return ie({},e,s)}var dR=["onMouseLeave","refKey","ref"],fR=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],pR=["onClick","onPress","refKey","ref"],hR=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Nr.stateChangeTypes=Fv;function Nr(e){e===void 0&&(e={}),Bv(e,Nr);var t=ie({},lR,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,a=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,l=t.itemToString,d=sR(t),f=cR(uR,d,t),m=f[0],p=f[1],x=m.isOpen,E=m.highlightedIndex,S=m.selectedItem,T=m.inputValue,h=u.useRef(null),w=u.useRef({}),_=u.useRef(null),$=u.useRef(null),M=u.useRef(!0),O=Q$(t),N=u.useRef(),V=cl({state:m,props:t}),z=u.useCallback(function(B){return w.current[O.getItemId(B)]},[O]);Gf(a,[x,E,T,i],ie({isInitialMount:M.current,previousResultCount:N.current,items:i,environment:s,itemToString:l},m)),Gf(c,[S],ie({isInitialMount:M.current,previousResultCount:N.current,items:i,environment:s,itemToString:l},m));var j=rR({menuElement:h.current,highlightedIndex:E,isOpen:x,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:z});ul({isInitialMount:M.current,props:t,state:m}),u.useEffect(function(){var B=n||r||x;B&&_.current&&_.current.focus()},[]),u.useEffect(function(){M.current||(N.current=i.length)});var R=nR(x,[_,h,$],s,function(){p({type:Vi,selectItem:!1})}),v=ll("getInputProps","getMenuProps");u.useEffect(function(){return M.current=!1,function(){M.current=!0}},[]),u.useEffect(function(){var B;if(!x)w.current={};else if(((B=s.document)==null?void 0:B.activeElement)!==_.current){var H;_==null||(H=_.current)==null||H.focus()}},[x,s]);var C=u.useMemo(function(){return{ArrowDown:function(H){H.preventDefault(),p({type:dl,altKey:H.altKey,getItemNodeFromIndex:z})},ArrowUp:function(H){H.preventDefault(),p({type:fl,altKey:H.altKey,getItemNodeFromIndex:z})},Home:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:hl,getItemNodeFromIndex:z}))},End:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:ml,getItemNodeFromIndex:z}))},Escape:function(H){var J=V.current.state;(J.isOpen||J.inputValue||J.selectedItem||J.highlightedIndex>-1)&&(H.preventDefault(),p({type:pl}))},Enter:function(H){var J=V.current.state;!J.isOpen||H.which===229||(H.preventDefault(),p({type:yl,getItemNodeFromIndex:z}))},PageUp:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:vl,getItemNodeFromIndex:z}))},PageDown:function(H){V.current.state.isOpen&&(H.preventDefault(),p({type:gl,getItemNodeFromIndex:z}))}}},[p,V,z]),I=u.useCallback(function(B){return ie({id:O.labelId,htmlFor:O.inputId},B)},[O]),k=u.useCallback(function(B,H){var J,ee=B===void 0?{}:B,te=ee.onMouseLeave,Z=ee.refKey,ge=Z===void 0?"ref":Z,Ce=ee.ref,Re=kt(ee,dR),Pe=H===void 0?{}:H,Te=Pe.suppressRefError,We=Te===void 0?!1:Te;return v("getMenuProps",We,ge,h),ie((J={},J[ge]=Yn(Ce,function(ke){h.current=ke}),J.id=O.menuId,J.role="listbox",J["aria-labelledby"]=Re&&Re["aria-label"]?void 0:""+O.labelId,J.onMouseLeave=ht(te,function(){p({type:Av})}),J),Re)},[p,v,O]),U=u.useCallback(function(B){var H,J,ee=B===void 0?{}:B,te=ee.item,Z=ee.index,ge=ee.refKey,Ce=ge===void 0?"ref":ge,Re=ee.ref,Pe=ee.onMouseMove,Te=ee.onMouseDown,We=ee.onClick;ee.onPress;var ke=ee.disabled,lt=kt(ee,fR),Ye=V.current,yt=Ye.props,Je=Ye.state,Pt=Pv(te,Z,yt.items,"Pass either item or index to getItemProps!"),$e=Pt[1],Et="onClick",ut=We,cn=function(){$e!==Je.highlightedIndex&&(j.current=!1,p({type:Ov,index:$e,disabled:ke}))},jt=function(){p({type:wl,index:$e})},St=function(Ct){return Ct.preventDefault()};return ie((H={},H[Ce]=Yn(Re,function(je){je&&(w.current[O.getItemId($e)]=je)}),H.disabled=ke,H.role="option",H["aria-selected"]=""+($e===Je.highlightedIndex),H.id=O.getItemId($e),H),!ke&&(J={},J[Et]=ht(ut,jt),J),{onMouseMove:ht(Pe,cn),onMouseDown:ht(Te,St)},lt)},[p,V,j,O]),q=u.useCallback(function(B){var H,J=B===void 0?{}:B,ee=J.onClick;J.onPress;var te=J.refKey,Z=te===void 0?"ref":te,ge=J.ref,Ce=kt(J,pR),Re=V.current.state,Pe=function(){p({type:Dv})};return ie((H={},H[Z]=Yn(ge,function(Te){$.current=Te}),H["aria-controls"]=O.menuId,H["aria-expanded"]=Re.isOpen,H.id=O.toggleButtonId,H.tabIndex=-1,H),!Ce.disabled&&ie({},{onClick:ht(ee,Pe)}),Ce)},[p,V,O]),ue=u.useCallback(function(B,H){var J,ee=B===void 0?{}:B,te=ee.onKeyDown,Z=ee.onChange,ge=ee.onInput,Ce=ee.onFocus,Re=ee.onBlur;ee.onChangeText;var Pe=ee.refKey,Te=Pe===void 0?"ref":Pe,We=ee.ref,ke=kt(ee,hR),lt=H===void 0?{}:H,Ye=lt.suppressRefError,yt=Ye===void 0?!1:Ye;v("getInputProps",yt,Te,_);var Je=V.current.state,Pt=function(Ct){var Lt=Ro(Ct);Lt&&C[Lt]&&C[Lt](Ct)},$e=function(Ct){p({type:bl,inputValue:Ct.target.value})},Et=function(Ct){if(Je.isOpen&&!R.current.isMouseDown){var Lt=Ct.relatedTarget===null&&s.document.activeElement!==s.document.body;p({type:Vi,selectItem:!Lt})}},ut=function(){Je.isOpen||p({type:xl})},cn="onChange",jt={};if(!ke.disabled){var St;jt=(St={},St[cn]=ht(Z,ge,$e),St.onKeyDown=ht(te,Pt),St.onBlur=ht(Re,Et),St.onFocus=ht(Ce,ut),St)}return ie((J={},J[Te]=Yn(We,function(je){_.current=je}),J["aria-activedescendant"]=Je.isOpen&&Je.highlightedIndex>-1?O.getItemId(Je.highlightedIndex):"",J["aria-autocomplete"]="list",J["aria-controls"]=O.menuId,J["aria-expanded"]=Je.isOpen,J["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+O.labelId,J.autoComplete="off",J.id=O.inputId,J.role="combobox",J.value=Je.inputValue,J),jt,ke)},[v,V,O,C,p,R,s]),W=u.useCallback(function(){p({type:Mv})},[p]),L=u.useCallback(function(){p({type:Nv})},[p]),oe=u.useCallback(function(){p({type:kv})},[p]),G=u.useCallback(function(B){p({type:Vv,highlightedIndex:B})},[p]),X=u.useCallback(function(B){p({type:El,selectedItem:B})},[p]),ne=u.useCallback(function(B){p({type:jv,inputValue:B})},[p]),ae=u.useCallback(function(){p({type:Lv})},[p]);return{getItemProps:U,getLabelProps:I,getMenuProps:k,getInputProps:ue,getToggleButtonProps:q,toggleMenu:W,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:ne,selectItem:X,reset:ae,highlightedIndex:E,isOpen:x,selectedItem:S,inputValue:T}}var Hv={activeIndex:-1,selectedItems:[]};function Zf(e,t){return lo(e,t,Hv)}function Qf(e,t){return sn(e,t,Hv)}function mR(e){var t=Zf(e,"activeIndex"),n=Zf(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function Jf(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 vR(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var gR={selectedItems:K.array,initialSelectedItems:K.array,defaultSelectedItems:K.array,itemToString:K.func,getA11yRemovalMessage:K.func,stateReducer:K.func,activeIndex:K.number,initialActiveIndex:K.number,defaultActiveIndex:K.number,onActiveIndexChange:K.func,onSelectedItemsChange:K.func,keyNavigationNext:K.string,keyNavigationPrevious:K.string,environment:K.shape({addEventListener:K.func,removeEventListener:K.func,document:K.shape({getElementById:K.func,activeElement:K.any,body:K.any})})},yR={itemToString:go.itemToString,stateReducer:go.stateReducer,environment:go.environment,getA11yRemovalMessage:vR,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Wv=Wt;process.env.NODE_ENV!=="production"&&(Wv=function(t,n){K.checkPropTypes(gR,t,"prop",n.name)});var _l=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Sl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Tl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,$l=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Rl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Pl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Il=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Al=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Ol=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Dl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ml=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,kl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Nl=process.env.NODE_ENV!=="production"?"__function_reset__":12,bR=Object.freeze({__proto__:null,SelectedItemClick:_l,SelectedItemKeyDownDelete:Sl,SelectedItemKeyDownBackspace:Tl,SelectedItemKeyDownNavigationNext:$l,SelectedItemKeyDownNavigationPrevious:Rl,DropdownKeyDownNavigationPrevious:Pl,DropdownKeyDownBackspace:Il,DropdownClick:Al,FunctionAddSelectedItem:Ol,FunctionRemoveSelectedItem:Dl,FunctionSetSelectedItems:Ml,FunctionSetActiveIndex:kl,FunctionReset:Nl});function xR(e,t){var n=t.type,r=t.index,i=t.props,o=t.selectedItem,s=e.activeIndex,a=e.selectedItems,c;switch(n){case _l:c={activeIndex:r};break;case Rl:c={activeIndex:s-1<0?0:s-1};break;case $l:c={activeIndex:s+1>=a.length?-1:s+1};break;case Tl:case Sl:{if(s<0)break;var l=s;a.length===1?l=-1:s===a.length-1&&(l=a.length-2),c=ie({selectedItems:[].concat(a.slice(0,s),a.slice(s+1))},{activeIndex:l});break}case Pl:c={activeIndex:a.length-1};break;case Il:c={selectedItems:a.slice(0,a.length-1)};break;case Ol:c={selectedItems:[].concat(a,[o])};break;case Al:c={activeIndex:-1};break;case Dl:{var d=s,f=a.indexOf(o);if(f<0)break;a.length===1?d=-1:f===a.length-1&&(d=a.length-2),c={selectedItems:[].concat(a.slice(0,f),a.slice(f+1)),activeIndex:d};break}case Ml:{var m=t.selectedItems;c={selectedItems:m};break}case kl:{var p=t.activeIndex;c={activeIndex:p};break}case Nl:c={activeIndex:Qf(i,"activeIndex"),selectedItems:Qf(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ie({},e,c)}var wR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],ER=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Vl.stateChangeTypes=bR;function Vl(e){e===void 0&&(e={}),Wv(e,Vl);var t=ie({},yR,e),n=t.getA11yRemovalMessage,r=t.itemToString,i=t.environment,o=t.keyNavigationNext,s=t.keyNavigationPrevious,a=eR(xR,mR(t),t),c=a[0],l=a[1],d=c.activeIndex,f=c.selectedItems,m=u.useRef(!0),p=u.useRef(null),x=u.useRef(f),E=u.useRef();E.current=[];var S=cl({state:c,props:t});u.useEffect(function(){if(!m.current){if(f.length<x.current.length){var j=x.current.find(function(R){return f.indexOf(R)<0});sl(n({itemToString:r,resultCount:f.length,removedSelectedItem:j,activeIndex:d,activeSelectedItem:f[d]}),i.document)}x.current=f}},[f.length]),u.useEffect(function(){m.current||(d===-1&&p.current?p.current.focus():E.current[d]&&E.current[d].focus())},[d]),ul({isInitialMount:m.current,props:t,state:c});var T=ll("getDropdownProps");u.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var h=u.useMemo(function(){var j;return j={},j[s]=function(){l({type:Rl})},j[o]=function(){l({type:$l})},j.Delete=function(){l({type:Sl})},j.Backspace=function(){l({type:Tl})},j},[l,o,s]),w=u.useMemo(function(){var j;return j={},j[s]=function(R){Jf(R)&&l({type:Pl})},j.Backspace=function(v){Jf(v)&&l({type:Il})},j},[l,s]),_=u.useCallback(function(j){var R,v=j===void 0?{}:j,C=v.refKey,I=C===void 0?"ref":C,k=v.ref,U=v.onClick,q=v.onKeyDown,ue=v.selectedItem,W=v.index,L=kt(v,wR),oe=S.current.state,G=Pv(ue,W,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),X=G[1],ne=X>-1&&X===oe.activeIndex,ae=function(){l({type:_l,index:X})},B=function(J){var ee=Ro(J);ee&&h[ee]&&h[ee](J)};return ie((R={},R[I]=Yn(k,function(H){H&&E.current.push(H)}),R.tabIndex=ne?0:-1,R.onClick=ht(U,ae),R.onKeyDown=ht(q,B),R),L)},[l,S,h]),$=u.useCallback(function(j,R){var v,C=j===void 0?{}:j,I=C.refKey,k=I===void 0?"ref":I,U=C.ref,q=C.onKeyDown,ue=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,oe=kt(C,ER),G=R===void 0?{}:R,X=G.suppressRefError,ne=X===void 0?!1:X;T("getDropdownProps",ne,k,p);var ae=function(J){var ee=Ro(J);ee&&w[ee]&&w[ee](J)},B=function(){l({type:Al})};return ie((v={},v[k]=Yn(U,function(H){H&&(p.current=H)}),v),!L&&{onKeyDown:ht(q,ae),onClick:ht(ue,B)},oe)},[l,w,T]),M=u.useCallback(function(j){l({type:Ol,selectedItem:j})},[l]),O=u.useCallback(function(j){l({type:Dl,selectedItem:j})},[l]),N=u.useCallback(function(j){l({type:Ml,selectedItems:j})},[l]),V=u.useCallback(function(j){l({type:kl,activeIndex:j})},[l]),z=u.useCallback(function(){l({type:Nl})},[l]);return{getSelectedItemProps:_,getDropdownProps:$,addSelectedItem:M,removeSelectedItem:O,setSelectedItems:N,setActiveIndex:V,reset:z,selectedItems:f,activeIndex:d}}var CR="jbnkvn0",ep=it({defaultClassName:"jbnkvn7",variantClassNames:{highlighted:{true:"jbnkvn8"},selected:{true:"jbnkvn9"},multiSelected:{true:"jbnkvna"},isDisabled:{true:"jbnkvnb"}},defaultVariants:{},compoundVariants:[]}),tp="jbnkvn6",_R="jbnkvn1",SR=it({defaultClassName:"jbnkvn2",variantClassNames:{isMobile:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),TR="jbnkvn5",np="jbnkvnc";const Uv=u.createContext(void 0),$R=({children:e,contextValue:t})=>D.jsx(Uv.Provider,{value:t,children:e}),jl=()=>{const e=u.useContext(Uv);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yv=({children:e,renderer:t})=>{const{getMenuProps:n}=jl();return t?t({children:e,defaultClassName:tp,innerProps:n()}):D.jsx("div",{className:tp,...n(),children:e})};Yv.defaultProps={renderer:void 0};const Kv=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:i,multipleSelectedItems:o,highlightedIndex:s,getItemProps:a,onClickItem:c}=jl(),l=s===n,d=i===t&&!r,f=r&&o.includes(t)||!1,m=a({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:ep({highlighted:s===n,selected:i===t&&!r,multiSelected:o.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:l,isSelected:d,isChecked:f}):D.jsxs("div",{className:ep({highlighted:l,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[D.jsx("span",{children:t.label}),r&&o.includes(t)&&D.jsx(rc,{size:16,color:dt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kv.defaultProps={renderer:void 0};const zv=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:i,isDisabled:o}=jl();if(e)return e({innerProps:i(),defaultClassName:np,isOpen:r});const s=n==="disabled"?dt.theme.colors.black:dt.theme.colors.grey1;return D.jsx("div",{className:np,...i({disabled:o}),"data-disabled":o,children:r?D.jsx(oc,{color:s,...t}):D.jsx(wo,{color:s,...t})})};zv.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const jr=u.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:i,components:o,required:s,containerStyles:a,isMulti:c,isReadOnly:l,isMobile:d,onClickItem:f,...m},p)=>{const{addonLeft:x,addonRight:E,helperTextLeft:S,helperTextRight:T,isError:h,errorMessage:w,isDisabled:_,isValid:$}=m,[M,O]=u.useState(e),N=hc({isError:h,isDisabled:_,isValid:$}),V=u.useRef(null),{removeSelectedItem:z,selectedItems:j,addSelectedItem:R,getDropdownProps:v}=Vl({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(B){c&&r(B.selectedItems)}}),C=u.useMemo(()=>j.length,[j]),I=u.useCallback(B=>{let H=B;(c&&!d||l)&&(H="");const J=new RegExp(H.toLowerCase());return e.filter(ee=>J.test(ee.label.toLowerCase()))},[e]),{isOpen:k,getToggleButtonProps:U,getLabelProps:q,getMenuProps:ue,getInputProps:W,highlightedIndex:L,getItemProps:oe,selectedItem:G,openMenu:X,closeMenu:ne}=Nr({items:M,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:B})=>{O(I(B||""))},itemToString(B){return B?B.label:""},onSelectedItemChange(B){var H;c||(r(B.selectedItem),l&&((H=V.current)==null||H.blur()),ne())},stateReducer:(B,H)=>{const{changes:J,type:ee}=H,te=M.find((Z,ge)=>ge===B.highlightedIndex);switch(ee){case Nr.stateChangeTypes.InputKeyDownEnter:case Nr.stateChangeTypes.ItemClick:if(c){let Z=C;return j.includes(te)?(Z-=1,z(te)):(Z+=1,R(te)),{...J,isOpen:!0,highlightedIndex:B.highlightedIndex,inputValue:!d&&Z>0?`${Z} items selected`:""}}return{...J,isOpen:!1,highlightedIndex:B.highlightedIndex,inputValue:J.inputValue};case Nr.stateChangeTypes.InputBlur:{let Z=J.inputValue;return c&&!d&&(C>0?Z=`${C} items selected`:Z=""),{...J,inputValue:Z}}default:return J}}});u.useImperativeHandle(p,()=>V.current);const ae={isOpen:k,formState:N,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:_,totalSelected:C,highlightedIndex:L,getMenuProps:ue,getItemProps:oe,getToggleButtonProps:U,onClickItem:f};return D.jsx($R,{contextValue:ae,children:D.jsxs(at,{position:"relative",w:"$full",children:[D.jsxs(Xr,{addonLeft:x,addonRight:E,helperTextLeft:S,helperTextRight:T,isError:h,errorMessage:w,isDisabled:_,isValid:$,inputAreaClassName:CR,children:[D.jsxs("div",{className:_R,children:[D.jsx("input",{"data-test-id":m["data-test-id"],...W(v({preventKeyAction:k,ref:V,placeholder:n,readOnly:l,disabled:_,className:SR({isMobile:d}),onClick:()=>{k||X()}}))}),d&&c&&D.jsx("div",{className:TR,children:C>0?`${C} items selected`:""}),d&&D.jsx(jo,{isSelect:!0,isError:h,isDisabled:_,required:s,...q(),children:n})]}),D.jsx(zv,{renderer:o==null?void 0:o.Toggle})]}),k&&D.jsx(Yv,{renderer:o==null?void 0:o.List,children:M.map((B,H)=>D.jsx(Kv,{renderer:o==null?void 0:o.ListItem,itemIndex:H,item:B}))})]})})});jr.displayName="Select";jr.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};const Xv=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},RR=Array.from({length:31},(e,t)=>({label:Xv(t+1),value:String(t+1),isDisabled:!1})),ji=["January","February","March","April","May","June","July","August","September","October","November","December"],PR=ji.map(e=>({label:e,value:e,isDisabled:!1})),IR=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}))},aa=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Xv(n.getDate()),value:n.getDate().toString()};if(e==="month")return{label:ji[n.getMonth()],value:ji[n.getMonth()]};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r}}}},bo=e=>ji.findIndex(t=>t===e),rp=(e,t)=>new Date(e,bo(t)+1,0).getDate(),AR=({date:e,month:t,year:n,maxDate:r})=>{const i=r?new Date(r):new Date;return i.setHours(0,0,0,0),e&&t&&n&&e<=rp(n,t)&&i>new Date(n,bo(t),e,0,0,0,0)?!0:e&&t&&!n?bo(t)===1?e<=29:e<=rp(0,t):!e&&t&&n?n===i.getFullYear()?bo(t)<=i.getMonth():!0:e&&!t&&n?i.getMonth()===0&&n===i.getFullYear()?e<i.getDate():!0:!1},Gv=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:i,onClose:o,isOpen:s,buttonText:a,errorMessage:c,...l})=>{const[d,f]=u.useState(),[m,p]=u.useState(),[x,E]=u.useState(),S=u.useRef(null),T=()=>{f(void 0),p(void 0),E(void 0)},h=u.useMemo(()=>{if(s){if(d)return d;if(r)return aa("date",r)}},[r,d,s]),w=u.useMemo(()=>{if(s){if(m)return m;if(r)return aa("month",r)}},[r,m,s]),_=u.useMemo(()=>{if(s){if(x)return x;if(r)return aa("year",r)}},[r,x,s]),$=u.useMemo(()=>h||w||_?AR({date:h?Number(h==null?void 0:h.value):0,month:w?w.value:"",year:_?Number(_.value):0,maxDate:t}):!1,[h,w,_,t]),M=h&&w&&!_&&!$,O=h&&!w&&_&&!$,N=!h&&w&&_&&!$,V=h&&w&&_&&!$,z=()=>D.jsx(at,{as:"button",ref:S,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:D.jsx(at,{display:"none"})}),j=()=>{S.current&&S.current.focus()};return D.jsx(No,{...l,isOpen:s,onClose:()=>{o==null||o(),T()},children:D.jsxs(mr,{gap:"$24",children:[D.jsxs(mr,{gap:"$8",children:[D.jsx(at,{height:"$40",children:D.jsx(Vo,{children:e})}),D.jsxs(mr,{children:[D.jsxs(Rt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[D.jsx(jr,{isReadOnly:!0,name:"date",label:"Date",value:h,isMobile:n,options:RR,onClickItem:j,onChange:f,isError:M||O||V,"data-test-id":"CT_Component_SelectPicker_dateField"}),D.jsx(jr,{isReadOnly:!0,name:"month",label:"Month",value:w,isMobile:n,options:PR,onClickItem:j,onChange:p,isError:N||M||V,"data-test-id":"CT_Component_SelectPicker_monthField"}),D.jsx(jr,{isReadOnly:!0,name:"year",label:"Year",value:_,isMobile:n,options:IR(t),onClickItem:j,onChange:E,isError:N||O||V,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(V||N||O||M)&&D.jsx(Nt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),z(),D.jsx(Ur,{onClick:()=>{i(new Date(Number(_==null?void 0:_.value),bo(w==null?void 0:w.value),Number(h==null?void 0:h.value))),T()},isDisabled:!_||!w||!h||!$,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:a})]})})};Gv.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};const ca="rovingFocusGroup.onEntryFocus",OR={bubbles:!1,cancelable:!0},Ll="RovingFocusGroup",[Ya,qv,DR]=Li(Ll),[MR,Zv]=Xt(Ll,[DR]),[kR,NR]=MR(Ll),VR=u.forwardRef((e,t)=>u.createElement(Ya.Provider,{scope:e.__scopeRovingFocusGroup},u.createElement(Ya.Slot,{scope:e.__scopeRovingFocusGroup},u.createElement(jR,ie({},e,{ref:t}))))),jR=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...d}=e,f=u.useRef(null),m=Xe(t,f),p=Fi(o),[x=null,E]=tn({prop:s,defaultProp:a,onChange:c}),[S,T]=u.useState(!1),h=Vt(l),w=qv(n),_=u.useRef(!1),[$,M]=u.useState(0);return u.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(ca,h),()=>O.removeEventListener(ca,h)},[h]),u.createElement(kR,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:x,onItemFocus:u.useCallback(O=>E(O),[E]),onItemShiftTab:u.useCallback(()=>T(!0),[]),onFocusableItemAdd:u.useCallback(()=>M(O=>O+1),[]),onFocusableItemRemove:u.useCallback(()=>M(O=>O-1),[])},u.createElement(Fe.div,ie({tabIndex:S||$===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{_.current=!0}),onFocus:Ie(e.onFocus,O=>{const N=!_.current;if(O.target===O.currentTarget&&N&&!S){const V=new CustomEvent(ca,OR);if(O.currentTarget.dispatchEvent(V),!V.defaultPrevented){const z=w().filter(I=>I.focusable),j=z.find(I=>I.active),R=z.find(I=>I.id===x),C=[j,R,...z].filter(Boolean).map(I=>I.ref.current);Qv(C)}}_.current=!1}),onBlur:Ie(e.onBlur,()=>T(!1))})))}),LR="RovingFocusGroupItem",FR=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=$n(),c=o||a,l=NR(LR,n),d=l.currentTabStopId===c,f=qv(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=l;return u.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),u.createElement(Ya.ItemSlot,{scope:n,id:c,focusable:r,active:i},u.createElement(Fe.span,ie({tabIndex:d?0:-1,"data-orientation":l.orientation},s,{ref:t,onMouseDown:Ie(e.onMouseDown,x=>{r?l.onItemFocus(c):x.preventDefault()}),onFocus:Ie(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:Ie(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){l.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const E=WR(x,l.orientation,l.dir);if(E!==void 0){x.preventDefault();let T=f().filter(h=>h.focusable).map(h=>h.ref.current);if(E==="last")T.reverse();else if(E==="prev"||E==="next"){E==="prev"&&T.reverse();const h=T.indexOf(x.currentTarget);T=l.loop?UR(T,h+1):T.slice(h+1)}setTimeout(()=>Qv(T))}})})))}),BR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function WR(e,t,n){const r=HR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return BR[r]}function Qv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function UR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const YR=VR,KR=FR,Jv="Radio",[zR,eg]=Xt(Jv),[XR,GR]=zR(Jv),qR=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...l}=e,[d,f]=u.useState(null),m=Xe(t,E=>f(E)),p=u.useRef(!1),x=d?!!d.closest("form"):!0;return u.createElement(XR,{scope:n,checked:i,disabled:s},u.createElement(Fe.button,ie({type:"button",role:"radio","aria-checked":i,"data-state":tg(i),"data-disabled":s?"":void 0,disabled:s,value:a},l,{ref:m,onClick:Ie(e.onClick,E=>{i||c==null||c(),x&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})),x&&u.createElement(JR,{control:d,bubbles:!p.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),ZR="RadioIndicator",QR=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=GR(ZR,n);return u.createElement(Jn,{present:r||o.checked},u.createElement(Fe.span,ie({"data-state":tg(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),JR=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function tg(e){return e?"checked":"unchecked"}const eP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ng="RadioGroup",[tP,qI]=Xt(ng,[Zv,eg]),rg=Zv(),og=eg(),[nP,rP]=tP(ng),oP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:l,loop:d=!0,onValueChange:f,...m}=e,p=rg(n),x=Fi(l),[E,S]=tn({prop:o,defaultProp:i,onChange:f});return u.createElement(nP,{scope:n,name:r,required:s,disabled:a,value:E,onValueChange:S},u.createElement(YR,ie({asChild:!0},p,{orientation:c,dir:x,loop:d}),u.createElement(Fe.div,ie({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x},m,{ref:t}))))}),iP="RadioGroupItem",sP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=rP(iP,n),s=o.disabled||r,a=rg(n),c=og(n),l=u.useRef(null),d=Xe(t,l),f=o.value===i.value,m=u.useRef(!1);return u.useEffect(()=>{const p=E=>{eP.includes(E.key)&&(m.current=!0)},x=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",x)}},[]),u.createElement(KR,ie({asChild:!0},a,{focusable:!s,active:f}),u.createElement(qR,ie({disabled:s,required:o.required,checked:f},c,i,{name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:Ie(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ie(i.onFocus,()=>{var p;m.current&&((p=l.current)===null||p===void 0||p.click())})})))}),aP=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=og(n);return u.createElement(QR,ie({},i,r,{ref:t}))}),cP=oP,lP=sP,uP=aP;var dP=it({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),fP="d6umgr1",pP=it({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),hP="d6umgr0";const ig=({children:e,className:t,disabled:n,...r})=>{const i=u.useId();return D.jsxs(Rt,{alignItems:"center",children:[D.jsx(lP,{...r,disabled:n,className:Se(t,hP),id:i,children:D.jsx(uP,{className:Se("radio-indicator",pP({disabled:n}))})}),e&&D.jsx("label",{className:Se("radio-label",dP({disabled:n})),htmlFor:i,children:e})]})};ig.defaultProps={children:void 0};const mP=({className:e,children:t,...n})=>D.jsx(cP,{...n,className:Se(e,fP),children:t});var vP="_846x3h0",gP="_846x3h1",yP=it({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const Fl=u.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:i,...o},s)=>{const[a,c]=u.useState(!1),l=()=>c(!0),d=()=>c(!1),f=u.useMemo(()=>!!(i||e&&a),[a,e,i]);return D.jsxs(at,{position:"relative",children:[D.jsx(at,{className:Se(vP),children:D.jsx(R0,{size:24})}),D.jsx("input",{className:Se(yP({size:n,isHasIcon:f,isDisabled:r})),ref:s,value:e,"data-test-id":o["data-test-id"],onFocus:l,onBlur:d,disabled:r,...o}),f&&D.jsx(at,{className:Se(gP),children:i&&(!a||a&&!e)?i:D.jsx(Ui,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});Fl.displayName="Search";Fl.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const sg="Switch",[bP,ZI]=Xt(sg),[xP,wP]=bP(sg),EP=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:l,...d}=e,[f,m]=u.useState(null),p=Xe(t,h=>m(h)),x=u.useRef(!1),E=f?!!f.closest("form"):!0,[S=!1,T]=tn({prop:i,defaultProp:o,onChange:l});return u.createElement(xP,{scope:n,checked:S,disabled:a},u.createElement(Fe.button,ie({type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":ag(S),"data-disabled":a?"":void 0,disabled:a,value:c},d,{ref:p,onClick:Ie(e.onClick,h=>{T(w=>!w),E&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})})),E&&u.createElement(SP,{control:f,bubbles:!x.current,name:r,value:c,checked:S,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),CP="SwitchThumb",_P=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=wP(CP,n);return u.createElement(Fe.span,ie({"data-state":ag(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),SP=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=u.useRef(null),s=qi(n),a=Xi(t);return u.useEffect(()=>{const c=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[s,n,r]),u.createElement("input",ie({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ag(e){return e?"checked":"unchecked"}const TP=EP,$P=_P;var RP="b7c0j12",PP="b7c0j10",IP="b7c0j11";const cg=u.forwardRef((e,t)=>D.jsx(TP,{ref:t,className:PP,...e,children:D.jsx($P,{className:IP,children:D.jsx(rc,{className:RP,size:16})})}));cg.displayName="Switch";const lg=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const i=t.by===e,o=t.order==="DESC",s=t.order==="ASC";return n?D.jsxs(Rt,{flexDirection:"column","data-test-id":r,children:[D.jsx(oc,{size:10,color:i&&o?"white":"grey"}),D.jsx(wo,{size:10,color:i&&s?"white":"grey"})]}):null};lg.defaultProps={sortable:!1,"data-test-id":""};var AP="_94c6vs1",OP="_94c6vs3",op="_94c6vs2",DP="_94c6vs0";const ug=({data:e,columns:t})=>{const[n,r]=u.useState([]),[i,o]=u.useState([]),[s,a]=u.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,p=f.sortable,x=s.by===m;return p?x&&s.order==="ASC"?a({by:m,order:"DESC"}):x&&s.order==="DESC"?a({by:"",order:""}):a({by:m,order:"ASC"}):null},l=f=>typeof f=="object"?"":f,d=u.useCallback((f,m)=>{const p=[...f];return m.order==="ASC"?p.sort((E,S)=>String(S[m.by]).localeCompare(String(E[m.by]))):m.order==="DESC"?p.sort((E,S)=>String(E[m.by]).localeCompare(String(S[m.by]))):[...f]},[]);return u.useEffect(()=>{const f=t.map(x=>({...x,sortable:x.sortable??!1}));r(f);const p=d(e,{by:s.by,order:s.order}).map(x=>f.map(E=>({accessor:E.accessor,sortable:E.sortable??!1,value:l(x[E.accessor]),...E.cellRenderer&&{CellRenderer:E.cellRenderer({origin:x,value:x[E.accessor]})}})));o(p)},[t,e,d,s.by,s.order]),{headers:n,rows:i,handleHeaderClick:c,sortColumn:s}},dg=u.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:i,...o},s)=>{const a=t||"table",{rows:c,headers:l,handleHeaderClick:d,sortColumn:f}=ug({data:r,columns:e});return u.useEffect(()=>{i&&i(f)},[i,f]),D.jsxs(a,{ref:s,as:t,className:DP,"data-test-id":n,...o,children:[D.jsx("thead",{children:D.jsx("tr",{className:OP,children:l.map(m=>D.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:op,onClick:()=>d(m),children:D.jsxs(Rt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[D.jsx(at,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),D.jsx(lg,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),D.jsx("tbody",{children:c.map((m,p)=>D.jsx("tr",{className:AP,children:m.map((x,E)=>D.jsx(at,{as:"td","data-test-id":`table-${n}-row${p}-col${E}`,className:op,w:"33%",children:x.CellRenderer??x.value}))}))})]})});dg.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var MP=it({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var kP=it({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const Bl=u.createContext({index:0,setIndex:()=>null}),Hl=u.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:i,align:o,onChange:s,...a},c)=>{const[l,d]=u.useState(i??0),f=u.useMemo(()=>u.Children.map(t,(x,E)=>u.cloneElement(x,{"data-index":E})),[t]);u.useEffect(()=>d(r??0),[r]);const m=u.useMemo(()=>({index:l,setIndex:E=>{d(E),s==null||s(E)}}),[l,s]),p=e||"ul";return D.jsx(p,{"data-test-id":a["data-test-id"],as:e,ref:c,className:Se(kP({withShadow:n,align:o})),...a,children:D.jsx(Bl.Provider,{value:m,children:f})})});Hl.displayName="Tabs";Hl.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const Wl=u.forwardRef(({as:e,children:t,...n},r)=>{const{index:i,setIndex:o}=u.useContext(Bl),s=u.useCallback(l=>{o==null||o(l)},[o]),a=n["data-index"]===i,c=e||"li";return D.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>s(n["data-index"]||0),className:Se(MP({isActive:a})),...n,children:D.jsx(Nt,{as:"span",textStyle:"body2",children:t})})});Wl.displayName="TabItem";Wl.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const fg="ToastProvider",[Ul,NP,VP]=Li("Toast"),[pg,QI]=Xt("Toast",[VP]),[jP,ys]=pg(fg),hg=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=e,[a,c]=u.useState(null),[l,d]=u.useState(0),f=u.useRef(!1),m=u.useRef(!1);return u.createElement(Ul.Provider,{scope:t},u.createElement(jP,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:u.useCallback(()=>d(p=>p+1),[]),onToastRemove:u.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},s))};hg.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${fg}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const LP="ToastViewport",FP=["F8"],Ka="toast.viewportPause",za="toast.viewportResume",BP=u.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=FP,label:i="Notifications ({hotkey})",...o}=e,s=ys(LP,n),a=NP(n),c=u.useRef(null),l=u.useRef(null),d=u.useRef(null),f=u.useRef(null),m=Xe(t,f,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;u.useEffect(()=>{const S=T=>{var h;r.every(_=>T[_]||T.code===_)&&((h=f.current)===null||h===void 0||h.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),u.useEffect(()=>{const S=c.current,T=f.current;if(x&&S&&T){const h=()=>{if(!s.isClosePausedRef.current){const M=new CustomEvent(Ka);T.dispatchEvent(M),s.isClosePausedRef.current=!0}},w=()=>{if(s.isClosePausedRef.current){const M=new CustomEvent(za);T.dispatchEvent(M),s.isClosePausedRef.current=!1}},_=M=>{!S.contains(M.relatedTarget)&&w()},$=()=>{S.contains(document.activeElement)||w()};return S.addEventListener("focusin",h),S.addEventListener("focusout",_),S.addEventListener("pointermove",h),S.addEventListener("pointerleave",$),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{S.removeEventListener("focusin",h),S.removeEventListener("focusout",_),S.removeEventListener("pointermove",h),S.removeEventListener("pointerleave",$),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[x,s.isClosePausedRef]);const E=u.useCallback(({tabbingDirection:S})=>{const h=a().map(w=>{const _=w.ref.current,$=[_,...nI(_)];return S==="forwards"?$:$.reverse()});return(S==="forwards"?h.reverse():h).flat()},[a]);return u.useEffect(()=>{const S=f.current;if(S){const T=h=>{const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const N=document.activeElement,V=h.shiftKey;if(h.target===S&&V){var $;($=l.current)===null||$===void 0||$.focus();return}const R=E({tabbingDirection:V?"backwards":"forwards"}),v=R.findIndex(C=>C===N);if(la(R.slice(v+1)))h.preventDefault();else{var M,O;V?(M=l.current)===null||M===void 0||M.focus():(O=d.current)===null||O===void 0||O.focus()}}};return S.addEventListener("keydown",T),()=>S.removeEventListener("keydown",T)}},[a,E]),u.createElement(q0,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"}},x&&u.createElement(ip,{ref:l,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"forwards"});la(S)}}),u.createElement(Ul.Slot,{scope:n},u.createElement(Fe.ol,ie({tabIndex:-1},o,{ref:m}))),x&&u.createElement(ip,{ref:d,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"backwards"});la(S)}}))}),HP="ToastFocusProxy",ip=u.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=ys(HP,n);return u.createElement(Zi,ie({"aria-hidden":!0,tabIndex:0},i,{ref:t,style:{position:"fixed"},onFocus:s=>{var a;const c=s.relatedTarget;!((a=o.viewport)!==null&&a!==void 0&&a.contains(c))&&r()}}))}),bs="Toast",WP="toast.swipeStart",UP="toast.swipeMove",YP="toast.swipeCancel",KP="toast.swipeEnd",zP=u.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=e,[a=!0,c]=tn({prop:r,defaultProp:i,onChange:o});return u.createElement(Jn,{present:n||a},u.createElement(mg,ie({open:a},s,{ref:t,onClose:()=>c(!1),onPause:Vt(e.onPause),onResume:Vt(e.onResume),onSwipeStart:Ie(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ie(e.onSwipeMove,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ie(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ie(e.onSwipeEnd,l=>{const{x:d,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[XP,GP]=pg(bs,{onClose(){}}),mg=u.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:p,...x}=e,E=ys(bs,n),[S,T]=u.useState(null),h=Xe(t,C=>T(C)),w=u.useRef(null),_=u.useRef(null),$=i||E.duration,M=u.useRef(0),O=u.useRef($),N=u.useRef(0),{onToastAdd:V,onToastRemove:z}=E,j=Vt(()=>{var C;(S==null?void 0:S.contains(document.activeElement))&&((C=E.viewport)===null||C===void 0||C.focus()),s()}),R=u.useCallback(C=>{!C||C===1/0||(window.clearTimeout(N.current),M.current=new Date().getTime(),N.current=window.setTimeout(j,C))},[j]);u.useEffect(()=>{const C=E.viewport;if(C){const I=()=>{R(O.current),l==null||l()},k=()=>{const U=new Date().getTime()-M.current;O.current=O.current-U,window.clearTimeout(N.current),c==null||c()};return C.addEventListener(Ka,k),C.addEventListener(za,I),()=>{C.removeEventListener(Ka,k),C.removeEventListener(za,I)}}},[E.viewport,$,c,l,R]),u.useEffect(()=>{o&&!E.isClosePausedRef.current&&R($)},[o,$,E.isClosePausedRef,R]),u.useEffect(()=>(V(),()=>z()),[V,z]);const v=u.useMemo(()=>S?gg(S):null,[S]);return E.viewport?u.createElement(u.Fragment,null,v&&u.createElement(qP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},v),u.createElement(XP,{scope:n,onClose:j},en.createPortal(u.createElement(Ul.ItemSlot,{scope:n},u.createElement(G0,{asChild:!0,onEscapeKeyDown:Ie(a,()=>{E.isFocusedToastEscapeKeyDownRef.current||j(),E.isFocusedToastEscapeKeyDownRef.current=!1})},u.createElement(Fe.li,ie({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":E.swipeDirection},x,{ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ie(e.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Ie(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ie(e.onPointerMove,C=>{if(!w.current)return;const I=C.clientX-w.current.x,k=C.clientY-w.current.y,U=!!_.current,q=["left","right"].includes(E.swipeDirection),ue=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,W=q?ue(0,I):0,L=q?0:ue(0,k),oe=C.pointerType==="touch"?10:2,G={x:W,y:L},X={originalEvent:C,delta:G};U?(_.current=G,li(UP,f,X,{discrete:!1})):sp(G,E.swipeDirection,oe)?(_.current=G,li(WP,d,X,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(I)>oe||Math.abs(k)>oe)&&(w.current=null)}),onPointerUp:Ie(e.onPointerUp,C=>{const I=_.current,k=C.target;if(k.hasPointerCapture(C.pointerId)&&k.releasePointerCapture(C.pointerId),_.current=null,w.current=null,I){const U=C.currentTarget,q={originalEvent:C,delta:I};sp(I,E.swipeDirection,E.swipeThreshold)?li(KP,p,q,{discrete:!0}):li(YP,m,q,{discrete:!0}),U.addEventListener("click",ue=>ue.preventDefault(),{once:!0})}})})))),E.viewport))):null});mg.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${bs}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const qP=e=>{const{__scopeToast:t,children:n,...r}=e,i=ys(bs,t),[o,s]=u.useState(!1),[a,c]=u.useState(!1);return eI(()=>s(!0)),u.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:u.createElement(zp,{asChild:!0},u.createElement(Zi,r,o&&u.createElement(u.Fragment,null,i.label," ",n)))},ZP="ToastAction",Yl=u.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?u.createElement(vg,{altText:n,asChild:!0},u.createElement(JP,ie({},r,{ref:t}))):null});Yl.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${ZP}\``)}};const QP="ToastClose",JP=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=GP(QP,n);return u.createElement(vg,{asChild:!0},u.createElement(Fe.button,ie({type:"button"},r,{ref:t,onClick:Ie(e.onClick,i.onClose)})))}),vg=u.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return u.createElement(Fe.div,ie({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},i,{ref:t}))});function gg(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),tI(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...gg(r))}}),t}function li(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hp(i,o):i.dispatchEvent(o)}const sp=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function eI(e=()=>{}){const t=Vt(e);Ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function tI(e){return e.nodeType===e.ELEMENT_NODE}function nI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function la(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const rI=hg,yg=BP,bg=zP,oI=Yl;var iI="_10z4js29",sI=it({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),aI="_10z4js28",cI="_10z4js2a";const xg=rI,Kl=u.forwardRef(({className:e,...t},n)=>D.jsx(yg,{ref:n,className:Se(cI,e),...t}));Kl.displayName=yg.displayName;const xs=u.forwardRef(({className:e,color:t="neutral",...n},r)=>D.jsx(bg,{ref:r,className:Se(sI({color:t}),e),...n}));xs.displayName=bg.displayName;xs.defaultProps={viewPort:void 0,actionClassName:void 0};const zl=u.forwardRef(({className:e,...t},n)=>D.jsx(Yl,{ref:n,className:Se(e),...t}));zl.displayName=oI.displayName;const lI=1,uI=1e6,Tn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let ua=0;function dI(){return ua=(ua+1)%Number.MAX_VALUE,ua.toString()}const da=new Map,ap=e=>{if(da.has(e))return;const t=setTimeout(()=>{da.delete(e),xo({type:Tn.REMOVE_TOAST,toastId:e})},uI);da.set(e,t)};function wg(e,t){switch(t.type){case Tn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,lI)};case Tn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Tn.DISMISS_TOAST:{const{toastId:n}=t;return n?ap(n):e.toasts.forEach(r=>{ap(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Tn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const gi=[];let yi={toasts:[]};function xo(e){yi=wg(yi,e),gi.forEach(t=>{t(yi)})}function Eg({...e}){const t=dI(),n=i=>xo({type:Tn.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>xo({type:Tn.DISMISS_TOAST,toastId:t});return xo({type:Tn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Cg(){const[e,t]=u.useState(yi);return u.useEffect(()=>(gi.push(t),()=>{const n=gi.indexOf(t);n>-1&&gi.splice(n,1)}),[e]),{...e,toast:Eg,dismiss:n=>xo({type:Tn.DISMISS_TOAST,toastId:n})}}const Xl=u.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Cg();return D.jsx(xg,{children:n.map(({id:i,description:o,action:s,actionText:a,actionClick:c,duration:l=3e3,type:d="foreground",color:f="neutral",viewPort:m,actionClassName:p,isDismissable:x=!0,...E})=>D.jsxs("div",{children:[D.jsxs(xs,{ref:t,color:f,duration:l,type:d,"data-test-id":`toast-${E["data-test-id"]??""}`,...E,children:[D.jsx(at,{"data-test-id":`toast-${E["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:x?"pointer":"auto",onClick:()=>{x&&r(i)},children:D.jsx(Nt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:aI,children:o})}),!s&&c&&a?D.jsx(zl,{altText:a,asChild:!0,children:D.jsx(nv,{"data-test-id":`action-toast-${E["data-test-id"]??""}`,onClick:c,className:Se(iI,p),children:a})}):s]},i),D.jsx(Kl,{...m})]},i))})});Xl.displayName="Toaster";const[ws,JI]=Xt("Tooltip",[Gi]),Es=Gi(),fI="TooltipProvider",pI=700,Xa="tooltip.open",[hI,Gl]=ws(fI),mI=e=>{const{__scopeTooltip:t,delayDuration:n=pI,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[s,a]=u.useState(!0),c=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.createElement(hI,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:u.useCallback(d=>{c.current=d},[]),disableHoverableContent:i},o)},ql="Tooltip",[vI,Cs]=ws(ql),gI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,c=Gl(ql,e.__scopeTooltip),l=Es(t),[d,f]=u.useState(null),m=$n(),p=u.useRef(0),x=s??c.disableHoverableContent,E=a??c.delayDuration,S=u.useRef(!1),[T=!1,h]=tn({prop:r,defaultProp:i,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xa))):c.onClose(),o==null||o(O)}}),w=u.useMemo(()=>T?S.current?"delayed-open":"instant-open":"closed",[T]),_=u.useCallback(()=>{window.clearTimeout(p.current),S.current=!1,h(!0)},[h]),$=u.useCallback(()=>{window.clearTimeout(p.current),h(!1)},[h]),M=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{S.current=!0,h(!0)},E)},[E,h]);return u.useEffect(()=>()=>window.clearTimeout(p.current),[]),u.createElement(Up,l,u.createElement(vI,{scope:t,contentId:m,open:T,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayed?M():_()},[c.isOpenDelayed,M,_]),onTriggerLeave:u.useCallback(()=>{x?$():window.clearTimeout(p.current)},[$,x]),onOpen:_,onClose:$,disableHoverableContent:x},n))},cp="TooltipTrigger",yI=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Cs(cp,n),o=Gl(cp,n),s=Es(n),a=u.useRef(null),c=Xe(t,a,i.onTriggerChange),l=u.useRef(!1),d=u.useRef(!1),f=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.createElement(Yp,ie({asChild:!0},s),u.createElement(Fe.button,ie({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:Ie(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ie(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Ie(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ie(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ie(e.onBlur,i.onClose),onClick:Ie(e.onClick,i.onClose)})))}),bI="TooltipPortal",[eA,xI]=ws(bI,{forceMount:void 0}),Po="TooltipContent",wI=u.forwardRef((e,t)=>{const n=xI(Po,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Cs(Po,e.__scopeTooltip);return u.createElement(Jn,{present:r||s.open},s.disableHoverableContent?u.createElement(_g,ie({side:i},o,{ref:t})):u.createElement(EI,ie({side:i},o,{ref:t})))}),EI=u.forwardRef((e,t)=>{const n=Cs(Po,e.__scopeTooltip),r=Gl(Po,e.__scopeTooltip),i=u.useRef(null),o=Xe(t,i),[s,a]=u.useState(null),{trigger:c,onClose:l}=n,d=i.current,{onPointerInTransitChange:f}=r,m=u.useCallback(()=>{a(null),f(!1)},[f]),p=u.useCallback((x,E)=>{const S=x.currentTarget,T={x:x.clientX,y:x.clientY},h=$I(T,S.getBoundingClientRect()),w=RI(T,h),_=PI(E.getBoundingClientRect()),$=AI([...w,..._]);a($),f(!0)},[f]);return u.useEffect(()=>()=>m(),[m]),u.useEffect(()=>{if(c&&d){const x=S=>p(S,d),E=S=>p(S,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",E),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",E)}}},[c,d,p,m]),u.useEffect(()=>{if(s){const x=E=>{const S=E.target,T={x:E.clientX,y:E.clientY},h=(c==null?void 0:c.contains(S))||(d==null?void 0:d.contains(S)),w=!II(T,s);h?m():w&&(m(),l())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,s,l,m]),u.createElement(_g,ie({},e,{ref:o}))}),[CI,_I]=ws(ql,{isInside:!1}),_g=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,c=Cs(Po,n),l=Es(n),{onClose:d}=c;return u.useEffect(()=>(document.addEventListener(Xa,d),()=>document.removeEventListener(Xa,d)),[d]),u.useEffect(()=>{if(c.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),u.createElement(Yi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d},u.createElement(Kp,ie({"data-state":c.stateAttribute},l,a,{ref:t,style:{...a.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)"}}),u.createElement(pp,null,r),u.createElement(CI,{scope:n,isInside:!0},u.createElement(nx,{id:c.contentId,role:"tooltip"},i||r))))}),SI="TooltipArrow",TI=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Es(n);return _I(SI,n).isInside?null:u.createElement(ex,ie({},i,r,{ref:t}))});function $I(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function RI(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 PI(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function II(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,l=t[s].x,d=t[s].y;c>r!=d>r&&n<(l-a)*(r-c)/(d-c)+a&&(i=!i)}return i}function AI(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),OI(t)}function OI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}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 DI=mI,MI=gI,kI=yI,NI=wI,VI=TI;function lp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function jI(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 Sg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var i in e){var o=e[i],s=[...n,i];typeof o=="string"||typeof o=="number"||o==null?r[i]=t(o,s):typeof o=="object"&&!Array.isArray(o)?r[i]=Sg(o,t,s):console.warn('Skipping invalid key "'.concat(s.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(o)?"Array":typeof o,'"'))}return r}function LI(e,t){var n={};if(typeof t=="object"){var r=e;Sg(t,(s,a)=>{var c=jI(r,a);n[lp(c)]=String(s)})}else{var i=e;for(var o in i)n[lp(o)]=i[o]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(a=>"".concat(a,":").concat(this[a])).join(";")},writable:!1}),n}var FI="var(--_4goys34)",BI="_4goys35",HI="_4goys36";const Zl=u.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:i,content:o,defaultOpen:s,delayDuration:a=700,disableHoverableContent:c,onOpenChange:l,open:d,position:f,positionOffset:m,withIcon:p,...x},E)=>{const S=dt.atoms.commonAtoms({color:r,bgColor:i}).className,T=dt.atoms.borderAtoms({borderColor:i}).className,w=i.replace("$","");return D.jsxs(MI,{defaultOpen:s,delayDuration:a,disableHoverableContent:c,onOpenChange:l,open:d,children:[D.jsx(kI,{asChild:!0,ref:E,children:n}),D.jsx(ns,{children:D.jsxs(NI,{align:e,alignOffset:t,side:f,sideOffset:m,...x,className:Se(HI,S,T),children:[D.jsxs(Rt,{gap:"$6",children:[p&&D.jsx(Rt,{width:"$24",children:D.jsx(O0,{size:24})}),o]}),D.jsx(VI,{className:BI,style:LI({[FI]:dt.theme.colors[w]})})]})})]})});Zl.displayName="Tooltip";Zl.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 Ql=({children:e})=>D.jsxs(DI,{children:[e,D.jsx(Xl,{})]});Ql.displayName="RadixProvider";const Jl=({children:e,withScrollStyles:t})=>D.jsx("div",{id:"voila-ui",style:{fontFamily:dt.theme.fonts.poppins},className:Se(t??dt.scrollbarStyle),children:D.jsx(Ql,{children:e})});Jl.displayName="Provider";Jl.defaultProps={withScrollStyles:!1};exports.Accordion=Oy;exports.AccordionContent=f0;exports.AccordionItem=p0;exports.AccordionTrigger=L0;exports.Alert=_p;exports.Badge=ic;exports.BaseSelect=yc;exports.BottomSheet=sT;exports.Box=at;exports.Button=Ur;exports.Card=ec;exports.Checkbox=Zm;exports.Chips=Kc;exports.CloseButton=Gr;exports.ConfirmDialogContext=Gc;exports.ConfirmDialogProvider=t$;exports.Container=tc;exports.DatePicker=$$;exports.Dialog=Xc;exports.Flex=Rt;exports.FullLoader=iv;exports.Grid=nc;exports.IconButton=Jc;exports.Image=el;exports.Input=Zc;exports.Link=nv;exports.List=tl;exports.ListItem=nl;exports.Loader=p$;exports.LoaderAnimated=rl;exports.Modal=No;exports.ModalBody=vs;exports.ModalFooter=gs;exports.ModalHeader=Vo;exports.MultiPicker=sv;exports.Overlay=Xw;exports.Picker=Ha;exports.Portal=ns;exports.Provider=Jl;exports.Radio=ig;exports.RadioGroup=mP;exports.RadixProvider=Ql;exports.Search=Fl;exports.Select=jr;exports.SelectPicker=Gv;exports.Spinner=qr;exports.Stack=mr;exports.Switch=cg;exports.TabItem=Wl;exports.Table=dg;exports.Tabs=Hl;exports.TabsContext=Bl;exports.Text=Nt;exports.Textarea=Qc;exports.Toast=xs;exports.ToastAction=zl;exports.ToastProvider=xg;exports.ToastViewport=Kl;exports.Toaster=Xl;exports.Tooltip=Zl;exports.reducer=wg;exports.toast=Eg;exports.useDialog=n$;exports.useIndeterminate=ST;exports.useOnMount=mh;exports.useRipple=Yc;exports.useTableRenderer=ug;exports.useToast=Cg;