@mp-front/components 0.0.1-next-8 → 0.0.1-next-9
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/{classNames-EUcv3dqx.js → classNames-BiTpavcN.js} +2 -2
- package/dist/components/animation/count-up/count-up.component.d.ts +3 -0
- package/dist/components/animation/count-up/count-up.component.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.stories.d.ts +15 -0
- package/dist/components/animation/count-up/count-up.stories.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.test.d.ts +2 -0
- package/dist/components/animation/count-up/count-up.test.d.ts.map +1 -0
- package/dist/components/animation/count-up/count-up.types.d.ts +11 -0
- package/dist/components/animation/count-up/count-up.types.d.ts.map +1 -0
- package/dist/components/animation/index.d.ts +2 -0
- package/dist/components/animation/index.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.types.d.ts +1 -0
- package/dist/components/dropdown/dropdown.types.d.ts.map +1 -1
- package/dist/components/input/number/useInputNumber.d.ts +3 -2
- package/dist/components/input/number/useInputNumber.d.ts.map +1 -1
- package/dist/components/modal/{modal.overlay.d.ts → dialog.overlay.d.ts} +5 -6
- package/dist/components/modal/dialog.overlay.d.ts.map +1 -0
- package/dist/components/modal/dialog.types.d.ts +5 -0
- package/dist/components/modal/dialog.types.d.ts.map +1 -0
- package/dist/components/modal/modal.component.d.ts +4 -3
- package/dist/components/modal/modal.component.d.ts.map +1 -1
- package/dist/indeterminate-C7JUOCP0.cjs +1 -0
- package/dist/indeterminate-CSEeEKiJ.js +25 -0
- package/dist/index-DGDeDoym.cjs +17 -0
- package/dist/index-q_fyr_Rn.js +156 -0
- package/dist/interfaces/modal/index.d.ts +2 -0
- package/dist/interfaces/modal/index.d.ts.map +1 -1
- package/dist/layout/header/right-side.component.d.ts.map +1 -1
- package/dist/layout/header/store.component.d.ts.map +1 -1
- package/dist/layout/header/user.component.d.ts.map +1 -1
- package/dist/proxy-2cglvzJh.cjs +31 -0
- package/dist/proxy-uRb7Bek8.js +5497 -0
- package/dist/skeleton-avatar-8uHbPAra.cjs +1 -0
- package/dist/skeleton-avatar-Cp8o0kUa.js +20 -0
- package/dist/styles.css +2 -2
- package/dist/toggle-group.component-Cs7zS-s6.js +11256 -0
- package/dist/toggle-group.component-DOQKWhkg.cjs +80 -0
- package/dist/ui-components-animation.cjs +1 -0
- package/dist/ui-components-animation.js +416 -0
- package/dist/ui-components-hooks.cjs +1 -1
- package/dist/ui-components-hooks.js +16 -15
- package/dist/ui-components-icons.cjs +1 -1
- package/dist/ui-components-icons.js +24 -23
- package/dist/ui-components-index.cjs +3 -102
- package/dist/ui-components-index.js +3211 -19256
- package/dist/ui-components-layout.cjs +1 -131
- package/dist/ui-components-layout.js +1146 -21133
- package/dist/ui-components-utils.js +2 -2
- package/dist/use-controlled-state-CNjWcDSI.js +19 -0
- package/dist/use-controlled-state-Ci1ztv5B.cjs +1 -0
- package/dist/useTranslation-2Dz5dMlm.cjs +1 -0
- package/dist/useTranslation-B0fSob9I.js +189 -0
- package/package.json +3 -3
- package/dist/components/modal/modal.overlay.d.ts.map +0 -1
- package/dist/index-BP9HuXkV.cjs +0 -31
- package/dist/index-C0ENqrRs.js +0 -570
- package/dist/interfaces/animation/check-icon.d.ts +0 -5
- package/dist/interfaces/animation/check-icon.d.ts.map +0 -1
- package/dist/interfaces/animation/count-up.d.ts +0 -12
- package/dist/interfaces/animation/count-up.d.ts.map +0 -1
- package/dist/interfaces/animation/index.d.ts +0 -6
- package/dist/interfaces/animation/index.d.ts.map +0 -1
- package/dist/interfaces/animation/text-effect.d.ts +0 -25
- package/dist/interfaces/animation/text-effect.d.ts.map +0 -1
- package/dist/interfaces/animation/text-morph.d.ts +0 -10
- package/dist/interfaces/animation/text-morph.d.ts.map +0 -1
- package/dist/interfaces/animation/text-scramble.d.ts +0 -14
- package/dist/interfaces/animation/text-scramble.d.ts.map +0 -1
- package/dist/skeleton-avatar-BzklbqjK.js +0 -41
- package/dist/skeleton-avatar-Ce_osCsT.cjs +0 -1
- package/dist/use-controlled-state-FlR7N58L.js +0 -51
- package/dist/use-controlled-state-H7oMYjxi.cjs +0 -1
- package/dist/useTranslation-QicPQnlv.cjs +0 -1
- package/dist/useTranslation-tTfk6apO.js +0 -157
|
@@ -1,131 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("./index-BP9HuXkV.cjs"),En=require("./classNames-CN12fVA7.cjs"),P=require("react"),Na=require("react-dom"),Wo=require("./useTranslation-QicPQnlv.cjs");function Ff(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=Ff(P),vi=Ff(Na);var g0="Separator",su="horizontal",v0=["horizontal","vertical"],Vf=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=su,...o}=e,i=y0(r)?r:su,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return pe.jsxRuntimeExports.jsx(pe.Primitive.div,{"data-orientation":i,...u,...o,ref:t})});Vf.displayName=g0;function y0(e){return v0.includes(e)}var b0=Vf;const w0={type:"3rdParty",init(e){Wo.setDefaults(e.options.react),Wo.setI18n(e)}};function x0({i18n:e,defaultNS:t,children:n}){const r=P.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return P.createElement(Wo.I18nContext.Provider,{value:r},n)}const E0=({className:e,...t})=>pe.jsxRuntimeExports.jsx("div",{className:En.cn("[&_svg]:w-40",e),...t}),S0=e=>v.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),C0=e=>v.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"}));var ns={exports:{}},Fn={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var au;function P0(){if(au)return Fn;au=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var l=null;if(i!==void 0&&(l=""+i),o.key!==void 0&&(l=""+o.key),"key"in o){i={};for(var u in o)u!=="key"&&(i[u]=o[u])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:i}}return Fn.Fragment=t,Fn.jsx=n,Fn.jsxs=n,Fn}var zr={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var lu;function R0(){return lu||(lu=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===z?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case _:return"Fragment";case S:return"Portal";case M:return"Profiler";case j:return"StrictMode";case T:return"Suspense";case V:return"SuspenseList"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case R:return(C.displayName||"Context")+".Provider";case O:return(C._context.displayName||"Context")+".Consumer";case A:var Z=C.render;return C=C.displayName,C||(C=Z.displayName||Z.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case N:return Z=C.displayName||null,Z!==null?Z:e(C.type)||"Memo";case U:Z=C._payload,C=C._init;try{return e(C(Z))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var Z=!1}catch{Z=!0}if(Z){Z=console;var J=Z.error,ue=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ue),t(C)}}function r(){}function o(){if(G===0){ne=console.log,te=console.info,$=console.warn,q=console.error,X=console.group,K=console.groupCollapsed,ie=console.groupEnd;var C={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}G++}function i(){if(G--,G===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},C,{value:ne}),info:L({},C,{value:te}),warn:L({},C,{value:$}),error:L({},C,{value:q}),group:L({},C,{value:X}),groupCollapsed:L({},C,{value:K}),groupEnd:L({},C,{value:ie})})}0>G&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function l(C){if(I===void 0)try{throw Error()}catch(J){var Z=J.stack.trim().match(/\n( *(at )?)/);I=Z&&Z[1]||"",me=-1<J.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<J.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+I+C+me}function u(C,Z){if(!C||Le)return"";var J=Ue.get(C);if(J!==void 0)return J;Le=!0,J=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ue=null;ue=D.H,D.H=null,o();try{var Te={DetermineComponentFrameRoot:function(){try{if(Z){var wt=function(){throw Error()};if(Object.defineProperty(wt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(wt,[])}catch(ht){var Br=ht}Reflect.construct(C,[],wt)}else{try{wt.call()}catch(ht){Br=ht}C.call(wt.prototype)}}else{try{throw Error()}catch(ht){Br=ht}(wt=C())&&typeof wt.catch=="function"&&wt.catch(function(){})}}catch(ht){if(ht&&Br&&typeof ht.stack=="string")return[ht.stack,Br.stack]}return[null,null]}};Te.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ve=Object.getOwnPropertyDescriptor(Te.DetermineComponentFrameRoot,"name");ve&&ve.configurable&&Object.defineProperty(Te.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var ae=Te.DetermineComponentFrameRoot(),pt=ae[0],rn=ae[1];if(pt&&rn){var je=pt.split(`
|
|
20
|
-
`),Bt=rn.split(`
|
|
21
|
-
`);for(ae=ve=0;ve<je.length&&!je[ve].includes("DetermineComponentFrameRoot");)ve++;for(;ae<Bt.length&&!Bt[ae].includes("DetermineComponentFrameRoot");)ae++;if(ve===je.length||ae===Bt.length)for(ve=je.length-1,ae=Bt.length-1;1<=ve&&0<=ae&&je[ve]!==Bt[ae];)ae--;for(;1<=ve&&0<=ae;ve--,ae--)if(je[ve]!==Bt[ae]){if(ve!==1||ae!==1)do if(ve--,ae--,0>ae||je[ve]!==Bt[ae]){var In=`
|
|
22
|
-
`+je[ve].replace(" at new "," at ");return C.displayName&&In.includes("<anonymous>")&&(In=In.replace("<anonymous>",C.displayName)),typeof C=="function"&&Ue.set(C,In),In}while(1<=ve&&0<=ae);break}}}finally{Le=!1,D.H=ue,i(),Error.prepareStackTrace=J}return je=(je=C?C.displayName||C.name:"")?l(je):"",typeof C=="function"&&Ue.set(C,je),je}function c(C){if(C==null)return"";if(typeof C=="function"){var Z=C.prototype;return u(C,!(!Z||!Z.isReactComponent))}if(typeof C=="string")return l(C);switch(C){case T:return l("Suspense");case V:return l("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case A:return C=u(C.render,!1),C;case N:return c(C.type);case U:Z=C._payload,C=C._init;try{return c(C(Z))}catch{}}return""}function a(){var C=D.A;return C===null?null:C.getOwner()}function s(C){if(k.call(C,"key")){var Z=Object.getOwnPropertyDescriptor(C,"key").get;if(Z&&Z.isReactWarning)return!1}return C.key!==void 0}function d(C,Z){function J(){Vr||(Vr=!0,console.error("%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://react.dev/link/special-props)",Z))}J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}function f(){var C=e(this.type);return $r[C]||($r[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function p(C,Z,J,ue,Te,ve){return J=ve.ref,C={$$typeof:E,type:C,key:Z,props:ve,_owner:Te},(J!==void 0?J:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:f}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function m(C,Z,J,ue,Te,ve){if(typeof C=="string"||typeof C=="function"||C===_||C===M||C===j||C===T||C===V||C===B||typeof C=="object"&&C!==null&&(C.$$typeof===U||C.$$typeof===N||C.$$typeof===R||C.$$typeof===O||C.$$typeof===A||C.$$typeof===Q||C.getModuleId!==void 0)){var ae=Z.children;if(ae!==void 0)if(ue)if(ee(ae)){for(ue=0;ue<ae.length;ue++)h(ae[ue],C);Object.freeze&&Object.freeze(ae)}else console.error("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 h(ae,C)}else ae="",(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C===null?ue="null":ee(C)?ue="array":C!==void 0&&C.$$typeof===E?(ue="<"+(e(C.type)||"Unknown")+" />",ae=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof C,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,ae);if(k.call(Z,"key")){ae=e(C);var pt=Object.keys(Z).filter(function(je){return je!=="key"});ue=0<pt.length?"{key: someKey, "+pt.join(": ..., ")+": ...}":"{key: someKey}",$t[ae+ue]||(pt=0<pt.length?"{"+pt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
-
let props = %s;
|
|
24
|
-
<%s {...props} />
|
|
25
|
-
React keys must be passed directly to JSX without using spread:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,ue,ae,pt,ae),$t[ae+ue]=!0)}if(ae=null,J!==void 0&&(n(J),ae=""+J),s(Z)&&(n(Z.key),ae=""+Z.key),"key"in Z){J={};for(var rn in Z)rn!=="key"&&(J[rn]=Z[rn])}else J=Z;return ae&&d(J,typeof C=="function"?C.displayName||C.name||"Unknown":C),p(C,ae,ve,Te,a(),J)}function h(C,Z){if(typeof C=="object"&&C&&C.$$typeof!==Vt){if(ee(C))for(var J=0;J<C.length;J++){var ue=C[J];g(ue)&&y(ue,Z)}else if(g(C))C._store&&(C._store.validated=1);else if(C===null||typeof C!="object"?J=null:(J=W&&C[W]||C["@@iterator"],J=typeof J=="function"?J:null),typeof J=="function"&&J!==C.entries&&(J=J.call(C),J!==C))for(;!(C=J.next()).done;)g(C.value)&&y(C.value,Z)}}function g(C){return typeof C=="object"&&C!==null&&C.$$typeof===E}function y(C,Z){if(C._store&&!C._store.validated&&C.key==null&&(C._store.validated=1,Z=b(Z),!iu[Z])){iu[Z]=!0;var J="";C&&C._owner!=null&&C._owner!==a()&&(J=null,typeof C._owner.tag=="number"?J=e(C._owner.type):typeof C._owner.name=="string"&&(J=C._owner.name),J=" It was passed a child from "+J+".");var ue=D.getCurrentStack;D.getCurrentStack=function(){var Te=c(C.type);return ue&&(Te+=ue()||""),Te},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Z,J),D.getCurrentStack=ue}}function b(C){var Z="",J=a();return J&&(J=e(J.type))&&(Z=`
|
|
28
|
-
|
|
29
|
-
Check the render method of \``+J+"`."),Z||(C=e(C))&&(Z=`
|
|
30
|
-
|
|
31
|
-
Check the top-level render call using <`+C+">."),Z}var x=P,E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),W=Symbol.iterator,z=Symbol.for("react.client.reference"),D=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,L=Object.assign,Q=Symbol.for("react.client.reference"),ee=Array.isArray,G=0,ne,te,$,q,X,K,ie;r.__reactDisabledLog=!0;var I,me,Le=!1,Ue=new(typeof WeakMap=="function"?WeakMap:Map),Vt=Symbol.for("react.client.reference"),Vr,$r={},$t={},iu={};zr.Fragment=_,zr.jsx=function(C,Z,J,ue,Te){return m(C,Z,J,!1,ue,Te)},zr.jsxs=function(C,Z,J,ue,Te){return m(C,Z,J,!0,ue,Te)}})()),zr}var uu;function O0(){return uu||(uu=1,process.env.NODE_ENV==="production"?ns.exports=P0():ns.exports=R0()),ns.exports}var w=O0();function cu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yi(...e){return t=>{let n=!1;const r=e.map(o=>{const i=cu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():cu(e[o],null)}}}}function re(...e){return v.useCallback(yi(...e),e)}function _t(e){const t=T0(e),n=v.forwardRef((r,o)=>{const{children:i,...l}=r,u=v.Children.toArray(i),c=u.find(M0);if(c){const a=c.props.children,s=u.map(d=>d===c?v.Children.count(a)>1?v.Children.only(null):v.isValidElement(a)?a.props.children:null:d);return w.jsx(t,{...l,ref:o,children:v.isValidElement(a)?v.cloneElement(a,void 0,s):null})}return w.jsx(t,{...l,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var _0=_t("Slot");function T0(e){const t=v.forwardRef((n,r)=>{const{children:o,...i}=n;if(v.isValidElement(o)){const l=A0(o),u=k0(i,o.props);return o.type!==v.Fragment&&(u.ref=r?yi(r,l):l),v.cloneElement(o,u)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $f=Symbol("radix.slottable");function j0(e){const t=({children:n})=>w.jsx(w.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$f,t}function M0(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$f}function k0(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const u=i(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function A0(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var D0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=D0.reduce((e,t)=>{const n=_t(`Primitive.${t}`),r=v.forwardRef((o,i)=>{const{asChild:l,...u}=o,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(c,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bf(e,t){e&&vi.flushSync(()=>e.dispatchEvent(t))}var Ce=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},L0="Portal",zf=v.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[i,l]=v.useState(!1);Ce(()=>l(!0),[]);const u=r||i&&((n=globalThis==null?void 0:globalThis.document)==null?void 0:n.body);return u?Na.createPortal(w.jsx(H.div,{...o,ref:t}),u):null});zf.displayName=L0;function Uf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Uf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function N0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Uf(e))&&(r&&(r+=" "),r+=t);return r}const Ia="-",I0=e=>{const t=V0(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const i=o.split(Ia);return i[0]===""&&i.length!==1&&i.shift(),Hf(i,t)||F0(o)},getConflictingClassGroupIds:(o,i)=>{const l=n[o]||[];return i&&r[o]?[...l,...r[o]]:l}}},Hf=(e,t)=>{var n;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?Hf(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(Ia);return(n=t.validators.find(({validator:u})=>u(l)))==null?void 0:n.classGroupId},du=/^\[(.+)\]$/,F0=e=>{if(du.test(e)){const t=du.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},V0=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return B0(Object.entries(e.classGroups),n).forEach(([o,i])=>{Hs(i,r,o,t)}),r},Hs=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:fu(t,o);i.classGroupId=n;return}if(typeof o=="function"){if($0(o)){Hs(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Hs(l,fu(t,i),n,r)})})},fu=(e,t)=>{let n=e;return t.split(Ia).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$0=e=>e.isThemeGetter,B0=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,u])=>[t+l,u])):i);return[n,o]}):e,z0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,l)=>{n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}},Kf="!",U0=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,l=u=>{const c=[];let a=0,s=0,d;for(let g=0;g<u.length;g++){let y=u[g];if(a===0){if(y===o&&(r||u.slice(g,g+i)===t)){c.push(u.slice(s,g)),s=g+i;continue}if(y==="/"){d=g;continue}}y==="["?a++:y==="]"&&a--}const f=c.length===0?u:u.substring(s),p=f.startsWith(Kf),m=p?f.substring(1):f,h=d&&d>s?d-s:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return n?u=>n({className:u,parseClassName:l}):l},H0=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},K0=e=>({cache:z0(e.cacheSize),parseClassName:U0(e),...I0(e)}),W0=/\s+/,G0=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],l=e.trim().split(W0);let u="";for(let c=l.length-1;c>=0;c-=1){const a=l[c],{modifiers:s,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(a);let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){u=a+(u.length>0?" "+u:u);continue}if(h=r(f),!h){u=a+(u.length>0?" "+u:u);continue}m=!1}const g=H0(s).join(":"),y=d?g+Kf:g,b=y+h;if(i.includes(b))continue;i.push(b);const x=o(h,m);for(let E=0;E<x.length;++E){const S=x[E];i.push(y+S)}u=a+(u.length>0?" "+u:u)}return u};function X0(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wf(t))&&(r&&(r+=" "),r+=n);return r}const Wf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wf(e[r]))&&(n&&(n+=" "),n+=t);return n};function Y0(e,...t){let n,r,o,i=l;function l(c){const a=t.reduce((s,d)=>d(s),e());return n=K0(a),r=n.cache.get,o=n.cache.set,i=u,u(c)}function u(c){const a=r(c);if(a)return a;const s=G0(c,n);return o(c,s),s}return function(){return i(X0.apply(null,arguments))}}const ge=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gf=/^\[(?:([a-z-]+):)?(.+)\]$/i,q0=/^\d+\/\d+$/,Z0=new Set(["px","full","screen"]),J0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ey=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ty=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ny=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mt=e=>yn(e)||Z0.has(e)||q0.test(e),xt=e=>On(e,"length",cy),yn=e=>!!e&&!Number.isNaN(Number(e)),rs=e=>On(e,"number",yn),Vn=e=>!!e&&Number.isInteger(Number(e)),ry=e=>e.endsWith("%")&&yn(e.slice(0,-1)),se=e=>Gf.test(e),Et=e=>J0.test(e),oy=new Set(["length","size","percentage"]),iy=e=>On(e,oy,Xf),sy=e=>On(e,"position",Xf),ay=new Set(["image","url"]),ly=e=>On(e,ay,fy),uy=e=>On(e,"",dy),$n=()=>!0,On=(e,t,n)=>{const r=Gf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},cy=e=>Q0.test(e)&&!ey.test(e),Xf=()=>!1,dy=e=>ty.test(e),fy=e=>ny.test(e),py=()=>{const e=ge("colors"),t=ge("spacing"),n=ge("blur"),r=ge("brightness"),o=ge("borderColor"),i=ge("borderRadius"),l=ge("borderSpacing"),u=ge("borderWidth"),c=ge("contrast"),a=ge("grayscale"),s=ge("hueRotate"),d=ge("invert"),f=ge("gap"),p=ge("gradientColorStops"),m=ge("gradientColorStopPositions"),h=ge("inset"),g=ge("margin"),y=ge("opacity"),b=ge("padding"),x=ge("saturate"),E=ge("scale"),S=ge("sepia"),_=ge("skew"),j=ge("space"),M=ge("translate"),O=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",se,t],T=()=>[se,t],V=()=>["",mt,xt],N=()=>["auto",yn,se],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",se],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[yn,se];return{cacheSize:500,separator:":",theme:{colors:[$n],spacing:[mt,xt],blur:["none","",Et,se],brightness:L(),borderColor:[e],borderRadius:["none","","full",Et,se],borderSpacing:T(),borderWidth:V(),contrast:L(),grayscale:D(),hueRotate:L(),invert:D(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[ry,xt],inset:A(),margin:A(),opacity:L(),padding:T(),saturate:L(),scale:L(),sepia:D(),skew:L(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[Et]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),se]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vn,se]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Vn,se]}],"grid-cols":[{"grid-cols":[$n]}],"col-start-end":[{col:["auto",{span:["full",Vn,se]},se]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[$n]}],"row-start-end":[{row:["auto",{span:[Vn,se]},se]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,t]}],"min-w":[{"min-w":[se,t,"min","max","fit"]}],"max-w":[{"max-w":[se,t,"none","full","min","max","fit","prose",{screen:[Et]},Et]}],h:[{h:[se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Et,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rs]}],"font-family":[{font:[$n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",yn,rs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",mt,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",mt,xt]}],"underline-offset":[{"underline-offset":["auto",mt,se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),sy]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",iy]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ly]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:B()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[mt,se]}],"outline-w":[{outline:[mt,xt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[mt,xt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Et,uy]}],"shadow-color":[{shadow:[$n]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Et,se]}],grayscale:[{grayscale:[a]}],"hue-rotate":[{"hue-rotate":[s]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[s]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Vn,se]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[mt,xt,rs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},hy=Y0(py),fe=(...e)=>hy(N0(e)),my=e=>v.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("g",{clipPath:"url(#clip0_1359_16290)"},v.createElement("path",{d:"M13.422 5.75502L8.37215 10.8048C8.19178 10.9856 7.97752 11.129 7.74166 11.2268C7.50579 11.3246 7.25295 11.375 6.9976 11.375C6.74224 11.375 6.4894 11.3246 6.25353 11.2268C6.01767 11.129 5.80341 10.9856 5.62304 10.8048L0.573244 5.75502C-0.655085 4.52669 0.222293 2.42098 1.95755 2.42098L12.0571 2.42098C13.7924 2.42098 14.6503 4.52669 13.422 5.75502Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"clip0_1359_16290"},v.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(14 14) rotate(-180)"})))),gy=e=>v.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 15 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("path",{d:"M5.88995 10.1388L5.86646 10.1623L0 4.29579L1.91024 2.38556L5.89003 6.36536L12.2554 0L14.1656 1.91024L5.91352 10.1623L5.88995 10.1388Z",fill:"currentColor"})),vy=e=>v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24",...e},v.createElement("path",{d:"M21.2805 18.736C20.7752 17.5392 20.0419 16.452 19.1216 15.5351C18.204 14.6156 17.117 13.8825 15.9207 13.3762C15.9099 13.3709 15.8992 13.3682 15.8885 13.3628C17.5573 12.1575 18.6421 10.1941 18.6421 7.97889C18.6421 4.30924 15.6689 1.33603 11.9992 1.33603C8.32959 1.33603 5.35637 4.30924 5.35637 7.97889C5.35637 10.1941 6.44119 12.1575 8.10994 13.3655C8.09923 13.3709 8.08852 13.3735 8.0778 13.3789C6.8778 13.8851 5.80102 14.611 4.87691 15.5378C3.95738 16.4554 3.22424 17.5424 2.71798 18.7387C2.22063 19.9099 1.9524 21.1656 1.9278 22.4378C1.92709 22.4664 1.9321 22.4948 1.94255 22.5215C1.953 22.5481 1.96867 22.5723 1.98864 22.5928C2.00861 22.6133 2.03247 22.6296 2.05883 22.6407C2.08518 22.6518 2.11349 22.6575 2.14209 22.6575H3.74923C3.86709 22.6575 3.96084 22.5637 3.96352 22.4485C4.01709 20.3807 4.84744 18.4441 6.3153 16.9762C7.83405 15.4575 9.85102 14.6217 11.9992 14.6217C14.1474 14.6217 16.1644 15.4575 17.6832 16.9762C19.151 18.4441 19.9814 20.3807 20.0349 22.4485C20.0376 22.5664 20.1314 22.6575 20.2492 22.6575H21.8564C21.885 22.6575 21.9133 22.6518 21.9396 22.6407C21.966 22.6296 21.9899 22.6133 22.0098 22.5928C22.0298 22.5723 22.0455 22.5481 22.0559 22.5215C22.0664 22.4948 22.0714 22.4664 22.0707 22.4378C22.0439 21.1575 21.7787 19.9119 21.2805 18.736ZM11.9992 12.586C10.7698 12.586 9.61262 12.1066 8.74209 11.236C7.87155 10.3655 7.39209 9.20835 7.39209 7.97889C7.39209 6.74942 7.87155 5.59228 8.74209 4.72174C9.61262 3.85121 10.7698 3.37174 11.9992 3.37174C13.2287 3.37174 14.3858 3.85121 15.2564 4.72174C16.1269 5.59228 16.6064 6.74942 16.6064 7.97889C16.6064 9.20835 16.1269 10.3655 15.2564 11.236C14.3858 12.1066 13.2287 12.586 11.9992 12.586Z"})),yy=e=>v.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("g",{clipPath:"url(#clip0_13053_6230)"},v.createElement("path",{d:"M7 0.875C3.61758 0.875 0.875 3.61758 0.875 7C0.875 10.3824 3.61758 13.125 7 13.125C10.3824 13.125 13.125 10.3824 13.125 7C13.125 3.61758 10.3824 0.875 7 0.875ZM9.26133 9.32695L8.35898 9.32285L7 7.70273L5.64238 9.32148L4.73867 9.32559C4.67852 9.32559 4.6293 9.27773 4.6293 9.21621C4.6293 9.19023 4.63887 9.16563 4.65527 9.14512L6.43398 7.02598L4.65527 4.9082C4.63875 4.88817 4.62959 4.86308 4.6293 4.83711C4.6293 4.77695 4.67852 4.72773 4.73867 4.72773L5.64238 4.73184L7 6.35195L8.35762 4.7332L9.25996 4.7291C9.32012 4.7291 9.36934 4.77695 9.36934 4.83848C9.36934 4.86445 9.35977 4.88906 9.34336 4.90957L7.56738 7.02734L9.34473 9.14648C9.36113 9.16699 9.3707 9.1916 9.3707 9.21758C9.3707 9.27773 9.32148 9.32695 9.26133 9.32695Z"})),v.createElement("defs",null,v.createElement("clipPath",{id:"clip0_13053_6230"},v.createElement("rect",{width:14,height:14,fill:"white"})))),by=e=>v.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("rect",{width:16,height:16,fill:"currentColor"})),dn=(e,t)=>`${e}-${t}`,wy=(e,t)=>t?[(t==null?void 0:t.sm)&&`sm:${dn(e,t.sm)}`,(t==null?void 0:t.md)&&`md:${dn(e,t.md)}`,(t==null?void 0:t.lg)&&`lg:${dn(e,t.lg)}`,(t==null?void 0:t.xl)&&`xl:${dn(e,t.xl)}`].filter(Boolean):[],os=(e,t)=>{const n=[];if(typeof t=="number"||typeof t=="string")n.push(dn(e,t));else if(t&&t){const[r,o]=t;n.push(dn(e,r)),n.push(...wy(e,o))}return n.join(" ")};var Yf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xy="VisuallyHidden",qf=v.forwardRef((e,t)=>w.jsx(H.span,{...e,ref:t,style:{...Yf,...e.style}}));qf.displayName=xy;var Ey=qf;function Sy(e,t){const n=v.createContext(t),r=i=>{const{children:l,...u}=i,c=v.useMemo(()=>u,Object.values(u));return w.jsx(n.Provider,{value:c,children:l})};r.displayName=e+"Provider";function o(i){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Ee(e,t=[]){let n=[];function r(i,l){const u=v.createContext(l),c=n.length;n=[...n,l];const a=d=>{var f;const{scope:p,children:m,...h}=d,g=((f=p==null?void 0:p[e])==null?void 0:f[c])||u,y=v.useMemo(()=>h,Object.values(h));return w.jsx(g.Provider,{value:y,children:m})};a.displayName=i+"Provider";function s(d,f){var p;const m=((p=f==null?void 0:f[e])==null?void 0:p[c])||u,h=v.useContext(m);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[a,s]}const o=()=>{const i=n.map(l=>v.createContext(l));return function(l){const u=(l==null?void 0:l[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,Cy(o,...t)]}function Cy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(o){const i=r.reduce((l,{useScope:u,scopeName:c})=>{const a=u(o)[`__scope${c}`];return{...l,...a}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function gr(e){const t=e+"CollectionProvider",[n,r]=Ee(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:g,children:y}=h,b=P.useRef(null),x=P.useRef(new Map).current;return w.jsx(o,{scope:g,itemMap:x,collectionRef:b,children:y})};l.displayName=t;const u=e+"CollectionSlot",c=_t(u),a=P.forwardRef((h,g)=>{const{scope:y,children:b}=h,x=i(u,y),E=re(g,x.collectionRef);return w.jsx(c,{ref:E,children:b})});a.displayName=u;const s=e+"CollectionItemSlot",d="data-radix-collection-item",f=_t(s),p=P.forwardRef((h,g)=>{const{scope:y,children:b,...x}=h,E=P.useRef(null),S=re(g,E),_=i(s,y);return P.useEffect(()=>(_.itemMap.set(E,{ref:E,...x}),()=>void _.itemMap.delete(E))),w.jsx(f,{[d]:"",ref:S,children:b})});p.displayName=s;function m(h){const g=i(e+"CollectionConsumer",h);return P.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((x,E)=>b.indexOf(x.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:a,ItemSlot:p},m,r]}function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var Py=v[" useInsertionEffect ".trim().toString()]||Ce;function $e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,l]=Ry({defaultProp:t,onChange:n}),u=e!==void 0,c=u?e:o;{const s=v.useRef(e!==void 0);v.useEffect(()=>{const d=s.current;d!==u&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),s.current=u},[u,r])}const a=v.useCallback(s=>{var d;if(u){const f=Oy(s)?s(e):s;f!==e&&((d=l.current)==null||d.call(l,f))}else i(s)},[u,e,i,l]);return[c,a]}function Ry({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),i=v.useRef(t);return Py(()=>{i.current=t},[t]),v.useEffect(()=>{var l;o.current!==n&&((l=i.current)==null||l.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Oy(e){return typeof e=="function"}function _y(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=Ty(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=re(r.ref,jy(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};Be.displayName="Presence";function Ty(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),i=v.useRef("none"),l=e?"mounted":"unmounted",[u,c]=_y(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const a=Ur(r.current);i.current=u==="mounted"?a:"none"},[u]),Ce(()=>{const a=r.current,s=o.current;if(s!==e){const d=i.current,f=Ur(a);e?c("MOUNT"):f==="none"||(a==null?void 0:a.display)==="none"?c("UNMOUNT"):c(s&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ce(()=>{if(t){let a;const s=t.ownerDocument.defaultView??window,d=p=>{const m=Ur(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(c("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",a=s.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=p=>{p.target===t&&(i.current=Ur(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{s.clearTimeout(a),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(a=>{r.current=a?getComputedStyle(a):null,n(a)},[])}}function Ur(e){return(e==null?void 0:e.animationName)||"none"}function jy(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var My=v[" useId ".trim().toString()]||(()=>{}),ky=0;function Je(e){const[t,n]=v.useState(My());return Ce(()=>{n(r=>r??String(ky++))},[e]),t?`radix-${t}`:""}var bi="Collapsible",[Ay,Zf]=Ee(bi),[Dy,Fa]=Ay(bi),Jf=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...u}=e,[c,a]=$e({prop:r,defaultProp:o??!1,onChange:l,caller:bi});return w.jsx(Dy,{scope:n,disabled:i,contentId:Je(),open:c,onOpenToggle:v.useCallback(()=>a(s=>!s),[a]),children:w.jsx(H.div,{"data-state":$a(c),"data-disabled":i?"":void 0,...u,ref:t})})});Jf.displayName=bi;var Qf="CollapsibleTrigger",ep=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Fa(Qf,n);return w.jsx(H.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":$a(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});ep.displayName=Qf;var Va="CollapsibleContent",tp=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fa(Va,e.__scopeCollapsible);return w.jsx(Be,{present:n||o.open,children:({present:i})=>w.jsx(Ly,{...r,ref:t,present:i})})});tp.displayName=Va;var Ly=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=Fa(Va,n),[u,c]=v.useState(r),a=v.useRef(null),s=re(t,a),d=v.useRef(0),f=d.current,p=v.useRef(0),m=p.current,h=l.open||u,g=v.useRef(h),y=v.useRef(void 0);return v.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),Ce(()=>{const b=a.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();d.current=x.height,p.current=x.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(r)}},[l.open,r]),w.jsx(H.div,{"data-state":$a(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!h,...i,ref:s,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&o})});function $a(e){return e?"open":"closed"}var Ny=Jf,Iy=ep,Fy=tp,Vy=v.createContext(void 0);function Qt(e){const t=v.useContext(Vy);return e||t||"ltr"}var nt="Accordion",$y=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ba,By,zy]=gr(nt),[wi]=Ee(nt,[zy,Zf]),za=Zf(),Uy=P.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return w.jsx(Ba.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?w.jsx(Gy,{...i,ref:t}):w.jsx(Wy,{...o,ref:t})})});Uy.displayName=nt;var[np,Hy]=wi(nt),[rp,Ky]=wi(nt,{collapsible:!1}),Wy=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...l}=e,[u,c]=$e({prop:n,defaultProp:r??"",onChange:o,caller:nt});return w.jsx(np,{scope:e.__scopeAccordion,value:P.useMemo(()=>u?[u]:[],[u]),onItemOpen:c,onItemClose:P.useCallback(()=>i&&c(""),[i,c]),children:w.jsx(rp,{scope:e.__scopeAccordion,collapsible:i,children:w.jsx(op,{...l,ref:t})})})}),Gy=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l,u]=$e({prop:n,defaultProp:r??[],onChange:o,caller:nt}),c=P.useCallback(s=>u((d=[])=>[...d,s]),[u]),a=P.useCallback(s=>u((d=[])=>d.filter(f=>f!==s)),[u]);return w.jsx(np,{scope:e.__scopeAccordion,value:l,onItemOpen:c,onItemClose:a,children:w.jsx(rp,{scope:e.__scopeAccordion,collapsible:!0,children:w.jsx(op,{...i,ref:t})})})}),[Xy,xi]=wi(nt),op=P.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...l}=e,u=P.useRef(null),c=re(u,t),a=By(n),s=Qt(o)==="ltr",d=F(e.onKeyDown,f=>{var p;if(!$y.includes(f.key))return;const m=f.target,h=a().filter(M=>{var O;return!((O=M.ref.current)!=null&&O.disabled)}),g=h.findIndex(M=>M.ref.current===m),y=h.length;if(g===-1)return;f.preventDefault();let b=g;const x=0,E=y-1,S=()=>{b=g+1,b>E&&(b=x)},_=()=>{b=g-1,b<x&&(b=E)};switch(f.key){case"Home":b=x;break;case"End":b=E;break;case"ArrowRight":i==="horizontal"&&(s?S():_());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(s?_():S());break;case"ArrowUp":i==="vertical"&&_();break}const j=b%y;(p=h[j].ref.current)==null||p.focus()});return w.jsx(Xy,{scope:n,disabled:r,direction:o,orientation:i,children:w.jsx(Ba.Slot,{scope:n,children:w.jsx(H.div,{...l,"data-orientation":i,ref:c,onKeyDown:r?void 0:d})})})}),Go="AccordionItem",[Yy,Ua]=wi(Go),ip=P.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=xi(Go,n),l=Hy(Go,n),u=za(n),c=Je(),a=r&&l.value.includes(r)||!1,s=i.disabled||e.disabled;return w.jsx(Yy,{scope:n,open:a,disabled:s,triggerId:c,children:w.jsx(Ny,{"data-orientation":i.orientation,"data-state":dp(a),...u,...o,ref:t,disabled:s,open:a,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})})});ip.displayName=Go;var sp="AccordionHeader",ap=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=xi(nt,n),i=Ua(sp,n);return w.jsx(H.h3,{"data-orientation":o.orientation,"data-state":dp(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});ap.displayName=sp;var Ks="AccordionTrigger",lp=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=xi(nt,n),i=Ua(Ks,n),l=Ky(Ks,n),u=za(n);return w.jsx(Ba.ItemSlot,{scope:n,children:w.jsx(Iy,{"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...u,...r,ref:t})})});lp.displayName=Ks;var up="AccordionContent",cp=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=xi(nt,n),i=Ua(up,n),l=za(n);return w.jsx(Fy,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...l,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});cp.displayName=up;function dp(e){return e?"open":"closed"}var qy=ip,Zy=ap,Jy=lp,Qy=cp;function Qe(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function e1(e,t=globalThis==null?void 0:globalThis.document){const n=Qe(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t1="DismissableLayer",Ws="dismissableLayer.update",n1="dismissableLayer.pointerDownOutside",r1="dismissableLayer.focusOutside",pu,fp=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_n=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...c}=e,a=v.useContext(fp),[s,d]=v.useState(null),f=(s==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=re(t,j=>d(j)),h=Array.from(a.layers),[g]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),b=s?h.indexOf(s):-1,x=a.layersWithOutsidePointerEventsDisabled.size>0,E=b>=y,S=s1(j=>{const M=j.target,O=[...a.branches].some(R=>R.contains(M));!E||O||(o==null||o(j),l==null||l(j),j.defaultPrevented||u==null||u())},f),_=a1(j=>{const M=j.target;[...a.branches].some(O=>O.contains(M))||(i==null||i(j),l==null||l(j),j.defaultPrevented||u==null||u())},f);return e1(j=>{b===a.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&u&&(j.preventDefault(),u()))},f),v.useEffect(()=>{if(s)return n&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(pu=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(s)),a.layers.add(s),hu(),()=>{n&&a.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=pu)}},[s,f,n,a]),v.useEffect(()=>()=>{s&&(a.layers.delete(s),a.layersWithOutsidePointerEventsDisabled.delete(s),hu())},[s,a]),v.useEffect(()=>{const j=()=>p({});return document.addEventListener(Ws,j),()=>document.removeEventListener(Ws,j)},[]),w.jsx(H.div,{...c,ref:m,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,_.onFocusCapture),onBlurCapture:F(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,S.onPointerDownCapture)})});_n.displayName=t1;var o1="DismissableLayerBranch",i1=v.forwardRef((e,t)=>{const n=v.useContext(fp),r=v.useRef(null),o=re(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(H.div,{...e,ref:o})});i1.displayName=o1;function s1(e,t=globalThis==null?void 0:globalThis.document){const n=Qe(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let c=function(){pp(n1,n,a,{discrete:!0})};const a={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function a1(e,t=globalThis==null?void 0:globalThis.document){const n=Qe(e),r=v.useRef(!1);return v.useEffect(()=>{const o=i=>{i.target&&!r.current&&pp(r1,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hu(){const e=new CustomEvent(Ws);document.dispatchEvent(e)}function pp(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Bf(o,i):o.dispatchEvent(i)}var is="focusScope.autoFocusOnMount",ss="focusScope.autoFocusOnUnmount",mu={bubbles:!1,cancelable:!0},l1="FocusScope",vr=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[u,c]=v.useState(null),a=Qe(o),s=Qe(i),d=v.useRef(null),f=re(t,h=>c(h)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let h=function(x){if(p.paused||!u)return;const E=x.target;u.contains(E)?d.current=E:Ct(d.current,{select:!0})},g=function(x){if(p.paused||!u)return;const E=x.relatedTarget;E!==null&&(u.contains(E)||Ct(d.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Ct(u)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(y);return u&&b.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,u,p.paused]),v.useEffect(()=>{if(u){vu.add(p);const h=document.activeElement;if(!u.contains(h)){const g=new CustomEvent(is,mu);u.addEventListener(is,a),u.dispatchEvent(g),g.defaultPrevented||(u1(h1(hp(u)),{select:!0}),document.activeElement===h&&Ct(u))}return()=>{u.removeEventListener(is,a),setTimeout(()=>{const g=new CustomEvent(ss,mu);u.addEventListener(ss,s),u.dispatchEvent(g),g.defaultPrevented||Ct(h??document.body,{select:!0}),u.removeEventListener(ss,s),vu.remove(p)},0)}}},[u,a,s,p]);const m=v.useCallback(h=>{if(!n&&!r||p.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const b=h.currentTarget,[x,E]=c1(b);x&&E?!h.shiftKey&&y===E?(h.preventDefault(),n&&Ct(x,{select:!0})):h.shiftKey&&y===x&&(h.preventDefault(),n&&Ct(E,{select:!0})):y===b&&h.preventDefault()}},[n,r,p.paused]);return w.jsx(H.div,{tabIndex:-1,...l,ref:f,onKeyDown:m})});vr.displayName=l1;function u1(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ct(r,{select:t}),document.activeElement!==n)return}function c1(e){const t=hp(e),n=gu(t,e),r=gu(t.reverse(),e);return[n,r]}function hp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gu(e,t){for(const n of e)if(!d1(n,{upTo:t}))return n}function d1(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 f1(e){return e instanceof HTMLInputElement&&"select"in e}function Ct(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&f1(e)&&t&&e.select()}}var vu=p1();function p1(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=yu(e,t),e.unshift(t)},remove(t){var n;e=yu(e,t),(n=e[0])==null||n.resume()}}}function yu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function h1(e){return e.filter(t=>t.tagName!=="A")}var as=0;function Ei(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bu()),document.body.insertAdjacentElement("beforeend",e[1]??bu()),as++,()=>{as===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),as--}},[])}function bu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var rt=function(){return rt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},rt.apply(this,arguments)};function mp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function m1(e,t,n){for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Fo="right-scroll-bar-position",Vo="width-before-scroll-bar",g1="with-scroll-bars-hidden",v1="--removed-body-scroll-bar-size";function ls(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function y1(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var b1=typeof window<"u"?v.useLayoutEffect:v.useEffect,wu=new WeakMap;function w1(e,t){var n=y1(null,function(r){return e.forEach(function(o){return ls(o,r)})});return b1(function(){var r=wu.get(n);if(r){var o=new Set(r),i=new Set(e),l=n.current;o.forEach(function(u){i.has(u)||ls(u,null)}),i.forEach(function(u){o.has(u)||ls(u,l)})}wu.set(n,e)},[e]),n}function x1(e){return e}function E1(e,t){t===void 0&&(t=x1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(i),l=n}var c=function(){var s=l;l=[],s.forEach(i)},a=function(){return Promise.resolve().then(c)};a(),n={push:function(s){l.push(s),a()},filter:function(s){return l=l.filter(s),n}}}};return o}function S1(e){e===void 0&&(e={});var t=E1(null);return t.options=rt({async:!0,ssr:!1},e),t}var gp=function(e){var t=e.sideCar,n=mp(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 v.createElement(r,rt({},n))};gp.isSideCarExport=!0;function C1(e,t){return e.useMedium(t),gp}var vp=S1(),us=function(){},Si=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:us,onWheelCapture:us,onTouchMoveCapture:us}),o=r[0],i=r[1],l=e.forwardProps,u=e.children,c=e.className,a=e.removeScrollBar,s=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,E=mp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,_=w1([n,t]),j=rt(rt({},E),o);return v.createElement(v.Fragment,null,s&&v.createElement(S,{sideCar:vp,removeScrollBar:a,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:x}),l?v.cloneElement(v.Children.only(u),rt(rt({},j),{ref:_})):v.createElement(b,rt({},j,{className:c,ref:_}),u))});Si.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Si.classNames={fullWidth:Vo,zeroRight:Fo};var P1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function R1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=P1();return t&&e.setAttribute("nonce",t),e}function O1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var T1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=R1())&&(O1(t,n),_1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},j1=function(){var e=T1();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yp=function(){var e=j1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},M1={left:0,top:0,right:0,gap:0},cs=function(e){return parseInt(e||"",10)||0},k1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[cs(n),cs(r),cs(o)]},A1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M1;var t=k1(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])}},D1=yp(),bn="data-scroll-locked",L1=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
-
.`.concat(g1,` {
|
|
33
|
-
overflow: hidden `).concat(r,`;
|
|
34
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
35
|
-
}
|
|
36
|
-
body[`).concat(bn,`] {
|
|
37
|
-
overflow: hidden `).concat(r,`;
|
|
38
|
-
overscroll-behavior: contain;
|
|
39
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
40
|
-
padding-left: `.concat(o,`px;
|
|
41
|
-
padding-top: `).concat(i,`px;
|
|
42
|
-
padding-right: `).concat(l,`px;
|
|
43
|
-
margin-left:0;
|
|
44
|
-
margin-top:0;
|
|
45
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
46
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.`).concat(Fo,` {
|
|
50
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.`).concat(Vo,` {
|
|
54
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.`).concat(Fo," .").concat(Fo,` {
|
|
58
|
-
right: 0 `).concat(r,`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.`).concat(Vo," .").concat(Vo,` {
|
|
62
|
-
margin-right: 0 `).concat(r,`;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
body[`).concat(bn,`] {
|
|
66
|
-
`).concat(v1,": ").concat(u,`px;
|
|
67
|
-
}
|
|
68
|
-
`)},xu=function(){var e=parseInt(document.body.getAttribute(bn)||"0",10);return isFinite(e)?e:0},N1=function(){v.useEffect(function(){return document.body.setAttribute(bn,(xu()+1).toString()),function(){var e=xu()-1;e<=0?document.body.removeAttribute(bn):document.body.setAttribute(bn,e.toString())}},[])},I1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;N1();var i=v.useMemo(function(){return A1(o)},[o]);return v.createElement(D1,{styles:L1(i,!t,o,n?"":"!important")})},Gs=!1;if(typeof window<"u")try{var Hr=Object.defineProperty({},"passive",{get:function(){return Gs=!0,!0}});window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Gs=!1}var on=Gs?{passive:!1}:!1,F1=function(e){return e.tagName==="TEXTAREA"},bp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!F1(e)&&n[t]==="visible")},V1=function(e){return bp(e,"overflowY")},$1=function(e){return bp(e,"overflowX")},Eu=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=wp(e,r);if(o){var i=xp(e,r),l=i[1],u=i[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},B1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},z1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wp=function(e,t){return e==="v"?V1(t):$1(t)},xp=function(e,t){return e==="v"?B1(t):z1(t)},U1=function(e,t){return e==="h"&&t==="rtl"?-1:1},H1=function(e,t,n,r,o){var i=U1(e,window.getComputedStyle(t).direction),l=i*r,u=n.target,c=t.contains(u),a=!1,s=l>0,d=0,f=0;do{if(!u)break;var p=xp(e,u),m=p[0],h=p[1],g=p[2],y=h-g-i*m;(m||y)&&wp(e,u)&&(d+=y,f+=m);var b=u.parentNode;u=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(s&&Math.abs(d)<1||!s&&Math.abs(f)<1)&&(a=!0),a},Kr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Su=function(e){return[e.deltaX,e.deltaY]},Cu=function(e){return e&&"current"in e?e.current:e},K1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W1=function(e){return`
|
|
69
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
70
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
71
|
-
`)},G1=0,sn=[];function X1(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(G1++)[0],i=v.useState(yp)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=m1([e.lockRef.current],(e.shards||[]).map(Cu)).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!l.current.allowPinchZoom;var y=Kr(h),b=n.current,x="deltaX"in h?h.deltaX:b[0]-y[0],E="deltaY"in h?h.deltaY:b[1]-y[1],S,_=h.target,j=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in h&&j==="h"&&_.type==="range")return!1;var M=window.getSelection(),O=M&&M.anchorNode,R=O?O===_||O.contains(_):!1;if(R)return!1;var A=Eu(j,_);if(!A)return!0;if(A?S=j:(S=j==="v"?"h":"v",A=Eu(j,_)),!A)return!1;if(!r.current&&"changedTouches"in h&&(x||E)&&(r.current=S),!S)return!0;var T=r.current||S;return H1(T,g,h,T==="h"?x:E)},[]),c=v.useCallback(function(h){var g=h;if(!(!sn.length||sn[sn.length-1]!==i)){var y="deltaY"in g?Su(g):Kr(g),b=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&K1(S.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(l.current.shards||[]).map(Cu).filter(Boolean).filter(function(S){return S.contains(g.target)}),E=x.length>0?u(g,x[0]):!l.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),a=v.useCallback(function(h,g,y,b){var x={name:h,delta:g,target:y,should:b,shadowParent:Y1(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(E){return E!==x})},1)},[]),s=v.useCallback(function(h){n.current=Kr(h),r.current=void 0},[]),d=v.useCallback(function(h){a(h.type,Su(h),h.target,u(h,e.lockRef.current))},[]),f=v.useCallback(function(h){a(h.type,Kr(h),h.target,u(h,e.lockRef.current))},[]);v.useEffect(function(){return sn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,on),document.addEventListener("touchmove",c,on),document.addEventListener("touchstart",s,on),function(){sn=sn.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,on),document.removeEventListener("touchmove",c,on),document.removeEventListener("touchstart",s,on)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(i,{styles:W1(o)}):null,p?v.createElement(I1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Y1(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const q1=C1(vp,X1);var yr=v.forwardRef(function(e,t){return v.createElement(Si,rt({},e,{ref:t,sideCar:q1}))});yr.classNames=Si.classNames;var Z1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},an=new WeakMap,Wr=new WeakMap,Gr={},ds=0,Ep=function(e){return e&&(e.host||Ep(e.parentNode))},J1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ep(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})},Q1=function(e,t,n,r){var o=J1(t,Array.isArray(e)?e:[e]);Gr[n]||(Gr[n]=new WeakMap);var i=Gr[n],l=[],u=new Set,c=new Set(o),a=function(d){!d||u.has(d)||(u.add(d),a(d.parentNode))};o.forEach(a);var s=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(u.has(f))s(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",h=(an.get(f)||0)+1,g=(i.get(f)||0)+1;an.set(f,h),i.set(f,g),l.push(f),h===1&&m&&Wr.set(f,!0),g===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return s(t),u.clear(),ds++,function(){l.forEach(function(d){var f=an.get(d)-1,p=i.get(d)-1;an.set(d,f),i.set(d,p),f||(Wr.has(d)||d.removeAttribute(r),Wr.delete(d)),p||d.removeAttribute(n)}),ds--,ds||(an=new WeakMap,an=new WeakMap,Wr=new WeakMap,Gr={})}},Ci=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Z1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Q1(r,o,n,"aria-hidden")):function(){return null}},Sp="Dialog",[Cp]=Ee(Sp),[K2,dt]=Cp(Sp),Pp="DialogTrigger",eb=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Pp,n),i=re(t,o.triggerRef);return w.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ka(o.open),...r,ref:i,onClick:F(e.onClick,o.onOpenToggle)})});eb.displayName=Pp;var tb="DialogPortal",[W2,Rp]=Cp(tb,{forceMount:void 0}),Xo="DialogOverlay",nb=v.forwardRef((e,t)=>{const n=Rp(Xo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dt(Xo,e.__scopeDialog);return i.modal?w.jsx(Be,{present:r||i.open,children:w.jsx(ob,{...o,ref:t})}):null});nb.displayName=Xo;var rb=_t("DialogOverlay.RemoveScroll"),ob=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Xo,n);return w.jsx(yr,{as:rb,allowPinchZoom:!0,shards:[o.contentRef],children:w.jsx(H.div,{"data-state":Ka(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Yt="DialogContent",ib=v.forwardRef((e,t)=>{const n=Rp(Yt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=dt(Yt,e.__scopeDialog);return w.jsx(Be,{present:r||i.open,children:i.modal?w.jsx(sb,{...o,ref:t}):w.jsx(ab,{...o,ref:t})})});ib.displayName=Yt;var sb=v.forwardRef((e,t)=>{const n=dt(Yt,e.__scopeDialog),r=v.useRef(null),o=re(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return Ci(i)},[]),w.jsx(Op,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&i.preventDefault()}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault())})}),ab=v.forwardRef((e,t)=>{const n=dt(Yt,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return w.jsx(Op,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;(u=n.triggerRef.current)!=null&&u.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Op=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,u=dt(Yt,n),c=v.useRef(null),a=re(t,c);return Ei(),w.jsxs(w.Fragment,{children:[w.jsx(vr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:w.jsx(_n,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ka(u.open),...l,ref:a,onDismiss:()=>u.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(db,{titleId:u.titleId}),w.jsx(pb,{contentRef:c,descriptionId:u.descriptionId})]})]})}),Ha="DialogTitle",lb=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Ha,n);return w.jsx(H.h2,{id:o.titleId,...r,ref:t})});lb.displayName=Ha;var _p="DialogDescription",ub=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(_p,n);return w.jsx(H.p,{id:o.descriptionId,...r,ref:t})});ub.displayName=_p;var Tp="DialogClose",cb=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Tp,n);return w.jsx(H.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});cb.displayName=Tp;function Ka(e){return e?"open":"closed"}var jp="DialogTitleWarning",[G2,Mp]=Sy(jp,{contentName:Yt,titleName:Ha,docsSlug:"dialog"}),db=({titleId:e})=>{const t=Mp(jp),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
72
|
-
|
|
73
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
74
|
-
|
|
75
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fb="DialogDescriptionWarning",pb=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mp(fb).contentName}}.`;return v.useEffect(()=>{var r;const o=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},fs={exports:{}},ps={};/**
|
|
76
|
-
* @license React
|
|
77
|
-
* use-sync-external-store-shim.production.js
|
|
78
|
-
*
|
|
79
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the MIT license found in the
|
|
82
|
-
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/var Pu;function hb(){if(Pu)return ps;Pu=1;var e=P;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(d,f){var p=f(),m=r({inst:{value:p,getSnapshot:f}}),h=m[0].inst,g=m[1];return i(function(){h.value=p,h.getSnapshot=f,c(h)&&g({inst:h})},[d,p,f]),o(function(){return c(h)&&g({inst:h}),d(function(){c(h)&&g({inst:h})})},[d]),l(p),p}function c(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function a(d,f){return f()}var s=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:u;return ps.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:s,ps}var Ru={};/**
|
|
84
|
-
* @license React
|
|
85
|
-
* use-sync-external-store-shim.development.js
|
|
86
|
-
*
|
|
87
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the MIT license found in the
|
|
90
|
-
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var Ou;function mb(){return Ou||(Ou=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}function t(p,m){s||o.startTransition===void 0||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=m();if(!d){var g=m();i(h,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}g=l({inst:{value:h,getSnapshot:m}});var y=g[0].inst,b=g[1];return c(function(){y.value=h,y.getSnapshot=m,n(y)&&b({inst:y})},[p,h,m]),u(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),a(h),h}function n(p){var m=p.getSnapshot;p=p.value;try{var h=m();return!i(p,h)}catch{return!0}}function r(p,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=P,i=typeof Object.is=="function"?Object.is:e,l=o.useState,u=o.useEffect,c=o.useLayoutEffect,a=o.useDebugValue,s=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ru.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ru}var _u;function gb(){return _u||(_u=1,process.env.NODE_ENV==="production"?fs.exports=hb():fs.exports=mb()),fs.exports}var vb=gb();function yb(){return vb.useSyncExternalStore(bb,()=>!0,()=>!1)}function bb(){return()=>{}}var Wa="Avatar",[wb]=Ee(Wa),[xb,kp]=wb(Wa),Ap=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=v.useState("idle");return w.jsx(xb,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:w.jsx(H.span,{...r,ref:t})})});Ap.displayName=Wa;var Dp="AvatarImage",Lp=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,l=kp(Dp,n),u=Eb(r,i),c=Qe(a=>{o(a),l.onImageLoadingStatusChange(a)});return Ce(()=>{u!=="idle"&&c(u)},[u,c]),u==="loaded"?w.jsx(H.img,{...i,ref:t,src:r}):null});Lp.displayName=Dp;var Np="AvatarFallback",Ip=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=kp(Np,n),[l,u]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(c)}},[r]),l&&i.imageLoadingStatus!=="loaded"?w.jsx(H.span,{...o,ref:t}):null});Ip.displayName=Np;function Tu(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Eb(e,{referrerPolicy:t,crossOrigin:n}){const r=yb(),o=v.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[l,u]=v.useState(()=>Tu(i,e));return Ce(()=>{u(Tu(i,e))},[i,e]),Ce(()=>{const c=d=>()=>{u(d)};if(!i)return;const a=c("loaded"),s=c("error");return i.addEventListener("load",a),i.addEventListener("error",s),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",a),i.removeEventListener("error",s)}},[i,n,t]),l}var Sb=Ap,Cb=Lp,Pb=Ip;function br(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function wr(e){const[t,n]=v.useState(void 0);return Ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,u;if("borderBoxSize"in i){const c=i.borderBoxSize,a=Array.isArray(c)?c[0]:c;l=a.inlineSize,u=a.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Pi="Checkbox",[Rb]=Ee(Pi),[Ob,Ga]=Rb(Pi);function _b(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:l,name:u,onCheckedChange:c,required:a,value:s="on",internal_do_not_use_render:d}=e,[f,p]=$e({prop:n,defaultProp:o??!1,onChange:c,caller:Pi}),[m,h]=v.useState(null),[g,y]=v.useState(null),b=v.useRef(!1),x=m?!!l||!!m.closest("form"):!0,E={checked:f,disabled:i,setChecked:p,control:m,setControl:h,name:u,form:l,value:s,hasConsumerStoppedPropagationRef:b,required:a,defaultChecked:Ot(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:y};return w.jsx(Ob,{scope:t,...E,children:jb(d)?d(E):r})}var Fp="CheckboxTrigger",Vp=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:l,disabled:u,checked:c,required:a,setControl:s,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=Ga(Fp,e),h=re(o,s),g=v.useRef(c);return v.useEffect(()=>{const y=i==null?void 0:i.form;if(y){const b=()=>d(g.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[i,d]),w.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Ot(c)?"mixed":c,"aria-required":a,"data-state":Hp(c),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:h,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(n,y=>{d(b=>Ot(b)?!0:!b),m&&p&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});Vp.displayName=Fp;var $p=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:l,disabled:u,value:c,onCheckedChange:a,form:s,...d}=e;return w.jsx(_b,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:u,required:l,onCheckedChange:a,name:r,form:s,value:c,internal_do_not_use_render:({isFormControl:f})=>w.jsxs(w.Fragment,{children:[w.jsx(Vp,{...d,ref:t,__scopeCheckbox:n}),f&&w.jsx(Up,{__scopeCheckbox:n})]})})});$p.displayName=Pi;var Bp="CheckboxIndicator",Tb=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Ga(Bp,n);return w.jsx(Be,{present:r||Ot(i.checked)||i.checked===!0,children:w.jsx(H.span,{"data-state":Hp(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Tb.displayName=Bp;var zp="CheckboxBubbleInput",Up=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:l,required:u,disabled:c,name:a,value:s,form:d,bubbleInput:f,setBubbleInput:p}=Ga(zp,e),m=re(n,p),h=br(i),g=wr(r);v.useEffect(()=>{const b=f;if(!b)return;const x=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(x,"checked").set,S=!o.current;if(h!==i&&E){const _=new Event("click",{bubbles:S});b.indeterminate=Ot(i),E.call(b,Ot(i)?!1:i),b.dispatchEvent(_)}},[f,h,i,o]);const y=v.useRef(Ot(i)?!1:i);return w.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??y.current,required:u,disabled:c,name:a,value:s,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Up.displayName=zp;function jb(e){return typeof e=="function"}function Ot(e){return e==="indeterminate"}function Hp(e){return Ot(e)?"indeterminate":e?"checked":"unchecked"}const Mb=["top","right","bottom","left"],Tt=Math.min,Fe=Math.max,Yo=Math.round,Xr=Math.floor,st=e=>({x:e,y:e}),kb={left:"right",right:"left",bottom:"top",top:"bottom"},Ab={start:"end",end:"start"};function Xs(e,t,n){return Fe(e,Tt(t,n))}function gt(e,t){return typeof e=="function"?e(t):e}function vt(e){return e.split("-")[0]}function Tn(e){return e.split("-")[1]}function Xa(e){return e==="x"?"y":"x"}function Ya(e){return e==="y"?"height":"width"}const Db=new Set(["top","bottom"]);function ot(e){return Db.has(vt(e))?"y":"x"}function qa(e){return Xa(ot(e))}function Lb(e,t,n){n===void 0&&(n=!1);const r=Tn(e),o=qa(e),i=Ya(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=qo(l)),[l,qo(l)]}function Nb(e){const t=qo(e);return[Ys(e),t,Ys(t)]}function Ys(e){return e.replace(/start|end/g,t=>Ab[t])}const ju=["left","right"],Mu=["right","left"],Ib=["top","bottom"],Fb=["bottom","top"];function Vb(e,t,n){switch(e){case"top":case"bottom":return n?t?Mu:ju:t?ju:Mu;case"left":case"right":return t?Ib:Fb;default:return[]}}function $b(e,t,n,r){const o=Tn(e);let i=Vb(vt(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Ys)))),i}function qo(e){return e.replace(/left|right|bottom|top/g,t=>kb[t])}function Bb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kp(e){return typeof e!="number"?Bb(e):{top:e,right:e,bottom:e,left:e}}function Zo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ku(e,t,n){let{reference:r,floating:o}=e;const i=ot(t),l=qa(t),u=Ya(l),c=vt(t),a=i==="y",s=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:s,y:r.y-o.height};break;case"bottom":p={x:s,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Tn(t)){case"start":p[l]-=f*(n&&a?-1:1);break;case"end":p[l]+=f*(n&&a?-1:1);break}return p}async function zb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:u,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=gt(t,e),m=Kp(p),h=u[f?d==="floating"?"reference":"floating":d],g=Zo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:a,rootBoundary:s,strategy:c})),y=d==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Zo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:y,offsetParent:b,strategy:c}):y);return{top:(g.top-E.top+m.top)/x.y,bottom:(E.bottom-g.bottom+m.bottom)/x.y,left:(g.left-E.left+m.left)/x.x,right:(E.right-g.right+m.right)/x.x}}const Ub=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=ku(a,r,c),f=r,p={},m=0;for(let g=0;g<u.length;g++){var h;const{name:y,fn:b}=u[g],{x,y:E,data:S,reset:_}=await b({x:s,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:a,platform:{...l,detectOverflow:(h=l.detectOverflow)!=null?h:zb},elements:{reference:e,floating:t}});s=x??s,d=E??d,p={...p,[y]:{...p[y],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(a=_.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:s,y:d}=ku(a,f,c)),g=-1)}return{x:s,y:d,placement:f,strategy:o,middlewareData:p}},Hb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:c}=t,{element:a,padding:s=0}=gt(e,t)||{};if(a==null)return{};const d=Kp(s),f={x:n,y:r},p=qa(o),m=Ya(p),h=await l.getDimensions(a),g=p==="y",y=g?"top":"left",b=g?"bottom":"right",x=g?"clientHeight":"clientWidth",E=i.reference[m]+i.reference[p]-f[p]-i.floating[m],S=f[p]-i.reference[p],_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a));let j=_?_[x]:0;(!j||!await(l.isElement==null?void 0:l.isElement(_)))&&(j=u.floating[x]||i.floating[m]);const M=E/2-S/2,O=j/2-h[m]/2-1,R=Tt(d[y],O),A=Tt(d[b],O),T=R,V=j-h[m]-A,N=j/2-h[m]/2+M,U=Xs(T,N,V),B=!c.arrow&&Tn(o)!=null&&N!==U&&i.reference[m]/2-(N<T?R:A)-h[m]/2<0,W=B?N<T?N-T:N-V:0;return{[p]:f[p]+W,data:{[p]:U,centerOffset:N-U-W,...B&&{alignmentOffset:W}},reset:B}}}),Kb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:u,platform:c,elements:a}=t,{mainAxis:s=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=gt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=vt(o),b=ot(u),x=vt(u)===u,E=await(c.isRTL==null?void 0:c.isRTL(a.floating)),S=f||(x||!h?[qo(u)]:Nb(u)),_=m!=="none";!f&&_&&S.push(...$b(u,h,m,E));const j=[u,...S],M=await c.detectOverflow(t,g),O=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(s&&O.push(M[y]),d){const N=Lb(o,l,E);O.push(M[N[0]],M[N[1]])}if(R=[...R,{placement:o,overflows:O}],!O.every(N=>N<=0)){var A,T;const N=(((A=i.flip)==null?void 0:A.index)||0)+1,U=j[N];if(U&&(!(d==="alignment"&&b!==ot(U))||R.every(W=>ot(W.placement)===b?W.overflows[0]>0:!0)))return{data:{index:N,overflows:R},reset:{placement:U}};let B=(T=R.filter(W=>W.overflows[0]<=0).sort((W,z)=>W.overflows[1]-z.overflows[1])[0])==null?void 0:T.placement;if(!B)switch(p){case"bestFit":{var V;const W=(V=R.filter(z=>{if(_){const D=ot(z.placement);return D===b||D==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(D=>D>0).reduce((D,k)=>D+k,0)]).sort((z,D)=>z[1]-D[1])[0])==null?void 0:V[0];W&&(B=W);break}case"initialPlacement":B=u;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Au(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Du(e){return Mb.some(t=>e[t]>=0)}const Wb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=gt(e,t);switch(o){case"referenceHidden":{const l=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=Au(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Du(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...i,altBoundary:!0}),u=Au(l,n.floating);return{data:{escapedOffsets:u,escaped:Du(u)}}}default:return{}}}}},Wp=new Set(["left","top"]);async function Gb(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=vt(n),u=Tn(n),c=ot(n)==="y",a=Wp.has(l)?-1:1,s=i&&c?-1:1,d=gt(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof m=="number"&&(p=u==="end"?m*-1:m),c?{x:p*s,y:f*a}:{x:f*a,y:p*s}}const Xb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:u}=t,c=await Gb(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},Yb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...a}=gt(e,t),s={x:n,y:r},d=await i.detectOverflow(t,a),f=ot(vt(o)),p=Xa(f);let m=s[p],h=s[f];if(l){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=m+d[y],E=m-d[b];m=Xs(x,m,E)}if(u){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=h+d[y],E=h-d[b];h=Xs(x,h,E)}const g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:l,[f]:u}}}}}},qb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:a=!0}=gt(e,t),s={x:n,y:r},d=ot(o),f=Xa(d);let p=s[f],m=s[d];const h=gt(u,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const x=f==="y"?"height":"width",E=i.reference[f]-i.floating[x]+g.mainAxis,S=i.reference[f]+i.reference[x]-g.mainAxis;p<E?p=E:p>S&&(p=S)}if(a){var y,b;const x=f==="y"?"width":"height",E=Wp.has(vt(o)),S=i.reference[d]-i.floating[x]+(E&&((y=l.offset)==null?void 0:y[d])||0)+(E?0:g.crossAxis),_=i.reference[d]+i.reference[x]+(E?0:((b=l.offset)==null?void 0:b[d])||0)-(E?g.crossAxis:0);m<S?m=S:m>_&&(m=_)}return{[f]:p,[d]:m}}}},Zb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:u}=t,{apply:c=()=>{},...a}=gt(e,t),s=await l.detectOverflow(t,a),d=vt(o),f=Tn(o),p=ot(o)==="y",{width:m,height:h}=i.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=f===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(y=d,g=f==="end"?"top":"bottom");const b=h-s.top-s.bottom,x=m-s.left-s.right,E=Tt(h-s[g],b),S=Tt(m-s[y],x),_=!t.middlewareData.shift;let j=E,M=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=b),_&&!f){const R=Fe(s.left,0),A=Fe(s.right,0),T=Fe(s.top,0),V=Fe(s.bottom,0);p?M=m-2*(R!==0||A!==0?R+A:Fe(s.left,s.right)):j=h-2*(T!==0||V!==0?T+V:Fe(s.top,s.bottom))}await c({...t,availableWidth:M,availableHeight:j});const O=await l.getDimensions(u.floating);return m!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function Ri(){return typeof window<"u"}function jn(e){return Gp(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ft(e){var t;return(t=(Gp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gp(e){return Ri()?e instanceof Node||e instanceof Ve(e).Node:!1}function et(e){return Ri()?e instanceof Element||e instanceof Ve(e).Element:!1}function ut(e){return Ri()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function Lu(e){return!Ri()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}const Jb=new Set(["inline","contents"]);function xr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jb.has(o)}const Qb=new Set(["table","td","th"]);function ew(e){return Qb.has(jn(e))}const tw=[":popover-open",":modal"];function Oi(e){return tw.some(t=>{try{return e.matches(t)}catch{return!1}})}const nw=["transform","translate","scale","rotate","perspective"],rw=["transform","translate","scale","rotate","perspective","filter"],ow=["paint","layout","strict","content"];function Za(e){const t=Ja(),n=et(e)?tt(e):e;return nw.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rw.some(r=>(n.willChange||"").includes(r))||ow.some(r=>(n.contain||"").includes(r))}function iw(e){let t=jt(e);for(;ut(t)&&!Sn(t);){if(Za(t))return t;if(Oi(t))return null;t=jt(t)}return null}function Ja(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sw=new Set(["html","body","#document"]);function Sn(e){return sw.has(jn(e))}function tt(e){return Ve(e).getComputedStyle(e)}function _i(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jt(e){if(jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lu(e)&&e.host||ft(e);return Lu(t)?t.host:t}function Xp(e){const t=jt(e);return Sn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&xr(t)?t:Xp(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xp(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=Ve(o);if(i){const u=qs(l);return t.concat(l,l.visualViewport||[],xr(o)?o:[],u&&n?ir(u):[])}return t.concat(o,ir(o,[],n))}function qs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yp(e){const t=tt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Yo(n)!==i||Yo(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function Qa(e){return et(e)?e:e.contextElement}function wn(e){const t=Qa(e);if(!ut(t))return st(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Yp(t);let l=(i?Yo(n.width):n.width)/r,u=(i?Yo(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const aw=st(0);function qp(e){const t=Ve(e);return!Ja()||!t.visualViewport?aw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ve(e)?!1:t}function qt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Qa(e);let l=st(1);t&&(r?et(r)&&(l=wn(r)):l=wn(e));const u=lw(i,n,r)?qp(i):st(0);let c=(o.left+u.x)/l.x,a=(o.top+u.y)/l.y,s=o.width/l.x,d=o.height/l.y;if(i){const f=Ve(i),p=r&&et(r)?Ve(r):r;let m=f,h=qs(m);for(;h&&r&&p!==m;){const g=wn(h),y=h.getBoundingClientRect(),b=tt(h),x=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,E=y.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;c*=g.x,a*=g.y,s*=g.x,d*=g.y,c+=x,a+=E,m=Ve(h),h=qs(m)}}return Zo({width:s,height:d,x:c,y:a})}function Ti(e,t){const n=_i(e).scrollLeft;return t?t.left+n:qt(ft(e)).left+n}function Zp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ti(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function uw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=ft(r),u=t?Oi(t.floating):!1;if(r===l||u&&i)return n;let c={scrollLeft:0,scrollTop:0},a=st(1);const s=st(0),d=ut(r);if((d||!d&&!i)&&((jn(r)!=="body"||xr(l))&&(c=_i(r)),ut(r))){const p=qt(r);a=wn(r),s.x=p.x+r.clientLeft,s.y=p.y+r.clientTop}const f=l&&!d&&!i?Zp(l,c):st(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+s.x+f.x,y:n.y*a.y-c.scrollTop*a.y+s.y+f.y}}function cw(e){return Array.from(e.getClientRects())}function dw(e){const t=ft(e),n=_i(e),r=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Ti(e);const u=-n.scrollTop;return tt(r).direction==="rtl"&&(l+=Fe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}const Nu=25;function fw(e,t){const n=Ve(e),r=ft(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,c=0;if(o){i=o.width,l=o.height;const s=Ja();(!s||s&&t==="fixed")&&(u=o.offsetLeft,c=o.offsetTop)}const a=Ti(r);if(a<=0){const s=r.ownerDocument,d=s.body,f=getComputedStyle(d),p=s.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-p);m<=Nu&&(i-=m)}else a<=Nu&&(i+=a);return{width:i,height:l,x:u,y:c}}const pw=new Set(["absolute","fixed"]);function hw(e,t){const n=qt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?wn(e):st(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,c=o*i.x,a=r*i.y;return{width:l,height:u,x:c,y:a}}function Iu(e,t,n){let r;if(t==="viewport")r=fw(e,n);else if(t==="document")r=dw(ft(e));else if(et(t))r=hw(t,n);else{const o=qp(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Zo(r)}function Jp(e,t){const n=jt(e);return n===t||!et(n)||Sn(n)?!1:tt(n).position==="fixed"||Jp(n,t)}function mw(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(u=>et(u)&&jn(u)!=="body"),o=null;const i=tt(e).position==="fixed";let l=i?jt(e):e;for(;et(l)&&!Sn(l);){const u=tt(l),c=Za(l);!c&&u.position==="fixed"&&(o=null),(i?!c&&!o:!c&&u.position==="static"&&o&&pw.has(o.position)||xr(l)&&!c&&Jp(e,l))?r=r.filter(a=>a!==l):o=u,l=jt(l)}return t.set(e,r),r}function gw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Oi(t)?[]:mw(t,this._c):[].concat(n),r],l=i[0],u=i.reduce((c,a)=>{const s=Iu(t,a,o);return c.top=Fe(s.top,c.top),c.right=Tt(s.right,c.right),c.bottom=Tt(s.bottom,c.bottom),c.left=Fe(s.left,c.left),c},Iu(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function vw(e){const{width:t,height:n}=Yp(e);return{width:t,height:n}}function yw(e,t,n){const r=ut(t),o=ft(t),i=n==="fixed",l=qt(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=st(0);function a(){c.x=Ti(o)}if(r||!r&&!i)if((jn(t)!=="body"||xr(o))&&(u=_i(t)),r){const p=qt(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&a();i&&!r&&o&&a();const s=o&&!r&&!i?Zp(o,u):st(0),d=l.left+u.scrollLeft-c.x-s.x,f=l.top+u.scrollTop-c.y-s.y;return{x:d,y:f,width:l.width,height:l.height}}function hs(e){return tt(e).position==="static"}function Fu(e,t){if(!ut(e)||tt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ft(e)===n&&(n=n.ownerDocument.body),n}function Qp(e,t){const n=Ve(e);if(Oi(e))return n;if(!ut(e)){let o=jt(e);for(;o&&!Sn(o);){if(et(o)&&!hs(o))return o;o=jt(o)}return n}let r=Fu(e,t);for(;r&&ew(r)&&hs(r);)r=Fu(r,t);return r&&Sn(r)&&hs(r)&&!Za(r)?n:r||iw(e)||n}const bw=async function(e){const t=this.getOffsetParent||Qp,n=this.getDimensions,r=await n(e.floating);return{reference:yw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ww(e){return tt(e).direction==="rtl"}const xw={convertOffsetParentRelativeRectToViewportRelativeRect:uw,getDocumentElement:ft,getClippingRect:gw,getOffsetParent:Qp,getElementRects:bw,getClientRects:cw,getDimensions:vw,getScale:wn,isElement:et,isRTL:ww};function eh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ew(e,t){let n=null,r;const o=ft(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),i();const a=e.getBoundingClientRect(),{left:s,top:d,width:f,height:p}=a;if(u||t(),!f||!p)return;const m=Xr(d),h=Xr(o.clientWidth-(s+f)),g=Xr(o.clientHeight-(d+p)),y=Xr(s),b={rootMargin:-m+"px "+-h+"px "+-g+"px "+-y+"px",threshold:Fe(0,Tt(1,c))||1};let x=!0;function E(S){const _=S[0].intersectionRatio;if(_!==c){if(!x)return l();_?l(!1,_):r=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!eh(a,e.getBoundingClientRect())&&l(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return l(!0),i}function Sw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,a=Qa(e),s=o||i?[...a?ir(a):[],...ir(t)]:[];s.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=a&&u?Ew(a,n):null;let f=-1,p=null;l&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===a&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),a&&!c&&p.observe(a),p.observe(t));let m,h=c?qt(e):null;c&&g();function g(){const y=qt(e);h&&!eh(h,y)&&n(),h=y,m=requestAnimationFrame(g)}return n(),()=>{var y;s.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Cw=Xb,Pw=Yb,Rw=Kb,Ow=Zb,_w=Wb,Vu=Hb,Tw=qb,jw=(e,t,n)=>{const r=new Map,o={platform:xw,...n},i={...o.platform,_c:r};return Ub(e,t,{...o,platform:i})};var Mw=typeof document<"u",kw=function(){},$o=Mw?P.useLayoutEffect:kw;function Jo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Jo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function th(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $u(e,t){const n=th(e);return Math.round(t*n)/n}function ms(e){const t=v.useRef(e);return $o(()=>{t.current=e}),t}function Aw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:u=!0,whileElementsMounted:c,open:a}=e,[s,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Jo(f,r)||p(r);const[m,h]=v.useState(null),[g,y]=v.useState(null),b=v.useCallback(z=>{z!==_.current&&(_.current=z,h(z))},[]),x=v.useCallback(z=>{z!==j.current&&(j.current=z,y(z))},[]),E=i||m,S=l||g,_=v.useRef(null),j=v.useRef(null),M=v.useRef(s),O=c!=null,R=ms(c),A=ms(o),T=ms(a),V=v.useCallback(()=>{if(!_.current||!j.current)return;const z={placement:t,strategy:n,middleware:f};A.current&&(z.platform=A.current),jw(_.current,j.current,z).then(D=>{const k={...D,isPositioned:T.current!==!1};N.current&&!Jo(M.current,k)&&(M.current=k,vi.flushSync(()=>{d(k)}))})},[f,t,n,A,T]);$o(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(z=>({...z,isPositioned:!1})))},[a]);const N=v.useRef(!1);$o(()=>(N.current=!0,()=>{N.current=!1}),[]),$o(()=>{if(E&&(_.current=E),S&&(j.current=S),E&&S){if(R.current)return R.current(E,S,V);V()}},[E,S,V,R,O]);const U=v.useMemo(()=>({reference:_,floating:j,setReference:b,setFloating:x}),[b,x]),B=v.useMemo(()=>({reference:E,floating:S}),[E,S]),W=v.useMemo(()=>{const z={position:n,left:0,top:0};if(!B.floating)return z;const D=$u(B.floating,s.x),k=$u(B.floating,s.y);return u?{...z,transform:"translate("+D+"px, "+k+"px)",...th(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:k}},[n,u,B.floating,s.x,s.y]);return v.useMemo(()=>({...s,update:V,refs:U,elements:B,floatingStyles:W}),[s,V,U,B,W])}const Dw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vu({element:r.current,padding:o}).fn(n):{}:r?Vu({element:r,padding:o}).fn(n):{}}}},Lw=(e,t)=>({...Cw(e),options:[e,t]}),Nw=(e,t)=>({...Pw(e),options:[e,t]}),Iw=(e,t)=>({...Tw(e),options:[e,t]}),Fw=(e,t)=>({...Rw(e),options:[e,t]}),Vw=(e,t)=>({...Ow(e),options:[e,t]}),$w=(e,t)=>({..._w(e),options:[e,t]}),Bw=(e,t)=>({...Dw(e),options:[e,t]});var zw="Arrow",nh=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return w.jsx(H.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});nh.displayName=zw;var Uw=nh,el="Popper",[rh,At]=Ee(el),[Hw,oh]=rh(el),ih=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return w.jsx(Hw,{scope:t,anchor:r,onAnchorChange:o,children:n})};ih.displayName=el;var sh="PopperAnchor",ah=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=oh(sh,n),l=v.useRef(null),u=re(t,l),c=v.useRef(null);return v.useEffect(()=>{const a=c.current;c.current=(r==null?void 0:r.current)||l.current,a!==c.current&&i.onAnchorChange(c.current)}),r?null:w.jsx(H.div,{...o,ref:u})});ah.displayName=sh;var tl="PopperContent",[Kw,Ww]=rh(tl),lh=v.forwardRef((e,t)=>{var n,r,o,i,l,u;const{__scopePopper:c,side:a="bottom",sideOffset:s=0,align:d="center",alignOffset:f=0,arrowPadding:p=0,avoidCollisions:m=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:E,...S}=e,_=oh(tl,c),[j,M]=v.useState(null),O=re(t,me=>M(me)),[R,A]=v.useState(null),T=wr(R),V=(T==null?void 0:T.width)??0,N=(T==null?void 0:T.height)??0,U=a+(d!=="center"?"-"+d:""),B=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},W=Array.isArray(h)?h:[h],z=W.length>0,D={padding:B,boundary:W.filter(Xw),altBoundary:z},{refs:k,floatingStyles:L,placement:Q,isPositioned:ee,middlewareData:G}=Aw({strategy:"fixed",placement:U,whileElementsMounted:(...me)=>Sw(...me,{animationFrame:x==="always"}),elements:{reference:_.anchor},middleware:[Lw({mainAxis:s+N,alignmentAxis:f}),m&&Nw({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?Iw():void 0,...D}),m&&Fw({...D}),Vw({...D,apply:({elements:me,rects:Le,availableWidth:Ue,availableHeight:Vt})=>{const{width:Vr,height:$r}=Le.reference,$t=me.floating.style;$t.setProperty("--radix-popper-available-width",`${Ue}px`),$t.setProperty("--radix-popper-available-height",`${Vt}px`),$t.setProperty("--radix-popper-anchor-width",`${Vr}px`),$t.setProperty("--radix-popper-anchor-height",`${$r}px`)}}),R&&Bw({element:R,padding:p}),Yw({arrowWidth:V,arrowHeight:N}),b&&$w({strategy:"referenceHidden",...D})]}),[ne,te]=dh(Q),$=Qe(E);Ce(()=>{ee&&($==null||$())},[ee,$]);const q=(n=G.arrow)==null?void 0:n.x,X=(r=G.arrow)==null?void 0:r.y,K=((o=G.arrow)==null?void 0:o.centerOffset)!==0,[ie,I]=v.useState();return Ce(()=>{j&&I(window.getComputedStyle(j).zIndex)},[j]),w.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:ee?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(i=G.transformOrigin)==null?void 0:i.x,(l=G.transformOrigin)==null?void 0:l.y].join(" "),...((u=G.hide)==null?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(Kw,{scope:c,placedSide:ne,onArrowChange:A,arrowX:q,arrowY:X,shouldHideArrow:K,children:w.jsx(H.div,{"data-side":ne,"data-align":te,...S,ref:O,style:{...S.style,animation:ee?void 0:"none"}})})})});lh.displayName=tl;var uh="PopperArrow",Gw={top:"bottom",right:"left",bottom:"top",left:"right"},ch=v.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=Ww(uh,n),i=Gw[o.placedSide];return w.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]: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},children:w.jsx(Uw,{...r,ref:t,style:{...r.style,display:"block"}})})});ch.displayName=uh;function Xw(e){return e!==null}var Yw=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:l,middlewareData:u}=t,c=((n=u.arrow)==null?void 0:n.centerOffset)!==0,a=c?0:e.arrowWidth,s=c?0:e.arrowHeight,[d,f]=dh(i),p={start:"0%",center:"50%",end:"100%"}[f],m=(((r=u.arrow)==null?void 0:r.x)??0)+a/2,h=(((o=u.arrow)==null?void 0:o.y)??0)+s/2;let g="",y="";return d==="bottom"?(g=c?p:`${m}px`,y=`${-s}px`):d==="top"?(g=c?p:`${m}px`,y=`${l.floating.height+s}px`):d==="right"?(g=`${-s}px`,y=c?p:`${h}px`):d==="left"&&(g=`${l.floating.width+s}px`,y=c?p:`${h}px`),{data:{x:g,y}}}});function dh(e){const[t,n="center"]=e.split("-");return[t,n]}var qw=ih,Er=ah,ji=lh,Mi=ch,gs="rovingFocusGroup.onEntryFocus",Zw={bubbles:!1,cancelable:!0},Sr="RovingFocusGroup",[Zs,fh,Jw]=gr(Sr),[Qw,Dt]=Ee(Sr,[Jw]),[ex,tx]=Qw(Sr),ph=v.forwardRef((e,t)=>w.jsx(Zs.Provider,{scope:e.__scopeRovingFocusGroup,children:w.jsx(Zs.Slot,{scope:e.__scopeRovingFocusGroup,children:w.jsx(nx,{...e,ref:t})})}));ph.displayName=Sr;var nx=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:a,preventScrollOnEntryFocus:s=!1,...d}=e,f=v.useRef(null),p=re(t,f),m=Qt(i),[h,g]=$e({prop:l,defaultProp:u??null,onChange:c,caller:Sr}),[y,b]=v.useState(!1),x=Qe(a),E=fh(n),S=v.useRef(!1),[_,j]=v.useState(0);return v.useEffect(()=>{const M=f.current;if(M)return M.addEventListener(gs,x),()=>M.removeEventListener(gs,x)},[x]),w.jsx(ex,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:h,onItemFocus:v.useCallback(M=>g(M),[g]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>j(M=>M+1),[]),onFocusableItemRemove:v.useCallback(()=>j(M=>M-1),[]),children:w.jsx(H.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{S.current=!0}),onFocus:F(e.onFocus,M=>{const O=!S.current;if(M.target===M.currentTarget&&O&&!y){const R=new CustomEvent(gs,Zw);if(M.currentTarget.dispatchEvent(R),!R.defaultPrevented){const A=E().filter(U=>U.focusable),T=A.find(U=>U.active),V=A.find(U=>U.id===h),N=[T,V,...A].filter(Boolean).map(U=>U.ref.current);gh(N,s)}}S.current=!1}),onBlur:F(e.onBlur,()=>b(!1))})})}),hh="RovingFocusGroupItem",mh=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:l,...u}=e,c=Je(),a=i||c,s=tx(hh,n),d=s.currentTabStopId===a,f=fh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=s;return v.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),w.jsx(Zs.ItemSlot,{scope:n,id:a,focusable:r,active:o,children:w.jsx(H.span,{tabIndex:d?0:-1,"data-orientation":s.orientation,...u,ref:t,onMouseDown:F(e.onMouseDown,g=>{r?s.onItemFocus(a):g.preventDefault()}),onFocus:F(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:F(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){s.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=ix(g,s.orientation,s.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=f().filter(x=>x.focusable).map(x=>x.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const x=b.indexOf(g.currentTarget);b=s.loop?sx(b,x+1):b.slice(x+1)}setTimeout(()=>gh(b))}}),children:typeof l=="function"?l({isCurrentTabStop:d,hasTabStop:h!=null}):l})})});mh.displayName=hh;var rx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ox(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ix(e,t,n){const r=ox(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rx[r]}function gh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function sx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ki=ph,Ai=mh,Js=["Enter"," "],ax=["ArrowDown","PageUp","Home"],vh=["ArrowUp","PageDown","End"],lx=[...ax,...vh],ux={ltr:[...Js,"ArrowRight"],rtl:[...Js,"ArrowLeft"]},cx={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cr="Menu",[sr,dx,fx]=gr(Cr),[en,yh]=Ee(Cr,[fx,At,Dt]),Di=At(),bh=Dt(),[px,tn]=en(Cr),[hx,Pr]=en(Cr),wh=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:l=!0}=e,u=Di(t),[c,a]=v.useState(null),s=v.useRef(!1),d=Qe(i),f=Qt(o);return v.useEffect(()=>{const p=()=>{s.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>s.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),w.jsx(qw,{...u,children:w.jsx(px,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:a,children:w.jsx(hx,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:s,dir:f,modal:l,children:r})})})};wh.displayName=Cr;var mx="MenuAnchor",nl=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Di(n);return w.jsx(Er,{...o,...r,ref:t})});nl.displayName=mx;var rl="MenuPortal",[gx,xh]=en(rl,{forceMount:void 0}),Eh=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=tn(rl,t);return w.jsx(gx,{scope:t,forceMount:n,children:w.jsx(Be,{present:n||i.open,children:w.jsx(zf,{asChild:!0,container:o,children:r})})})};Eh.displayName=rl;var We="MenuContent",[vx,ol]=en(We),Sh=v.forwardRef((e,t)=>{const n=xh(We,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=tn(We,e.__scopeMenu),l=Pr(We,e.__scopeMenu);return w.jsx(sr.Provider,{scope:e.__scopeMenu,children:w.jsx(Be,{present:r||i.open,children:w.jsx(sr.Slot,{scope:e.__scopeMenu,children:l.modal?w.jsx(yx,{...o,ref:t}):w.jsx(bx,{...o,ref:t})})})})}),yx=v.forwardRef((e,t)=>{const n=tn(We,e.__scopeMenu),r=v.useRef(null),o=re(t,r);return v.useEffect(()=>{const i=r.current;if(i)return Ci(i)},[]),w.jsx(il,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bx=v.forwardRef((e,t)=>{const n=tn(We,e.__scopeMenu);return w.jsx(il,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),wx=_t("MenuContent.ScrollLock"),il=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:c,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=tn(We,n),y=Pr(We,n),b=Di(n),x=bh(n),E=dx(n),[S,_]=v.useState(null),j=v.useRef(null),M=re(t,j,g.onContentChange),O=v.useRef(0),R=v.useRef(""),A=v.useRef(0),T=v.useRef(null),V=v.useRef("right"),N=v.useRef(0),U=m?yr:v.Fragment,B=m?{as:wx,allowPinchZoom:!0}:void 0,W=D=>{var k,L;const Q=R.current+D,ee=E().filter(X=>!X.disabled),G=document.activeElement,ne=(k=ee.find(X=>X.ref.current===G))==null?void 0:k.textValue,te=ee.map(X=>X.textValue),$=kx(te,Q,ne),q=(L=ee.find(X=>X.textValue===$))==null?void 0:L.ref.current;(function X(K){R.current=K,window.clearTimeout(O.current),K!==""&&(O.current=window.setTimeout(()=>X(""),1e3))})(Q),q&&setTimeout(()=>q.focus())};v.useEffect(()=>()=>window.clearTimeout(O.current),[]),Ei();const z=v.useCallback(D=>{var k,L;return V.current===((k=T.current)==null?void 0:k.side)&&Dx(D,(L=T.current)==null?void 0:L.area)},[]);return w.jsx(vx,{scope:n,searchRef:R,onItemEnter:v.useCallback(D=>{z(D)&&D.preventDefault()},[z]),onItemLeave:v.useCallback(D=>{var k;z(D)||((k=j.current)==null||k.focus(),_(null))},[z]),onTriggerLeave:v.useCallback(D=>{z(D)&&D.preventDefault()},[z]),pointerGraceTimerRef:A,onPointerGraceIntentChange:v.useCallback(D=>{T.current=D},[]),children:w.jsx(U,{...B,children:w.jsx(vr,{asChild:!0,trapped:o,onMountAutoFocus:F(i,D=>{var k;D.preventDefault(),(k=j.current)==null||k.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:w.jsx(_n,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:w.jsx(ki,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:_,onEntryFocus:F(c,D=>{y.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(ji,{role:"menu","aria-orientation":"vertical","data-state":Vh(g.open),"data-radix-menu-content":"",dir:y.dir,...b,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:F(h.onKeyDown,D=>{const k=D.target.closest("[data-radix-menu-content]")===D.currentTarget,L=D.ctrlKey||D.altKey||D.metaKey,Q=D.key.length===1;k&&(D.key==="Tab"&&D.preventDefault(),!L&&Q&&W(D.key));const ee=j.current;if(D.target!==ee||!lx.includes(D.key))return;D.preventDefault();const G=E().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);vh.includes(D.key)&&G.reverse(),jx(G)}),onBlur:F(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(O.current),R.current="")}),onPointerMove:F(e.onPointerMove,ar(D=>{const k=D.target,L=N.current!==D.clientX;if(D.currentTarget.contains(k)&&L){const Q=D.clientX>N.current?"right":"left";V.current=Q,N.current=D.clientX}}))})})})})})})});Sh.displayName=We;var xx="MenuGroup",sl=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(H.div,{role:"group",...r,ref:t})});sl.displayName=xx;var Ex="MenuLabel",Ch=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(H.div,{...r,ref:t})});Ch.displayName=Ex;var Qo="MenuItem",Bu="menu.itemSelect",Li=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=v.useRef(null),l=Pr(Qo,e.__scopeMenu),u=ol(Qo,e.__scopeMenu),c=re(t,i),a=v.useRef(!1),s=()=>{const d=i.current;if(!n&&d){const f=new CustomEvent(Bu,{bubbles:!0,cancelable:!0});d.addEventListener(Bu,p=>r==null?void 0:r(p),{once:!0}),Bf(d,f),f.defaultPrevented?a.current=!1:l.onClose()}};return w.jsx(Ph,{...o,ref:c,disabled:n,onClick:F(e.onClick,s),onPointerDown:d=>{var f;(f=e.onPointerDown)==null||f.call(e,d),a.current=!0},onPointerUp:F(e.onPointerUp,d=>{var f;a.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:F(e.onKeyDown,d=>{const f=u.searchRef.current!=="";n||f&&d.key===" "||Js.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Li.displayName=Qo;var Ph=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,l=ol(Qo,n),u=bh(n),c=v.useRef(null),a=re(t,c),[s,d]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=c.current;m&&p((m.textContent??"").trim())},[i.children]),w.jsx(sr.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:w.jsx(Ai,{asChild:!0,...u,focusable:!r,children:w.jsx(H.div,{role:"menuitem","data-highlighted":s?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:a,onPointerMove:F(e.onPointerMove,ar(m=>{r?l.onItemLeave(m):(l.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,ar(m=>l.onItemLeave(m))),onFocus:F(e.onFocus,()=>d(!0)),onBlur:F(e.onBlur,()=>d(!1))})})})}),Sx="MenuCheckboxItem",Rh=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return w.jsx(Mh,{scope:e.__scopeMenu,checked:n,children:w.jsx(Li,{role:"menuitemcheckbox","aria-checked":ei(n)?"mixed":n,...o,ref:t,"data-state":ll(n),onSelect:F(o.onSelect,()=>r==null?void 0:r(ei(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Rh.displayName=Sx;var Oh="MenuRadioGroup",[Cx,Px]=en(Oh,{value:void 0,onValueChange:()=>{}}),_h=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Qe(r);return w.jsx(Cx,{scope:e.__scopeMenu,value:n,onValueChange:i,children:w.jsx(sl,{...o,ref:t})})});_h.displayName=Oh;var Th="MenuRadioItem",jh=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=Px(Th,e.__scopeMenu),i=n===o.value;return w.jsx(Mh,{scope:e.__scopeMenu,checked:i,children:w.jsx(Li,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":ll(i),onSelect:F(r.onSelect,()=>{var l;return(l=o.onValueChange)==null?void 0:l.call(o,n)},{checkForDefaultPrevented:!1})})})});jh.displayName=Th;var al="MenuItemIndicator",[Mh,Rx]=en(al,{checked:!1}),kh=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Rx(al,n);return w.jsx(Be,{present:r||ei(i.checked)||i.checked===!0,children:w.jsx(H.span,{...o,ref:t,"data-state":ll(i.checked)})})});kh.displayName=al;var Ox="MenuSeparator",Ah=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ah.displayName=Ox;var _x="MenuArrow",Dh=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Di(n);return w.jsx(Mi,{...o,...r,ref:t})});Dh.displayName=_x;var Tx="MenuSub",[X2,Lh]=en(Tx),Zn="MenuSubTrigger",Nh=v.forwardRef((e,t)=>{const n=tn(Zn,e.__scopeMenu),r=Pr(Zn,e.__scopeMenu),o=Lh(Zn,e.__scopeMenu),i=ol(Zn,e.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:c}=i,a={__scopeMenu:e.__scopeMenu},s=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>s,[s]),v.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),c(null)}},[u,c]),w.jsx(nl,{asChild:!0,...a,children:w.jsx(Ph,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Vh(n.open),...e,ref:yi(t,o.onTriggerChange),onClick:d=>{var f;(f=e.onClick)==null||f.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,ar(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),s()},100))})),onPointerLeave:F(e.onPointerLeave,ar(d=>{var f,p;s();const m=(f=n.content)==null?void 0:f.getBoundingClientRect();if(m){const h=(p=n.content)==null?void 0:p.dataset.side,g=h==="right",y=g?-5:5,b=m[g?"left":"right"],x=m[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:b,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:b,y:m.bottom}],side:h}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,d=>{var f;const p=i.searchRef.current!=="";e.disabled||p&&d.key===" "||ux[r.dir].includes(d.key)&&(n.onOpenChange(!0),(f=n.content)==null||f.focus(),d.preventDefault())})})})});Nh.displayName=Zn;var Ih="MenuSubContent",Fh=v.forwardRef((e,t)=>{const n=xh(We,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=tn(We,e.__scopeMenu),l=Pr(We,e.__scopeMenu),u=Lh(Ih,e.__scopeMenu),c=v.useRef(null),a=re(t,c);return w.jsx(sr.Provider,{scope:e.__scopeMenu,children:w.jsx(Be,{present:r||i.open,children:w.jsx(sr.Slot,{scope:e.__scopeMenu,children:w.jsx(il,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:a,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:s=>{var d;l.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),s.preventDefault()},onCloseAutoFocus:s=>s.preventDefault(),onFocusOutside:F(e.onFocusOutside,s=>{s.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,s=>{l.onClose(),s.preventDefault()}),onKeyDown:F(e.onKeyDown,s=>{var d;const f=s.currentTarget.contains(s.target),p=cx[l.dir].includes(s.key);f&&p&&(i.onOpenChange(!1),(d=u.trigger)==null||d.focus(),s.preventDefault())})})})})})});Fh.displayName=Ih;function Vh(e){return e?"open":"closed"}function ei(e){return e==="indeterminate"}function ll(e){return ei(e)?"indeterminate":e?"checked":"unchecked"}function jx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function kx(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Mx(e,Math.max(o,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Ax(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],c=t[l],a=u.x,s=u.y,d=c.x,f=c.y;s>r!=f>r&&n<(d-a)*(r-s)/(f-s)+a&&(o=!o)}return o}function Dx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ax(n,t)}function ar(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Lx=wh,Nx=nl,Ix=Eh,Fx=Sh,Vx=sl,$x=Ch,Bx=Li,zx=Rh,Ux=_h,Hx=jh,Kx=kh,Wx=Ah,Gx=Dh,Xx=Nh,Yx=Fh,Ni="DropdownMenu",[qx]=Ee(Ni,[yh]),De=yh(),[Zx,$h]=qx(Ni),Bh=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:l,modal:u=!0}=e,c=De(t),a=v.useRef(null),[s,d]=$e({prop:o,defaultProp:i??!1,onChange:l,caller:Ni});return w.jsx(Zx,{scope:t,triggerId:Je(),triggerRef:a,contentId:Je(),open:s,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:u,children:w.jsx(Lx,{...c,open:s,onOpenChange:d,dir:r,modal:u,children:n})})};Bh.displayName=Ni;var zh="DropdownMenuTrigger",Uh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=$h(zh,n),l=De(n);return w.jsx(Nx,{asChild:!0,...l,children:w.jsx(H.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:yi(t,i.triggerRef),onPointerDown:F(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:F(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});Uh.displayName=zh;var Jx="DropdownMenuPortal",Hh=e=>{const{__scopeDropdownMenu:t,...n}=e,r=De(t);return w.jsx(Ix,{...r,...n})};Hh.displayName=Jx;var Kh="DropdownMenuContent",Wh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=$h(Kh,n),i=De(n),l=v.useRef(!1);return w.jsx(Fx,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,u=>{var c;l.current||(c=o.triggerRef.current)==null||c.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:F(e.onInteractOutside,u=>{const c=u.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0,s=c.button===2||a;(!o.modal||s)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wh.displayName=Kh;var Qx="DropdownMenuGroup",eE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Vx,{...o,...r,ref:t})});eE.displayName=Qx;var tE="DropdownMenuLabel",Gh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx($x,{...o,...r,ref:t})});Gh.displayName=tE;var nE="DropdownMenuItem",Xh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Bx,{...o,...r,ref:t})});Xh.displayName=nE;var rE="DropdownMenuCheckboxItem",oE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(zx,{...o,...r,ref:t})});oE.displayName=rE;var iE="DropdownMenuRadioGroup",sE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Ux,{...o,...r,ref:t})});sE.displayName=iE;var aE="DropdownMenuRadioItem",lE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Hx,{...o,...r,ref:t})});lE.displayName=aE;var uE="DropdownMenuItemIndicator",cE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Kx,{...o,...r,ref:t})});cE.displayName=uE;var dE="DropdownMenuSeparator",Yh=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Wx,{...o,...r,ref:t})});Yh.displayName=dE;var fE="DropdownMenuArrow",pE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Gx,{...o,...r,ref:t})});pE.displayName=fE;var hE="DropdownMenuSubTrigger",mE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Xx,{...o,...r,ref:t})});mE.displayName=hE;var gE="DropdownMenuSubContent",vE=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return w.jsx(Yx,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vE.displayName=gE;var yE=Bh,bE=Uh,wE=Hh,xE=Wh,EE=Gh,SE=Xh,CE=Yh,PE="Label",qh=v.forwardRef((e,t)=>w.jsx(H.label,{...e,ref:t,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));qh.displayName=PE;var[ul]=Ee("Form"),cl="Form",[RE,Rr]=ul(cl),[OE,Zh]=ul(cl),_E=v.forwardRef((e,t)=>{const{__scopeForm:n,onClearServerErrors:r=()=>{},...o}=e,i=v.useRef(null),l=re(t,i),[u,c]=v.useState({}),a=v.useCallback(R=>u[R],[u]),s=v.useCallback((R,A)=>c(T=>({...T,[R]:{...T[R]??{},...A}})),[]),d=v.useCallback(R=>{c(A=>({...A,[R]:void 0})),b(A=>({...A,[R]:{}}))},[]),[f,p]=v.useState({}),m=v.useCallback(R=>f[R]??[],[f]),h=v.useCallback((R,A)=>{p(T=>({...T,[R]:[...T[R]??[],A]}))},[]),g=v.useCallback((R,A)=>{p(T=>({...T,[R]:(T[R]??[]).filter(V=>V.id!==A)}))},[]),[y,b]=v.useState({}),x=v.useCallback(R=>y[R]??{},[y]),E=v.useCallback((R,A)=>{b(T=>({...T,[R]:{...T[R]??{},...A}}))},[]),[S,_]=v.useState({}),j=v.useCallback((R,A)=>{_(T=>{const V=new Set(T[R]).add(A);return{...T,[R]:V}})},[]),M=v.useCallback((R,A)=>{_(T=>{const V=new Set(T[R]);return V.delete(A),{...T,[R]:V}})},[]),O=v.useCallback(R=>Array.from(S[R]??[]).join(" ")||void 0,[S]);return w.jsx(RE,{scope:n,getFieldValidity:a,onFieldValidityChange:s,getFieldCustomMatcherEntries:m,onFieldCustomMatcherEntryAdd:h,onFieldCustomMatcherEntryRemove:g,getFieldCustomErrors:x,onFieldCustomErrorsChange:E,onFieldValiditionClear:d,children:w.jsx(OE,{scope:n,onFieldMessageIdAdd:j,onFieldMessageIdRemove:M,getFieldDescription:O,children:w.jsx(H.form,{...o,ref:l,onInvalid:F(e.onInvalid,R=>{const A=Jh(R.currentTarget);A===R.target&&A.focus(),R.preventDefault()}),onSubmit:F(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:F(e.onReset,r)})})})});_E.displayName=cl;var dl="FormField",[TE,fl]=ul(dl),jE=v.forwardRef((e,t)=>{const{__scopeForm:n,name:r,serverInvalid:o=!1,...i}=e,l=Rr(dl,n).getFieldValidity(r),u=Je();return w.jsx(TE,{scope:n,id:u,name:r,serverInvalid:o,children:w.jsx(H.div,{"data-valid":hl(l,o),"data-invalid":ml(l,o),...i,ref:t})})});jE.displayName=dl;var Qs="FormLabel",ME=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Rr(Qs,n),i=fl(Qs,n),l=r.htmlFor||i.id,u=o.getFieldValidity(i.name);return w.jsx(qh,{"data-valid":hl(u,i.serverInvalid),"data-invalid":ml(u,i.serverInvalid),...r,ref:t,htmlFor:l})});ME.displayName=Qs;var Bo="FormControl",kE=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e,o=Rr(Bo,n),i=fl(Bo,n),l=Zh(Bo,n),u=v.useRef(null),c=re(t,u),a=r.name||i.name,s=r.id||i.id,d=o.getFieldCustomMatcherEntries(a),{onFieldValidityChange:f,onFieldCustomErrorsChange:p,onFieldValiditionClear:m}=o,h=v.useCallback(async b=>{if(Qh(b.validity)){const T=vs(b.validity);f(a,T);return}const x=b.form?new FormData(b.form):new FormData,E=[b.value,x],S=[],_=[];d.forEach(T=>{zE(T,E)?_.push(T):UE(T)&&S.push(T)});const j=S.map(({id:T,match:V})=>[T,V(...E)]),M=Object.fromEntries(j),O=Object.values(M).some(Boolean),R=O;b.setCustomValidity(R?lr:"");const A=vs(b.validity);if(f(a,A),p(a,M),!O&&_.length>0){const T=_.map(({id:W,match:z})=>z(...E).then(D=>[W,D])),V=await Promise.all(T),N=Object.fromEntries(V),U=Object.values(N).some(Boolean);b.setCustomValidity(U?lr:"");const B=vs(b.validity);f(a,B),p(a,N)}},[d,a,p,f]);v.useEffect(()=>{const b=u.current;if(b){const x=()=>h(b);return b.addEventListener("change",x),()=>b.removeEventListener("change",x)}},[h]);const g=v.useCallback(()=>{const b=u.current;b&&(b.setCustomValidity(""),m(a))},[a,m]);v.useEffect(()=>{var b;const x=(b=u.current)==null?void 0:b.form;if(x)return x.addEventListener("reset",g),()=>x.removeEventListener("reset",g)},[g]),v.useEffect(()=>{const b=u.current,x=b==null?void 0:b.closest("form");if(x&&i.serverInvalid){const E=Jh(x);E===b&&E.focus()}},[i.serverInvalid]);const y=o.getFieldValidity(a);return w.jsx(H.input,{"data-valid":hl(y,i.serverInvalid),"data-invalid":ml(y,i.serverInvalid),"aria-invalid":i.serverInvalid?!0:void 0,"aria-describedby":l.getFieldDescription(a),title:"",...r,ref:c,id:s,name:a,onInvalid:F(e.onInvalid,b=>{const x=b.currentTarget;h(x)}),onChange:F(e.onChange,b=>{g()})})});kE.displayName=Bo;var lr="This value is not valid",AE={badInput:lr,patternMismatch:"This value does not match the required pattern",rangeOverflow:"This value is too large",rangeUnderflow:"This value is too small",stepMismatch:"This value does not match the required step",tooLong:"This value is too long",tooShort:"This value is too short",typeMismatch:"This value does not match the required type",valid:void 0,valueMissing:"This value is missing"},Or="FormMessage",DE=v.forwardRef((e,t)=>{const{match:n,name:r,...o}=e,i=fl(Or,e.__scopeForm),l=r??i.name;return n===void 0?w.jsx(pl,{...o,ref:t,name:l,children:e.children||lr}):typeof n=="function"?w.jsx(NE,{match:n,...o,ref:t,name:l}):w.jsx(LE,{match:n,...o,ref:t,name:l})});DE.displayName=Or;var LE=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,children:i,...l}=e,u=Rr(Or,l.__scopeForm).getFieldValidity(o);return r||u!=null&&u[n]?w.jsx(pl,{ref:t,...l,name:o,children:i??AE[n]}):null}),NE=v.forwardRef((e,t)=>{const{match:n,forceMatch:r=!1,name:o,id:i,children:l,...u}=e,c=Rr(Or,u.__scopeForm),a=v.useRef(null),s=re(t,a),d=Je(),f=i??d,p=v.useMemo(()=>({id:f,match:n}),[f,n]),{onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:h}=c;v.useEffect(()=>(m(o,p),()=>h(o,p.id)),[p,o,m,h]);const g=c.getFieldValidity(o),y=c.getFieldCustomErrors(o)[f];return r||g&&!Qh(g)&&y?w.jsx(pl,{id:f,ref:s,...u,name:o,children:l??lr}):null}),pl=v.forwardRef((e,t)=>{const{__scopeForm:n,id:r,name:o,...i}=e,l=Zh(Or,n),u=Je(),c=r??u,{onFieldMessageIdAdd:a,onFieldMessageIdRemove:s}=l;return v.useEffect(()=>(a(o,c),()=>s(o,c)),[o,c,a,s]),w.jsx(H.span,{id:c,...i,ref:t})}),IE="FormSubmit",FE=v.forwardRef((e,t)=>{const{__scopeForm:n,...r}=e;return w.jsx(H.button,{type:"submit",...r,ref:t})});FE.displayName=IE;function vs(e){const t={};for(const n in e)t[n]=e[n];return t}function VE(e){return e instanceof HTMLElement}function $E(e){return"validity"in e}function BE(e){return $E(e)&&(e.validity.valid===!1||e.getAttribute("aria-invalid")==="true")}function Jh(e){const t=e.elements,[n]=Array.from(t).filter(VE).filter(BE);return n}function zE(e,t){return e.match.constructor.name==="AsyncFunction"||HE(e.match,t)}function UE(e){return e.match.constructor.name==="Function"}function HE(e,t){return e(...t)instanceof Promise}function Qh(e){let t=!1;for(const n in e){const r=n;if(r!=="valid"&&r!=="customError"&&e[r]){t=!0;break}}return t}function hl(e,t){if((e==null?void 0:e.valid)===!0&&!t)return!0}function ml(e,t){if((e==null?void 0:e.valid)===!1||t)return!0}function ti(e,[t,n]){return Math.min(n,Math.max(t,e))}var em="Popover",[tm]=Ee(em,[At]),Ii=At(),[Y2,nn]=tm(em),nm="PopoverAnchor",KE=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nn(nm,n),i=Ii(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=o;return v.useEffect(()=>(l(),()=>u()),[l,u]),w.jsx(Er,{...i,...r,ref:t})});KE.displayName=nm;var rm="PopoverTrigger",WE=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nn(rm,n),i=Ii(n),l=re(t,o.triggerRef),u=w.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sm(o.open),...r,ref:l,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:w.jsx(Er,{asChild:!0,...i,children:u})});WE.displayName=rm;var GE="PopoverPortal",[q2,XE]=tm(GE,{forceMount:void 0}),Cn="PopoverContent",YE=v.forwardRef((e,t)=>{const n=XE(Cn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=nn(Cn,e.__scopePopover);return w.jsx(Be,{present:r||i.open,children:i.modal?w.jsx(ZE,{...o,ref:t}):w.jsx(JE,{...o,ref:t})})});YE.displayName=Cn;var qE=_t("PopoverContent.RemoveScroll"),ZE=v.forwardRef((e,t)=>{const n=nn(Cn,e.__scopePopover),r=v.useRef(null),o=re(t,r),i=v.useRef(!1);return v.useEffect(()=>{const l=r.current;if(l)return Ci(l)},[]),w.jsx(yr,{as:qE,allowPinchZoom:!0,children:w.jsx(om,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),i.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,a=u.button===2||c;i.current=a},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),JE=v.forwardRef((e,t)=>{const n=nn(Cn,e.__scopePopover),r=v.useRef(!1),o=v.useRef(!1);return w.jsx(om,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;(u=n.triggerRef.current)!=null&&u.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),om=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:a,onInteractOutside:s,...d}=e,f=nn(Cn,n),p=Ii(n);return Ei(),w.jsx(vr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:w.jsx(_n,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:a,onDismiss:()=>f.onOpenChange(!1),children:w.jsx(ji,{"data-state":sm(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),im="PopoverClose",QE=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nn(im,n);return w.jsx(H.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});QE.displayName=im;var eS="PopoverArrow",tS=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ii(n);return w.jsx(Mi,{...o,...r,ref:t})});tS.displayName=eS;function sm(e){return e?"open":"closed"}var gl="Progress",vl=100,[nS]=Ee(gl),[rS,oS]=nS(gl),iS=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=aS,...l}=e;(o||o===0)&&!zu(o)&&console.error(lS(`${o}`,"Progress"));const u=zu(o)?o:vl;r!==null&&!Uu(r,u)&&console.error(uS(`${r}`,"Progress"));const c=Uu(r,u)?r:null,a=ni(c)?i(c,u):void 0;return w.jsx(rS,{scope:n,value:c,max:u,children:w.jsx(H.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":ni(c)?c:void 0,"aria-valuetext":a,role:"progressbar","data-state":lm(c,u),"data-value":c??void 0,"data-max":u,...l,ref:t})})});iS.displayName=gl;var am="ProgressIndicator",sS=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=oS(am,n);return w.jsx(H.div,{"data-state":lm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});sS.displayName=am;function aS(e,t){return`${Math.round(e/t*100)}%`}function lm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ni(e){return typeof e=="number"}function zu(e){return ni(e)&&!isNaN(e)&&e>0}function Uu(e,t){return ni(e)&&!isNaN(e)&&e<=t&&e>=0}function lS(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vl}\`.`}function uS(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
92
|
-
- a positive number
|
|
93
|
-
- less than the value passed to \`max\` (or ${vl} if no \`max\` prop is set)
|
|
94
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
95
|
-
|
|
96
|
-
Defaulting to \`null\`.`}var yl="Radio",[cS,um]=Ee(yl),[dS,fS]=cS(yl),cm=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:l,value:u="on",onCheck:c,form:a,...s}=e,[d,f]=v.useState(null),p=re(t,g=>f(g)),m=v.useRef(!1),h=d?a||!!d.closest("form"):!0;return w.jsxs(dS,{scope:n,checked:o,disabled:l,children:[w.jsx(H.button,{type:"button",role:"radio","aria-checked":o,"data-state":hm(o),"data-disabled":l?"":void 0,disabled:l,value:u,...s,ref:p,onClick:F(e.onClick,g=>{o||c==null||c(),h&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})}),h&&w.jsx(pm,{control:d,bubbles:!m.current,name:r,value:u,checked:o,required:i,disabled:l,form:a,style:{transform:"translateX(-100%)"}})]})});cm.displayName=yl;var dm="RadioIndicator",fm=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=fS(dm,n);return w.jsx(Be,{present:r||i.checked,children:w.jsx(H.span,{"data-state":hm(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});fm.displayName=dm;var pS="RadioBubbleInput",pm=v.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const l=v.useRef(null),u=re(l,i),c=br(n),a=wr(t);return v.useEffect(()=>{const s=l.current;if(!s)return;const d=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&f){const p=new Event("click",{bubbles:r});f.call(s,n),s.dispatchEvent(p)}},[c,n,r]),w.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});pm.displayName=pS;function hm(e){return e?"checked":"unchecked"}var hS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fi="RadioGroup",[mS]=Ee(Fi,[Dt,um]),mm=Dt(),gm=um(),[gS,vS]=mS(Fi),yS=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:l=!1,disabled:u=!1,orientation:c,dir:a,loop:s=!0,onValueChange:d,...f}=e,p=mm(n),m=Qt(a),[h,g]=$e({prop:i,defaultProp:o??null,onChange:d,caller:Fi});return w.jsx(gS,{scope:n,name:r,required:l,disabled:u,value:h,onValueChange:g,children:w.jsx(ki,{asChild:!0,...p,orientation:c,dir:m,loop:s,children:w.jsx(H.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":u?"":void 0,dir:m,...f,ref:t})})})});yS.displayName=Fi;var vm="RadioGroupItem",bS=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=vS(vm,n),l=i.disabled||r,u=mm(n),c=gm(n),a=v.useRef(null),s=re(t,a),d=i.value===o.value,f=v.useRef(!1);return v.useEffect(()=>{const p=h=>{hS.includes(h.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",m)}},[]),w.jsx(Ai,{asChild:!0,...u,focusable:!l,active:d,children:w.jsx(cm,{disabled:l,required:i.required,checked:d,...c,...o,name:i.name,ref:s,onCheck:()=>i.onValueChange(o.value),onKeyDown:F(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:F(o.onFocus,()=>{var p;f.current&&((p=a.current)==null||p.click())})})})});bS.displayName=vm;var wS="RadioGroupIndicator",xS=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=gm(n);return w.jsx(fm,{...o,...r,ref:t})});xS.displayName=wS;var ES=[" ","Enter","ArrowUp","ArrowDown"],SS=[" ","Enter"],Vi="Select",[bl,$i,CS]=gr(Vi),[Mn]=Ee(Vi,[CS,At]),wl=At(),[Z2,Lt]=Mn(Vi),[J2,PS]=Mn(Vi),ym="SelectTrigger",RS=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=wl(n),l=Lt(ym,n),u=l.disabled||r,c=re(t,l.onTriggerChange),a=$i(n),s=v.useRef("touch"),[d,f,p]=Mm(h=>{const g=a().filter(x=>!x.disabled),y=g.find(x=>x.value===l.value),b=km(g,h,y);b!==void 0&&l.onValueChange(b.value)}),m=h=>{u||(l.onOpenChange(!0),p()),h&&(l.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return w.jsx(Er,{asChild:!0,...i,children:w.jsx(H.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":jm(l.value)?"":void 0,...o,ref:c,onClick:F(o.onClick,h=>{h.currentTarget.focus(),s.current!=="mouse"&&m(h)}),onPointerDown:F(o.onPointerDown,h=>{s.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(m(h),h.preventDefault())}),onKeyDown:F(o.onKeyDown,h=>{const g=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(g&&h.key===" ")&&ES.includes(h.key)&&(m(),h.preventDefault())})})})});RS.displayName=ym;var bm="SelectValue",OS=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...u}=e,c=Lt(bm,n),{onValueNodeHasChildrenChange:a}=c,s=i!==void 0,d=re(t,c.onValueNodeChange);return Ce(()=>{a(s)},[a,s]),w.jsx(H.span,{...u,ref:d,style:{pointerEvents:"none"},children:jm(c.value)?w.jsx(w.Fragment,{children:l}):i})});OS.displayName=bm;var _S="SelectIcon",TS=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return w.jsx(H.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});TS.displayName=_S;var Zt="SelectContent",jS=v.forwardRef((e,t)=>{const n=Lt(Zt,e.__scopeSelect),[r,o]=v.useState();if(Ce(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?vi.createPortal(w.jsx(wm,{scope:e.__scopeSelect,children:w.jsx(bl.Slot,{scope:e.__scopeSelect,children:w.jsx("div",{children:e.children})})}),i):null}return w.jsx(xm,{...e,ref:t})});jS.displayName=Zt;var qe=10,[wm,Nt]=Mn(Zt),MS="SelectContentImpl",kS=_t("SelectContent.RemoveScroll"),xm=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:u,sideOffset:c,align:a,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...y}=e,b=Lt(Zt,n),[x,E]=v.useState(null),[S,_]=v.useState(null),j=re(t,$=>E($)),[M,O]=v.useState(null),[R,A]=v.useState(null),T=$i(n),[V,N]=v.useState(!1),U=v.useRef(!1);v.useEffect(()=>{if(x)return Ci(x)},[x]),Ei();const B=v.useCallback($=>{const[q,...X]=T().map(I=>I.ref.current),[K]=X.slice(-1),ie=document.activeElement;for(const I of $)if(I===ie||(I==null||I.scrollIntoView({block:"nearest"}),I===q&&S&&(S.scrollTop=0),I===K&&S&&(S.scrollTop=S.scrollHeight),I==null||I.focus(),document.activeElement!==ie))return},[T,S]),W=v.useCallback(()=>B([M,x]),[B,M,x]);v.useEffect(()=>{V&&W()},[V,W]);const{onOpenChange:z,triggerPointerDownPosRef:D}=b;v.useEffect(()=>{if(x){let $={x:0,y:0};const q=K=>{var ie,I;$={x:Math.abs(Math.round(K.pageX)-(((ie=D.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round(K.pageY)-(((I=D.current)==null?void 0:I.y)??0))}},X=K=>{$.x<=10&&$.y<=10?K.preventDefault():x.contains(K.target)||z(!1),document.removeEventListener("pointermove",q),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,z,D]),v.useEffect(()=>{const $=()=>z(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[z]);const[k,L]=Mm($=>{const q=T().filter(ie=>!ie.disabled),X=q.find(ie=>ie.ref.current===document.activeElement),K=km(q,$,X);K&&setTimeout(()=>K.ref.current.focus())}),Q=v.useCallback(($,q,X)=>{const K=!U.current&&!X;(b.value!==void 0&&b.value===q||K)&&(O($),K&&(U.current=!0))},[b.value]),ee=v.useCallback(()=>x==null?void 0:x.focus(),[x]),G=v.useCallback(($,q,X)=>{const K=!U.current&&!X;(b.value!==void 0&&b.value===q||K)&&A($)},[b.value]),ne=r==="popper"?ea:Em,te=ne===ea?{side:u,sideOffset:c,align:a,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return w.jsx(wm,{scope:n,content:x,viewport:S,onViewportChange:_,itemRefCallback:Q,selectedItem:M,onItemLeave:ee,itemTextRefCallback:G,focusSelectedItem:W,selectedItemText:R,position:r,isPositioned:V,searchRef:k,children:w.jsx(yr,{as:kS,allowPinchZoom:!0,children:w.jsx(vr,{asChild:!0,trapped:b.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:F(o,$=>{var q;(q=b.trigger)==null||q.focus({preventScroll:!0}),$.preventDefault()}),children:w.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:w.jsx(ne,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:$=>$.preventDefault(),...y,...te,onPlaced:()=>N(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,$=>{const q=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!q&&$.key.length===1&&L($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let X=T().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes($.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const K=$.target,ie=X.indexOf(K);X=X.slice(ie+1)}setTimeout(()=>B(X)),$.preventDefault()}})})})})})})});xm.displayName=MS;var AS="SelectItemAlignedPosition",Em=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Lt(Zt,n),l=Nt(Zt,n),[u,c]=v.useState(null),[a,s]=v.useState(null),d=re(t,j=>s(j)),f=$i(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=l,x=v.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&a&&h&&g&&y){const j=i.trigger.getBoundingClientRect(),M=a.getBoundingClientRect(),O=i.valueNode.getBoundingClientRect(),R=y.getBoundingClientRect();if(i.dir!=="rtl"){const K=R.left-M.left,ie=O.left-K,I=j.left-ie,me=j.width+I,Le=Math.max(me,M.width),Ue=window.innerWidth-qe,Vt=ti(ie,[qe,Math.max(qe,Ue-Le)]);u.style.minWidth=me+"px",u.style.left=Vt+"px"}else{const K=M.right-R.right,ie=window.innerWidth-O.right-K,I=window.innerWidth-j.right-ie,me=j.width+I,Le=Math.max(me,M.width),Ue=window.innerWidth-qe,Vt=ti(ie,[qe,Math.max(qe,Ue-Le)]);u.style.minWidth=me+"px",u.style.right=Vt+"px"}const A=f(),T=window.innerHeight-qe*2,V=h.scrollHeight,N=window.getComputedStyle(a),U=parseInt(N.borderTopWidth,10),B=parseInt(N.paddingTop,10),W=parseInt(N.borderBottomWidth,10),z=parseInt(N.paddingBottom,10),D=U+B+V+z+W,k=Math.min(g.offsetHeight*5,D),L=window.getComputedStyle(h),Q=parseInt(L.paddingTop,10),ee=parseInt(L.paddingBottom,10),G=j.top+j.height/2-qe,ne=T-G,te=g.offsetHeight/2,$=g.offsetTop+te,q=U+B+$,X=D-q;if(q<=G){const K=A.length>0&&g===A[A.length-1].ref.current;u.style.bottom="0px";const ie=a.clientHeight-h.offsetTop-h.offsetHeight,I=Math.max(ne,te+(K?ee:0)+ie+W),me=q+I;u.style.height=me+"px"}else{const K=A.length>0&&g===A[0].ref.current;u.style.top="0px";const ie=Math.max(G,U+h.offsetTop+(K?Q:0)+te)+X;u.style.height=ie+"px",h.scrollTop=q-G+h.offsetTop}u.style.margin=`${qe}px 0`,u.style.minHeight=k+"px",u.style.maxHeight=T+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,u,a,h,g,y,i.dir,r]);Ce(()=>x(),[x]);const[E,S]=v.useState();Ce(()=>{a&&S(window.getComputedStyle(a).zIndex)},[a]);const _=v.useCallback(j=>{j&&m.current===!0&&(x(),b==null||b(),m.current=!1)},[x,b]);return w.jsx(LS,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:w.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:w.jsx(H.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Em.displayName=AS;var DS="SelectPopperPosition",ea=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=qe,...i}=e,l=wl(n);return w.jsx(ji,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ea.displayName=DS;var[LS,xl]=Mn(Zt,{}),ta="SelectViewport",NS=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Nt(ta,n),l=xl(ta,n),u=re(t,i.onViewportChange),c=v.useRef(0);return w.jsxs(w.Fragment,{children:[w.jsx("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}"},nonce:r}),w.jsx(bl.Slot,{scope:n,children:w.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,a=>{const s=a.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=l;if(f!=null&&f.current&&d){const p=Math.abs(c.current-s.scrollTop);if(p>0){const m=window.innerHeight-qe*2,h=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),y=Math.max(h,g);if(y<m){const b=y+p,x=Math.min(m,b),E=b-x;d.style.height=x+"px",d.style.bottom==="0px"&&(s.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}c.current=s.scrollTop})})})]})});NS.displayName=ta;var Sm="SelectGroup",[IS,FS]=Mn(Sm),VS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Je();return w.jsx(IS,{scope:n,id:o,children:w.jsx(H.div,{role:"group","aria-labelledby":o,...r,ref:t})})});VS.displayName=Sm;var Cm="SelectLabel",$S=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=FS(Cm,n);return w.jsx(H.div,{id:o.id,...r,ref:t})});$S.displayName=Cm;var ri="SelectItem",[BS,Pm]=Mn(ri),Rm=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,u=Lt(ri,n),c=Nt(ri,n),a=u.value===r,[s,d]=v.useState(i??""),[f,p]=v.useState(!1),m=re(t,b=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,b,r,o)}),h=Je(),g=v.useRef("touch"),y=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return w.jsx(BS,{scope:n,value:r,disabled:o,textId:h,isSelected:a,onItemTextChange:v.useCallback(b=>{d(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:w.jsx(bl.ItemSlot,{scope:n,value:r,disabled:o,textValue:s,children:w.jsx(H.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":a&&f,"data-state":a?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:m,onFocus:F(l.onFocus,()=>p(!0)),onBlur:F(l.onBlur,()=>p(!1)),onClick:F(l.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:F(l.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:F(l.onPointerDown,b=>{g.current=b.pointerType}),onPointerMove:F(l.onPointerMove,b=>{var x;g.current=b.pointerType,o?(x=c.onItemLeave)==null||x.call(c):g.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(l.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:F(l.onKeyDown,b=>{var x;((x=c.searchRef)==null?void 0:x.current)!==""&&b.key===" "||(SS.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Rm.displayName=ri;var Jn="SelectItemText",Om=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Lt(Jn,n),u=Nt(Jn,n),c=Pm(Jn,n),a=PS(Jn,n),[s,d]=v.useState(null),f=re(t,y=>d(y),c.onItemTextChange,y=>{var b;return(b=u.itemTextRefCallback)==null?void 0:b.call(u,y,c.value,c.disabled)}),p=s==null?void 0:s.textContent,m=v.useMemo(()=>w.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=a;return Ce(()=>(h(m),()=>g(m)),[h,g,m]),w.jsxs(w.Fragment,{children:[w.jsx(H.span,{id:c.textId,...i,ref:f}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?vi.createPortal(i.children,l.valueNode):null]})});Om.displayName=Jn;var _m="SelectItemIndicator",zS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Pm(_m,n).isSelected?w.jsx(H.span,{"aria-hidden":!0,...r,ref:t}):null});zS.displayName=_m;var na="SelectScrollUpButton",US=v.forwardRef((e,t)=>{const n=Nt(na,e.__scopeSelect),r=xl(na,e.__scopeSelect),[o,i]=v.useState(!1),l=re(t,r.onScrollButtonChange);return Ce(()=>{if(n.viewport&&n.isPositioned){let u=function(){const a=c.scrollTop>0;i(a)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?w.jsx(Tm,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop-c.offsetHeight)}}):null});US.displayName=na;var ra="SelectScrollDownButton",HS=v.forwardRef((e,t)=>{const n=Nt(ra,e.__scopeSelect),r=xl(ra,e.__scopeSelect),[o,i]=v.useState(!1),l=re(t,r.onScrollButtonChange);return Ce(()=>{if(n.viewport&&n.isPositioned){let u=function(){const a=c.scrollHeight-c.clientHeight,s=Math.ceil(c.scrollTop)<a;i(s)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),o?w.jsx(Tm,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop+c.offsetHeight)}}):null});HS.displayName=ra;var Tm=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Nt("SelectScrollButton",n),l=v.useRef(null),u=$i(n),c=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Ce(()=>{var a;const s=u().find(d=>d.ref.current===document.activeElement);(a=s==null?void 0:s.ref.current)==null||a.scrollIntoView({block:"nearest"})},[u]),w.jsx(H.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:F(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:F(o.onPointerMove,()=>{var a;(a=i.onItemLeave)==null||a.call(i),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:F(o.onPointerLeave,()=>{c()})})}),KS="SelectSeparator",WS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w.jsx(H.div,{"aria-hidden":!0,...r,ref:t})});WS.displayName=KS;var oa="SelectArrow",GS=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wl(n),i=Lt(oa,n),l=Nt(oa,n);return i.open&&l.position==="popper"?w.jsx(Mi,{...o,...r,ref:t}):null});GS.displayName=oa;var XS="SelectBubbleInput",YS=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),i=re(r,o),l=br(t);return v.useEffect(()=>{const u=o.current;if(!u)return;const c=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&a){const s=new Event("change",{bubbles:!0});a.call(u,t),u.dispatchEvent(s)}},[l,t]),w.jsx(H.select,{...n,style:{...Yf,...n.style},ref:i,defaultValue:t})});YS.displayName=XS;function jm(e){return e===""||e===void 0}function Mm(e){const t=Qe(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(l=>{const u=n.current+l;t(u),(function c(a){n.current=a,window.clearTimeout(r.current),a!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(u)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function km(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=qS(e,Math.max(o,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function qS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ZS=Rm,JS=Om,Am=["PageUp","PageDown"],Dm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Lm={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},kn="Slider",[ia,QS,eC]=gr(kn),[Nm]=Ee(kn,[eC]),[tC,Bi]=Nm(kn),nC=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:l="horizontal",disabled:u=!1,minStepsBetweenThumbs:c=0,defaultValue:a=[r],value:s,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=v.useRef(new Set),y=v.useRef(0),b=l==="horizontal"?rC:oC,[x=[],E]=$e({prop:s,defaultProp:a,onChange:R=>{var A;(A=[...g.current][y.current])==null||A.focus(),d(R)}}),S=v.useRef(x);function _(R){const A=fC(x,R);O(R,A)}function j(R){O(R,y.current)}function M(){const R=S.current[y.current];x[y.current]!==R&&f(x)}function O(R,A,{commit:T}={commit:!1}){const V=gC(i),N=vC(Math.round((R-r)/i)*i+r,V),U=ti(N,[r,o]);E((B=[])=>{const W=cC(B,U,A);if(mC(W,c*i)){y.current=W.indexOf(U);const z=String(W)!==String(B);return z&&T&&f(W),z?W:B}else return B})}return w.jsx(tC,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:o,valueIndexToChangeRef:y,thumbs:g.current,values:x,orientation:l,form:m,children:w.jsx(ia.Provider,{scope:e.__scopeSlider,children:w.jsx(ia.Slot,{scope:e.__scopeSlider,children:w.jsx(b,{"aria-disabled":u,"data-disabled":u?"":void 0,...h,ref:t,onPointerDown:F(h.onPointerDown,()=>{u||(S.current=x)}),min:r,max:o,inverted:p,onSlideStart:u?void 0:_,onSlideMove:u?void 0:j,onSlideEnd:u?void 0:M,onHomeKeyDown:()=>!u&&O(r,0,{commit:!0}),onEndKeyDown:()=>!u&&O(o,x.length-1,{commit:!0}),onStepKeyDown:({event:R,direction:A})=>{if(!u){const T=Am.includes(R.key)||R.shiftKey&&Dm.includes(R.key)?10:1,V=y.current,N=x[V],U=i*T*A;O(N+U,V,{commit:!0})}}})})})})});nC.displayName=kn;var[Im,Fm]=Nm(kn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),rC=v.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:l,onSlideMove:u,onSlideEnd:c,onStepKeyDown:a,...s}=e,[d,f]=v.useState(null),p=re(t,x=>f(x)),m=v.useRef(void 0),h=Qt(o),g=h==="ltr",y=g&&!i||!g&&i;function b(x){const E=m.current||d.getBoundingClientRect(),S=[0,E.width],_=El(S,y?[n,r]:[r,n]);return m.current=E,_(x-E.left)}return w.jsx(Im,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:w.jsx(Vm,{dir:h,"data-orientation":"horizontal",...s,ref:p,style:{...s.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const E=b(x.clientX);l==null||l(E)},onSlideMove:x=>{const E=b(x.clientX);u==null||u(E)},onSlideEnd:()=>{m.current=void 0,c==null||c()},onStepKeyDown:x=>{const E=Lm[y?"from-left":"from-right"].includes(x.key);a==null||a({event:x,direction:E?-1:1})}})})}),oC=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:l,onSlideEnd:u,onStepKeyDown:c,...a}=e,s=v.useRef(null),d=re(t,s),f=v.useRef(void 0),p=!o;function m(h){const g=f.current||s.current.getBoundingClientRect(),y=[0,g.height],b=El(y,p?[r,n]:[n,r]);return f.current=g,b(h-g.top)}return w.jsx(Im,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:w.jsx(Vm,{"data-orientation":"vertical",...a,ref:d,style:{...a.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const g=m(h.clientY);i==null||i(g)},onSlideMove:h=>{const g=m(h.clientY);l==null||l(g)},onSlideEnd:()=>{f.current=void 0,u==null||u()},onStepKeyDown:h=>{const g=Lm[p?"from-bottom":"from-top"].includes(h.key);c==null||c({event:h,direction:g?-1:1})}})})}),Vm=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:u,onStepKeyDown:c,...a}=e,s=Bi(kn,n);return w.jsx(H.span,{...a,ref:t,onKeyDown:F(e.onKeyDown,d=>{d.key==="Home"?(l(d),d.preventDefault()):d.key==="End"?(u(d),d.preventDefault()):Am.concat(Dm).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:F(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),s.thumbs.has(f)?f.focus():r(d)}),onPointerMove:F(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:F(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),$m="SliderTrack",iC=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Bi($m,n);return w.jsx(H.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});iC.displayName=$m;var sa="SliderRange",sC=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Bi(sa,n),i=Fm(sa,n),l=v.useRef(null),u=re(t,l),c=o.values.length,a=o.values.map(f=>zm(f,o.min,o.max)),s=c>1?Math.min(...a):0,d=100-Math.max(...a);return w.jsx(H.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:u,style:{...e.style,[i.startEdge]:s+"%",[i.endEdge]:d+"%"}})});sC.displayName=sa;var aa="SliderThumb",aC=v.forwardRef((e,t)=>{const n=QS(e.__scopeSlider),[r,o]=v.useState(null),i=re(t,u=>o(u)),l=v.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return w.jsx(lC,{...e,ref:i,index:l})}),lC=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,l=Bi(aa,n),u=Fm(aa,n),[c,a]=v.useState(null),s=re(t,b=>a(b)),d=c?l.form||!!c.closest("form"):!0,f=wr(c),p=l.values[r],m=p===void 0?0:zm(p,l.min,l.max),h=dC(r,l.values.length),g=f==null?void 0:f[u.size],y=g?pC(g,m,u.direction):0;return v.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),w.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${m}% + ${y}px)`},children:[w.jsx(ia.ItemSlot,{scope:e.__scopeSlider,children:w.jsx(H.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":l.min,"aria-valuenow":p,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:s,style:p===void 0?{display:"none"}:e.style,onFocus:F(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),d&&w.jsx(Bm,{name:o??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:p},r)]})});aC.displayName=aa;var uC="RadioBubbleInput",Bm=v.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=v.useRef(null),i=re(o,r),l=br(t);return v.useEffect(()=>{const u=o.current;if(!u)return;const c=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&a){const s=new Event("input",{bubbles:!0});a.call(u,t),u.dispatchEvent(s)}},[l,t]),w.jsx(H.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});Bm.displayName=uC;function cC(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function zm(e,t,n){const r=100/(n-t)*(e-t);return ti(r,[0,100])}function dC(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function fC(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function pC(e,t,n){const r=e/2,o=El([0,50],[0,r]);return(r-o(t)*n)*n}function hC(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function mC(e,t){if(t>0){const n=hC(e);return Math.min(...n)>=t}return!0}function El(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function gC(e){return(String(e).split(".")[1]||"").length}function vC(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var zi="Switch",[yC]=Ee(zi),[bC,wC]=yC(zi),xC=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:l,disabled:u,value:c="on",onCheckedChange:a,form:s,...d}=e,[f,p]=v.useState(null),m=re(t,x=>p(x)),h=v.useRef(!1),g=f?s||!!f.closest("form"):!0,[y,b]=$e({prop:o,defaultProp:i??!1,onChange:a,caller:zi});return w.jsxs(bC,{scope:n,checked:y,disabled:u,children:[w.jsx(H.button,{type:"button",role:"switch","aria-checked":y,"aria-required":l,"data-state":Km(y),"data-disabled":u?"":void 0,disabled:u,value:c,...d,ref:m,onClick:F(e.onClick,x=>{b(E=>!E),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&w.jsx(Hm,{control:f,bubbles:!h.current,name:r,value:c,checked:y,required:l,disabled:u,form:s,style:{transform:"translateX(-100%)"}})]})});xC.displayName=zi;var Um="SwitchThumb",EC=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wC(Um,n);return w.jsx(H.span,{"data-state":Km(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});EC.displayName=Um;var SC="SwitchBubbleInput",Hm=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const l=v.useRef(null),u=re(l,i),c=br(n),a=wr(t);return v.useEffect(()=>{const s=l.current;if(!s)return;const d=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&f){const p=new Event("click",{bubbles:r});f.call(s,n),s.dispatchEvent(p)}},[c,n,r]),w.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:u,style:{...o.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hm.displayName=SC;function Km(e){return e?"checked":"unchecked"}var Ui="Tabs",[CC]=Ee(Ui,[Dt]),Wm=Dt(),[PC,Sl]=CC(Ui),RC=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:u,activationMode:c="automatic",...a}=e,s=Qt(u),[d,f]=$e({prop:r,onChange:o,defaultProp:i??"",caller:Ui});return w.jsx(PC,{scope:n,baseId:Je(),value:d,onValueChange:f,orientation:l,dir:s,activationMode:c,children:w.jsx(H.div,{dir:s,"data-orientation":l,...a,ref:t})})});RC.displayName=Ui;var Gm="TabsList",OC=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Sl(Gm,n),l=Wm(n);return w.jsx(ki,{asChild:!0,...l,orientation:i.orientation,dir:i.dir,loop:r,children:w.jsx(H.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});OC.displayName=Gm;var Xm="TabsTrigger",_C=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,l=Sl(Xm,n),u=Wm(n),c=qm(l.baseId,r),a=Zm(l.baseId,r),s=r===l.value;return w.jsx(Ai,{asChild:!0,...u,focusable:!o,active:s,children:w.jsx(H.button,{type:"button",role:"tab","aria-selected":s,"aria-controls":a,"data-state":s?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...i,ref:t,onMouseDown:F(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?l.onValueChange(r):d.preventDefault()}),onKeyDown:F(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&l.onValueChange(r)}),onFocus:F(e.onFocus,()=>{const d=l.activationMode!=="manual";!s&&!o&&d&&l.onValueChange(r)})})})});_C.displayName=Xm;var Ym="TabsContent",TC=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...l}=e,u=Sl(Ym,n),c=qm(u.baseId,r),a=Zm(u.baseId,r),s=r===u.value,d=v.useRef(s);return v.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),w.jsx(Be,{present:o||s,children:({present:f})=>w.jsx(H.div,{"data-state":s?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:a,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});TC.displayName=Ym;function qm(e,t){return`${e}-trigger-${t}`}function Zm(e,t){return`${e}-content-${t}`}var Jm="Toggle",Qm=v.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...i}=e,[l,u]=$e({prop:n,onChange:o,defaultProp:r??!1,caller:Jm});return w.jsx(H.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:F(e.onClick,()=>{e.disabled||u(!l)})})});Qm.displayName=Jm;var It="ToggleGroup",[eg]=Ee(It,[Dt]),tg=Dt(),ng=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return w.jsx(jC,{...o,ref:t})}if(n==="multiple"){const o=r;return w.jsx(MC,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${It}\``)});ng.displayName=It;var[rg,og]=eg(It),jC=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l,u]=$e({prop:n,defaultProp:r??"",onChange:o,caller:It});return w.jsx(rg,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>l?[l]:[],[l]),onItemActivate:u,onItemDeactivate:P.useCallback(()=>u(""),[u]),children:w.jsx(ig,{...i,ref:t})})}),MC=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l,u]=$e({prop:n,defaultProp:r??[],onChange:o,caller:It}),c=P.useCallback(s=>u((d=[])=>[...d,s]),[u]),a=P.useCallback(s=>u((d=[])=>d.filter(f=>f!==s)),[u]);return w.jsx(rg,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:c,onItemDeactivate:a,children:w.jsx(ig,{...i,ref:t})})});ng.displayName=It;var[kC,AC]=eg(It),ig=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:l,loop:u=!0,...c}=e,a=tg(n),s=Qt(l),d={role:"group",dir:s,...c};return w.jsx(kC,{scope:n,rovingFocus:o,disabled:r,children:o?w.jsx(ki,{asChild:!0,...a,orientation:i,dir:s,loop:u,children:w.jsx(H.div,{...d,ref:t})}):w.jsx(H.div,{...d,ref:t})})}),oi="ToggleGroupItem",DC=P.forwardRef((e,t)=>{const n=og(oi,e.__scopeToggleGroup),r=AC(oi,e.__scopeToggleGroup),o=tg(e.__scopeToggleGroup),i=n.value.includes(e.value),l=r.disabled||e.disabled,u={...e,pressed:i,disabled:l},c=P.useRef(null);return r.rovingFocus?w.jsx(Ai,{asChild:!0,...o,focusable:!l,active:i,ref:c,children:w.jsx(Hu,{...u,ref:t})}):w.jsx(Hu,{...u,ref:t})});DC.displayName=oi;var Hu=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=og(oi,n),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=i.type==="single"?l:void 0;return w.jsx(Qm,{...u,...o,ref:t,onPressedChange:c=>{c?i.onItemActivate(r):i.onItemDeactivate(r)}})}),[Hi]=Ee("Tooltip",[At]),Cl=At(),LC="TooltipProvider",Ku="tooltip.open",[Q2,sg]=Hi(LC),ag="Tooltip",[eM,Ki]=Hi(ag),la="TooltipTrigger",NC=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ki(la,n),i=sg(la,n),l=Cl(n),u=v.useRef(null),c=re(t,u,o.onTriggerChange),a=v.useRef(!1),s=v.useRef(!1),d=v.useCallback(()=>a.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(Er,{asChild:!0,...l,children:w.jsx(H.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:F(e.onPointerMove,f=>{f.pointerType!=="touch"&&!s.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),s.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),a.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:F(e.onFocus,()=>{a.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});NC.displayName=la;var IC="TooltipPortal",[tM,FC]=Hi(IC,{forceMount:void 0}),Pn="TooltipContent",VC=v.forwardRef((e,t)=>{const n=FC(Pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=Ki(Pn,e.__scopeTooltip);return w.jsx(Be,{present:r||l.open,children:l.disableHoverableContent?w.jsx(lg,{side:o,...i,ref:t}):w.jsx($C,{side:o,...i,ref:t})})}),$C=v.forwardRef((e,t)=>{const n=Ki(Pn,e.__scopeTooltip),r=sg(Pn,e.__scopeTooltip),o=v.useRef(null),i=re(t,o),[l,u]=v.useState(null),{trigger:c,onClose:a}=n,s=o.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{u(null),d(!1)},[d]),p=v.useCallback((m,h)=>{const g=m.currentTarget,y={x:m.clientX,y:m.clientY},b=KC(y,g.getBoundingClientRect()),x=WC(y,b),E=GC(h.getBoundingClientRect()),S=YC([...x,...E]);u(S),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&s){const m=g=>p(g,s),h=g=>p(g,c);return c.addEventListener("pointerleave",m),s.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",m),s.removeEventListener("pointerleave",h)}}},[c,s,p,f]),v.useEffect(()=>{if(l){const m=h=>{const g=h.target,y={x:h.clientX,y:h.clientY},b=(c==null?void 0:c.contains(g))||(s==null?void 0:s.contains(g)),x=!XC(y,l);b?f():x&&(f(),a())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,s,l,a,f]),w.jsx(lg,{...e,ref:i})}),[BC,zC]=Hi(ag,{isInside:!1}),UC=j0("TooltipContent"),lg=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=e,c=Ki(Pn,n),a=Cl(n),{onClose:s}=c;return v.useEffect(()=>(document.addEventListener(Ku,s),()=>document.removeEventListener(Ku,s)),[s]),v.useEffect(()=>{if(c.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&s()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,s]),w.jsx(_n,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d=>d.preventDefault(),onDismiss:s,children:w.jsxs(ji,{"data-state":c.stateAttribute,...a,...u,ref:t,style:{...u.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)"},children:[w.jsx(UC,{children:r}),w.jsx(BC,{scope:n,isInside:!0,children:w.jsx(Ey,{id:c.contentId,role:"tooltip",children:o||r})})]})})});VC.displayName=Pn;var ug="TooltipArrow",HC=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Cl(n);return zC(ug,n).isInside?null:w.jsx(Mi,{...o,...r,ref:t})});HC.displayName=ug;function KC(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function WC(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 GC(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function XC(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],c=t[l],a=u.x,s=u.y,d=c.x,f=c.y;s>r!=f>r&&n<(d-a)*(r-s)/(f-s)+a&&(o=!o)}return o}function YC(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),qC(t)}function qC(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}P.forwardRef(({children:e,className:t,...n},r)=>w.jsx(qy,{className:fe("overflow-hidden rounded-xl shadow-(--box-shadow-accordion)",t),ref:r,...n,children:e}));P.forwardRef(({children:e,className:t,triggerIcon:n,...r},o)=>w.jsx(Zy,{className:"flex",children:w.jsxs(Jy,{className:fe("group flex h-14 flex-1 cursor-pointer items-center justify-between px-6 text-[15px] leading-none bg-white space-x-2",t),ref:o,...r,children:[e,n??w.jsx(my,{className:"size-3 shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180 fill-primary-blue"})]})}));const Pl=P.createContext({});function Rl(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const cg=typeof window<"u",dg=cg?P.useLayoutEffect:P.useEffect,Wi=P.createContext(null);function Ol(e,t){e.indexOf(t)===-1&&e.push(t)}function _l(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ct=(e,t,n)=>n>t?t:n<e?e:n;function ua(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let An=()=>{},yt=()=>{};var Wu;typeof process<"u"&&((Wu=process.env)==null?void 0:Wu.NODE_ENV)!=="production"&&(An=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(ua(t,n))},yt=(e,t,n)=>{if(!e)throw new Error(ua(t,n))});const bt={},fg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pg(e){return typeof e=="object"&&e!==null}const hg=e=>/^0[^.\s]+$/u.test(e);function Tl(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ge=e=>e,ZC=(e,t)=>n=>t(e(n)),_r=(...e)=>e.reduce(ZC),ur=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class jl{constructor(){this.subscriptions=[]}add(t){return Ol(this.subscriptions,t),()=>_l(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const l=this.subscriptions[i];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=e=>e*1e3,Ke=e=>e/1e3;function mg(e,t){return t?e*(1e3/t):0}const Gu=new Set;function Ml(e,t,n){e||Gu.has(t)||(console.warn(ua(t,n)),Gu.add(t))}const gg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,JC=1e-7,QC=12;function eP(e,t,n,r,o){let i,l,u=0;do l=t+(n-t)/2,i=gg(l,r,o)-e,i>0?n=l:t=l;while(Math.abs(i)>JC&&++u<QC);return l}function Tr(e,t,n,r){if(e===t&&n===r)return Ge;const o=i=>eP(i,0,1,e,n);return i=>i===0||i===1?i:gg(o(i),t,r)}const vg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yg=e=>t=>1-e(1-t),bg=Tr(.33,1.53,.69,.99),kl=yg(bg),wg=vg(kl),xg=e=>(e*=2)<1?.5*kl(e):.5*(2-Math.pow(2,-10*(e-1))),Al=e=>1-Math.sin(Math.acos(e)),Eg=yg(Al),Sg=vg(Al),tP=Tr(.42,0,1,1),nP=Tr(0,0,.58,1),Cg=Tr(.42,0,.58,1),rP=e=>Array.isArray(e)&&typeof e[0]!="number",Pg=e=>Array.isArray(e)&&typeof e[0]=="number",Xu={linear:Ge,easeIn:tP,easeInOut:Cg,easeOut:nP,circIn:Al,circInOut:Sg,circOut:Eg,backIn:kl,backInOut:wg,backOut:bg,anticipate:xg},oP=e=>typeof e=="string",Yu=e=>{if(Pg(e)){yt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Tr(t,n,r,o)}else if(oP(e))return yt(Xu[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Xu[e];return e},Yr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function iP(e,t){let n=new Set,r=new Set,o=!1,i=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(s){l.has(s)&&(a.schedule(s),e()),s(u)}const a={schedule:(s,d=!1,f=!1)=>{const p=f&&o?n:r;return d&&l.add(s),p.has(s)||p.add(s),s},cancel:s=>{r.delete(s),l.delete(s)},process:s=>{if(u=s,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,i&&(i=!1,a.process(s))}};return a}const sP=40;function Rg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,l=Yr.reduce((y,b)=>(y[b]=iP(i),y),{}),{setup:u,read:c,resolveKeyframes:a,preUpdate:s,update:d,preRender:f,render:p,postRender:m}=l,h=()=>{const y=bt.useManualTiming?o.timestamp:performance.now();n=!1,bt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,sP),1)),o.timestamp=y,o.isProcessing=!0,u.process(o),c.process(o),a.process(o),s.process(o),d.process(o),f.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Yr.reduce((y,b)=>{const x=l[b];return y[b]=(E,S=!1,_=!1)=>(n||g(),x.schedule(E,S,_)),y},{}),cancel:y=>{for(let b=0;b<Yr.length;b++)l[Yr[b]].cancel(y)},state:o,steps:l}}const{schedule:he,cancel:Mt,state:Re,steps:ys}=Rg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ge,!0);let zo;function aP(){zo=void 0}const ke={now:()=>(zo===void 0&&ke.set(Re.isProcessing||bt.useManualTiming?Re.timestamp:performance.now()),zo),set:e=>{zo=e,queueMicrotask(aP)}},Og=e=>t=>typeof t=="string"&&t.startsWith(e),_g=Og("--"),lP=Og("var(--"),Dl=e=>lP(e)?uP.test(e.split("/*")[0].trim()):!1,uP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qu(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cr={...Dn,transform:e=>ct(0,1,e)},qr={...Dn,default:1},tr=e=>Math.round(e*1e5)/1e5,Ll=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cP(e){return e==null}const dP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Nl=(e,t)=>n=>!!(typeof n=="string"&&dP.test(n)&&n.startsWith(e)||t&&!cP(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,l,u]=r.match(Ll);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},fP=e=>ct(0,255,e),bs={...Dn,transform:e=>Math.round(fP(e))},Wt={test:Nl("rgb","red"),parse:Tg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bs.transform(e)+", "+bs.transform(t)+", "+bs.transform(n)+", "+tr(cr.transform(r))+")"};function pP(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const ca={test:Nl("#"),parse:pP,transform:Wt.transform},jr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pt=jr("deg"),lt=jr("%"),Y=jr("px"),hP=jr("vh"),mP=jr("vw"),Zu={...lt,parse:e=>lt.parse(e)/100,transform:e=>lt.transform(e*100)},fn={test:Nl("hsl","hue"),parse:Tg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+lt.transform(tr(t))+", "+lt.transform(tr(n))+", "+tr(cr.transform(r))+")"},Se={test:e=>Wt.test(e)||ca.test(e)||fn.test(e),parse:e=>Wt.test(e)?Wt.parse(e):fn.test(e)?fn.parse(e):ca.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wt.transform(e):fn.transform(e),getAnimatableNone:e=>{const t=Se.parse(e);return t.alpha=0,Se.transform(t)}},gP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vP(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ll))==null?void 0:t.length)||0)+(((n=e.match(gP))==null?void 0:n.length)||0)>0}const jg="number",Mg="color",yP="var",bP="var(",Ju="${}",wP=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(wP,u=>(Se.test(u)?(r.color.push(i),o.push(Mg),n.push(Se.parse(u))):u.startsWith(bP)?(r.var.push(i),o.push(yP),n.push(u)):(r.number.push(i),o.push(jg),n.push(parseFloat(u))),++i,Ju)).split(Ju);return{values:n,split:l,indexes:r,types:o}}function kg(e){return dr(e).values}function Ag(e){const{split:t,types:n}=dr(e),r=t.length;return o=>{let i="";for(let l=0;l<r;l++)if(i+=t[l],o[l]!==void 0){const u=n[l];u===jg?i+=tr(o[l]):u===Mg?i+=Se.transform(o[l]):i+=o[l]}return i}}const xP=e=>typeof e=="number"?0:Se.test(e)?Se.getAnimatableNone(e):e;function EP(e){const t=kg(e);return Ag(e)(t.map(xP))}const kt={test:vP,parse:kg,createTransformer:Ag,getAnimatableNone:EP};function ws(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 SP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,l=0;if(!t)o=i=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;o=ws(c,u,e+1/3),i=ws(c,u,e),l=ws(c,u,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(l*255),alpha:r}}function ii(e,t){return n=>n>0?t:e}const be=(e,t,n)=>e+(t-e)*n,xs=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CP=[ca,Wt,fn],PP=e=>CP.find(t=>t.test(e));function Qu(e){const t=PP(e);if(An(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===fn&&(n=SP(n)),n}const ec=(e,t)=>{const n=Qu(e),r=Qu(t);if(!n||!r)return ii(e,t);const o={...n};return i=>(o.red=xs(n.red,r.red,i),o.green=xs(n.green,r.green,i),o.blue=xs(n.blue,r.blue,i),o.alpha=be(n.alpha,r.alpha,i),Wt.transform(o))},da=new Set(["none","hidden"]);function RP(e,t){return da.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OP(e,t){return n=>be(e,t,n)}function Il(e){return typeof e=="number"?OP:typeof e=="string"?Dl(e)?ii:Se.test(e)?ec:jP:Array.isArray(e)?Dg:typeof e=="object"?Se.test(e)?ec:_P:ii}function Dg(e,t){const n=[...e],r=n.length,o=e.map((i,l)=>Il(i)(i,t[l]));return i=>{for(let l=0;l<r;l++)n[l]=o[l](i);return n}}function _P(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Il(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function TP(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],l=e.indexes[i][r[i]],u=e.values[l]??0;n[o]=u,r[i]++}return n}const jP=(e,t)=>{const n=kt.createTransformer(t),r=dr(e),o=dr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?da.has(e)&&!o.values.length||da.has(t)&&!r.values.length?RP(e,t):_r(Dg(TP(r,o),o.values),n):(An(!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.`,"complex-values-different"),ii(e,t))};function Lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):Il(e)(e,t)}const MP=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>he.update(t,n),stop:()=>Mt(t),now:()=>Re.isProcessing?Re.timestamp:ke.now()}},Ng=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},si=2e4;function Fl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<si;)t+=n,r=e.next(t);return t>=si?1/0:t}function kP(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Fl(r),si);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Ke(o)}}const AP=5;function Ig(e,t,n){const r=Math.max(t-AP,0);return mg(n-e(r),t-r)}const ye={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Es=.001;function DP({duration:e=ye.duration,bounce:t=ye.bounce,velocity:n=ye.velocity,mass:r=ye.mass}){let o,i;An(e<=at(ye.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-t;l=ct(ye.minDamping,ye.maxDamping,l),e=ct(ye.minDuration,ye.maxDuration,Ke(e)),l<1?(o=a=>{const s=a*l,d=s*e,f=s-n,p=fa(a,l),m=Math.exp(-d);return Es-f/p*m},i=a=>{const s=a*l*e,d=s*n+n,f=Math.pow(l,2)*Math.pow(a,2)*e,p=Math.exp(-s),m=fa(Math.pow(a,2),l);return(-o(a)+Es>0?-1:1)*((d-f)*p)/m}):(o=a=>{const s=Math.exp(-a*e),d=(a-n)*e+1;return-Es+s*d},i=a=>{const s=Math.exp(-a*e),d=(n-a)*(e*e);return s*d});const u=5/e,c=NP(o,i,u);if(e=at(e),isNaN(c))return{stiffness:ye.stiffness,damping:ye.damping,duration:e};{const a=Math.pow(c,2)*r;return{stiffness:a,damping:l*2*Math.sqrt(r*a),duration:e}}}const LP=12;function NP(e,t,n){let r=n;for(let o=1;o<LP;o++)r=r-e(r)/t(r);return r}function fa(e,t){return e*Math.sqrt(1-t*t)}const IP=["duration","bounce"],FP=["stiffness","damping","mass"];function tc(e,t){return t.some(n=>e[n]!==void 0)}function VP(e){let t={velocity:ye.velocity,stiffness:ye.stiffness,damping:ye.damping,mass:ye.mass,isResolvedFromDuration:!1,...e};if(!tc(e,FP)&&tc(e,IP))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ct(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ye.mass,stiffness:o,damping:i}}else{const n=DP(e);t={...t,...n,mass:ye.mass},t.isResolvedFromDuration=!0}return t}function ai(e=ye.visualDuration,t=ye.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:c,damping:a,mass:s,duration:d,velocity:f,isResolvedFromDuration:p}=VP({...n,velocity:-Ke(n.velocity||0)}),m=f||0,h=a/(2*Math.sqrt(c*s)),g=l-i,y=Ke(Math.sqrt(c/s)),b=Math.abs(g)<5;r||(r=b?ye.restSpeed.granular:ye.restSpeed.default),o||(o=b?ye.restDelta.granular:ye.restDelta.default);let x;if(h<1){const S=fa(y,h);x=_=>{const j=Math.exp(-h*y*_);return l-j*((m+h*y*g)/S*Math.sin(S*_)+g*Math.cos(S*_))}}else if(h===1)x=S=>l-Math.exp(-y*S)*(g+(m+y*g)*S);else{const S=y*Math.sqrt(h*h-1);x=_=>{const j=Math.exp(-h*y*_),M=Math.min(S*_,300);return l-j*((m+h*y*g)*Math.sinh(M)+S*g*Math.cosh(M))/S}}const E={calculatedDuration:p&&d||null,next:S=>{const _=x(S);if(p)u.done=S>=d;else{let j=S===0?m:0;h<1&&(j=S===0?at(m):Ig(x,S,_));const M=Math.abs(j)<=r,O=Math.abs(l-_)<=o;u.done=M&&O}return u.value=u.done?l:_,u},toString:()=>{const S=Math.min(Fl(E),si),_=Ng(j=>E.next(S*j).value,S,30);return S+"ms "+_},toTransition:()=>{}};return E}ai.applyToOptions=e=>{const t=kP(e,100,ai);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function pa({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:l,min:u,max:c,restDelta:a=.5,restSpeed:s}){const d=e[0],f={done:!1,value:d},p=M=>u!==void 0&&M<u||c!==void 0&&M>c,m=M=>u===void 0?c:c===void 0||Math.abs(u-M)<Math.abs(c-M)?u:c;let h=n*t;const g=d+h,y=l===void 0?g:l(g);y!==g&&(h=y-d);const b=M=>-h*Math.exp(-M/r),x=M=>y+b(M),E=M=>{const O=b(M),R=x(M);f.done=Math.abs(O)<=a,f.value=f.done?y:R};let S,_;const j=M=>{p(f.value)&&(S=M,_=ai({keyframes:[f.value,m(f.value)],velocity:Ig(x,M,f.value),damping:o,stiffness:i,restDelta:a,restSpeed:s}))};return j(0),{calculatedDuration:null,next:M=>{let O=!1;return!_&&S===void 0&&(O=!0,E(M),j(M)),S!==void 0&&M>=S?_.next(M-S):(!O&&E(M),f)}}}function $P(e,t,n){const r=[],o=n||bt.mix||Lg,i=e.length-1;for(let l=0;l<i;l++){let u=o(e[l],e[l+1]);if(t){const c=Array.isArray(t)?t[l]||Ge:t;u=_r(c,u)}r.push(u)}return r}function BP(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(yt(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=$P(t,r,o),c=u.length,a=s=>{if(l&&s<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(s<e[d+1]);d++);const f=ur(e[d],e[d+1],s);return u[d](f)};return n?s=>a(ct(e[0],e[i-1],s)):a}function zP(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ur(0,t,r);e.push(be(n,1,o))}}function UP(e){const t=[0];return zP(t,e.length-1),t}function HP(e,t){return e.map(n=>n*t)}function KP(e,t){return e.map(()=>t||Cg).splice(0,e.length-1)}function pn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=rP(r)?r.map(Yu):Yu(r),i={done:!1,value:t[0]},l=HP(n&&n.length===t.length?n:UP(t),e),u=BP(l,t,{ease:Array.isArray(o)?o:KP(t,o)});return{calculatedDuration:e,next:c=>(i.value=u(c),i.done=c>=e,i)}}const WP=e=>e!==null;function Vl(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(WP),l=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const GP={decay:pa,inertia:pa,tween:pn,keyframes:pn,spring:ai};function Fg(e){typeof e.type=="string"&&(e.type=GP[e.type])}class $l{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const XP=e=>e/100;class Bl extends $l{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,r;const{motionValue:o}=this.options;o&&o.updatedAt!==ke.now()&&this.tick(ke.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Fg(t);const{type:n=pn,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:l=0}=t;let{keyframes:u}=t;const c=n||pn;process.env.NODE_ENV!=="production"&&c!==pn&&yt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),c!==pn&&typeof u[0]!="number"&&(this.mixKeyframes=_r(XP,Lg(u[0],u[1])),u=[0,100]);const a=c({...t,keyframes:u});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...u].reverse(),velocity:-l})),a.calculatedDuration===null&&(a.calculatedDuration=Fl(a));const{calculatedDuration:s}=a;this.calculatedDuration=s,this.resolvedDuration=s+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=a}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:a=0,keyframes:s,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-a*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,E=r;if(d){const M=Math.min(this.currentTime,o)/u;let O=Math.floor(M),R=M%1;!R&&M>=1&&(R=1),R===1&&O--,O=Math.min(O,d+1),O%2&&(f==="reverse"?(R=1-R,p&&(R-=p/u)):f==="mirror"&&(E=l)),x=ct(0,1,R)*u}const S=b?{done:!1,value:s[0]}:E.next(x);i&&(S.value=i(S.value));let{done:_}=S;!b&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return j&&m!==pa&&(S.value=Vl(s,this.options,g,this.speed)),h&&h(S.value),j&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Ke(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ke(t)}get time(){return Ke(this.currentTime)}set time(t){var n;t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ke.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ke(this.currentTime))}play(){var t,n;if(this.isStopped)return;const{driver:r=MP,startTime:o}=this.options;this.driver||(this.driver=r(l=>this.tick(l))),(n=(t=this.options).onPlay)==null||n.call(t);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=o??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ke.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function YP(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Gt=e=>e*180/Math.PI,ha=e=>{const t=Gt(Math.atan2(e[1],e[0]));return ma(t)},qP={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ha,rotateZ:ha,skewX:e=>Gt(Math.atan(e[1])),skewY:e=>Gt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ma=e=>(e=e%360,e<0&&(e+=360),e),nc=ha,rc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ZP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rc,scaleY:oc,scale:e=>(rc(e)+oc(e))/2,rotateX:e=>ma(Gt(Math.atan2(e[6],e[5]))),rotateY:e=>ma(Gt(Math.atan2(-e[2],e[0]))),rotateZ:nc,rotate:nc,skewX:e=>Gt(Math.atan(e[4])),skewY:e=>Gt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ga(e){return e.includes("scale")?1:0}function va(e,t){if(!e||e==="none")return ga(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ZP,o=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qP,o=u}if(!o)return ga(t);const i=r[t],l=o[1].split(",").map(QP);return typeof i=="function"?i(l):l[i]}const JP=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return va(n,t)};function QP(e){return parseFloat(e.trim())}const Ln=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nn=new Set(Ln),ic=e=>e===Dn||e===Y,eR=new Set(["x","y","z"]),tR=Ln.filter(e=>!eR.has(e));function nR(e){const t=[];return tR.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Rt={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:(e,{transform:t})=>va(t,"x"),y:(e,{transform:t})=>va(t,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Xt=new Set;let ya=!1,ba=!1,wa=!1;function Vg(){if(ba){const e=Array.from(Xt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=nR(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,l])=>{var u;(u=r.getValue(i))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ba=!1,ya=!1,Xt.forEach(e=>e.complete(wa)),Xt.clear()}function $g(){Xt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ba=!0)})}function rR(){wa=!0,$g(),Vg(),wa=!1}class zl{constructor(t,n,r,o,i,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Xt.add(this),ya||(ya=!0,he.read($g),he.resolveKeyframes(Vg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o==null?void 0:o.get(),l=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),o&&i===void 0&&o.set(t[0])}YP(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xt.delete(this)}cancel(){this.state==="scheduled"&&(Xt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const oR=e=>e.startsWith("--");function iR(e,t,n){oR(t)?e.style.setProperty(t,n):e.style[t]=n}const sR=Tl(()=>window.ScrollTimeline!==void 0),aR={};function lR(e,t){const n=Tl(e);return()=>aR[t]??n()}const Bg=lR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,sc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qn([0,.65,.55,1]),circOut:Qn([.55,0,1,.45]),backIn:Qn([.31,.01,.66,-.59]),backOut:Qn([.33,1.53,.69,.99])};function zg(e,t){if(e)return typeof e=="function"?Bg()?Ng(e,t):"ease-out":Pg(e)?Qn(e):Array.isArray(e)?e.map(n=>zg(n,t)||sc.easeOut):sc[e]}function uR(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:l="loop",ease:u="easeOut",times:c}={},a=void 0){const s={[t]:n};c&&(s.offset=c);const d=zg(u,o);Array.isArray(d)&&(s.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:l==="reverse"?"alternate":"normal"};return a&&(f.pseudoElement=a),e.animate(s,f)}function Ug(e){return typeof e=="function"&&"applyToOptions"in e}function cR({type:e,...t}){return Ug(e)&&Bg()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class dR extends $l{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:l=!1,finalKeyframe:u,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=l,this.options=t,yt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const a=cR(t);this.animation=uR(n,r,o,a,i),a.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const s=Vl(o,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(s):iR(n,r,s),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n,r;const o=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&o!=null&&o.isConnected&&((r=(n=this.animation).commitStyles)==null||r.call(n))}get duration(){var t,n;const r=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return Ke(Number(r))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ke(t)}get time(){return Ke(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&sR()?(this.animation.timeline=t,Ge):n(this)}}const Hg={anticipate:xg,backInOut:wg,circInOut:Sg};function fR(e){return e in Hg}function pR(e){typeof e.ease=="string"&&fR(e.ease)&&(e.ease=Hg[e.ease])}const Ss=10;class hR extends dR{constructor(t){pR(t),Fg(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Bl({...l,autoplay:!1}),c=Math.max(Ss,ke.now()-this.startTime),a=ct(0,Ss,c-Ss);n.setWithVelocity(u.sample(Math.max(0,c-a)).value,u.sample(c).value,a),u.stop()}}const ac=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kt.test(e)||e==="0")&&!e.startsWith("url("));function mR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function gR(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],l=ac(o,t),u=ac(i,t);return An(l===u,`You are trying to animate ${t} from "${o}" to "${i}". "${l?i:o}" is not an animatable value.`,"value-not-animatable"),!l||!u?!1:mR(e)||(n==="spring"||Ug(n))&&r}function xa(e){e.duration=0,e.type="keyframes"}const vR=new Set(["opacity","clipPath","filter","transform"]),yR=Tl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bR(e){var t;const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:l,type:u}=e;if(!(((t=n==null?void 0:n.owner)==null?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:a}=n.owner.getProps();return yR()&&r&&vR.has(r)&&(r!=="transform"||!a)&&!c&&!o&&i!=="mirror"&&l!==0&&u!=="inertia"}const wR=40;class xR extends $l{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:l="loop",keyframes:u,name:c,motionValue:a,element:s,...d}){var f;super(),this.stop=()=>{var h,g;this._animation&&(this._animation.stop(),(h=this.stopTimeline)==null||h.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=ke.now();const p={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:l,name:c,motionValue:a,element:s,...d},m=(s==null?void 0:s.KeyframeResolver)||zl;this.keyframeResolver=new m(u,(h,g,y)=>this.onKeyframesResolved(h,g,p,!y),c,a,s),(f=this.keyframeResolver)==null||f.scheduleResolve()}onKeyframesResolved(t,n,r,o){var i,l;this.keyframeResolver=void 0;const{name:u,type:c,velocity:a,delay:s,isHandoff:d,onUpdate:f}=r;this.resolvedAt=ke.now(),gR(t,u,c,a)||((bt.instantAnimations||!s)&&(f==null||f(Vl(t,r,n))),t[0]=t[t.length-1],xa(r),r.repeat=0);const p={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>wR?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!d&&bR(p),h=(l=(i=p.motionValue)==null?void 0:i.owner)==null?void 0:l.current,g=m?new hR({...p,element:h}):new Bl(p);g.finished.then(()=>{this.notifyFinished()}).catch(Ge),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),rR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Kg(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,a)=>c.sortNodePosition(a)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(i,l):o===1?i*r:u-i*r}const ER=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function SR(e){const t=ER.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const CR=4;function Wg(e,t,n=1){yt(n<=CR,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=SR(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const l=i.trim();return fg(l)?parseFloat(l):l}return Dl(o)?Wg(o,t,n+1):o}const PR={type:"spring",stiffness:500,damping:25,restSpeed:10},RR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),OR={type:"keyframes",duration:.8},_R={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TR=(e,{keyframes:t})=>t.length>2?OR:Nn.has(e)?e.startsWith("scale")?RR(t[1]):PR:_R,jR=e=>e!==null;function MR(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jR),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Ul(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function kR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:l,repeatDelay:u,from:c,elapsed:a,...s}){return!!Object.keys(s).length}const Hl=(e,t,n,r={},o,i)=>l=>{const u=Ul(r,e)||{},c=u.delay||r.delay||0;let{elapsed:a=0}=r;a=a-at(c);const s={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-a,onUpdate:f=>{t.set(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:i?void 0:o};kR(u)||Object.assign(s,TR(e,s)),s.duration&&(s.duration=at(s.duration)),s.repeatDelay&&(s.repeatDelay=at(s.repeatDelay)),s.from!==void 0&&(s.keyframes[0]=s.from);let d=!1;if((s.type===!1||s.duration===0&&!s.repeatDelay)&&(xa(s),s.delay===0&&(d=!0)),(bt.instantAnimations||bt.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(d=!0,xa(s),s.delay=0),s.allowFlatten=!u.type&&!u.ease,d&&!i&&t.get()!==void 0){const f=MR(s.keyframes,u);if(f!==void 0){he.update(()=>{s.onUpdate(f),s.onComplete()});return}}return u.isSync?new Bl(s):new xR(s)};function lc(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kl(e,t,n,r){if(typeof t=="function"){const[o,i]=lc(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=lc(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function xn(e,t,n){const r=e.getProps();return Kl(r,t,n!==void 0?n:r.custom,e)}const Gg=new Set(["width","height","top","left","right","bottom",...Ln]),uc=30,AR=e=>!isNaN(parseFloat(e));class DR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=ke.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ke.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=AR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ml(!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 jl);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ke.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>uc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,uc);return mg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Rn(e,t){return new DR(e,t)}const Ea=e=>Array.isArray(e);function LR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rn(n))}function NR(e){return Ea(e)?e[e.length-1]||0:e}function IR(e,t){const n=xn(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const l in i){const u=NR(i[l]);LR(e,l,u)}}const _e=e=>!!(e&&e.getVelocity);function FR(e){return!!(_e(e)&&e.add)}function Sa(e,t){const n=e.getValue("willChange");if(FR(n))return n.add(t);if(!n&&bt.WillChange){const r=new bt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Wl(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const VR="framerAppearId",Xg="data-"+Wl(VR);function Yg(e){return e.props[Xg]}function $R({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:l,...u}=t;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const a=[],s=o&&e.animationState&&e.animationState.getState()[o];for(const d in u){const f=e.getValue(d,e.latestValues[d]??null),p=u[d];if(p===void 0||s&&$R(s,d))continue;const m={delay:n,...Ul(i||{},d)},h=f.get();if(h!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===h&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=Yg(e);if(x){const E=window.MotionHandoffAnimation(x,d,he);E!==null&&(m.startTime=E,g=!0)}}Sa(e,d);const y=c??e.shouldReduceMotion;f.start(Hl(d,f,p,y&&Gg.has(d)?{type:!1}:m,e,g));const b=f.animation;b&&a.push(b)}return l&&Promise.all(a).then(()=>{he.update(()=>{l&&IR(e,l)})}),a}function Ca(e,t,n={}){var r;const o=xn(e,t,n.type==="exit"?(r=e.presenceContext)==null?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const l=o?()=>Promise.all(qg(e,o,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:s=0,staggerChildren:d,staggerDirection:f}=i;return BR(e,t,a,s,d,f,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[a,s]=c==="beforeChildren"?[l,u]:[u,l];return a().then(()=>s())}else return Promise.all([l(),u(n.delay)])}function BR(e,t,n=0,r=0,o=0,i=1,l){const u=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),u.push(Ca(c,t,{...l,delay:n+(typeof r=="function"?0:r)+Kg(e.variantChildren,c,r,o,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(u)}function zR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Ca(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Ca(e,t,n);else{const o=typeof t=="function"?xn(e,t,n.custom):t;r=Promise.all(qg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const UR={test:e=>e==="auto",parse:e=>e},Zg=e=>t=>t.test(e),Jg=[Dn,Y,lt,Pt,mP,hP,UR],cc=e=>Jg.find(Zg(e));function HR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hg(e):!0}const KR=new Set(["brightness","contrast","saturate","opacity"]);function WR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ll)||[];if(!r)return e;const o=n.replace(r,"");let i=KR.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const GR=/\b([a-z-]*)\(.*?\)/gu,Pa={...kt,getAnimatableNone:e=>{const t=e.match(GR);return t?t.map(WR).join(" "):e}},dc={...Dn,transform:Math.round},XR={rotate:Pt,rotateX:Pt,rotateY:Pt,rotateZ:Pt,scale:qr,scaleX:qr,scaleY:qr,scaleZ:qr,skew:Pt,skewX:Pt,skewY:Pt,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:cr,originX:Zu,originY:Zu,originZ:Y},Gl={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,...XR,zIndex:dc,fillOpacity:cr,strokeOpacity:cr,numOctaves:dc},YR={...Gl,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:Pa,WebkitFilter:Pa},Qg=e=>YR[e];function ev(e,t){let n=Qg(e);return n!==Pa&&(n=kt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const qR=new Set(["auto","none","0"]);function ZR(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!qR.has(i)&&dr(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ev(n,o)}class JR extends zl{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let s=0;s<t.length;s++){let d=t[s];if(typeof d=="string"&&(d=d.trim(),Dl(d))){const f=Wg(d,n.current);f!==void 0&&(t[s]=f),s===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Gg.has(r)||t.length!==2)return;const[o,i]=t,l=cc(o),u=cc(i),c=qu(o),a=qu(i);if(c!==a&&Rt[r]){this.needsMeasurement=!0;return}if(l!==u)if(ic(l)&&ic(u))for(let s=0;s<t.length;s++){const d=t[s];typeof d=="string"&&(t[s]=parseFloat(d))}else Rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||HR(t[o]))&&r.push(o);r.length&&ZR(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const l=o.length-1,u=o[l];o[l]=Rt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),(t=this.removedTransforms)!=null&&t.length&&this.removedTransforms.forEach(([c,a])=>{n.getValue(c).set(a)}),this.resolveNoneKeyframes()}}function QR(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const o=document.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const tv=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ra(e){return pg(e)&&"offsetHeight"in e}const{schedule:Xl}=Rg(queueMicrotask,!1),Ze={x:!1,y:!1};function nv(){return Ze.x||Ze.y}function eO(e){return e==="x"||e==="y"?Ze[e]?null:(Ze[e]=!0,()=>{Ze[e]=!1}):Ze.x||Ze.y?null:(Ze.x=Ze.y=!0,()=>{Ze.x=Ze.y=!1})}function rv(e,t){const n=QR(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function fc(e){return!(e.pointerType==="touch"||nv())}function tO(e,t,n={}){const[r,o,i]=rv(e,n),l=u=>{if(!fc(u))return;const{target:c}=u,a=t(c,u);if(typeof a!="function"||!c)return;const s=d=>{fc(d)&&(a(d),c.removeEventListener("pointerleave",s))};c.addEventListener("pointerleave",s,o)};return r.forEach(u=>{u.addEventListener("pointerenter",l,o)}),i}const ov=(e,t)=>t?e===t?!0:ov(e,t.parentElement):!1,Yl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rO(e){return nO.has(e.tagName)||e.isContentEditable===!0}const oO=new Set(["INPUT","SELECT","TEXTAREA"]);function iO(e){return oO.has(e.tagName)||e.isContentEditable===!0}const Uo=new WeakSet;function pc(e){return t=>{t.key==="Enter"&&e(t)}}function Cs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sO=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pc(()=>{if(Uo.has(n))return;Cs(n,"down");const o=pc(()=>{Cs(n,"up")}),i=()=>Cs(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function hc(e){return Yl(e)&&!nv()}function aO(e,t,n={}){const[r,o,i]=rv(e,n),l=u=>{const c=u.currentTarget;if(!hc(u))return;Uo.add(c);const a=t(c,u),s=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Uo.has(c)&&Uo.delete(c),hc(p)&&typeof a=="function"&&a(p,{success:m})},d=p=>{s(p,c===window||c===document||n.useGlobalTarget||ov(c,p.target))},f=p=>{s(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,o),Ra(u)&&(u.addEventListener("focus",c=>sO(c,o)),!rO(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function iv(e){return pg(e)&&"ownerSVGElement"in e}function lO(e){return iv(e)&&e.tagName==="svg"}const uO=[...Jg,Se,kt],cO=e=>uO.find(Zg(e)),mc=()=>({translate:0,scale:1,origin:0,originPoint:0}),hn=()=>({x:mc(),y:mc()}),gc=()=>({min:0,max:0}),Pe=()=>({x:gc(),y:gc()}),Oa={current:null},sv={current:!1},dO=typeof window<"u";function fO(){if(sv.current=!0,!!dO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Oa.current=e.matches;e.addEventListener("change",t),t()}else Oa.current=!1}const pO=new WeakMap;function Gi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fr(e){return typeof e=="string"||Array.isArray(e)}const ql=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zl=["initial",...ql];function Xi(e){return Gi(e.animate)||Zl.some(t=>fr(e[t]))}function av(e){return!!(Xi(e)||e.variants)}function hO(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_e(o))e.addValue(r,o);else if(_e(i))e.addValue(r,Rn(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,Rn(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const vc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let li={};function lv(e){li=e}function mO(){return li}class gO{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:l,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zl,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.renderScheduledAt=0,this.scheduleRender=()=>{const p=ke.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,he.render(this.render,!1,!0))};const{latestValues:a,renderState:s}=u;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!l,this.isControllingVariants=Xi(n),this.isVariantNode=av(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];a[p]!==void 0&&_e(m)&&m.set(a[p])}}mount(t){var n;this.current=t,pO.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((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(sv.current||fO(),this.shouldReduceMotion=Oa.current),process.env.NODE_ENV!=="production"&&Ml(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Mt(this.notifyUpdate),Mt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Nn.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in li){const n=li[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<vc.length;r++){const o=vc[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,l=t[i];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=hO(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),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}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Rn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(fg(r)||hg(r))?r=parseFloat(r):!cO(r)&&kt.test(n)&&(r=ev(t,n)),this.setBaseTarget(t,_e(r)?r.get():r)),_e(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const l=Kl(this.props,r,(n=this.presenceContext)==null?void 0:n.custom);l&&(o=l[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!_e(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new jl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Xl.render(this.render)}}class uv extends gO{constructor(){super(...arguments),this.KeyframeResolver=JR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_e(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(t){this.isMounted=!1,this.node=t}update(){}}function cv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yO(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 Ps(e){return e===void 0||e===1}function _a({scale:e,scaleX:t,scaleY:n}){return!Ps(e)||!Ps(t)||!Ps(n)}function Kt(e){return _a(e)||dv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dv(e){return yc(e.x)||yc(e.y)}function yc(e){return e&&e!=="0%"}function ui(e,t,n){const r=e-n,o=t*r;return n+o}function bc(e,t,n,r,o){return o!==void 0&&(e=ui(e,o,r)),ui(e,n,r)+t}function Ta(e,t=0,n=1,r,o){e.min=bc(e.min,t,n,r,o),e.max=bc(e.max,t,n,r,o)}function fv(e,{x:t,y:n}){Ta(e.x,t.translate,t.scale,t.originPoint),Ta(e.y,n.translate,n.scale,n.originPoint)}const wc=.999999999999,xc=1.0000000000001;function bO(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,l;for(let u=0;u<o;u++){i=n[u],l=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&gn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,fv(e,l)),r&&Kt(i.latestValues)&&gn(e,i.latestValues))}t.x<xc&&t.x>wc&&(t.x=1),t.y<xc&&t.y>wc&&(t.y=1)}function mn(e,t){e.min=e.min+t,e.max=e.max+t}function Ec(e,t,n,r,o=.5){const i=be(e.min,e.max,o);Ta(e,t,n,i,r)}function gn(e,t){Ec(e.x,t.x,t.scaleX,t.scale,t.originX),Ec(e.y,t.y,t.scaleY,t.scale,t.originY)}function pv(e,t){return cv(yO(e.getBoundingClientRect(),t))}function wO(e,t,n){const r=pv(e,n),{scroll:o}=t;return o&&(mn(r.x,o.offset.x),mn(r.y,o.offset.y)),r}const xO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},EO=Ln.length;function SO(e,t,n){let r="",o=!0;for(let i=0;i<EO;i++){const l=Ln[i],u=e[l];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(l.startsWith("scale")?1:0);else{const a=parseFloat(u);c=l.startsWith("scale")?a===1:a===0}if(!c||n){const a=tv(u,Gl[l]);if(!c){o=!1;const s=xO[l]||l;r+=`${s}(${a}) `}n&&(t[l]=a)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Jl(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let l=!1,u=!1;for(const c in t){const a=t[c];if(Nn.has(c)){l=!0;continue}else if(_g(c)){o[c]=a;continue}else{const s=tv(a,Gl[c]);c.startsWith("origin")?(u=!0,i[c]=s):r[c]=s}}if(t.transform||(l||n?r.transform=SO(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:a="50%",originZ:s=0}=i;r.transformOrigin=`${c} ${a} ${s}`}}function hv(e,{style:t,vars:n},r,o){const i=e.style;let l;for(l in t)i[l]=t[l];o==null||o.applyProjectionStyles(i,r);for(l in n)i.setProperty(l,n[l])}function Sc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Bn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=Sc(e,t.target.x),r=Sc(e,t.target.y);return`${n}% ${r}%`}},CO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=kt.parse(e);if(o.length>5)return r;const i=kt.createTransformer(e),l=typeof o[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;o[0+l]/=u,o[1+l]/=c;const a=be(u,c,.5);return typeof o[2+l]=="number"&&(o[2+l]/=a),typeof o[3+l]=="number"&&(o[3+l]/=a),i(o)}},ja={borderRadius:{...Bn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bn,borderTopRightRadius:Bn,borderBottomLeftRadius:Bn,borderBottomRightRadius:Bn,boxShadow:CO};function mv(e,{layout:t,layoutId:n}){return Nn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ja[e]||e==="opacity")}function Ql(e,t,n){var r;const o=e.style,i=t==null?void 0:t.style,l={};if(!o)return l;for(const u in o)(_e(o[u])||i&&_e(i[u])||mv(u,e)||((r=n==null?void 0:n.getValue(u))==null?void 0:r.liveStyle)!==void 0)&&(l[u]=o[u]);return l}function PO(e){return window.getComputedStyle(e)}class RO extends uv{constructor(){super(...arguments),this.type="html",this.renderInstance=hv}readValueFromInstance(t,n){var r;if(Nn.has(n))return(r=this.projection)!=null&&r.isProjecting?ga(n):JP(t,n);{const o=PO(t),i=(_g(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pv(t,n)}build(t,n,r){Jl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ql(t,n,r)}}const OO={offset:"stroke-dashoffset",array:"stroke-dasharray"},_O={offset:"strokeDashoffset",array:"strokeDasharray"};function TO(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?OO:_O;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const jO=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function gv(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:l=0,...u},c,a,s){if(Jl(e,u,a),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(s==null?void 0:s.transformBox)??"fill-box",delete d.transformBox);for(const p of jO)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&TO(d,o,i,l,!1)}const vv=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"]),yv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function MO(e,t,n,r){hv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(vv.has(o)?o:Wl(o),t.attrs[o])}function bv(e,t,n){const r=Ql(e,t,n);for(const o in e)if(_e(e[o])||_e(t[o])){const i=Ln.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class kO extends uv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nn.has(n)){const r=Qg(n);return r&&r.default||0}return n=vv.has(n)?n:Wl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bv(t,n,r)}build(t,n,r){gv(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){MO(t,n,r,o)}mount(t){this.isSVGTag=yv(t.tagName),super.mount(t)}}const AO=Zl.length;function wv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AO;n++){const r=Zl[n],o=e.props[r];(fr(o)||o===!1)&&(t[r]=o)}return t}function xv(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}const DO=[...ql].reverse(),LO=ql.length;function NO(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zR(e,n,r)))}function IO(e){let t=NO(e),n=Cc(),r=!0;const o=c=>(a,s)=>{var d;const f=xn(e,s,c==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...h}=f;a={...a,...h,...m}}return a};function i(c){t=c(e)}function l(c){const{props:a}=e,s=wv(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let g=0;g<LO;g++){const y=DO[g],b=n[y],x=a[y]!==void 0?a[y]:s[y],E=fr(x),S=y===c?b.isActive:null;S===!1&&(m=g);let _=x===s[y]&&x!==a[y]&&E;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),b.protectedKeys={...p},!b.isActive&&S===null||!x&&!b.prevProp||Gi(x)||typeof x=="boolean")continue;const j=FO(b.prevProp,x);let M=j||y===c&&b.isActive&&!_&&E||g>m&&E,O=!1;const R=Array.isArray(x)?x:[x];let A=R.reduce(o(y),{});S===!1&&(A={});const{prevResolvedValues:T={}}=b,V={...T,...A},N=B=>{M=!0,f.has(B)&&(O=!0,f.delete(B)),b.needsAnimating[B]=!0;const W=e.getValue(B);W&&(W.liveStyle=!1)};for(const B in V){const W=A[B],z=T[B];if(p.hasOwnProperty(B))continue;let D=!1;Ea(W)&&Ea(z)?D=!xv(W,z):D=W!==z,D?W!=null?N(B):f.add(B):W!==void 0&&f.has(B)?N(B):b.protectedKeys[B]=!0}b.prevProp=x,b.prevResolvedValues=A,b.isActive&&(p={...p,...A}),r&&e.blockInitialAnimation&&(M=!1);const U=_&&j;M&&(!U||O)&&d.push(...R.map(B=>{const W={type:y};if(typeof B=="string"&&r&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,D=xn(z,B);if(z.enteringChildren&&D){const{delayChildren:k}=D.transition||{};W.delay=Kg(z.enteringChildren,e,k)}}return{animation:B,options:W}}))}if(f.size){const g={};if(typeof a.initial!="boolean"){const y=xn(e,Array.isArray(a.initial)?a.initial[0]:a.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),g[y]=b??null}),d.push({animation:g})}let h=!!d.length;return r&&(a.initial===!1||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(d):Promise.resolve()}function u(c,a){var s;if(n[c].isActive===a)return Promise.resolve();(s=e.variantChildren)==null||s.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,a)}),n[c].isActive=a;const d=l(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:l,setActive:u,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Cc()}}}function FO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xv(t,e):!1}function zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cc(){return{animate:zt(!0),whileInView:zt(),whileHover:zt(),whileTap:zt(),whileDrag:zt(),whileFocus:zt(),exit:zt()}}function Pc(e,t){e.min=t.min,e.max=t.max}function Xe(e,t){Pc(e.x,t.x),Pc(e.y,t.y)}function Rc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ev=1e-4,VO=1-Ev,$O=1+Ev,Sv=.01,BO=0-Sv,zO=0+Sv;function Ae(e){return e.max-e.min}function UO(e,t,n){return Math.abs(e-t)<=n}function Oc(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=Ae(n)/Ae(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VO&&e.scale<=$O||isNaN(e.scale))&&(e.scale=1),(e.translate>=BO&&e.translate<=zO||isNaN(e.translate))&&(e.translate=0)}function nr(e,t,n,r){Oc(e.x,t.x,n.x,r?r.originX:void 0),Oc(e.y,t.y,n.y,r?r.originY:void 0)}function _c(e,t,n){e.min=n.min+t.min,e.max=e.min+Ae(t)}function HO(e,t,n){_c(e.x,t.x,n.x),_c(e.y,t.y,n.y)}function Tc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ae(t)}function ci(e,t,n){Tc(e.x,t.x,n.x),Tc(e.y,t.y,n.y)}function jc(e,t,n,r,o){return e-=t,e=ui(e,1/n,r),o!==void 0&&(e=ui(e,1/o,r)),e}function KO(e,t=0,n=1,r=.5,o,i=e,l=e){if(lt.test(t)&&(t=parseFloat(t),t=be(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=be(i.min,i.max,r);e===i&&(u-=t),e.min=jc(e.min,t,n,u,o),e.max=jc(e.max,t,n,u,o)}function Mc(e,t,[n,r,o],i,l){KO(e,t[n],t[r],t[o],t.scale,i,l)}const WO=["x","scaleX","originX"],GO=["y","scaleY","originY"];function kc(e,t,n,r){Mc(e.x,t,WO,n?n.x:void 0,r?r.x:void 0),Mc(e.y,t,GO,n?n.y:void 0,r?r.y:void 0)}function Ac(e){return e.translate===0&&e.scale===1}function Cv(e){return Ac(e.x)&&Ac(e.y)}function Dc(e,t){return e.min===t.min&&e.max===t.max}function XO(e,t){return Dc(e.x,t.x)&&Dc(e.y,t.y)}function Lc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pv(e,t){return Lc(e.x,t.x)&&Lc(e.y,t.y)}function Nc(e){return Ae(e.x)/Ae(e.y)}function Ic(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function He(e){return[e("x"),e("y")]}function YO(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((o||i||l)&&(r=`translate3d(${o}px, ${i}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:a,rotate:s,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;a&&(r=`perspective(${a}px) ${r}`),s&&(r+=`rotate(${s}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const Rv=["TopLeft","TopRight","BottomLeft","BottomRight"],qO=Rv.length,Fc=e=>typeof e=="string"?parseFloat(e):e,Vc=e=>typeof e=="number"||Y.test(e);function ZO(e,t,n,r,o,i){o?(e.opacity=be(0,n.opacity??1,JO(r)),e.opacityExit=be(t.opacity??1,0,QO(r))):i&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let l=0;l<qO;l++){const u=`border${Rv[l]}Radius`;let c=$c(t,u),a=$c(n,u);c===void 0&&a===void 0||(c||(c=0),a||(a=0),c===0||a===0||Vc(c)===Vc(a)?(e[u]=Math.max(be(Fc(c),Fc(a),r),0),(lt.test(a)||lt.test(c))&&(e[u]+="%")):e[u]=a)}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function $c(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JO=Ov(0,.5,Eg),QO=Ov(.5,.95,Ge);function Ov(e,t,n){return r=>r<e?0:r>t?1:n(ur(e,t,r))}function e_(e,t,n){const r=_e(e)?e:Rn(e);return r.start(Hl("",r,t,n)),r.animation}function pr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const t_=(e,t)=>e.depth-t.depth;class n_{constructor(){this.children=[],this.isDirty=!1}add(t){Ol(this.children,t),this.isDirty=!0}remove(t){_l(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(t_),this.isDirty=!1,this.children.forEach(t)}}function r_(e,t){const n=ke.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Mt(r),e(i-t))};return he.setup(r,!0),()=>Mt(r)}function Ho(e){return _e(e)?e.get():e}class o_{constructor(){this.members=[]}add(t){Ol(this.members,t),t.scheduleRender()}remove(t){if(_l(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;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();const o=r.options.layoutDependency,i=t.options.layoutDependency;o!==void 0&&i!==void 0&&o===i||(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:l}=t.options;l===!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)}}const Ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rs=["","X","Y","Z"],i_=1e3;let s_=0;function Os(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function _v(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Yg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&_v(r)}function Tv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},l=t==null?void 0:t()){this.id=s_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(u_),this.nodes.forEach(p_),this.nodes.forEach(h_),this.nodes.forEach(c_)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new n_)}addEventListener(i,l){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new jl),this.eventHandlers.get(i).add(l)}notifyListeners(i,...l){const u=this.eventHandlers.get(i);u&&u.notify(...l)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=iv(i)&&!lO(i),this.instance=i;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let a,s=0;const d=()=>this.root.updateBlockedByResize=!1;he.read(()=>{s=window.innerWidth}),e(i,()=>{const f=window.innerWidth;f!==s&&(s=f,this.root.updateBlockedByResize=!0,a&&a(),a=r_(d,250),Ko.hasAnimatedSinceResize&&(Ko.hasAnimatedSinceResize=!1,this.nodes.forEach(Uc)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:a,hasLayoutChanged:s,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||b_,{onLayoutAnimationStart:m,onLayoutAnimationComplete:h}=c.getProps(),g=!this.targetLayout||!Pv(this.targetLayout,f),y=!s&&d;if(this.options.layoutRoot||this.resumeFrom||y||s&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Ul(p,"layout"),onPlay:m,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(a,y)}else s||Uc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Mt(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(m_),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_v(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const s=this.path[a];s.shouldResetTransform=!0,s.updateScroll("snapshot"),s.options.layoutRoot&&s.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(f_),this.nodes.forEach(a_),this.nodes.forEach(l_)):this.nodes.forEach(zc),this.clearAllSnapshots();const i=ke.now();Re.delta=ct(0,1e3/60,i-Re.timestamp),Re.timestamp=i,Re.isProcessing=!0,ys.update.process(Re),ys.preRender.process(Re),ys.render.process(Re),Re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(d_),this.sharedNodes.forEach(g_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ae(this.snapshot.measuredBox.x)&&!Ae(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Cv(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,a=c!==this.prevTransformTemplateValue;i&&this.instance&&(l||Kt(this.latestValues)||a)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return i&&(u=this.removeTransform(u)),w_(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:l}=this.options;if(!l)return Pe();const u=l.measureViewportBox();if(!((i=this.scroll)!=null&&i.wasRoot||this.path.some(x_))){const{scroll:c}=this.root;c&&(mn(u.x,c.offset.x),mn(u.y,c.offset.y))}return u}removeElementScroll(i){var l;const u=Pe();if(Xe(u,i),(l=this.scroll)!=null&&l.wasRoot)return u;for(let c=0;c<this.path.length;c++){const a=this.path[c],{scroll:s,options:d}=a;a!==this.root&&s&&d.layoutScroll&&(s.wasRoot&&Xe(u,i),mn(u.x,s.offset.x),mn(u.y,s.offset.y))}return u}applyTransform(i,l=!1){const u=Pe();Xe(u,i);for(let c=0;c<this.path.length;c++){const a=this.path[c];!l&&a.options.layoutScroll&&a.scroll&&a!==a.root&&gn(u,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),Kt(a.latestValues)&&gn(u,a.latestValues)}return Kt(this.latestValues)&&gn(u,this.latestValues),u}removeTransform(i){const l=Pe();Xe(l,i);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!c.instance||!Kt(c.latestValues))continue;_a(c.latestValues)&&c.updateSnapshot();const a=Pe(),s=c.measurePageBox();Xe(a,s),kc(l,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,a)}return Kt(this.latestValues)&&kc(l,this.latestValues),l}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==Re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var l;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(l=this.parent)!=null&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:s}=this.options;if(!this.layout||!(a||s))return;this.resolvedRelativeTargetAt=Re.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xe(this.target,this.layout.layoutBox),fv(this.target,this.targetDelta)):Xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||_a(this.parent.latestValues)||dv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,l,u){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),ci(this.relativeTargetOrigin,l,u),Xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var i;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let c=!0;if((this.isProjectionDirty||(i=this.parent)!=null&&i.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Re.timestamp&&(c=!1),c)return;const{layout:a,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||s))return;Xe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;bO(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Pe());const{target:p}=l;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rc(this.prevProjectionDelta.x,this.projectionDelta.x),Rc(this.prevProjectionDelta.y,this.projectionDelta.y)),nr(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ic(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ic(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),i){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hn(),this.projectionDelta=hn(),this.projectionDeltaWithTransform=hn()}setAnimationOrigin(i,l=!1){const u=this.snapshot,c=u?u.latestValues:{},a={...this.latestValues},s=hn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const d=Pe(),f=u?u.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,h=this.getStack(),g=!h||h.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(y_));this.animationProgress=0;let b;this.mixTargetDelta=x=>{const E=x/1e3;Hc(s.x,i.x,E),Hc(s.y,i.y,E),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ci(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),v_(this.relativeTarget,this.relativeTargetOrigin,d,E),b&&XO(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Pe()),Xe(b,this.relativeTarget)),m&&(this.animationValues=a,ZO(a,c,this.latestValues,E,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var l,u,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{Ko.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rn(0)),this.currentAnimation=e_(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(i_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:l,target:u,layout:c,latestValues:a}=i;if(!(!l||!u||!c)){if(this!==i&&this.layout&&c&&jv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||Pe();const s=Ae(this.layout.layoutBox.x);u.x.min=i.target.x.min,u.x.max=u.x.min+s;const d=Ae(this.layout.layoutBox.y);u.y.min=i.target.y.min,u.y.max=u.y.min+d}Xe(l,u),gn(l,a),nr(this.projectionDeltaWithTransform,this.layoutCorrected,l,a)}}registerSharedNode(i,l){this.sharedNodes.has(i)||this.sharedNodes.set(i,new o_),this.sharedNodes.get(i).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:l}=this.options;return l?((i=this.getStack())==null?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:l}=this.options;return l?(i=this.getStack())==null?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:l,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),i&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let l=!1;const{latestValues:u}=i;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const c={};u.z&&Os("z",i,c,this.animationValues);for(let a=0;a<Rs.length;a++)Os(`rotate${Rs[a]}`,i,c,this.animationValues),Os(`skew${Rs[a]}`,i,c,this.animationValues);i.render();for(const a in c)i.setStaticValue(a,c[a]),this.animationValues&&(this.animationValues[a]=c[a]);i.scheduleRender()}applyProjectionStyles(i,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Ho(l==null?void 0:l.pointerEvents)||"",i.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ho(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Kt(this.latestValues)&&(i.transform=u?u({},""):"none",this.hasProjected=!1);return}i.visibility="";const a=c.animationValues||c.latestValues;this.applyTransformsToTarget();let s=YO(this.projectionDeltaWithTransform,this.treeScale,a);u&&(s=u(a,s)),i.transform=s;const{x:d,y:f}=this.projectionDelta;i.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?i.opacity=c===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:i.opacity=c===this?a.opacity!==void 0?a.opacity:"":a.opacityExit!==void 0?a.opacityExit:0;for(const p in ja){if(a[p]===void 0)continue;const{correct:m,applyTo:h,isCSSVariable:g}=ja[p],y=s==="none"?a[p]:m(a[p],c);if(h){const b=h.length;for(let x=0;x<b;x++)i[h[x]]=y}else g?this.options.visualElement.renderState.vars[p]=y:i[p]=y}this.options.layoutId&&(i.pointerEvents=c===this?Ho(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var l;return(l=i.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Bc),this.root.sharedNodes.clear()}}}function a_(e){e.updateLayout()}function l_(e){var t;const n=((t=e.resumeFrom)==null?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,l=n.source!==e.layout.source;i==="size"?He(d=>{const f=l?n.measuredBox[d]:n.layoutBox[d],p=Ae(f);f.min=r[d].min,f.max=f.min+p}):jv(i,n.layoutBox,r)&&He(d=>{const f=l?n.measuredBox[d]:n.layoutBox[d],p=Ae(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const u=hn();nr(u,r,n.layoutBox);const c=hn();l?nr(c,e.applyTransform(o,!0),n.measuredBox):nr(c,r,n.layoutBox);const a=!Cv(u);let s=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Pe();ci(m,n.layoutBox,f.layoutBox);const h=Pe();ci(h,r,p.layoutBox),Pv(m,h)||(s=!0),d.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:u,hasLayoutChanged:a,hasRelativeLayoutChanged:s})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function u_(e){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 c_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function d_(e){e.clearSnapshot()}function Bc(e){e.clearMeasurements()}function zc(e){e.isLayoutDirty=!1}function f_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Uc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p_(e){e.resolveTargetDelta()}function h_(e){e.calcProjection()}function m_(e){e.resetSkewAndRotation()}function g_(e){e.removeLeadSnapshot()}function Hc(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Kc(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function v_(e,t,n,r){Kc(e.x,t.x,n.x,r),Kc(e.y,t.y,n.y,r)}function y_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const b_={duration:.45,ease:[.4,0,.1,1]},Wc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gc=Wc("applewebkit/")&&!Wc("chrome/")?Math.round:Ge;function Xc(e){e.min=Gc(e.min),e.max=Gc(e.max)}function w_(e){Xc(e.x),Xc(e.y)}function jv(e,t,n){return e==="position"||e==="preserve-aspect"&&!UO(Nc(t),Nc(n),.2)}function x_(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const E_=Tv({attachResizeListener:(e,t)=>pr(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),_s={current:void 0},Mv=Tv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_s.current){const e=new E_({});e.mount(window),e.setOptions({layoutScroll:!0}),_s.current=e}return _s.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),eu=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Yc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function S_(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Yc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Yc(e[o],null)}}}}function C_(...e){return v.useCallback(S_(...e),e)}class P_ extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=Ra(r)&&r.offsetWidth||0,i=Ra(r)&&r.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left,l.bottom=i-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function R_({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){var i;const l=P.useId(),u=P.useRef(null),c=P.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:a}=P.useContext(eu),s=((i=e.props)==null?void 0:i.ref)??(e==null?void 0:e.ref),d=C_(u,s);return P.useInsertionEffect(()=>{const{width:f,height:p,top:m,left:h,right:g,bottom:y}=c.current;if(t||!u.current||!f||!p)return;const b=n==="left"?`left: ${h}`:`right: ${g}`,x=r==="bottom"?`bottom: ${y}`:`top: ${m}`;u.current.dataset.motionPopId=l;const E=document.createElement("style");a&&(E.nonce=a);const S=o??document.head;return S.appendChild(E),E.sheet&&E.sheet.insertRule(`
|
|
97
|
-
[data-motion-pop-id="${l}"] {
|
|
98
|
-
position: absolute !important;
|
|
99
|
-
width: ${f}px !important;
|
|
100
|
-
height: ${p}px !important;
|
|
101
|
-
${b}px !important;
|
|
102
|
-
${x}px !important;
|
|
103
|
-
}
|
|
104
|
-
`),()=>{S.contains(E)&&S.removeChild(E)}},[t]),w.jsx(P_,{isPresent:t,childRef:u,sizeRef:c,children:v.cloneElement(e,{ref:d})})}const O_=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:l,anchorX:u,anchorY:c,root:a})=>{const s=Rl(__),d=P.useId();let f=!0,p=P.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:m=>{s.set(m,!0);for(const h of s.values())if(!h)return;r&&r()},register:m=>(s.set(m,!1),()=>s.delete(m))}),[n,s,r]);return i&&f&&(p={...p}),P.useMemo(()=>{s.forEach((m,h)=>s.set(h,!1))},[n]),v.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),l==="popLayout"&&(e=w.jsx(R_,{isPresent:n,anchorX:u,anchorY:c,root:a,children:e})),w.jsx(Wi.Provider,{value:p,children:e})};function __(){return new Map}function kv(e=!0){const t=P.useContext(Wi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=P.useId();P.useEffect(()=>{if(e)return o(i)},[e]);const l=P.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,l]:[!0]}const Zr=e=>e.key||"";function qc(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const T_=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:l=!1,anchorX:u="left",anchorY:c="top",root:a})=>{const[s,d]=kv(l),f=P.useMemo(()=>qc(e),[e]),p=l&&!s?[]:f.map(Zr),m=P.useRef(!0),h=P.useRef(f),g=Rl(()=>new Map),y=P.useRef(new Set),[b,x]=P.useState(f),[E,S]=P.useState(f);dg(()=>{m.current=!1,h.current=f;for(let M=0;M<E.length;M++){const O=Zr(E[M]);p.includes(O)?(g.delete(O),y.current.delete(O)):g.get(O)!==!0&&g.set(O,!1)}},[E,p.length,p.join("-")]);const _=[];if(f!==b){let M=[...f];for(let O=0;O<E.length;O++){const R=E[O],A=Zr(R);p.includes(A)||(M.splice(O,0,R),_.push(R))}return i==="wait"&&_.length&&(M=_),S(qc(M)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:j}=P.useContext(Pl);return w.jsx(w.Fragment,{children:E.map(M=>{const O=Zr(M),R=l&&!s?!1:f===E||p.includes(O),A=()=>{if(y.current.has(O))return;if(y.current.add(O),g.has(O))g.set(O,!0);else return;let T=!0;g.forEach(V=>{V||(T=!1)}),T&&(j==null||j(),S(h.current),l&&(d==null||d()),r&&r())};return w.jsx(O_,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:a,onExitComplete:R?void 0:A,anchorX:u,anchorY:c,children:M},O)})})},Av=P.createContext({strict:!1}),Zc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Jc=!1;function j_(){if(Jc)return;const e={};for(const t in Zc)e[t]={isEnabled:n=>Zc[t].some(r=>!!n[r])};lv(e),Jc=!0}function Dv(){return j_(),mO()}function M_(e){const t=Dv();for(const n in e)t[n]={...t[n],...e[n]};lv(t)}const k_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function di(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||k_.has(e)}let Lv=e=>!di(e);function A_(e){typeof e=="function"&&(Lv=t=>t.startsWith("on")?!di(t):e(t))}try{A_(require("@emotion/is-prop-valid").default)}catch{}function D_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Lv(o)||n===!0&&di(o)||!t&&!di(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Yi=P.createContext({});function L_(e,t){if(Xi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fr(n)?n:void 0,animate:fr(r)?r:void 0}}return e.inherit!==!1?t:{}}function N_(e){const{initial:t,animate:n}=L_(e,P.useContext(Yi));return P.useMemo(()=>({initial:t,animate:n}),[Qc(t),Qc(n)])}function Qc(e){return Array.isArray(e)?e.join(" "):e}const tu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Nv(e,t,n){for(const r in t)!_e(t[r])&&!mv(r,n)&&(e[r]=t[r])}function I_({transformTemplate:e},t){return P.useMemo(()=>{const n=tu();return Jl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function F_(e,t){const n=e.style||{},r={};return Nv(r,n,e),Object.assign(r,I_(e,t)),r}function V_(e,t){const n={},r=F_(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Iv=()=>({...tu(),attrs:{}});function $_(e,t,n,r){const o=P.useMemo(()=>{const i=Iv();return gv(i,t,yv(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Nv(i,e.style,e),o.style={...i,...o.style}}return o}const B_=["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 nu(e){return typeof e!="string"||e.includes("-")?!1:!!(B_.indexOf(e)>-1||/[A-Z]/u.test(e))}function z_(e,t,n,{latestValues:r},o,i=!1,l){const u=(l??nu(e)?$_:V_)(t,r,o,e),c=D_(t,typeof e=="string",i),a=e!==P.Fragment?{...c,...u,ref:n}:{},{children:s}=t,d=P.useMemo(()=>_e(s)?s.get():s,[s]);return P.createElement(e,{...a,children:d})}function U_({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:H_(n,r,o,e),renderState:t()}}function H_(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ho(i[f]);let{initial:l,animate:u}=e;const c=Xi(e),a=av(e);t&&a&&!c&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let s=n?n.initial===!1:!1;s=s||l===!1;const d=s?u:l;if(d&&typeof d!="boolean"&&!Gi(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=Kl(e,f[p]);if(m){const{transitionEnd:h,transition:g,...y}=m;for(const b in y){let x=y[b];if(Array.isArray(x)){const E=s?x.length-1:0;x=x[E]}x!==null&&(o[b]=x)}for(const b in h)o[b]=h[b]}}}return o}const Fv=e=>(t,n)=>{const r=P.useContext(Yi),o=P.useContext(Wi),i=()=>U_(e,t,r,o);return n?i():Rl(i)},K_=Fv({scrapeMotionValuesFromProps:Ql,createRenderState:tu}),W_=Fv({scrapeMotionValuesFromProps:bv,createRenderState:Iv}),G_=Symbol.for("motionComponentSymbol");function X_(e,t,n){const r=P.useRef(n);P.useInsertionEffect(()=>{r.current=n});const o=P.useRef(null);return P.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i)),t&&(i?t.mount(i):t.unmount());const u=r.current;if(typeof u=="function")if(i){const c=u(i);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):u(i);else u&&(u.current=i)},[t])}const Vv=P.createContext({});function er(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Y_(e,t,n,r,o,i){var l,u;const{visualElement:c}=P.useContext(Yi),a=P.useContext(Av),s=P.useContext(Wi),d=P.useContext(eu),f=d.reducedMotion,p=d.skipAnimations,m=P.useRef(null),h=P.useRef(!1);r=r||a.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:c,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:f,skipAnimations:p,isSVG:i}),h.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const g=m.current,y=P.useContext(Vv);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&q_(m.current,n,o,y);const b=P.useRef(!1);P.useInsertionEffect(()=>{g&&b.current&&g.update(n,s)});const x=n[Xg],E=P.useRef(!!x&&!((l=window.MotionHandoffIsComplete)!=null&&l.call(window,x))&&((u=window.MotionHasOptimisedAnimation)==null?void 0:u.call(window,x)));return dg(()=>{h.current=!0,g&&(b.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),E.current&&g.animationState&&g.animationState.animateChanges())}),P.useEffect(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,x)}),E.current=!1),g.enteringChildren=void 0)}),g}function q_(e,t,n,r){const{layoutId:o,layout:i,drag:l,dragConstraints:u,layoutScroll:c,layoutRoot:a,layoutCrossfade:s}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$v(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!l||u&&er(u),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:s,layoutScroll:c,layoutRoot:a})}function $v(e){if(e)return e.options.allowProjection!==!1?e.projection:$v(e.parent)}function Ts(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&M_(r);const i=n?n==="svg":nu(e),l=i?W_:K_;function u(a,s){let d;const f={...P.useContext(eu),...a,layoutId:Z_(a)},{isStatic:p}=f,m=N_(a),h=l(a,p);if(!p&&cg){J_(f,r);const g=Q_(f);d=g.MeasureLayout,m.visualElement=Y_(e,h,f,o,g.ProjectionNode,i)}return w.jsxs(Yi.Provider,{value:m,children:[d&&m.visualElement?w.jsx(d,{visualElement:m.visualElement,...f}):null,z_(e,a,X_(h,m.visualElement,s),h,p,t,i)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=P.forwardRef(u);return c[G_]=e,c}function Z_({layoutId:e}){const t=P.useContext(Pl).id;return t&&e!==void 0?t+"-"+e:e}function J_(e,t){const n=P.useContext(Av).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?An(!1,r,"lazy-strict-mode"):yt(!1,r,"lazy-strict-mode")}}function Q_(e){const t=Dv(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function eT(e,t){if(typeof Proxy>"u")return Ts;const n=new Map,r=(i,l)=>Ts(i,l,e,t),o=(i,l)=>(process.env.NODE_ENV!=="production"&&Ml(!1,"motion() is deprecated. Use motion.create() instead."),r(i,l));return new Proxy(o,{get:(i,l)=>l==="create"?r:(n.has(l)||n.set(l,Ts(l,void 0,e,t)),n.get(l))})}const tT=(e,t)=>t.isSVG??nu(e)?new kO(t):new RO(t,{allowProjection:e!==P.Fragment});class nT extends Ft{constructor(t){super(t),t.animationState||(t.animationState=IO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let rT=0;class oT extends Ft{constructor(){super(...arguments),this.id=rT++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const iT={animation:{Feature:nT},exit:{Feature:oT}};function Mr(e){return{point:{x:e.pageX,y:e.pageY}}}const sT=e=>t=>Yl(t)&&e(t,Mr(t));function rr(e,t,n,r){return pr(e,t,sT(n),r)}const Bv=({current:e})=>e?e.ownerDocument.defaultView:null,ed=(e,t)=>Math.abs(e-t);function aT(e,t){const n=ed(e.x,t.x),r=ed(e.y,t.y);return Math.sqrt(n**2+r**2)}const td=new Set(["auto","scroll"]);class zv{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:l=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ms(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=aT(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!h)return;const{point:g}=p,{timestamp:y}=Re;this.history.push({...g,timestamp:y});const{onStart:b,onMove:x}=this.handlers;m||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=js(m,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Ms(p.type==="pointercancel"?this.lastMoveEventInfo:js(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,b),g&&g(p,b)},!Yl(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const c=Mr(t),a=js(c,this.transformPagePoint),{point:s}=a,{timestamp:d}=Re;this.history=[{...s,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Ms(a,this.history)),this.removeListeners=_r(rr(this.contextWindow,"pointermove",this.handlePointerMove),rr(this.contextWindow,"pointerup",this.handlePointerUp),rr(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(td.has(r.overflowX)||td.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),he.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Mt(this.updatePoint)}}function js(e,t){return t?{point:t(e.point)}:e}function nd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ms({point:e},t){return{point:e,delta:nd(e,Uv(t)),offset:nd(e,lT(t)),velocity:uT(t,.1)}}function lT(e){return e[0]}function Uv(e){return e[e.length-1]}function uT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Uv(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>at(t)));)n--;if(!r)return{x:0,y:0};const i=Ke(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const l={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function cT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function rd(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 dT(e,{top:t,left:n,bottom:r,right:o}){return{x:rd(e.x,n,o),y:rd(e.y,t,r)}}function od(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 fT(e,t){return{x:od(e.x,t.x),y:od(e.y,t.y)}}function pT(e,t){let n=.5;const r=Ae(e),o=Ae(t);return o>r?n=ur(t.min,t.max-r,e.min):r>o&&(n=ur(e.min,e.max-o,t.min)),ct(0,1,n)}function hT(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 Ma=.35;function mT(e=Ma){return e===!1?e=0:e===!0&&(e=Ma),{x:id(e,"left","right"),y:id(e,"top","bottom")}}function id(e,t,n){return{min:sd(e,t),max:sd(e,n)}}function sd(e,t){return typeof e=="number"?e:e[t]||0}const gT=new WeakMap;class vT{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(Mr(d).point)):this.pauseAnimation()},l=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:m,onDragStart:h}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eO(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),He(y=>{let b=this.getAxisMotionValue(y).get()||0;if(lt.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[y];E&&(b=Ae(E)*(parseFloat(b)/100))}}this.originPoint[y]=b}),h&&he.update(()=>h(d,f),!1,!0),Sa(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},u=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=yT(y),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&he.update(()=>g(d,f),!1,!0)},c=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},a=()=>He(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:s}=this.getProps();this.panSession=new zv(t,{onSessionStart:i,onStart:l,onMove:u,onSessionEnd:c,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:r,contextWindow:Bv(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&he.postRender(()=>u(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Jr(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=cT(l,this.constraints[t],this.elastic[t])),i.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)==null?void 0:t.layout,i=this.constraints;n&&er(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=dT(o.layoutBox,n):this.constraints=!1,this.elastic=mT(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&He(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=hT(o.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!er(t))return!1;const r=t.current;yt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=wO(r,o.root,this.visualElement.getTransformPagePoint());let l=fT(o.layout.layoutBox,i);if(n){const u=n(vO(l));this.hasMutatedConstraints=!!u,u&&(l=cv(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},a=He(s=>{if(!Jr(s,n,this.currentDirection))return;let d=c&&c[s]||{};l&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[s]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(s,m)});return Promise.all(a).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Sa(this.visualElement,t),r.start(Hl(t,r,0,n,this.visualElement,!1))}stopAnimation(){He(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){He(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps();return r[n]||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){He(n=>{const{drag:r}=this.getProps();if(!Jr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:u}=o.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-be(l,u,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!er(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};He(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const c=u.get();o[l]=pT({min:c,max:c},this.constraints[l])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),He(l=>{if(!Jr(l,t,null))return;const u=this.getAxisMotionValue(l),{min:c,max:a}=this.constraints[l];u.set(be(c,a,o[l]))})}addListeners(){if(!this.visualElement.current)return;gT.set(this.visualElement,this);const t=this.visualElement.current,n=rr(t,"pointerdown",c=>{const{drag:a,dragListener:s=!0}=this.getProps(),d=c.target,f=d!==t&&iO(d);a&&s&&!f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();er(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),he.read(r);const l=pr(window,"resize",()=>this.scalePositionWithinConstraints()),u=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:a})=>{this.isDragging&&a&&(He(s=>{const d=this.getAxisMotionValue(s);d&&(this.originPoint[s]+=c[s].translate,d.set(d.get()+c[s].translate))}),this.visualElement.render())}));return()=>{l(),n(),i(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:l=Ma,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:l,dragMomentum:u}}}function Jr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bT extends Ft{constructor(t){super(t),this.removeGroupControls=Ge,this.removeListeners=Ge,this.controls=new vT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ge}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ks=e=>(t,n)=>{e&&he.update(()=>e(t,n),!1,!0)};class wT extends Ft{constructor(){super(...arguments),this.removePointerDownListener=Ge}onPointerDown(t){this.session=new zv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ks(t),onStart:ks(n),onMove:ks(r),onEnd:(i,l)=>{delete this.session,o&&he.postRender(()=>o(i,l))}}}mount(){this.removePointerDownListener=rr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let As=!1;class xT extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),As&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:l}=r;return l&&(l.isPresent=i,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),As=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?l.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?l.promote():l.relegate()||he.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Xl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;As=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hv(e){const[t,n]=kv(),r=P.useContext(Pl);return w.jsx(xT,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(Vv),isPresent:t,safeToRemove:n})}const ET={pan:{Feature:wT},drag:{Feature:bT,ProjectionNode:Mv,MeasureLayout:Hv}};function ad(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&he.postRender(()=>i(t,Mr(t)))}class ST extends Ft{mount(){const{current:t}=this.node;t&&(this.unmount=tO(t,(n,r)=>(ad(this.node,r,"Start"),o=>ad(this.node,o,"End"))))}unmount(){}}class CT extends Ft{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=_r(pr(this.node.current,"focus",()=>this.onFocus()),pr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ld(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&he.postRender(()=>i(t,Mr(t)))}class PT extends Ft{mount(){const{current:t}=this.node;t&&(this.unmount=aO(t,(n,r)=>(ld(this.node,r,"Start"),(o,{success:i})=>ld(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ka=new WeakMap,Ds=new WeakMap,RT=e=>{const t=ka.get(e.target);t&&t(e)},OT=e=>{e.forEach(RT)};function _T({root:e,...t}){const n=e||document;Ds.has(n)||Ds.set(n,{});const r=Ds.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(OT,{root:e,...t})),r[o]}function TT(e,t,n){const r=_T(t);return ka.set(e,n),r.observe(e),()=>{ka.delete(e),r.unobserve(e)}}const jT={some:0,all:1};class MT extends Ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:jT[o]},u=c=>{const{isIntersecting:a}=c;if(this.isInView===a||(this.isInView=a,i&&!a&&this.hasEnteredView))return;a&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",a);const{onViewportEnter:s,onViewportLeave:d}=this.node.getProps(),f=a?s:d;f&&f(c)};return TT(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kT(t,n))&&this.startObserver()}unmount(){}}function kT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const AT={inView:{Feature:MT},tap:{Feature:PT},focus:{Feature:CT},hover:{Feature:ST}},DT={layout:{ProjectionNode:Mv,MeasureLayout:Hv}},LT={...iT,...AT,...ET,...DT},kr=eT(LT,tT);P.forwardRef(({children:e,className:t,dividerClassName:n,showDivider:r=!0,...o},i)=>w.jsx(Qy,{...o,className:fe("overflow-hidden bg-white",t),ref:i,asChild:!0,children:w.jsxs(kr.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:[r&&w.jsx("hr",{className:fe("bg-primary-blue h-0.5 border-0",n)}),w.jsx("div",{className:"px-5 py-[15px]",children:e})]})}));const NT={sm:"size-8 text-[1.3rem]",md:"size-10 text-[1.4rem]",lg:"size-12 text-[2.1rem]",xl:"size-14 text-[2.5rem]"},IT=({size:e="md",src:t,alt:n="avatar",icon:r=w.jsx(vy,{}),bgClassName:o="bg-[#A1ADC0]",colorClassName:i="text-white",className:l="",onClick:u,style:c})=>w.jsxs(Sb,{className:fe("inline-flex shrink-0 overflow-hidden rounded-full",NT[e],l),onClick:u,style:c,children:[t&&w.jsx(Cb,{src:t,alt:n,className:"h-full w-full object-cover"}),w.jsx(Pb,{delayMs:0,className:fe("flex h-full w-full items-center justify-center rounded-full",i,o),children:r})]});fe("bg-primary-blue border-primary-blue text-white","hover:bg-darks-blue-Macropay-30 hover:border-darks-blue-Macropay-30"),fe("bg-primary-yellow border-primary-yellow text-primary-blue","hover:bg-shades-yellow-10 hover:border-shades-yellow-10"),fe("bg-white text-primary-blue border-primary-blue","hover:border-darks-blue-Macropay-30 hover:text-darks-blue-Macropay-30"),fe("bg-transparent text-primary-blue border-transparent shadow-none","hover:text-darks-blue-Macropay-30","disabled:bg-transparent disabled:border-transparent"),fe("bg-primary-red border-primary-red text-white","hover:bg-shades-red-10 hover:border-shades-red-10");const FT={sm:"h-4 w-4",md:"h-6 w-6"},VT={sm:"h-3 w-3",md:"h-4 w-4"},$T={sm:"h-2 w-2",md:"h-4 w-4"},BT={sm:"text-sm",md:"text-base"},zT=({size:e,disabled:t})=>({checked:w.jsx(gy,{className:fe(VT[e],t?"text-stone-300 fill-stone-300":"text-white")}),indeterminate:w.jsx(by,{className:fe($T[e],t?"text-stone-300 fill-stone-300":"text-blue-800")})}),UT=({size:e,disabled:t,children:n,checkboxId:r})=>n?w.jsx("label",{htmlFor:r,className:fe(BT[e],t&&"text-gray-400","cursor-pointer"),children:n}):null,HT=P.forwardRef(({size:e="md",checked:t,indeterminate:n=!1,disabled:r=!1,onCheckedChange:o,className:i,children:l,...u},c)=>{const a=P.useId(),s=n?"indeterminate":t?"checked":"none",d=f=>{r||o==null||o(f===!0)};return w.jsxs("div",{className:fe("flex gap-2 items-start sm:items-center select-none",r?"pointer-events-none":"cursor-pointer",i),children:[w.jsx($p,{id:a,ref:c,checked:t,"aria-checked":n?"mixed":t,disabled:r,onCheckedChange:d,className:fe("flex justify-center items-center rounded-sm border relative transition-[background-color] cursor-pointer",FT[e],{"bg-white border-gray-300 hover:border-blue-800":!t&&!r,"bg-blue-800 border-blue-800":t&&!n&&!r||n&&!r,"bg-neutral-100 border-stone-300":r}),...u,children:s!=="none"&&zT({size:e,disabled:r})[s]}),w.jsx(UT,{size:e,disabled:r,children:l,checkboxId:a})]})});HT.displayName="Checkbox";const KT=({children:e,id:t,className:n=""})=>{const r=P.useRef(null),[o,i]=P.useState(!1);return P.useEffect(()=>{const l=document.getElementById(t)||document.createElement("div");return r.current=l,r.current.id=t,n&&(r.current.className=n),document.body.appendChild(r.current),i(!0),()=>{r.current.parentElement&&r.current.parentElement.removeChild(r.current)}},[t]),o?Na.createPortal(e,r.current):null};P.memo(KT);const WT=P.forwardRef(({children:e,className:t,...n},r)=>w.jsx(bE,{className:fe("inline-flex items-center justify-center rounded px-4 py-2 text-sm font-medium","bg-white border border-gray-3 text-gray-12","hover:bg-gray-1 focus:outline-none focus:ring-2 focus:ring-primary-blue focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-colors",t),ref:r,...n,children:e})),GT=P.forwardRef(({children:e,className:t,...n},r)=>w.jsx(wE,{children:w.jsx(xE,{...n,className:fe("min-w-[220px] rounded-lg bg-white shadow-(--box-shadow-accordion) border border-gray-2","overflow-hidden",t),ref:r,asChild:!0,children:w.jsx(kr.div,{initial:{opacity:0,scale:.95,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10},transition:{duration:.2,ease:[.04,.62,.23,.98]},children:w.jsx("div",{className:"p-1",children:e})})})})),XT=P.forwardRef(({children:e,className:t,icon:n,shortcut:r,...o},i)=>w.jsxs(SE,{className:fe("group relative flex cursor-pointer select-none items-center justify-between rounded px-3 py-2 text-sm outline-none","text-gray-12 hover:bg-blue-1 hover:text-blue-6","focus:bg-blue-1 focus:text-blue-6","data-disabled:pointer-events-none data-disabled:opacity-50","transition-colors",t),ref:i,...o,children:[w.jsxs("div",{className:"flex items-center gap-2",children:[n&&w.jsx("span",{className:"inline-flex shrink-0",children:n}),w.jsx("span",{children:e})]}),r&&w.jsx("span",{className:"ml-auto pl-4 text-xs text-gray-6 group-hover:text-blue-6",children:r})]})),YT=P.forwardRef(({className:e,...t},n)=>w.jsx(CE,{className:fe("my-1 h-px bg-gray-3",e),ref:n,...t})),qT=P.forwardRef(({children:e,className:t,...n},r)=>w.jsx(EE,{className:fe("px-3 py-2 text-xs font-semibold text-gray-6",t),ref:r,...n,children:e})),ZT=(e,t)=>{const n={separator:()=>w.jsx(YT,{className:t==null?void 0:t.separator},e.id),label:()=>w.jsx(qT,{className:t==null?void 0:t.label,children:e.label},e.id),default:()=>w.jsx(XT,{className:t==null?void 0:t.item,icon:e.icon,shortcut:e.shortcut,disabled:e.disabled,onSelect:e.onSelect,children:e.label},e.id)};return(n[e.type]||n.default)()},JT=({trigger:e,items:t=[],align:n="start",sideOffset:r=4,classNames:o})=>w.jsxs(yE,{children:[w.jsx(WT,{children:e}),w.jsx(GT,{align:n,sideOffset:r,className:o==null?void 0:o.content,children:t.map(i=>w.jsx("div",{children:ZT(i,o)},i.id))})]});var Kv=(e=>(e.justify="justify",e.align="items",e.gap="gap",e))(Kv||{});const{align:QT,justify:ej,gap:tj}=Kv,nj={horizontal:"flex-row",vertical:"flex-col"},rj={horizontal:"flex-row-reverse",vertical:"flex-col-reverse"},hr=({children:e,justify:t,align:n,gap:r,direction:o="horizontal",isReverse:i=!1,style:l,className:u="",onClick:c,wrap:a,...s})=>w.jsx(kr.div,{"aria-hidden":!0,className:fe(`flex ${i?rj[o]:nj[o]}`,os(tj,r),os(ej,t),os(QT,n),{[u]:u,"flex-wrap":a}),onClick:c,style:l,children:e,...s}),oj={md:"py-[5px] min-h-8 rounded-md",lg:"py-2 text-base min-h-10 rounded-lg",xl:"py-3 text-base min-h-12 rounded-lg"},ij=(e,t,n,r,o)=>{const i=["px-3 py-px min-h-6 text-sm leading-[22px] w-full","transition-all ease-out duration-300","placeholder:text-gray-6 text-gray-10 outline-none appearance-none","disabled:bg-gray-3 disabled:text-gray-6 disabled:border-gray-5"],l=e==="default"?["rounded border shadow-button border-gray-7","focus:border-light-blue-30 focus:ring-light-blue-30 focus:shadow-[0_0_0_2px_#E6EDF8]"]:["border-0 border-b border-gray-7 rounded-none! bg-transparent","focus:border-light-blue-30"],u={"pl-8":o,[e==="default"?"border-red text-red focus:border-red focus:ring-red focus:shadow-[0_0_0_2px_#FFCCC7]":"border-b-red text-red focus:border-b-red"]:n,[e==="default"?"border-green text-green focus:border-green focus:ring-green focus:shadow-[0_0_0_2px_#D4F0E0]":"border-b-green text-green focus:border-b-green"]:r};return{sizeStyles:oj[t],stateStyles:u,baseStyles:i,variantStyles:l}},sj=({onClick:e,disabled:t})=>w.jsx(kr.button,{initial:{opacity:0,y:"-50%"},animate:{opacity:1,y:"-50%"},exit:{opacity:0,y:"-50%"},transition:{duration:.2},type:"button",className:"absolute transition-colors ease-out duration-300 top-1/2 right-3 disabled:opacity-100 text-gray-6 hover:text-gray-7 disabled:hover:text-gray-6",onClick:e,disabled:t,children:w.jsx(yy,{})},"clear-button"),aj=({num:e,format:t,useGrouping:n,minFractionDigits:r,maxFractionDigits:o,mode:i,currency:l,currencyDisplay:u,locale:c,prefix:a="",suffix:s=""})=>{if(e==null||!t)return(e==null?void 0:e.toString())??"";const d={useGrouping:n,minimumFractionDigits:r,maximumFractionDigits:o,...i==="currency"&&{style:"currency",currency:l,currencyDisplay:u}},f=new Intl.NumberFormat(c,d).format(e);return`${a} ${f} ${s}`.trim()},lj=(e,t="",n="",r=!0)=>{if(!e)return r?null:0;const o=e.replace(t,"").replace(n,"").replaceAll(/[^\d.-]/g,""),i=Number.parseFloat(o);return Number.isNaN(i)?null:i},uj=(e,t,n)=>e==null||(t==null||e>=t)&&(n==null||e<=n),cj=e=>{const{onChange:t,onValueChange:n,format:r=!0,locale:o="es-MX",mode:i="decimal",currency:l="MXN",currencyDisplay:u="symbol",useGrouping:c=!0,minFractionDigits:a,maxFractionDigits:s,min:d,max:f,allowEmpty:p=!0,prefix:m,suffix:h,...g}=e,[y,b]=P.useState(Number((g==null?void 0:g.value)??null)),[x,E]=P.useState(""),[S,_]=P.useState(!1),j=P.useMemo(()=>({format:r,useGrouping:c,minFractionDigits:a,maxFractionDigits:s,mode:i,currency:l,currencyDisplay:u,locale:o,prefix:m,suffix:h}),[r,c,a,s,i,l,u,o,m,h]),M=P.useCallback(N=>aj({num:N,...j}),[j]),O=P.useCallback(N=>lj(N,m,h,p),[m,h,p]);P.useEffect(()=>{S||E(M(y))},[y,M,S]);const R=P.useCallback(N=>{const U=N.target.value;E(U);const B=O(U);uj(B,d,f)&&(b(B),t==null||t(B),n==null||n({originalEvent:N.nativeEvent,value:B}))},[O,d,f,t,n]),A=P.useCallback(N=>{var U;_(!0),y!=null&&E(y.toString()),(U=g.onFocus)==null||U.call(g,N)},[y,g]),T=P.useCallback(N=>{var U;_(!1),E(M(y)),(U=g.onBlur)==null||U.call(g,N)},[M,y,g]),V=P.useCallback(()=>{E(""),b(null),t==null||t(null)},[t]);return{displayValue:x,handleChange:R,handleFocus:A,handleBlur:T,handleClear:V,...g}},dj=P.forwardRef((e,t)=>{const{error:n,size:r="md",check:o,icon:i,leftIcon:l,clear:u=!0,disabled:c=!1,variant:a="default",className:s,displayValue:d,handleChange:f,handleFocus:p,handleBlur:m,handleClear:h,...g}=cj(e),{baseStyles:y,variantStyles:b,sizeStyles:x,stateStyles:E}=ij(a,r,n,o,!!i),S=P.useMemo(()=>u&&d?w.jsx(sj,{disabled:c,onClick:h}):l?w.jsx("div",{className:fe("absolute right-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:l}):null,[u,d,l,c,h]);return w.jsxs("div",{className:fe("relative",s),children:[i&&w.jsx("div",{className:fe("absolute left-3 top-1/2 -translate-y-1/2",{"opacity-40":c}),children:i}),w.jsx(kr.input,{...g,ref:t,type:"text",value:d,disabled:c,onChange:f,onFocus:p,onBlur:m,className:fe(...y,...b,x,E,s)}),w.jsx(T_,{children:S})]})});dj.displayName="InputNumber";const ud=(e,t)=>`${e}-${t}`,qi=P.forwardRef(({children:e,as:t,asChild:n=!1,className:r,italic:o=!1,size:i="base",weight:l="normal",...u},c)=>{if(!e)return null;const a=ud("text",i),s=ud("font",l),d=n?_0:t??"p";return w.jsx(d,{ref:c,className:fe("text-grays-Macropay-10",a,s,r,{italic:o}),...u,children:e})});qi.displayName="Typography";const fj=({children:e,as:t="p",className:n,...r})=>w.jsx(qi,{as:t,className:n,...r,children:e}),pj={1:"text-4xl",2:"text-3xl",3:"text-2xl",4:"text-xl",5:"text-lg",6:"text-base"},hj={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},mj=({children:e,className:t="",level:n=1,...r})=>{const o=hj[n];return w.jsx(qi,{as:o,weight:"bold",className:`${pj[n]} ${t}`,...r,children:e})},Ar=qi;Ar.Text=fj;Ar.Title=mj;const{Title:nM,Text:rM}=Ar,gj=e=>{const t=P.createContext(void 0);return[({value:n,children:r})=>w.jsx(t.Provider,{value:n,children:r}),()=>{const n=P.useContext(t);if(n===void 0)throw new Error(`useContext must be used within a ${e}Provider`);return n}]};gj("PopoverContext");var vj=Object.defineProperty,fi=Object.getOwnPropertySymbols,Wv=Object.prototype.hasOwnProperty,Gv=Object.prototype.propertyIsEnumerable,cd=(e,t,n)=>t in e?vj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aa=(e,t)=>{for(var n in t||(t={}))Wv.call(t,n)&&cd(e,n,t[n]);if(fi)for(var n of fi(t))Gv.call(t,n)&&cd(e,n,t[n]);return e},Da=(e,t)=>{var n={};for(var r in e)Wv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fi)for(var r of fi(e))t.indexOf(r)<0&&Gv.call(e,r)&&(n[r]=e[r]);return n};/**
|
|
105
|
-
* @license QR Code generator library (TypeScript)
|
|
106
|
-
* Copyright (c) Project Nayuki.
|
|
107
|
-
* SPDX-License-Identifier: MIT
|
|
108
|
-
*/var Jt;(e=>{const t=class le{constructor(c,a,s,d){if(this.version=c,this.errorCorrectionLevel=a,this.modules=[],this.isFunction=[],c<le.MIN_VERSION||c>le.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let f=[];for(let m=0;m<this.size;m++)f.push(!1);for(let m=0;m<this.size;m++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(s);if(this.drawCodewords(p),d==-1){let m=1e9;for(let h=0;h<8;h++){this.applyMask(h),this.drawFormatBits(h);const g=this.getPenaltyScore();g<m&&(d=h,m=g),this.applyMask(h)}}o(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(c,a){const s=e.QrSegment.makeSegments(c);return le.encodeSegments(s,a)}static encodeBinary(c,a){const s=e.QrSegment.makeBytes(c);return le.encodeSegments([s],a)}static encodeSegments(c,a,s=1,d=40,f=-1,p=!0){if(!(le.MIN_VERSION<=s&&s<=d&&d<=le.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let m,h;for(m=s;;m++){const x=le.getNumDataCodewords(m,a)*8,E=l.getTotalBits(c,m);if(E<=x){h=E;break}if(m>=d)throw new RangeError("Data too long")}for(const x of[le.Ecc.MEDIUM,le.Ecc.QUARTILE,le.Ecc.HIGH])p&&h<=le.getNumDataCodewords(m,x)*8&&(a=x);let g=[];for(const x of c){n(x.mode.modeBits,4,g),n(x.numChars,x.mode.numCharCountBits(m),g);for(const E of x.getData())g.push(E)}o(g.length==h);const y=le.getNumDataCodewords(m,a)*8;o(g.length<=y),n(0,Math.min(4,y-g.length),g),n(0,(8-g.length%8)%8,g),o(g.length%8==0);for(let x=236;g.length<y;x^=253)n(x,8,g);let b=[];for(;b.length*8<g.length;)b.push(0);return g.forEach((x,E)=>b[E>>>3]|=x<<7-(E&7)),new le(m,a,b,f)}getModule(c,a){return 0<=c&&c<this.size&&0<=a&&a<this.size&&this.modules[a][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let s=0;s<this.size;s++)this.setFunctionModule(6,s,s%2==0),this.setFunctionModule(s,6,s%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),a=c.length;for(let s=0;s<a;s++)for(let d=0;d<a;d++)s==0&&d==0||s==0&&d==a-1||s==a-1&&d==0||this.drawAlignmentPattern(c[s],c[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const a=this.errorCorrectionLevel.formatBits<<3|c;let s=a;for(let f=0;f<10;f++)s=s<<1^(s>>>9)*1335;const d=(a<<10|s)^21522;o(d>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,r(d,f));this.setFunctionModule(8,7,r(d,6)),this.setFunctionModule(8,8,r(d,7)),this.setFunctionModule(7,8,r(d,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,r(d,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,r(d,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,r(d,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let s=0;s<12;s++)c=c<<1^(c>>>11)*7973;const a=this.version<<12|c;o(a>>>18==0);for(let s=0;s<18;s++){const d=r(a,s),f=this.size-11+s%3,p=Math.floor(s/3);this.setFunctionModule(f,p,d),this.setFunctionModule(p,f,d)}}drawFinderPattern(c,a){for(let s=-4;s<=4;s++)for(let d=-4;d<=4;d++){const f=Math.max(Math.abs(d),Math.abs(s)),p=c+d,m=a+s;0<=p&&p<this.size&&0<=m&&m<this.size&&this.setFunctionModule(p,m,f!=2&&f!=4)}}drawAlignmentPattern(c,a){for(let s=-2;s<=2;s++)for(let d=-2;d<=2;d++)this.setFunctionModule(c+d,a+s,Math.max(Math.abs(d),Math.abs(s))!=1)}setFunctionModule(c,a,s){this.modules[a][c]=s,this.isFunction[a][c]=!0}addEccAndInterleave(c){const a=this.version,s=this.errorCorrectionLevel;if(c.length!=le.getNumDataCodewords(a,s))throw new RangeError("Invalid argument");const d=le.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][a],f=le.ECC_CODEWORDS_PER_BLOCK[s.ordinal][a],p=Math.floor(le.getNumRawDataModules(a)/8),m=d-p%d,h=Math.floor(p/d);let g=[];const y=le.reedSolomonComputeDivisor(f);for(let x=0,E=0;x<d;x++){let S=c.slice(E,E+h-f+(x<m?0:1));E+=S.length;const _=le.reedSolomonComputeRemainder(S,y);x<m&&S.push(0),g.push(S.concat(_))}let b=[];for(let x=0;x<g[0].length;x++)g.forEach((E,S)=>{(x!=h-f||S>=m)&&b.push(E[x])});return o(b.length==p),b}drawCodewords(c){if(c.length!=Math.floor(le.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let a=0;for(let s=this.size-1;s>=1;s-=2){s==6&&(s=5);for(let d=0;d<this.size;d++)for(let f=0;f<2;f++){const p=s-f,m=(s+1&2)==0?this.size-1-d:d;!this.isFunction[m][p]&&a<c.length*8&&(this.modules[m][p]=r(c[a>>>3],7-(a&7)),a++)}}o(a==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let a=0;a<this.size;a++)for(let s=0;s<this.size;s++){let d;switch(c){case 0:d=(s+a)%2==0;break;case 1:d=a%2==0;break;case 2:d=s%3==0;break;case 3:d=(s+a)%3==0;break;case 4:d=(Math.floor(s/3)+Math.floor(a/2))%2==0;break;case 5:d=s*a%2+s*a%3==0;break;case 6:d=(s*a%2+s*a%3)%2==0;break;case 7:d=((s+a)%2+s*a%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[a][s]&&d&&(this.modules[a][s]=!this.modules[a][s])}}getPenaltyScore(){let c=0;for(let f=0;f<this.size;f++){let p=!1,m=0,h=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[f][g]==p?(m++,m==5?c+=le.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,h),p||(c+=this.finderPenaltyCountPatterns(h)*le.PENALTY_N3),p=this.modules[f][g],m=1);c+=this.finderPenaltyTerminateAndCount(p,m,h)*le.PENALTY_N3}for(let f=0;f<this.size;f++){let p=!1,m=0,h=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[g][f]==p?(m++,m==5?c+=le.PENALTY_N1:m>5&&c++):(this.finderPenaltyAddHistory(m,h),p||(c+=this.finderPenaltyCountPatterns(h)*le.PENALTY_N3),p=this.modules[g][f],m=1);c+=this.finderPenaltyTerminateAndCount(p,m,h)*le.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let p=0;p<this.size-1;p++){const m=this.modules[f][p];m==this.modules[f][p+1]&&m==this.modules[f+1][p]&&m==this.modules[f+1][p+1]&&(c+=le.PENALTY_N2)}let a=0;for(const f of this.modules)a=f.reduce((p,m)=>p+(m?1:0),a);const s=this.size*this.size,d=Math.ceil(Math.abs(a*20-s*10)/s)-1;return o(0<=d&&d<=9),c+=d*le.PENALTY_N4,o(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,a=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let s=[6];for(let d=this.size-7;s.length<c;d-=a)s.splice(1,0,d);return s}}static getNumRawDataModules(c){if(c<le.MIN_VERSION||c>le.MAX_VERSION)throw new RangeError("Version number out of range");let a=(16*c+128)*c+64;if(c>=2){const s=Math.floor(c/7)+2;a-=(25*s-10)*s-55,c>=7&&(a-=36)}return o(208<=a&&a<=29648),a}static getNumDataCodewords(c,a){return Math.floor(le.getNumRawDataModules(c)/8)-le.ECC_CODEWORDS_PER_BLOCK[a.ordinal][c]*le.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let a=[];for(let d=0;d<c-1;d++)a.push(0);a.push(1);let s=1;for(let d=0;d<c;d++){for(let f=0;f<a.length;f++)a[f]=le.reedSolomonMultiply(a[f],s),f+1<a.length&&(a[f]^=a[f+1]);s=le.reedSolomonMultiply(s,2)}return a}static reedSolomonComputeRemainder(c,a){let s=a.map(d=>0);for(const d of c){const f=d^s.shift();s.push(0),a.forEach((p,m)=>s[m]^=le.reedSolomonMultiply(p,f))}return s}static reedSolomonMultiply(c,a){if(c>>>8||a>>>8)throw new RangeError("Byte out of range");let s=0;for(let d=7;d>=0;d--)s=s<<1^(s>>>7)*285,s^=(a>>>d&1)*c;return o(s>>>8==0),s}finderPenaltyCountPatterns(c){const a=c[1];o(a<=this.size*3);const s=a>0&&c[2]==a&&c[3]==a*3&&c[4]==a&&c[5]==a;return(s&&c[0]>=a*4&&c[6]>=a?1:0)+(s&&c[6]>=a*4&&c[0]>=a?1:0)}finderPenaltyTerminateAndCount(c,a,s){return c&&(this.finderPenaltyAddHistory(a,s),a=0),a+=this.size,this.finderPenaltyAddHistory(a,s),this.finderPenaltyCountPatterns(s)}finderPenaltyAddHistory(c,a){a[0]==0&&(c+=this.size),a.pop(),a.unshift(c)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(u,c,a){if(c<0||c>31||u>>>c)throw new RangeError("Value out of range");for(let s=c-1;s>=0;s--)a.push(u>>>s&1)}function r(u,c){return(u>>>c&1)!=0}function o(u){if(!u)throw new Error("Assertion error")}const i=class xe{constructor(c,a,s){if(this.mode=c,this.numChars=a,this.bitData=s,a<0)throw new RangeError("Invalid argument");this.bitData=s.slice()}static makeBytes(c){let a=[];for(const s of c)n(s,8,a);return new xe(xe.Mode.BYTE,c.length,a)}static makeNumeric(c){if(!xe.isNumeric(c))throw new RangeError("String contains non-numeric characters");let a=[];for(let s=0;s<c.length;){const d=Math.min(c.length-s,3);n(parseInt(c.substring(s,s+d),10),d*3+1,a),s+=d}return new xe(xe.Mode.NUMERIC,c.length,a)}static makeAlphanumeric(c){if(!xe.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let a=[],s;for(s=0;s+2<=c.length;s+=2){let d=xe.ALPHANUMERIC_CHARSET.indexOf(c.charAt(s))*45;d+=xe.ALPHANUMERIC_CHARSET.indexOf(c.charAt(s+1)),n(d,11,a)}return s<c.length&&n(xe.ALPHANUMERIC_CHARSET.indexOf(c.charAt(s)),6,a),new xe(xe.Mode.ALPHANUMERIC,c.length,a)}static makeSegments(c){return c==""?[]:xe.isNumeric(c)?[xe.makeNumeric(c)]:xe.isAlphanumeric(c)?[xe.makeAlphanumeric(c)]:[xe.makeBytes(xe.toUtf8ByteArray(c))]}static makeEci(c){let a=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)n(c,8,a);else if(c<16384)n(2,2,a),n(c,14,a);else if(c<1e6)n(6,3,a),n(c,21,a);else throw new RangeError("ECI assignment value out of range");return new xe(xe.Mode.ECI,0,a)}static isNumeric(c){return xe.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return xe.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,a){let s=0;for(const d of c){const f=d.mode.numCharCountBits(a);if(d.numChars>=1<<f)return 1/0;s+=4+f+d.bitData.length}return s}static toUtf8ByteArray(c){c=encodeURI(c);let a=[];for(let s=0;s<c.length;s++)c.charAt(s)!="%"?a.push(c.charCodeAt(s)):(a.push(parseInt(c.substring(s+1,s+3),16)),s+=2);return a}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let l=i;e.QrSegment=i})(Jt||(Jt={}));(e=>{(t=>{const n=class{constructor(r,o){this.ordinal=r,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Jt||(Jt={}));(e=>{(t=>{const n=class{constructor(r,o){this.modeBits=r,this.numBitsCharCount=o}numCharCountBits(r){return this.numBitsCharCount[Math.floor((r+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Jt||(Jt={}));var vn=Jt;/**
|
|
109
|
-
* @license qrcode.react
|
|
110
|
-
* Copyright (c) Paul O'Shannessy
|
|
111
|
-
* SPDX-License-Identifier: ISC
|
|
112
|
-
*/var yj={L:vn.QrCode.Ecc.LOW,M:vn.QrCode.Ecc.MEDIUM,Q:vn.QrCode.Ecc.QUARTILE,H:vn.QrCode.Ecc.HIGH},Xv=128,Yv="L",qv="#FFFFFF",Zv="#000000",Jv=!1,Qv=1,bj=4,wj=0,xj=.1;function e0(e,t=0){const n=[];return e.forEach(function(r,o){let i=null;r.forEach(function(l,u){if(!l&&i!==null){n.push(`M${i+t} ${o+t}h${u-i}v1H${i+t}z`),i=null;return}if(u===r.length-1){if(!l)return;i===null?n.push(`M${u+t},${o+t} h1v1H${u+t}z`):n.push(`M${i+t},${o+t} h${u+1-i}v1H${i+t}z`);return}l&&i===null&&(i=u)})}),n.join("")}function t0(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,i)=>i<t.x||i>=t.x+t.w?o:!1))}function Ej(e,t,n,r){if(r==null)return null;const o=e.length+n*2,i=Math.floor(t*xj),l=o/t,u=(r.width||i)*l,c=(r.height||i)*l,a=r.x==null?e.length/2-u/2:r.x*l,s=r.y==null?e.length/2-c/2:r.y*l,d=r.opacity==null?1:r.opacity;let f=null;if(r.excavate){let m=Math.floor(a),h=Math.floor(s),g=Math.ceil(u+a-m),y=Math.ceil(c+s-h);f={x:m,y:h,w:g,h:y}}const p=r.crossOrigin;return{x:a,y:s,h:c,w:u,excavation:f,opacity:d,crossOrigin:p}}function Sj(e,t){return t!=null?Math.max(Math.floor(t),0):e?bj:wj}function n0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:i,size:l,boostLevel:u}){let c=P.useMemo(()=>{const p=(Array.isArray(e)?e:[e]).reduce((m,h)=>(m.push(...vn.QrSegment.makeSegments(h)),m),[]);return vn.QrCode.encodeSegments(p,yj[t],n,void 0,void 0,u)},[e,t,n,u]);const{cells:a,margin:s,numCells:d,calculatedImageSettings:f}=P.useMemo(()=>{let p=c.getModules();const m=Sj(r,o),h=p.length+m*2,g=Ej(p,l,m,i);return{cells:p,margin:m,numCells:h,calculatedImageSettings:g}},[c,l,i,r,o]);return{qrcode:c,margin:s,cells:a,numCells:d,calculatedImageSettings:f}}var Cj=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Pj=P.forwardRef(function(e,t){const n=e,{value:r,size:o=Xv,level:i=Yv,bgColor:l=qv,fgColor:u=Zv,includeMargin:c=Jv,minVersion:a=Qv,boostLevel:s,marginSize:d,imageSettings:f}=n,p=Da(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=p,h=Da(p,["style"]),g=f==null?void 0:f.src,y=P.useRef(null),b=P.useRef(null),x=P.useCallback(T=>{y.current=T,typeof t=="function"?t(T):t&&(t.current=T)},[t]),[E,S]=P.useState(!1),{margin:_,cells:j,numCells:M,calculatedImageSettings:O}=n0({value:r,level:i,minVersion:a,boostLevel:s,includeMargin:c,marginSize:d,imageSettings:f,size:o});P.useEffect(()=>{if(y.current!=null){const T=y.current,V=T.getContext("2d");if(!V)return;let N=j;const U=b.current,B=O!=null&&U!==null&&U.complete&&U.naturalHeight!==0&&U.naturalWidth!==0;B&&O.excavation!=null&&(N=t0(j,O.excavation));const W=window.devicePixelRatio||1;T.height=T.width=o*W;const z=o/M*W;V.scale(z,z),V.fillStyle=l,V.fillRect(0,0,M,M),V.fillStyle=u,Cj?V.fill(new Path2D(e0(N,_))):j.forEach(function(D,k){D.forEach(function(L,Q){L&&V.fillRect(Q+_,k+_,1,1)})}),O&&(V.globalAlpha=O.opacity),B&&V.drawImage(U,O.x+_,O.y+_,O.w,O.h)}}),P.useEffect(()=>{S(!1)},[g]);const R=Aa({height:o,width:o},m);let A=null;return g!=null&&(A=P.createElement("img",{src:g,key:g,style:{display:"none"},onLoad:()=>{S(!0)},ref:b,crossOrigin:O==null?void 0:O.crossOrigin})),P.createElement(P.Fragment,null,P.createElement("canvas",Aa({style:R,height:o,width:o,ref:x,role:"img"},h)),A)});Pj.displayName="QRCodeCanvas";var Rj=P.forwardRef(function(e,t){const n=e,{value:r,size:o=Xv,level:i=Yv,bgColor:l=qv,fgColor:u=Zv,includeMargin:c=Jv,minVersion:a=Qv,boostLevel:s,title:d,marginSize:f,imageSettings:p}=n,m=Da(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:h,cells:g,numCells:y,calculatedImageSettings:b}=n0({value:r,level:i,minVersion:a,boostLevel:s,includeMargin:c,marginSize:f,imageSettings:p,size:o});let x=g,E=null;p!=null&&b!=null&&(b.excavation!=null&&(x=t0(g,b.excavation)),E=P.createElement("image",{href:p.src,height:b.h,width:b.w,x:b.x+h,y:b.y+h,preserveAspectRatio:"none",opacity:b.opacity,crossOrigin:b.crossOrigin}));const S=e0(x,h);return P.createElement("svg",Aa({height:o,width:o,viewBox:`0 0 ${y} ${y}`,ref:t,role:"img"},m),!!d&&P.createElement("title",null,d),P.createElement("path",{fill:l,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),P.createElement("path",{fill:u,d:S,shapeRendering:"crispEdges"}),E)});Rj.displayName="QRCodeSVG";var Qr={},zn={},eo={},dd;function ze(){if(dd)return eo;dd=1,Object.defineProperty(eo,"__esModule",{value:!0});function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}var t=function n(r,o){e(this,n),this.data=r,this.text=o.text||r,this.options=o};return eo.default=t,eo}var fd;function Oj(){if(fd)return zn;fd=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.CODE39=void 0;var e=(function(){function h(g,y){for(var b=0;b<y.length;b++){var x=y[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,y,b){return y&&h(g.prototype,y),b&&h(g,b),g}})(),t=ze(),n=r(t);function r(h){return h&&h.__esModule?h:{default:h}}function o(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")}function i(h,g){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:h}function l(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);h.prototype=Object.create(g&&g.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(h,g):h.__proto__=g)}var u=(function(h){l(g,h);function g(y,b){return o(this,g),y=y.toUpperCase(),b.mod43&&(y+=f(m(y))),i(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y,b))}return e(g,[{key:"encode",value:function(){for(var y=s("*"),b=0;b<this.data.length;b++)y+=s(this.data[b])+"0";return y+=s("*"),{data:y,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),g})(n.default),c=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],a=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function s(h){return d(p(h))}function d(h){return a[h].toString(2)}function f(h){return c[h]}function p(h){return c.indexOf(h)}function m(h){for(var g=0,y=0;y<h.length;y++)g+=p(h[y]);return g=g%43,g}return zn.CODE39=u,zn}var Ye={},to={},no={},we={},pd;function Dr(){if(pd)return we;pd=1,Object.defineProperty(we,"__esModule",{value:!0});var e;function t(c,a,s){return a in c?Object.defineProperty(c,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[a]=s,c}var n=we.SET_A=0,r=we.SET_B=1,o=we.SET_C=2;we.SHIFT=98;var i=we.START_A=103,l=we.START_B=104,u=we.START_C=105;return we.MODULO=103,we.STOP=106,we.FNC1=207,we.SET_BY_CODE=(e={},t(e,i,n),t(e,l,r),t(e,u,o),e),we.SWAP={101:n,100:r,99:o},we.A_START_CHAR="Ð",we.B_START_CHAR="Ñ",we.C_START_CHAR="Ò",we.A_CHARS="[\0-_È-Ï]",we.B_CHARS="[ -È-Ï]",we.C_CHARS="(Ï*[0-9]{2}Ï*)",we.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],we}var hd;function Zi(){if(hd)return no;hd=1,Object.defineProperty(no,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=ze(),n=o(t),r=Dr();function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){i(this,s);var p=l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,d.substring(1),f));return p.bytes=d.split("").map(function(m){return m.charCodeAt(0)}),p}return e(s,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.bytes,f=d.shift()-105,p=r.SET_BY_CODE[f];if(p===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&d.unshift(r.FNC1);var m=s.next(d,1,p);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:s.getBar(f)+m.result+s.getBar((m.checksum+f)%r.MODULO)+s.getBar(r.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var d=this.options.ean128||!1;return typeof d=="string"&&(d=d.toLowerCase()==="true"),d}}],[{key:"getBar",value:function(d){return r.BARS[d]?r.BARS[d].toString():""}},{key:"correctIndex",value:function(d,f){if(f===r.SET_A){var p=d.shift();return p<32?p+64:p-32}else return f===r.SET_B?d.shift()-32:(d.shift()-48)*10+d.shift()-48}},{key:"next",value:function(d,f,p){if(!d.length)return{result:"",checksum:0};var m=void 0,h=void 0;if(d[0]>=200){h=d.shift()-105;var g=r.SWAP[h];g!==void 0?m=s.next(d,f+1,g):((p===r.SET_A||p===r.SET_B)&&h===r.SHIFT&&(d[0]=p===r.SET_A?d[0]>95?d[0]-96:d[0]:d[0]<32?d[0]+96:d[0]),m=s.next(d,f+1,p))}else h=s.correctIndex(d,p),m=s.next(d,f+1,p);var y=s.getBar(h),b=h*f;return{result:y+m.result,checksum:b+m.checksum}}}]),s})(n.default);return no.default=c,no}var ro={},md;function _j(){if(md)return ro;md=1,Object.defineProperty(ro,"__esModule",{value:!0});var e=Dr(),t=function(l){return l.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(l){return l.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(l){return l.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(l,u){var c=u?e.A_CHARS:e.B_CHARS,a=l.match(new RegExp("^("+c+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(a)return a[1]+"Ì"+i(l.substring(a[1].length));var s=l.match(new RegExp("^"+c+"+"))[0];return s.length===l.length?l:s+String.fromCharCode(u?205:206)+o(l.substring(s.length),!u)}function i(l){var u=r(l),c=u.length;if(c===l.length)return l;l=l.substring(c);var a=t(l)>=n(l);return u+String.fromCharCode(a?206:205)+o(l,a)}return ro.default=function(l){var u=void 0,c=r(l).length;if(c>=2)u=e.C_START_CHAR+i(l);else{var a=t(l)>n(l);u=(a?e.A_START_CHAR:e.B_START_CHAR)+o(l,a)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(s,d){return"Ë"+d})},ro}var gd;function Tj(){if(gd)return to;gd=1,Object.defineProperty(to,"__esModule",{value:!0});var e=Zi(),t=o(e),n=_j(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){if(i(this,s),/^[\x00-\x7F\xC8-\xD3]+$/.test(d))var p=l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,(0,r.default)(d),f));else var p=l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,d,f));return l(p)}return s})(t.default);return to.default=c,to}var oo={},vd;function jj(){if(vd)return oo;vd=1,Object.defineProperty(oo,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=Zi(),n=o(t),r=Dr();function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){return i(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,r.A_START_CHAR+d,f))}return e(s,[{key:"valid",value:function(){return new RegExp("^"+r.A_CHARS+"+$").test(this.data)}}]),s})(n.default);return oo.default=c,oo}var io={},yd;function Mj(){if(yd)return io;yd=1,Object.defineProperty(io,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=Zi(),n=o(t),r=Dr();function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){return i(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,r.B_START_CHAR+d,f))}return e(s,[{key:"valid",value:function(){return new RegExp("^"+r.B_CHARS+"+$").test(this.data)}}]),s})(n.default);return io.default=c,io}var so={},bd;function kj(){if(bd)return so;bd=1,Object.defineProperty(so,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=Zi(),n=o(t),r=Dr();function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){return i(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,r.C_START_CHAR+d,f))}return e(s,[{key:"valid",value:function(){return new RegExp("^"+r.C_CHARS+"+$").test(this.data)}}]),s})(n.default);return so.default=c,so}var wd;function Aj(){if(wd)return Ye;wd=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.CODE128C=Ye.CODE128B=Ye.CODE128A=Ye.CODE128=void 0;var e=Tj(),t=c(e),n=jj(),r=c(n),o=Mj(),i=c(o),l=kj(),u=c(l);function c(a){return a&&a.__esModule?a:{default:a}}return Ye.CODE128=t.default,Ye.CODE128A=r.default,Ye.CODE128B=i.default,Ye.CODE128C=u.default,Ye}var Me={},ao={},St={},xd;function Lr(){return xd||(xd=1,Object.defineProperty(St,"__esModule",{value:!0}),St.SIDE_BIN="101",St.MIDDLE_BIN="01010",St.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},St.EAN2_STRUCTURE=["LL","LG","GL","GG"],St.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],St.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),St}var lo={},uo={},Ed;function Nr(){if(Ed)return uo;Ed=1,Object.defineProperty(uo,"__esModule",{value:!0});var e=Lr(),t=function(n,r,o){var i=n.split("").map(function(u,c){return e.BINARIES[r[c]]}).map(function(u,c){return u?u[n[c]]:""});if(o){var l=n.length-1;i=i.map(function(u,c){return c<l?u+o:u})}return i.join("")};return uo.default=t,uo}var Sd;function r0(){if(Sd)return lo;Sd=1,Object.defineProperty(lo,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var h=p[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=Lr(),n=Nr(),r=l(n),o=ze(),i=l(o);function l(d){return d&&d.__esModule?d:{default:d}}function u(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function c(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function a(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var s=(function(d){a(f,d);function f(p,m){u(this,f);var h=c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return h.fontSize=!m.flat&&m.fontSize>m.width*10?m.width*10:m.fontSize,h.guardHeight=m.height+h.fontSize/2+m.textMargin,h}return e(f,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(p,m){return this.text.substr(p,m)}},{key:"leftEncode",value:function(p,m){return(0,r.default)(p,m)}},{key:"rightText",value:function(p,m){return this.text.substr(p,m)}},{key:"rightEncode",value:function(p,m){return(0,r.default)(p,m)}},{key:"encodeGuarded",value:function(){var p={fontSize:this.fontSize},m={height:this.guardHeight};return[{data:t.SIDE_BIN,options:m},{data:this.leftEncode(),text:this.leftText(),options:p},{data:t.MIDDLE_BIN,options:m},{data:this.rightEncode(),text:this.rightText(),options:p},{data:t.SIDE_BIN,options:m}]}},{key:"encodeFlat",value:function(){var p=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:p.join(""),text:this.text}}}]),f})(i.default);return lo.default=s,lo}var Cd;function Dj(){if(Cd)return ao;Cd=1,Object.defineProperty(ao,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var h=p[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=function d(f,p,m){f===null&&(f=Function.prototype);var h=Object.getOwnPropertyDescriptor(f,p);if(h===void 0){var g=Object.getPrototypeOf(f);return g===null?void 0:d(g,p,m)}else{if("value"in h)return h.value;var y=h.get;return y===void 0?void 0:y.call(m)}},n=Lr(),r=r0(),o=i(r);function i(d){return d&&d.__esModule?d:{default:d}}function l(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function u(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function c(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var a=function(d){var f=d.substr(0,12).split("").map(function(p){return+p}).reduce(function(p,m,h){return h%2?p+m*3:p+m},0);return(10-f%10)%10},s=(function(d){c(f,d);function f(p,m){l(this,f),p.search(/^[0-9]{12}$/)!==-1&&(p+=a(p));var h=u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return h.lastChar=m.lastChar,h}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var p=this.data.substr(1,6),m=n.EAN13_STRUCTURE[this.data[0]];return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"leftEncode",this).call(this,p,m)}},{key:"rightText",value:function(){return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var p=this.data.substr(7,6);return t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"rightEncode",this).call(this,p,"RRRRRR")}},{key:"encodeGuarded",value:function(){var p=t(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(p.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(p.push({data:"00"}),p.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),p}}]),f})(o.default);return ao.default=s,ao}var co={},Pd;function Lj(){if(Pd)return co;Pd=1,Object.defineProperty(co,"__esModule",{value:!0});var e=(function(){function s(d,f){for(var p=0;p<f.length;p++){var m=f[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,f,p){return f&&s(d.prototype,f),p&&s(d,p),d}})(),t=function s(d,f,p){d===null&&(d=Function.prototype);var m=Object.getOwnPropertyDescriptor(d,f);if(m===void 0){var h=Object.getPrototypeOf(d);return h===null?void 0:s(h,f,p)}else{if("value"in m)return m.value;var g=m.get;return g===void 0?void 0:g.call(p)}},n=r0(),r=o(n);function o(s){return s&&s.__esModule?s:{default:s}}function i(s,d){if(!(s instanceof d))throw new TypeError("Cannot call a class as a function")}function l(s,d){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:s}function u(s,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);s.prototype=Object.create(d&&d.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(s,d):s.__proto__=d)}var c=function(s){var d=s.substr(0,7).split("").map(function(f){return+f}).reduce(function(f,p,m){return m%2?f+p:f+p*3},0);return(10-d%10)%10},a=(function(s){u(d,s);function d(f,p){return i(this,d),f.search(/^[0-9]{7}$/)!==-1&&(f+=c(f)),l(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,f,p))}return e(d,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===c(this.data)}},{key:"leftText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var f=this.data.substr(0,4);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,f,"LLLL")}},{key:"rightText",value:function(){return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var f=this.data.substr(4,4);return t(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,f,"RRRR")}}]),d})(r.default);return co.default=a,co}var fo={},Rd;function Nj(){if(Rd)return fo;Rd=1,Object.defineProperty(fo,"__esModule",{value:!0});var e=(function(){function f(p,m){for(var h=0;h<m.length;h++){var g=m[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,m,h){return m&&f(p.prototype,m),h&&f(p,h),p}})(),t=Lr(),n=Nr(),r=l(n),o=ze(),i=l(o);function l(f){return f&&f.__esModule?f:{default:f}}function u(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function c(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function a(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var s=function(f){var p=f.split("").map(function(m){return+m}).reduce(function(m,h,g){return g%2?m+h*9:m+h*3},0);return p%10},d=(function(f){a(p,f);function p(m,h){return u(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,m,h))}return e(p,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var m=t.EAN5_STRUCTURE[s(this.data)];return{data:"1011"+(0,r.default)(this.data,m,"01"),text:this.text}}}]),p})(i.default);return fo.default=d,fo}var po={},Od;function Ij(){if(Od)return po;Od=1,Object.defineProperty(po,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var h=p[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})(),t=Lr(),n=Nr(),r=l(n),o=ze(),i=l(o);function l(d){return d&&d.__esModule?d:{default:d}}function u(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function c(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function a(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var s=(function(d){a(f,d);function f(p,m){return u(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m))}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var p=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,p,"01"),text:this.text}}}]),f})(i.default);return po.default=s,po}var Un={},_d;function o0(){if(_d)return Un;_d=1,Object.defineProperty(Un,"__esModule",{value:!0});var e=(function(){function d(f,p){for(var m=0;m<p.length;m++){var h=p[m];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}return function(f,p,m){return p&&d(f.prototype,p),m&&d(f,m),f}})();Un.checksum=s;var t=Nr(),n=i(t),r=ze(),o=i(r);function i(d){return d&&d.__esModule?d:{default:d}}function l(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function u(d,f){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:d}function c(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(d,f):d.__proto__=f)}var a=(function(d){c(f,d);function f(p,m){l(this,f),p.search(/^[0-9]{11}$/)!==-1&&(p+=s(p));var h=u(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,p,m));return h.displayValue=m.displayValue,m.fontSize>m.width*10?h.fontSize=m.width*10:h.fontSize=m.fontSize,h.guardHeight=m.height+h.fontSize/2+m.textMargin,h}return e(f,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==s(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var p="";return p+="101",p+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),p+="01010",p+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),p+="101",{data:p,text:this.text}}},{key:"guardedEncoding",value:function(){var p=[];return this.displayValue&&p.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),p.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),p.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),p.push({data:"01010",options:{height:this.guardHeight}}),p.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),p.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&p.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),p}}]),f})(o.default);function s(d){var f=0,p;for(p=1;p<11;p+=2)f+=parseInt(d[p]);for(p=0;p<11;p+=2)f+=parseInt(d[p])*3;return(10-f%10)%10}return Un.default=a,Un}var ho={},Td;function Fj(){if(Td)return ho;Td=1,Object.defineProperty(ho,"__esModule",{value:!0});var e=(function(){function m(h,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,g,y){return g&&m(h.prototype,g),y&&m(h,y),h}})(),t=Nr(),n=l(t),r=ze(),o=l(r),i=o0();function l(m){return m&&m.__esModule?m:{default:m}}function u(m,h){if(!(m instanceof h))throw new TypeError("Cannot call a class as a function")}function c(m,h){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:m}function a(m,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);m.prototype=Object.create(h&&h.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(m,h):m.__proto__=h)}var s=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=(function(m){a(h,m);function h(g,y){u(this,h);var b=c(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,g,y));if(b.isValid=!1,g.search(/^[0-9]{6}$/)!==-1)b.middleDigits=g,b.upcA=p(g,"0"),b.text=y.text||""+b.upcA[0]+g+b.upcA[b.upcA.length-1],b.isValid=!0;else if(g.search(/^[01][0-9]{7}$/)!==-1)if(b.middleDigits=g.substring(1,g.length-1),b.upcA=p(b.middleDigits,g[0]),b.upcA[b.upcA.length-1]===g[g.length-1])b.isValid=!0;else return c(b);else return c(b);return b.displayValue=y.displayValue,y.fontSize>y.width*10?b.fontSize=y.width*10:b.fontSize=y.fontSize,b.guardHeight=y.height+b.fontSize/2+y.textMargin,b}return e(h,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var g="";return g+="101",g+=this.encodeMiddleDigits(),g+="010101",{data:g,text:this.text}}},{key:"guardedEncoding",value:function(){var g=[];return this.displayValue&&g.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),g.push({data:"101",options:{height:this.guardHeight}}),g.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),g.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&g.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),g}},{key:"encodeMiddleDigits",value:function(){var g=this.upcA[0],y=this.upcA[this.upcA.length-1],b=d[parseInt(y)][parseInt(g)];return(0,n.default)(this.middleDigits,b)}}]),h})(o.default);function p(m,h){for(var g=parseInt(m[m.length-1]),y=s[g],b="",x=0,E=0;E<y.length;E++){var S=y[E];S==="X"?b+=m[x++]:b+=S}return b=""+h+b,""+b+(0,i.checksum)(b)}return ho.default=f,ho}var jd;function Vj(){if(jd)return Me;jd=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.UPCE=Me.UPC=Me.EAN2=Me.EAN5=Me.EAN8=Me.EAN13=void 0;var e=Dj(),t=f(e),n=Lj(),r=f(n),o=Nj(),i=f(o),l=Ij(),u=f(l),c=o0(),a=f(c),s=Fj(),d=f(s);function f(p){return p&&p.__esModule?p:{default:p}}return Me.EAN13=t.default,Me.EAN8=r.default,Me.EAN5=i.default,Me.EAN2=u.default,Me.UPC=a.default,Me.UPCE=d.default,Me}var Ut={},mo={},Hn={},Md;function $j(){return Md||(Md=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.START_BIN="1010",Hn.END_BIN="11101",Hn.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),Hn}var kd;function i0(){if(kd)return mo;kd=1,Object.defineProperty(mo,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=$j(),n=ze(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(){return i(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return e(s,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var d=this,f=this.data.match(/.{2}/g).map(function(p){return d.encodePair(p)}).join("");return{data:t.START_BIN+f+t.END_BIN,text:this.text}}},{key:"encodePair",value:function(d){var f=t.BINARIES[d[1]];return t.BINARIES[d[0]].split("").map(function(p,m){return(p==="1"?"111":"1")+(f[m]==="1"?"000":"0")}).join("")}}]),s})(r.default);return mo.default=c,mo}var go={},Ad;function Bj(){if(Ad)return go;Ad=1,Object.defineProperty(go,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=i0(),n=r(t);function r(a){return a&&a.__esModule?a:{default:a}}function o(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function i(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function l(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var u=function(a){var s=a.substr(0,13).split("").map(function(d){return parseInt(d,10)}).reduce(function(d,f,p){return d+f*(3-p%2*2)},0);return Math.ceil(s/10)*10-s},c=(function(a){l(s,a);function s(d,f){return o(this,s),d.search(/^[0-9]{13}$/)!==-1&&(d+=u(d)),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,d,f))}return e(s,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===u(this.data)}}]),s})(n.default);return go.default=c,go}var Dd;function zj(){if(Dd)return Ut;Dd=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.ITF14=Ut.ITF=void 0;var e=i0(),t=o(e),n=Bj(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return Ut.ITF=t.default,Ut.ITF14=r.default,Ut}var Ne={},vo={},Ld;function Ir(){if(Ld)return vo;Ld=1,Object.defineProperty(vo,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=ze(),n=r(t);function r(a){return a&&a.__esModule?a:{default:a}}function o(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function i(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function l(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var u=(function(a){l(s,a);function s(d,f){return o(this,s),i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,d,f))}return e(s,[{key:"encode",value:function(){for(var d="110",f=0;f<this.data.length;f++){var p=parseInt(this.data[f]),m=p.toString(2);m=c(m,4-m.length);for(var h=0;h<m.length;h++)d+=m[h]=="0"?"100":"110"}return d+="1001",{data:d,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),s})(n.default);function c(a,s){for(var d=0;d<s;d++)a="0"+a;return a}return vo.default=u,vo}var yo={},Kn={},Nd;function Ji(){if(Nd)return Kn;Nd=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.mod10=e,Kn.mod11=t;function e(n){for(var r=0,o=0;o<n.length;o++){var i=parseInt(n[o]);(o+n.length)%2===0?r+=i:r+=i*2%10+Math.floor(i*2/10)}return(10-r%10)%10}function t(n){for(var r=0,o=[2,3,4,5,6,7],i=0;i<n.length;i++){var l=parseInt(n[n.length-1-i]);r+=o[i%o.length]*l}return(11-r%11)%11}return Kn}var Id;function Uj(){if(Id)return yo;Id=1,Object.defineProperty(yo,"__esModule",{value:!0});var e=Ir(),t=r(e),n=Ji();function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s+(0,n.mod10)(s),d))}return a})(t.default);return yo.default=u,yo}var bo={},Fd;function Hj(){if(Fd)return bo;Fd=1,Object.defineProperty(bo,"__esModule",{value:!0});var e=Ir(),t=r(e),n=Ji();function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s+(0,n.mod11)(s),d))}return a})(t.default);return bo.default=u,bo}var wo={},Vd;function Kj(){if(Vd)return wo;Vd=1,Object.defineProperty(wo,"__esModule",{value:!0});var e=Ir(),t=r(e),n=Ji();function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),s+=(0,n.mod10)(s),s+=(0,n.mod10)(s),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s,d))}return a})(t.default);return wo.default=u,wo}var xo={},$d;function Wj(){if($d)return xo;$d=1,Object.defineProperty(xo,"__esModule",{value:!0});var e=Ir(),t=r(e),n=Ji();function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),s+=(0,n.mod11)(s),s+=(0,n.mod10)(s),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s,d))}return a})(t.default);return xo.default=u,xo}var Bd;function Gj(){if(Bd)return Ne;Bd=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.MSI1110=Ne.MSI1010=Ne.MSI11=Ne.MSI10=Ne.MSI=void 0;var e=Ir(),t=s(e),n=Uj(),r=s(n),o=Hj(),i=s(o),l=Kj(),u=s(l),c=Wj(),a=s(c);function s(d){return d&&d.__esModule?d:{default:d}}return Ne.MSI=t.default,Ne.MSI10=r.default,Ne.MSI11=i.default,Ne.MSI1010=u.default,Ne.MSI1110=a.default,Ne}var Wn={},zd;function Xj(){if(zd)return Wn;zd=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.pharmacode=void 0;var e=(function(){function c(a,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,s,d){return s&&c(a.prototype,s),d&&c(a,d),a}})(),t=ze(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){o(this,a);var f=i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s,d));return f.number=parseInt(s,10),f}return e(a,[{key:"encode",value:function(){for(var s=this.number,d="";!isNaN(s)&&s!=0;)s%2===0?(d="11100"+d,s=(s-2)/2):(d="100"+d,s=(s-1)/2);return d=d.slice(0,-2),{data:d,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),a})(n.default);return Wn.pharmacode=u,Wn}var Gn={},Ud;function Yj(){if(Ud)return Gn;Ud=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.codabar=void 0;var e=(function(){function c(a,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,s,d){return s&&c(a.prototype,s),d&&c(a,d),a}})(),t=ze(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){o(this,a),s.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(s="A"+s+"A");var f=i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s.toUpperCase(),d));return f.text=f.options.text||f.text.replace(/[A-D]/g,""),f}return e(a,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var s=[],d=this.getEncodings(),f=0;f<this.data.length;f++)s.push(d[this.data.charAt(f)]),f!==this.data.length-1&&s.push("0");return{text:this.text,data:s.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),a})(n.default);return Gn.codabar=u,Gn}var Ht={},Eo={},Xn={},Hd;function qj(){return Hd||(Hd=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.SYMBOLS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Xn.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Xn.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),Xn}var Kd;function s0(){if(Kd)return Eo;Kd=1,Object.defineProperty(Eo,"__esModule",{value:!0});var e=(function(){function a(s,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,d,f){return d&&a(s.prototype,d),f&&a(s,f),s}})(),t=qj(),n=ze(),r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function l(a,s){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s&&(typeof s=="object"||typeof s=="function")?s:a}function u(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof s);a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(a,s):a.__proto__=s)}var c=(function(a){u(s,a);function s(d,f){return i(this,s),l(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,d,f))}return e(s,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var d=this.data.split("").flatMap(function(h){return t.MULTI_SYMBOLS[h]||h}),f=d.map(function(h){return s.getEncoding(h)}).join(""),p=s.checksum(d,20),m=s.checksum(d.concat(p),15);return{text:this.text,data:s.getEncoding("ÿ")+f+s.getEncoding(p)+s.getEncoding(m)+s.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(d){return t.BINARIES[s.symbolValue(d)]}},{key:"getSymbol",value:function(d){return t.SYMBOLS[d]}},{key:"symbolValue",value:function(d){return t.SYMBOLS.indexOf(d)}},{key:"checksum",value:function(d,f){var p=d.slice().reverse().reduce(function(m,h,g){var y=g%f+1;return m+s.symbolValue(h)*y},0);return s.getSymbol(p%47)}}]),s})(r.default);return Eo.default=c,Eo}var So={},Wd;function Zj(){if(Wd)return So;Wd=1,Object.defineProperty(So,"__esModule",{value:!0});var e=(function(){function c(a,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,s,d){return s&&c(a.prototype,s),d&&c(a,d),a}})(),t=s0(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s,d))}return e(a,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),a})(n.default);return So.default=u,So}var Gd;function Jj(){if(Gd)return Ht;Gd=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.CODE93FullASCII=Ht.CODE93=void 0;var e=s0(),t=o(e),n=Zj(),r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}return Ht.CODE93=t.default,Ht.CODE93FullASCII=r.default,Ht}var Yn={},Xd;function Qj(){if(Xd)return Yn;Xd=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.GenericBarcode=void 0;var e=(function(){function c(a,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,s,d){return s&&c(a.prototype,s),d&&c(a,d),a}})(),t=ze(),n=r(t);function r(c){return c&&c.__esModule?c:{default:c}}function o(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}function i(c,a){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:c}function l(c,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}var u=(function(c){l(a,c);function a(s,d){return o(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,s,d))}return e(a,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),a})(n.default);return Yn.GenericBarcode=u,Yn}var Yd;function e2(){if(Yd)return Qr;Yd=1,Object.defineProperty(Qr,"__esModule",{value:!0});var e=Oj(),t=Aj(),n=Vj(),r=zj(),o=Gj(),i=Xj(),l=Yj(),u=Jj(),c=Qj();return Qr.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:l.codabar,CODE93:u.CODE93,CODE93FullASCII:u.CODE93FullASCII,GenericBarcode:c.GenericBarcode},Qr}var Co={},qd;function Qi(){if(qd)return Co;qd=1,Object.defineProperty(Co,"__esModule",{value:!0});var e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};return Co.default=function(t,n){return e({},t,n)},Co}var Po={},Zd;function t2(){if(Zd)return Po;Zd=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=e;function e(t){var n=[];function r(o){if(Array.isArray(o))for(var i=0;i<o.length;i++)r(o[i]);else o.text=o.text||"",o.data=o.data||"",n.push(o)}return r(t),n}return Po}var Ro={},Jd;function n2(){if(Jd)return Ro;Jd=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=e;function e(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}return Ro}var Oo={},_o={},To={},Qd;function a0(){if(Qd)return To;Qd=1,Object.defineProperty(To,"__esModule",{value:!0}),To.default=e;function e(t){var n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in n)n.hasOwnProperty(r)&&(r=n[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}return To}var jo={},ef;function l0(){if(ef)return jo;ef=1,Object.defineProperty(jo,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return jo.default=e,jo}var tf;function r2(){if(tf)return _o;tf=1,Object.defineProperty(_o,"__esModule",{value:!0});var e=a0(),t=o(e),n=l0(),r=o(n);function o(l){return l&&l.__esModule?l:{default:l}}function i(l){var u={};for(var c in r.default)r.default.hasOwnProperty(c)&&(l.hasAttribute("jsbarcode-"+c.toLowerCase())&&(u[c]=l.getAttribute("jsbarcode-"+c.toLowerCase())),l.hasAttribute("data-"+c.toLowerCase())&&(u[c]=l.getAttribute("data-"+c.toLowerCase())));return u.value=l.getAttribute("jsbarcode-value")||l.getAttribute("data-value"),u=(0,t.default)(u),u}return _o.default=i,_o}var Mo={},ko={},Ie={},nf;function u0(){if(nf)return Ie;nf=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getTotalWidthOfEncodings=Ie.calculateEncodingAttributes=Ie.getBarcodePadding=Ie.getEncodingHeight=Ie.getMaximumHeightOfEncodings=void 0;var e=Qi(),t=n(e);function n(a){return a&&a.__esModule?a:{default:a}}function r(a,s){return s.height+(s.displayValue&&a.text.length>0?s.fontSize+s.textMargin:0)+s.marginTop+s.marginBottom}function o(a,s,d){if(d.displayValue&&s<a){if(d.textAlign=="center")return Math.floor((a-s)/2);if(d.textAlign=="left")return 0;if(d.textAlign=="right")return Math.floor(a-s)}return 0}function i(a,s,d){for(var f=0;f<a.length;f++){var p=a[f],m=(0,t.default)(s,p.options),h;m.displayValue?h=c(p.text,m,d):h=0;var g=p.data.length*m.width;p.width=Math.ceil(Math.max(h,g)),p.height=r(p,m),p.barcodePadding=o(h,g,m)}}function l(a){for(var s=0,d=0;d<a.length;d++)s+=a[d].width;return s}function u(a){for(var s=0,d=0;d<a.length;d++)a[d].height>s&&(s=a[d].height);return s}function c(a,s,d){var f;if(d)f=d;else if(typeof document<"u")f=document.createElement("canvas").getContext("2d");else return 0;f.font=s.fontOptions+" "+s.fontSize+"px "+s.font;var p=f.measureText(a);if(!p)return 0;var m=p.width;return m}return Ie.getMaximumHeightOfEncodings=u,Ie.getEncodingHeight=r,Ie.getBarcodePadding=o,Ie.calculateEncodingAttributes=i,Ie.getTotalWidthOfEncodings=l,Ie}var rf;function o2(){if(rf)return ko;rf=1,Object.defineProperty(ko,"__esModule",{value:!0});var e=(function(){function u(c,a){for(var s=0;s<a.length;s++){var d=a[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(c,d.key,d)}}return function(c,a,s){return a&&u(c.prototype,a),s&&u(c,s),c}})(),t=Qi(),n=o(t),r=u0();function o(u){return u&&u.__esModule?u:{default:u}}function i(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")}var l=(function(){function u(c,a,s){i(this,u),this.canvas=c,this.encodings=a,this.options=s}return e(u,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var c=0;c<this.encodings.length;c++){var a=(0,n.default)(this.options,this.encodings[c].options);this.drawCanvasBarcode(a,this.encodings[c]),this.drawCanvasText(a,this.encodings[c]),this.moveCanvasDrawing(this.encodings[c])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var c=this.canvas.getContext("2d");c.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,c);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),s=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=a+this.options.marginLeft+this.options.marginRight,this.canvas.height=s,c.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(c.fillStyle=this.options.background,c.fillRect(0,0,this.canvas.width,this.canvas.height)),c.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(c,a){var s=this.canvas.getContext("2d"),d=a.data,f;c.textPosition=="top"?f=c.marginTop+c.fontSize+c.textMargin:f=c.marginTop,s.fillStyle=c.lineColor;for(var p=0;p<d.length;p++){var m=p*c.width+a.barcodePadding;d[p]==="1"?s.fillRect(m,f,c.width,c.height):d[p]&&s.fillRect(m,f,c.width,c.height*d[p])}}},{key:"drawCanvasText",value:function(c,a){var s=this.canvas.getContext("2d"),d=c.fontOptions+" "+c.fontSize+"px "+c.font;if(c.displayValue){var f,p;c.textPosition=="top"?p=c.marginTop+c.fontSize-c.textMargin:p=c.height+c.textMargin+c.marginTop+c.fontSize,s.font=d,c.textAlign=="left"||a.barcodePadding>0?(f=0,s.textAlign="left"):c.textAlign=="right"?(f=a.width-1,s.textAlign="right"):(f=a.width/2,s.textAlign="center"),s.fillText(a.text,f,p)}}},{key:"moveCanvasDrawing",value:function(c){var a=this.canvas.getContext("2d");a.translate(c.width,0)}},{key:"restoreCanvas",value:function(){var c=this.canvas.getContext("2d");c.restore()}}]),u})();return ko.default=l,ko}var Ao={},of;function i2(){if(of)return Ao;of=1,Object.defineProperty(Ao,"__esModule",{value:!0});var e=(function(){function c(a,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}return function(a,s,d){return s&&c(a.prototype,s),d&&c(a,d),a}})(),t=Qi(),n=o(t),r=u0();function o(c){return c&&c.__esModule?c:{default:c}}function i(c,a){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}var l="http://www.w3.org/2000/svg",u=(function(){function c(a,s,d){i(this,c),this.svg=a,this.encodings=s,this.options=d,this.document=d.xmlDocument||document}return e(c,[{key:"render",value:function(){var a=this.options.marginLeft;this.prepareSVG();for(var s=0;s<this.encodings.length;s++){var d=this.encodings[s],f=(0,n.default)(this.options,d.options),p=this.createGroup(a,f.marginTop,this.svg);this.setGroupOptions(p,f),this.drawSvgBarcode(p,f,d),this.drawSVGText(p,f,d),a+=d.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var a=(0,r.getTotalWidthOfEncodings)(this.encodings),s=(0,r.getMaximumHeightOfEncodings)(this.encodings),d=a+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(d,s),this.options.background&&this.drawRect(0,0,d,s,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(a,s,d){var f=d.data,p;s.textPosition=="top"?p=s.fontSize+s.textMargin:p=0;for(var m=0,h=0,g=0;g<f.length;g++)h=g*s.width+d.barcodePadding,f[g]==="1"?m++:m>0&&(this.drawRect(h-s.width*m,p,s.width*m,s.height,a),m=0);m>0&&this.drawRect(h-s.width*(m-1),p,s.width*m,s.height,a)}},{key:"drawSVGText",value:function(a,s,d){var f=this.document.createElementNS(l,"text");if(s.displayValue){var p,m;f.setAttribute("font-family",s.font),f.setAttribute("font-size",s.fontSize),s.fontOptions.includes("bold")&&f.setAttribute("font-weight","bold"),s.fontOptions.includes("italic")&&f.setAttribute("font-style","italic"),s.textPosition=="top"?m=s.fontSize-s.textMargin:m=s.height+s.textMargin+s.fontSize,s.textAlign=="left"||d.barcodePadding>0?(p=0,f.setAttribute("text-anchor","start")):s.textAlign=="right"?(p=d.width-1,f.setAttribute("text-anchor","end")):(p=d.width/2,f.setAttribute("text-anchor","middle")),f.setAttribute("x",p),f.setAttribute("y",m),f.appendChild(this.document.createTextNode(d.text)),a.appendChild(f)}}},{key:"setSvgAttributes",value:function(a,s){var d=this.svg;d.setAttribute("width",a+"px"),d.setAttribute("height",s+"px"),d.setAttribute("x","0px"),d.setAttribute("y","0px"),d.setAttribute("viewBox","0 0 "+a+" "+s),d.setAttribute("xmlns",l),d.setAttribute("version","1.1")}},{key:"createGroup",value:function(a,s,d){var f=this.document.createElementNS(l,"g");return f.setAttribute("transform","translate("+a+", "+s+")"),d.appendChild(f),f}},{key:"setGroupOptions",value:function(a,s){a.setAttribute("fill",s.lineColor)}},{key:"drawRect",value:function(a,s,d,f,p){var m=this.document.createElementNS(l,"rect");return m.setAttribute("x",a),m.setAttribute("y",s),m.setAttribute("width",d),m.setAttribute("height",f),p.appendChild(m),m}}]),c})();return Ao.default=u,Ao}var Do={},sf;function s2(){if(sf)return Do;sf=1,Object.defineProperty(Do,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var l=0;l<i.length;l++){var u=i[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,l){return i&&r(o.prototype,i),l&&r(o,l),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o,i,l){t(this,r),this.object=o,this.encodings=i,this.options=l}return e(r,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),r})();return Do.default=n,Do}var af;function a2(){if(af)return Mo;af=1,Object.defineProperty(Mo,"__esModule",{value:!0});var e=o2(),t=l(e),n=i2(),r=l(n),o=s2(),i=l(o);function l(u){return u&&u.__esModule?u:{default:u}}return Mo.default={CanvasRenderer:t.default,SVGRenderer:r.default,ObjectRenderer:i.default},Mo}var ln={},lf;function c0(){if(lf)return ln;lf=1,Object.defineProperty(ln,"__esModule",{value:!0});function e(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}function t(l,u){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:l}function n(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);l.prototype=Object.create(u&&u.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(l,u):l.__proto__=u)}var r=(function(l){n(u,l);function u(c,a){e(this,u);var s=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return s.name="InvalidInputException",s.symbology=c,s.input=a,s.message='"'+s.input+'" is not a valid input for '+s.symbology,s}return u})(Error),o=(function(l){n(u,l);function u(){e(this,u);var c=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return c.name="InvalidElementException",c.message="Not supported type to render on",c}return u})(Error),i=(function(l){n(u,l);function u(){e(this,u);var c=t(this,(u.__proto__||Object.getPrototypeOf(u)).call(this));return c.name="NoElementException",c.message="No element to render on.",c}return u})(Error);return ln.InvalidInputException=r,ln.InvalidElementException=o,ln.NoElementException=i,ln}var uf;function l2(){if(uf)return Oo;uf=1,Object.defineProperty(Oo,"__esModule",{value:!0});var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t=r2(),n=l(t),r=a2(),o=l(r),i=c0();function l(s){return s&&s.__esModule?s:{default:s}}function u(s){if(typeof s=="string")return c(s);if(Array.isArray(s)){for(var d=[],f=0;f<s.length;f++)d.push(u(s[f]));return d}else{if(typeof HTMLCanvasElement<"u"&&s instanceof HTMLImageElement)return a(s);if(s&&s.nodeName&&s.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&s instanceof SVGElement)return{element:s,options:(0,n.default)(s),renderer:o.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement)return{element:s,options:(0,n.default)(s),renderer:o.default.CanvasRenderer};if(s&&s.getContext)return{element:s,renderer:o.default.CanvasRenderer};if(s&&(typeof s>"u"?"undefined":e(s))==="object"&&!s.nodeName)return{element:s,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}}function c(s){var d=document.querySelectorAll(s);if(d.length!==0){for(var f=[],p=0;p<d.length;p++)f.push(u(d[p]));return f}}function a(s){var d=document.createElement("canvas");return{element:d,options:(0,n.default)(s),renderer:o.default.CanvasRenderer,afterRender:function(){s.setAttribute("src",d.toDataURL())}}}return Oo.default=u,Oo}var Lo={},cf;function u2(){if(cf)return Lo;cf=1,Object.defineProperty(Lo,"__esModule",{value:!0});var e=(function(){function r(o,i){for(var l=0;l<i.length;l++){var u=i[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}return function(o,i,l){return i&&r(o.prototype,i),l&&r(o,l),o}})();function t(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(o){t(this,r),this.api=o}return e(r,[{key:"handleCatch",value:function(o){if(o.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw o.message;else throw o;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(o){try{var i=o.apply(void 0,arguments);return this.api._options.valid(!0),i}catch(l){return this.handleCatch(l),this.api}}}]),r})();return Lo.default=n,Lo}var Ls,df;function c2(){if(df)return Ls;df=1;var e=e2(),t=y(e),n=Qi(),r=y(n),o=t2(),i=y(o),l=n2(),u=y(l),c=l2(),a=y(c),s=a0(),d=y(s),f=u2(),p=y(f),m=c0(),h=l0(),g=y(h);function y(O){return O&&O.__esModule?O:{default:O}}var b=function(){},x=function(O,R,A){var T=new b;if(typeof O>"u")throw Error("No element to render on was provided.");return T._renderProperties=(0,a.default)(O),T._encodings=[],T._options=g.default,T._errorHandler=new p.default(T),typeof R<"u"&&(A=A||{},A.format||(A.format=j()),T.options(A)[A.format](R,A).render()),T};x.getModule=function(O){return t.default[O]};for(var E in t.default)t.default.hasOwnProperty(E)&&S(t.default,E);function S(O,R){b.prototype[R]=b.prototype[R.toUpperCase()]=b.prototype[R.toLowerCase()]=function(A,T){var V=this;return V._errorHandler.wrapBarcodeCall(function(){T.text=typeof T.text>"u"?void 0:""+T.text;var N=(0,r.default)(V._options,T);N=(0,d.default)(N);var U=O[R],B=_(A,U,N);return V._encodings.push(B),V})}}function _(O,R,A){O=""+O;var T=new R(O,A);if(!T.valid())throw new m.InvalidInputException(T.constructor.name,O);var V=T.encode();V=(0,i.default)(V);for(var N=0;N<V.length;N++)V[N].options=(0,r.default)(A,V[N].options);return V}function j(){return t.default.CODE128?"CODE128":Object.keys(t.default)[0]}b.prototype.options=function(O){return this._options=(0,r.default)(this._options,O),this},b.prototype.blank=function(O){var R=new Array(O+1).join("0");return this._encodings.push({data:R}),this},b.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var O;for(var R in this._renderProperties){O=this._renderProperties[R];var A=(0,r.default)(this._options,O.options);A.format=="auto"&&(A.format=j()),this._errorHandler.wrapBarcodeCall(function(){var T=A.value,V=t.default[A.format.toUpperCase()],N=_(T,V,A);M(O,N,A)})}}},b.prototype.render=function(){if(!this._renderProperties)throw new m.NoElementException;if(Array.isArray(this._renderProperties))for(var O=0;O<this._renderProperties.length;O++)M(this._renderProperties[O],this._encodings,this._options);else M(this._renderProperties,this._encodings,this._options);return this},b.prototype._defaults=g.default;function M(O,R,A){R=(0,i.default)(R);for(var T=0;T<R.length;T++)R[T].options=(0,r.default)(A,R[T].options),(0,u.default)(R[T].options);(0,u.default)(A);var V=O.renderer,N=new V(O.element,R,A);N.render(),O.afterRender&&O.afterRender()}return typeof window<"u"&&(window.JsBarcode=x),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(O,R){var A=[];return jQuery(this).each(function(){A.push(this)}),x(A,O,R)}),Ls=x,Ls}var No={exports:{}},Ns={exports:{}},ce={};/** @license React v16.13.1
|
|
113
|
-
* react-is.production.min.js
|
|
114
|
-
*
|
|
115
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the MIT license found in the
|
|
118
|
-
* LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/var ff;function d2(){if(ff)return ce;ff=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case c:case a:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case u:case s:case m:case p:case l:return S;default:return _}}case n:return _}}}function E(S){return x(S)===a}return ce.AsyncMode=c,ce.ConcurrentMode=a,ce.ContextConsumer=u,ce.ContextProvider=l,ce.Element=t,ce.ForwardRef=s,ce.Fragment=r,ce.Lazy=m,ce.Memo=p,ce.Portal=n,ce.Profiler=i,ce.StrictMode=o,ce.Suspense=d,ce.isAsyncMode=function(S){return E(S)||x(S)===c},ce.isConcurrentMode=E,ce.isContextConsumer=function(S){return x(S)===u},ce.isContextProvider=function(S){return x(S)===l},ce.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ce.isForwardRef=function(S){return x(S)===s},ce.isFragment=function(S){return x(S)===r},ce.isLazy=function(S){return x(S)===m},ce.isMemo=function(S){return x(S)===p},ce.isPortal=function(S){return x(S)===n},ce.isProfiler=function(S){return x(S)===i},ce.isStrictMode=function(S){return x(S)===o},ce.isSuspense=function(S){return x(S)===d},ce.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===a||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===p||S.$$typeof===l||S.$$typeof===u||S.$$typeof===s||S.$$typeof===g||S.$$typeof===y||S.$$typeof===b||S.$$typeof===h)},ce.typeOf=x,ce}var de={};/** @license React v16.13.1
|
|
120
|
-
* react-is.development.js
|
|
121
|
-
*
|
|
122
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the MIT license found in the
|
|
125
|
-
* LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/var pf;function f2(){return pf||(pf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(I){return typeof I=="string"||typeof I=="function"||I===r||I===a||I===i||I===o||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===p||I.$$typeof===l||I.$$typeof===u||I.$$typeof===s||I.$$typeof===g||I.$$typeof===y||I.$$typeof===b||I.$$typeof===h)}function E(I){if(typeof I=="object"&&I!==null){var me=I.$$typeof;switch(me){case t:var Le=I.type;switch(Le){case c:case a:case r:case i:case o:case d:return Le;default:var Ue=Le&&Le.$$typeof;switch(Ue){case u:case s:case m:case p:case l:return Ue;default:return me}}case n:return me}}}var S=c,_=a,j=u,M=l,O=t,R=s,A=r,T=m,V=p,N=n,U=i,B=o,W=d,z=!1;function D(I){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(I)||E(I)===c}function k(I){return E(I)===a}function L(I){return E(I)===u}function Q(I){return E(I)===l}function ee(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function G(I){return E(I)===s}function ne(I){return E(I)===r}function te(I){return E(I)===m}function $(I){return E(I)===p}function q(I){return E(I)===n}function X(I){return E(I)===i}function K(I){return E(I)===o}function ie(I){return E(I)===d}de.AsyncMode=S,de.ConcurrentMode=_,de.ContextConsumer=j,de.ContextProvider=M,de.Element=O,de.ForwardRef=R,de.Fragment=A,de.Lazy=T,de.Memo=V,de.Portal=N,de.Profiler=U,de.StrictMode=B,de.Suspense=W,de.isAsyncMode=D,de.isConcurrentMode=k,de.isContextConsumer=L,de.isContextProvider=Q,de.isElement=ee,de.isForwardRef=G,de.isFragment=ne,de.isLazy=te,de.isMemo=$,de.isPortal=q,de.isProfiler=X,de.isStrictMode=K,de.isSuspense=ie,de.isValidElementType=x,de.typeOf=E})()),de}var hf;function d0(){return hf||(hf=1,process.env.NODE_ENV==="production"?Ns.exports=d2():Ns.exports=f2()),Ns.exports}/*
|
|
127
|
-
object-assign
|
|
128
|
-
(c) Sindre Sorhus
|
|
129
|
-
@license MIT
|
|
130
|
-
*/var Is,mf;function p2(){if(mf)return Is;mf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var l={},u=0;u<10;u++)l["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(l).map(function(s){return l[s]});if(c.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(s){a[s]=s}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Is=o()?Object.assign:function(i,l){for(var u,c=r(i),a,s=1;s<arguments.length;s++){u=Object(arguments[s]);for(var d in u)t.call(u,d)&&(c[d]=u[d]);if(e){a=e(u);for(var f=0;f<a.length;f++)n.call(u,a[f])&&(c[a[f]]=u[a[f]])}}return c},Is}var Fs,gf;function ru(){if(gf)return Fs;gf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fs=e,Fs}var vf,yf;function f0(){return yf||(yf=1,vf=Function.call.bind(Object.prototype.hasOwnProperty)),vf}var Vs,bf;function h2(){if(bf)return Vs;bf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ru(),n={},r=f0();e=function(i){var l="Warning: "+i;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function o(i,l,u,c,a){if(process.env.NODE_ENV!=="production"){for(var s in i)if(r(i,s)){var d;try{if(typeof i[s]!="function"){var f=Error((c||"React class")+": "+u+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[s](l,s,c,u,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+u+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=a?a():"";e("Failed "+u+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Vs=o,Vs}var $s,wf;function m2(){if(wf)return $s;wf=1;var e=d0(),t=p2(),n=ru(),r=f0(),o=h2(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function l(){return null}return $s=function(u,c){var a=typeof Symbol=="function"&&Symbol.iterator,s="@@iterator";function d(k){var L=k&&(a&&k[a]||k[s]);if(typeof L=="function")return L}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:E(),elementType:S(),instanceOf:_,node:R(),objectOf:M,oneOf:j,oneOfType:O,shape:T,exact:V};function m(k,L){return k===L?k!==0||1/k===1/L:k!==k&&L!==L}function h(k,L){this.message=k,this.data=L&&typeof L=="object"?L:{},this.stack=""}h.prototype=Error.prototype;function g(k){if(process.env.NODE_ENV!=="production")var L={},Q=0;function ee(ne,te,$,q,X,K,ie){if(q=q||f,K=K||$,ie!==n){if(c){var I=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 I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=q+":"+$;!L[me]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[me]=!0,Q++)}}return te[$]==null?ne?te[$]===null?new h("The "+X+" `"+K+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new h("The "+X+" `"+K+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:k(te,$,q,X,K)}var G=ee.bind(null,!1);return G.isRequired=ee.bind(null,!0),G}function y(k){function L(Q,ee,G,ne,te,$){var q=Q[ee],X=B(q);if(X!==k){var K=W(q);return new h("Invalid "+ne+" `"+te+"` of type "+("`"+K+"` supplied to `"+G+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return g(L)}function b(){return g(l)}function x(k){function L(Q,ee,G,ne,te){if(typeof k!="function")return new h("Property `"+te+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var $=Q[ee];if(!Array.isArray($)){var q=B($);return new h("Invalid "+ne+" `"+te+"` of type "+("`"+q+"` supplied to `"+G+"`, expected an array."))}for(var X=0;X<$.length;X++){var K=k($,X,G,ne,te+"["+X+"]",n);if(K instanceof Error)return K}return null}return g(L)}function E(){function k(L,Q,ee,G,ne){var te=L[Q];if(!u(te)){var $=B(te);return new h("Invalid "+G+" `"+ne+"` of type "+("`"+$+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return g(k)}function S(){function k(L,Q,ee,G,ne){var te=L[Q];if(!e.isValidElementType(te)){var $=B(te);return new h("Invalid "+G+" `"+ne+"` of type "+("`"+$+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return g(k)}function _(k){function L(Q,ee,G,ne,te){if(!(Q[ee]instanceof k)){var $=k.name||f,q=D(Q[ee]);return new h("Invalid "+ne+" `"+te+"` of type "+("`"+q+"` supplied to `"+G+"`, expected ")+("instance of `"+$+"`."))}return null}return g(L)}function j(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),l;function L(Q,ee,G,ne,te){for(var $=Q[ee],q=0;q<k.length;q++)if(m($,k[q]))return null;var X=JSON.stringify(k,function(K,ie){var I=W(ie);return I==="symbol"?String(ie):ie});return new h("Invalid "+ne+" `"+te+"` of value `"+String($)+"` "+("supplied to `"+G+"`, expected one of "+X+"."))}return g(L)}function M(k){function L(Q,ee,G,ne,te){if(typeof k!="function")return new h("Property `"+te+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var $=Q[ee],q=B($);if(q!=="object")return new h("Invalid "+ne+" `"+te+"` of type "+("`"+q+"` supplied to `"+G+"`, expected an object."));for(var X in $)if(r($,X)){var K=k($,X,G,ne,te+"."+X,n);if(K instanceof Error)return K}return null}return g(L)}function O(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var L=0;L<k.length;L++){var Q=k[L];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Q)+" at index "+L+"."),l}function ee(G,ne,te,$,q){for(var X=[],K=0;K<k.length;K++){var ie=k[K],I=ie(G,ne,te,$,q,n);if(I==null)return null;I.data&&r(I.data,"expectedType")&&X.push(I.data.expectedType)}var me=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new h("Invalid "+$+" `"+q+"` supplied to "+("`"+te+"`"+me+"."))}return g(ee)}function R(){function k(L,Q,ee,G,ne){return N(L[Q])?null:new h("Invalid "+G+" `"+ne+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return g(k)}function A(k,L,Q,ee,G){return new h((k||"React class")+": "+L+" type `"+Q+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function T(k){function L(Q,ee,G,ne,te){var $=Q[ee],q=B($);if(q!=="object")return new h("Invalid "+ne+" `"+te+"` of type `"+q+"` "+("supplied to `"+G+"`, expected `object`."));for(var X in k){var K=k[X];if(typeof K!="function")return A(G,ne,te,X,W(K));var ie=K($,X,G,ne,te+"."+X,n);if(ie)return ie}return null}return g(L)}function V(k){function L(Q,ee,G,ne,te){var $=Q[ee],q=B($);if(q!=="object")return new h("Invalid "+ne+" `"+te+"` of type `"+q+"` "+("supplied to `"+G+"`, expected `object`."));var X=t({},Q[ee],k);for(var K in X){var ie=k[K];if(r(k,K)&&typeof ie!="function")return A(G,ne,te,K,W(ie));if(!ie)return new h("Invalid "+ne+" `"+te+"` key `"+K+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(Q[ee],null," ")+`
|
|
131
|
-
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var I=ie($,K,G,ne,te+"."+K,n);if(I)return I}return null}return g(L)}function N(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(N);if(k===null||u(k))return!0;var L=d(k);if(L){var Q=L.call(k),ee;if(L!==k.entries){for(;!(ee=Q.next()).done;)if(!N(ee.value))return!1}else for(;!(ee=Q.next()).done;){var G=ee.value;if(G&&!N(G[1]))return!1}}else return!1;return!0;default:return!1}}function U(k,L){return k==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function B(k){var L=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":U(L,k)?"symbol":L}function W(k){if(typeof k>"u"||k===null)return""+k;var L=B(k);if(L==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return L}function z(k){var L=W(k);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function D(k){return!k.constructor||!k.constructor.name?f:k.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},$s}var Bs,xf;function g2(){if(xf)return Bs;xf=1;var e=ru();function t(){}function n(){}return n.resetWarningCache=t,Bs=function(){function r(l,u,c,a,s,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Bs}var Ef;function v2(){if(Ef)return No.exports;if(Ef=1,process.env.NODE_ENV!=="production"){var e=d0(),t=!0;No.exports=m2()(e.isElement,t)}else No.exports=g2()();return No.exports}var zs,Sf;function y2(){if(Sf)return zs;Sf=1;function e(g){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(y){return typeof y}:e=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},e(g)}var t=o(P),n=o(c2()),r=o(v2());function o(g){return g&&g.__esModule?g:{default:g}}function i(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function l(g,y){for(var b=0;b<y.length;b++){var x=y[b];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}function u(g,y,b){return y&&l(g.prototype,y),g}function c(g,y){return y&&(e(y)==="object"||typeof y=="function")?y:s(g)}function a(g){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},a(g)}function s(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function d(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),y&&f(g,y)}function f(g,y){return f=Object.setPrototypeOf||function(b,x){return b.__proto__=x,b},f(g,y)}var p,m=t.default.version.split(/[.-]/);m[0]==="0"&&(m[1]==="13"||m[1]==="12")?p=function(g){return g.getDOMNode()}:p=function(g){return g};var h=(function(g){d(y,g);function y(b){var x;return i(this,y),x=c(this,a(y).call(this,b)),x.renderElementRef=t.default.createRef(),x.update=x.update.bind(s(x)),x}return u(y,[{key:"shouldComponentUpdate",value:function(b){var x=this;return Object.keys(y.propTypes).some(function(E){return x.props[E]!==b[E]})}},{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var b=p(this.renderElementRef.current);try{new n.default(b,this.props.value,Object.assign({text:this.props.text||this.props.value},this.props))}catch(x){window.console.error(x)}}},{key:"render",value:function(){var b=this.props,x=b.id,E=b.className;if(this.props.renderer==="svg")return t.default.createElement("svg",{ref:this.renderElementRef,id:x,className:E});if(this.props.renderer==="canvas")return t.default.createElement("canvas",{ref:this.renderElementRef,id:x,className:E});if(this.props.renderer==="img")return t.default.createElement("img",{ref:this.renderElementRef,id:x,className:E})}}]),y})(t.default.Component);return h.propTypes={value:r.default.string.isRequired,text:r.default.string,renderer:r.default.string,format:r.default.string,width:r.default.number,height:r.default.number,displayValue:r.default.bool,fontOptions:r.default.string,font:r.default.string,textAlign:r.default.string,textPosition:r.default.string,textMargin:r.default.number,fontSize:r.default.number,background:r.default.string,lineColor:r.default.string,margin:r.default.number,marginTop:r.default.number,marginBottom:r.default.number,marginLeft:r.default.number,marginRight:r.default.number,id:r.default.string,className:r.default.string,ean128:r.default.bool},h.defaultProps={format:"CODE128",renderer:"svg",width:2,height:100,displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,className:"",ean128:!1},zs=h,zs}y2();const b2=P.forwardRef(({children:e,className:t,disabled:n,...r},o)=>w.jsx(ZS,{ref:o,disabled:n,className:fe("w-full h-auto outline-0 hover:bg-gray-3 px-4 py-[5px] cursor-pointer",{"text-gray-6 cursor-not-allowed":n},t),...r,children:w.jsx(JS,{className:"whitespace-nowrap",children:e})}));b2.displayName="SelectItem";const w2=P.forwardRef(({value:e,onChange:t,placeholder:n="Buscar...",disabled:r},o)=>w.jsx("div",{className:"px-2 py-2 border-b border-gray-4 bg-white sticky top-0",onPointerDown:i=>{i.stopPropagation()},children:w.jsx("input",{ref:o,type:"text",value:e,onChange:t,placeholder:n,disabled:r,autoComplete:"off",autoFocus:!0,className:fe("w-full px-3 py-1.5 text-sm border border-gray-4 rounded outline-none","focus:border-primary-blue focus:ring-1 focus:ring-primary-blue","disabled:bg-gray-3 disabled:cursor-not-allowed"),onKeyDown:i=>{i.stopPropagation()},onMouseDown:i=>{i.stopPropagation()},onPointerDown:i=>{i.stopPropagation()}})}));w2.displayName="SearchInput";var ou=(e=>(e.cols="grid-cols",e.rows="grid-rows",e.gap="gap",e.justifyItems="justify-items",e.alignContent="content",e.span="col-span",e.start="col-start",e.end="col-end",e.justifySelf="justify-self",e.alignSelf="self",e))(ou||{});const{cols:oM,gap:iM,justifyItems:sM,alignContent:aM}=ou,{span:lM,start:uM,end:cM,justifySelf:dM,alignSelf:fM}=ou;P.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"});const{Text:Cf}=Ar,x2=({className:e,children:t})=>{const{t:n}=Wo.useTranslation();return!t||t.trim()===""?null:pe.jsxRuntimeExports.jsxs(hr,{className:e,align:"center",gap:2,children:[pe.jsxRuntimeExports.jsxs(hr,{align:"center",gap:1,children:[pe.jsxRuntimeExports.jsx(S0,{className:"text-primary-blue size-6"}),pe.jsxRuntimeExports.jsx(Cf,{className:"text-primary-blue",size:"sm",weight:"semibold",children:n("layout.header.store")})]}),pe.jsxRuntimeExports.jsx(Cf,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:t})]})},{Text:Pf}=Ar,E2=({name:e,role:t,imageUrl:n,items:r})=>!e||e.trim()===""?null:pe.jsxRuntimeExports.jsxs(hr,{align:"center",gap:2,children:[pe.jsxRuntimeExports.jsx(IT,{src:n,alt:e,size:"sm"}),pe.jsxRuntimeExports.jsxs(hr,{gap:1,direction:"vertical",children:[pe.jsxRuntimeExports.jsx(Pf,{className:"text-primary-blue",size:"sm",weight:"semibold",children:e}),pe.jsxRuntimeExports.jsx(Pf,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:t})]}),pe.jsxRuntimeExports.jsx(JT,{classNames:{label:"p-0 border-0"},trigger:pe.jsxRuntimeExports.jsx(C0,{className:"rotate-180"}),items:r})]}),p0=({className:e,children:t})=>{if(Array.isArray(t)&&t.length===0)return null;const n=r=>r===t.length-1;return pe.jsxRuntimeExports.jsx(hr,{align:"center",gap:4,className:En.cn(e),children:t.map((r,o)=>pe.jsxRuntimeExports.jsxs(P.Fragment,{children:[r,n(o)?null:pe.jsxRuntimeExports.jsx(b0,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:En.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},o))})};p0.disPlayName="Layout.Header.RightSide";const Fr=({className:e,...t})=>pe.jsxRuntimeExports.jsx("header",{className:En.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",e),...t});Fr.LeftSide=E0;Fr.Store=x2;Fr.User=E2;Fr.RightSide=p0;const S2=({className:e,children:t,...n})=>pe.jsxRuntimeExports.jsx("div",{className:En.cn("flex w-full flex-1 flex-col px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",e),...n,children:pe.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:t})}),C2=({className:e,...t})=>pe.jsxRuntimeExports.jsx("footer",{className:En.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",e),...t}),oe=e=>typeof e=="string",qn=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Rf=e=>e==null?"":""+e,P2=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},R2=/###/g,Of=e=>e&&e.indexOf("###")>-1?e.replace(R2,"."):e,_f=e=>!e||oe(e),or=(e,t,n)=>{const r=oe(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(_f(e))return{};const i=Of(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return _f(e)?{}:{obj:e,k:Of(r[o])}},Tf=(e,t,n)=>{const{obj:r,k:o}=or(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],l=t.slice(0,t.length-1),u=or(e,l,Object);for(;u.obj===void 0&&l.length;)i=`${l[l.length-1]}.${i}`,l=l.slice(0,l.length-1),u=or(e,l,Object),u!=null&&u.obj&&typeof u.obj[`${u.k}.${i}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${i}`]=n},O2=(e,t,n,r)=>{const{obj:o,k:i}=or(e,t,Object);o[i]=o[i]||[],o[i].push(n)},pi=(e,t)=>{const{obj:n,k:r}=or(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},_2=(e,t,n)=>{const r=pi(e,n);return r!==void 0?r:pi(t,n)},h0=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?oe(e[r])||e[r]instanceof String||oe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):h0(e[r],t[r],n):e[r]=t[r]);return e},un=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var T2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const j2=e=>oe(e)?e.replace(/[&<>"'\/]/g,t=>T2[t]):e;class M2{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const k2=[" ",",","?","!",";"],A2=new M2(20),D2=(e,t,n)=>{t=t||"",n=n||"";const r=k2.filter(l=>t.indexOf(l)<0&&n.indexOf(l)<0);if(r.length===0)return!0;const o=A2.getRegExp(`(${r.map(l=>l==="?"?"\\?":l).join("|")})`);let i=!o.test(e);if(!i){const l=e.indexOf(n);l>0&&!o.test(e.substring(0,l))&&(i=!0)}return i},La=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let l,u="";for(let c=i;c<r.length;++c)if(c!==i&&(u+=n),u+=r[c],l=o[u],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&c<r.length-1)continue;i+=c-i+1;break}o=l}return o},hi=e=>e==null?void 0:e.replace("_","-"),L2={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class mi{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||L2,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(oe(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new mi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new mi(this.logger,t)}}var it=new mi;class es{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(l=>{let[u,c]=l;for(let a=0;a<c;a++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(l=>{let[u,c]=l;for(let a=0;a<c;a++)u.apply(u,[t,...r])})}}class jf extends es{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var a,s;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):oe(r)&&i?u.push(...r.split(i)):u.push(r)));const c=pi(this.data,u);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),c||!l||!oe(r)?c:La((s=(a=this.data)==null?void 0:a[t])==null?void 0:s[n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(l?r.split(l):r)),t.indexOf(".")>-1&&(u=t.split("."),o=n,n=u[1]),this.addNamespaces(n),Tf(this.data,u,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(oe(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),o=r,r=n,n=u[1]),this.addNamespaces(n);let c=pi(this.data,u)||{};l.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?h0(c,r,i):c={...c,...r},Tf(this.data,u,c),l.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var m0={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{var l;t=((l=this.processors[i])==null?void 0:l.process(t,n,r,o))??t}),t}};const Mf={};class gi extends es{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),P2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=it.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const l=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!D2(t,r,o);if(l&&!u){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:oe(i)?[i]:i};const a=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),t=a.join(o)}return{key:t,namespaces:oe(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:l,namespaces:u}=this.extractFromKey(t[t.length-1],n),c=u[u.length-1],a=n.lng||this.language,s=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((a==null?void 0:a.toLowerCase())==="cimode"){if(s){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${E}${l}`,usedKey:l,exactUsedKey:l,usedLng:a,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${E}${l}`}return o?{res:l,usedKey:l,exactUsedKey:l,usedLng:a,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:l}const d=this.resolve(t,n);let f=d==null?void 0:d.res;const p=(d==null?void 0:d.usedKey)||l,m=(d==null?void 0:d.exactUsedKey)||l,h=Object.prototype.toString.apply(f),g=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=!oe(f)&&typeof f!="boolean"&&typeof f!="number";if(b&&f&&x&&g.indexOf(h)<0&&!(oe(y)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:u}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(d.res=E,d.usedParams=this.getUsedParamsDetails(n),d):E}if(i){const E=Array.isArray(f),S=E?[]:{},_=E?m:p;for(const j in f)if(Object.prototype.hasOwnProperty.call(f,j)){const M=`${_}${i}${j}`;S[j]=this.translate(M,{...n,joinArrays:!1,ns:u}),S[j]===M&&(S[j]=f[j])}f=S}}else if(b&&oe(y)&&Array.isArray(f))f=f.join(y),f&&(f=this.extendTranslation(f,t,n,r));else{let E=!1,S=!1;const _=n.count!==void 0&&!oe(n.count),j=gi.hasDefaultValue(n),M=_?this.pluralResolver.getSuffix(a,n.count,n):"",O=n.ordinal&&_?this.pluralResolver.getSuffix(a,n.count,{ordinal:!1}):"",R=_&&!n.ordinal&&n.count===0,A=R&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(f)&&j&&(E=!0,f=A),this.isValidLookup(f)||(S=!0,f=l);const V=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,N=j&&A!==f&&this.options.updateMissing;if(S||E||N){if(this.logger.log(N?"updateKey":"missingKey",a,c,l,N?A:f),i){const z=this.resolve(l,{...n,keySeparator:!1});z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let z=0;z<B.length;z++)U.push(B[z]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const W=(z,D,k)=>{var Q;const L=j&&k!==f?k:V;this.options.missingKeyHandler?this.options.missingKeyHandler(z,c,D,L,N,n):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(z,c,D,L,N,n),this.emit("missingKey",z,c,D,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?U.forEach(z=>{const D=this.pluralResolver.getSuffixes(z,n);R&&n[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(k=>{W([z],l+k,n[`defaultValue${k}`]||A)})}):W(U,l,A))}f=this.extendTranslation(f,t,n,d,r),S&&f===l&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${l}`),(S||E)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${l}`:l,E?f:void 0))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a,s;var l=this;if((a=this.i18nFormat)!=null&&a.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=oe(t)&&(((s=r==null?void 0:r.interpolation)==null?void 0:s.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const m=t.match(this.interpolator.nestingRegexp);f=m&&m.length}let p=r.replace&&!oe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),d){const m=t.match(this.interpolator.nestingRegexp),h=m&&m.length;f<h&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var m=arguments.length,h=new Array(m),g=0;g<m;g++)h[g]=arguments[g];return(i==null?void 0:i[0])===h[0]&&!r.context?(l.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):l.translate(...h,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,c=oe(u)?[u]:u;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=m0.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,l,u;return oe(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const a=this.extractFromKey(c,n),s=a.key;o=s;let d=a.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!oe(n.count),p=f&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(oe(n.context)||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(g=>{var y,b;this.isValidLookup(r)||(u=g,!Mf[`${h[0]}-${g}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(u))&&(Mf[`${h[0]}-${g}`]=!0,this.logger.warn(`key "${o}" for languages "${h.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(x=>{var _;if(this.isValidLookup(r))return;l=x;const E=[s];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(E,s,x,g,n);else{let j;f&&(j=this.pluralResolver.getSuffix(x,n.count,n));const M=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(E.push(s+j),n.ordinal&&j.indexOf(O)===0&&E.push(s+j.replace(O,this.options.pluralSeparator)),p&&E.push(s+M)),m){const R=`${s}${this.options.contextSeparator}${n.context}`;E.push(R),f&&(E.push(R+j),n.ordinal&&j.indexOf(O)===0&&E.push(R+j.replace(O,this.options.pluralSeparator)),p&&E.push(R+M))}}let S;for(;S=E.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(x,g,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:l,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!oe(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class kf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=it.create("languageUtils")}getScriptPartFromCode(t){if(t=hi(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=hi(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(oe(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),oe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=l=>{l&&(this.isSupportedCode(l)?o.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return oe(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):oe(t)&&i(this.formatLanguageCode(t)),r.forEach(l=>{o.indexOf(l)<0&&i(this.formatLanguageCode(l))}),o}}const Af={zero:0,one:1,two:2,few:3,many:4,other:5},Df={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class N2{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=it.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=hi(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let l;try{l=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Df;if(!t.match(/-|_/))return Df;const c=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(c,n)}return this.pluralRulesCache[i]=l,l}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>Af[o]-Af[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Lf=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=_2(e,t,n);return!i&&o&&oe(n)&&(i=La(e,n,r),i===void 0&&(i=La(t,n,r))),i},Us=e=>e.replace(/\$/g,"$$$$");class I2{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=it.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:l,suffix:u,suffixEscaped:c,formatSeparator:a,unescapeSuffix:s,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:j2,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?un(i):l||"{{",this.suffix=u?un(u):c||"}}",this.formatSeparator=a||",",this.unescapePrefix=s?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":s||"",this.nestingPrefix=f?un(f):p||un("$t("),this.nestingSuffix=m?un(m):h||un(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var p;let i,l,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},a=m=>{if(m.indexOf(this.formatSeparator)<0){const b=Lf(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:m}):b}const h=m.split(this.formatSeparator),g=h.shift().trim(),y=h.join(this.formatSeparator).trim();return this.format(Lf(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:g})};this.resetRegExp();const s=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=o==null?void 0:o.interpolation)==null?void 0:p.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Us(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Us(this.escape(m)):Us(m)}].forEach(m=>{for(u=0;i=m.regex.exec(t);){const h=i[1].trim();if(l=a(h),l===void 0)if(typeof s=="function"){const y=s(t,i,o);l=oe(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,h))l="";else if(d){l=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),l="";else!oe(l)&&!this.useRawValueToEscape&&(l=Rf(l));const g=m.safeValue(l);if(t=t.replace(i[0],g),d?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,l;const u=(c,a)=>{const s=this.nestingOptionsSeparator;if(c.indexOf(s)<0)return c;const d=c.split(new RegExp(`${s}[ ]*{`));let f=`{${d[1]}`;c=d[0],f=this.interpolate(f,l);const p=f.match(/'/g),m=f.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{l=JSON.parse(f),a&&(l={...a,...l})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,h),`${c}${s}${f}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,c};for(;o=this.nestingRegexp.exec(t);){let c=[];l={...r},l=l.replace&&!oe(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;let a=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const s=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=s.shift(),c=s,a=!0}if(i=n(u.call(this,o[1].trim(),l),l),i&&o[0]===t&&!oe(i))return i;oe(i)||(i=Rf(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),a&&(i=c.reduce((s,d)=>this.format(s,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const F2=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(l=>{if(l){const[u,...c]=l.split(":"),a=c.join(":").trim().replace(/^'+|'+$/g,""),s=u.trim();n[s]||(n[s]=a),a==="false"&&(n[s]=!1),a==="true"&&(n[s]=!0),isNaN(a)||(n[s]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}},cn=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const l=r+JSON.stringify(i);let u=t[l];return u||(u=e(hi(r),o),t[l]=u),u(n)}};class V2{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=it.create("formatter"),this.options=t,this.formats={number:cn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:cn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:cn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:cn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:cn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=cn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(u=>u.indexOf(")")>-1)){const u=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,u)].join(this.formatSeparator)}return i.reduce((u,c)=>{var d;const{formatName:a,formatOptions:s}=F2(c);if(this.formats[a]){let f=u;try{const p=((d=o==null?void 0:o.formatParams)==null?void 0:d[o.interpolationkey])||{},m=p.locale||p.lng||o.locale||o.lng||r;f=this.formats[a](u,m,{...s,...o,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${a}`);return u},t)}}const $2=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class B2 extends es{constructor(t,n,r){var i,l;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=it.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(l=(i=this.backend)==null?void 0:i.init)==null||l.call(i,r,o.backend,o)}queueLoad(t,n,r,o){const i={},l={},u={},c={};return t.forEach(a=>{let s=!0;n.forEach(d=>{const f=`${a}|${d}`;!r.reload&&this.store.hasResourceBundle(a,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?l[f]===void 0&&(l[f]=!0):(this.state[f]=1,s=!1,l[f]===void 0&&(l[f]=!0),i[f]===void 0&&(i[f]=!0),c[d]===void 0&&(c[d]=!0)))}),s||(u[a]=!0)}),(Object.keys(i).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(l),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const o=t.split("|"),i=o[0],l=o[1];n&&this.emit("failedLoading",i,l,n),!n&&r&&this.store.addResourceBundle(i,l,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const u={};this.queue.forEach(c=>{O2(c.loaded,[i],l),$2(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(a=>{u[a]||(u[a]={});const s=c.loaded[a];s.length&&s.forEach(d=>{u[a][d]===void 0&&(u[a][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:l});return}this.readingCalls++;const u=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(a&&s&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,i*2,l)},i);return}l(a,s)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const a=c(t,n);a&&typeof a.then=="function"?a.then(s=>u(null,s)).catch(u):u(null,a)}catch(a){u(a)}return}return c(t,n,u)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();oe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),oe(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(l=>{this.loadOne(l)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(l,u)=>{l&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,l),!l&&u&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,u),this.loaded(t,l,u)})}saveMissing(t,n,r,o,i){var c,a,s,d,f;let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((a=(c=this.services)==null?void 0:c.utils)!=null&&a.hasLoadedNamespace&&!((d=(s=this.services)==null?void 0:s.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const p={...l,isUpdate:i},m=this.backend.create.bind(this.backend);if(m.length<6)try{let h;m.length===5?h=m(t,n,r,o,p):h=m(t,n,r,o),h&&typeof h.then=="function"?h.then(g=>u(null,g)).catch(u):u(null,h)}catch(h){u(h)}else m(t,n,r,o,u,p)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Nf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),oe(e[1])&&(t.defaultValue=e[1]),oe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),If=e=>{var t,n;return oe(e.ns)&&(e.ns=[e.ns]),oe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Io=()=>{},z2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class mr extends es{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=If(t),this.services={},this.logger=it,this.modules={external:[]},z2(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(oe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Nf();this.options={...o,...this.options,...If(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=s=>s?typeof s=="function"?new s:s:null;if(!this.options.isClone){this.modules.logger?it.init(i(this.modules.logger),this.options):it.init(null,this.options);let s;this.modules.formatter?s=this.modules.formatter:s=V2;const d=new kf(this.options);this.store=new jf(this.options.resources,this.options);const f=this.services;f.logger=it,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new N2(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(s),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new I2(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new B2(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var m=arguments.length,h=new Array(m>1?m-1:0),g=1;g<m;g++)h[g-1]=arguments[g];t.emit(p,...h)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new gi(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,h=new Array(m>1?m-1:0),g=1;g<m;g++)h[g-1]=arguments[g];t.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Io),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&s[0]!=="dev"&&(this.options.lng=s[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(s=>{this[s]=function(){return t.store[s](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(s=>{this[s]=function(){return t.store[s](...arguments),t}});const c=qn(),a=()=>{const s=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return s(null,this.t.bind(this));this.changeLanguage(this.options.lng,s)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),c}loadResources(t){var i,l;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Io;const o=oe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const u=[],c=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(d=>{d!=="cimode"&&u.indexOf(d)<0&&u.push(d)})};o?c(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>c(s)),(l=(i=this.options.preload)==null?void 0:i.forEach)==null||l.call(i,a=>c(a)),this.services.backendConnector.load(u,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=qn();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Io),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&m0.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=qn();this.emit("languageChanging",t);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},l=(c,a)=>{a?(i(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},u=c=>{var s,d;!t&&!c&&this.services.languageDetector&&(c=[]);const a=oe(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);a&&(this.language||i(a),this.translator.language||this.translator.changeLanguage(a),(d=(s=this.services.languageDetector)==null?void 0:s.cacheUserLanguage)==null||d.call(s,a)),this.loadResources(a,f=>{l(f,a)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),o}getFixedT(t,n,r){var o=this;const i=function(l,u){let c;if(typeof u!="object"){for(var a=arguments.length,s=new Array(a>2?a-2:0),d=2;d<a;d++)s[d-2]=arguments[d];c=o.options.overloadTranslationOptionHandler([l,u].concat(s))}else c={...u};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);const f=o.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(l)?p=l.map(m=>`${c.keyPrefix}${f}${m}`):p=c.keyPrefix?`${c.keyPrefix}${f}${l}`:l,o.t(p,c)};return oe(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const l=(u,c)=>{const a=this.services.backendConnector.state[`${u}|${c}`];return a===-1||a===0||a===2};if(n.precheck){const u=n.precheck(this,l);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(r,t)&&(!o||l(i,t)))}loadNamespaces(t,n){const r=qn();return this.options.ns?(oe(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=qn();oe(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(l=>o.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return i.length?(this.options.preload=o.concat(i),this.loadResources(l=>{r.resolve(),n&&n(l)}),r):(n&&n(),Promise.resolve())}dir(t){var o,i;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new kf(Nf());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new mr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Io;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new mr(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(u=>{i[u]=this[u]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const u=Object.keys(this.store.data).reduce((c,a)=>(c[a]={...this.store.data[a]},Object.keys(c[a]).reduce((s,d)=>(s[d]={...c[a][d]},s),{})),{});i.store=new jf(u,o),i.services.resourceStore=i.store}return i.translator=new gi(i.services,o),i.translator.on("*",function(u){for(var c=arguments.length,a=new Array(c>1?c-1:0),s=1;s<c;s++)a[s-1]=arguments[s];i.emit(u,...a)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oe=mr.createInstance();Oe.createInstance=mr.createInstance;Oe.createInstance;Oe.dir;Oe.init;Oe.loadResources;Oe.reloadResources;Oe.use;Oe.changeLanguage;Oe.getFixedT;Oe.t;Oe.exists;Oe.setDefaultNamespace;Oe.hasLoadedNamespace;Oe.loadNamespaces;Oe.loadLanguages;const U2={login:{btnLabel:"Iniciar sesión"}},H2={translation:{layout:{...U2,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};Oe.use(w0).init({resources:{es:H2},lng:"es",interpolation:{escapeValue:!1}});const ts=({children:e,loading:t,...n})=>pe.jsxRuntimeExports.jsx(x0,{i18n:Oe,children:pe.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...n,children:[e,t&&pe.jsxRuntimeExports.jsx(pe.Root,{className:"position bg-opacity-50 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center"})]})});ts.Header=Fr;ts.Content=S2;ts.Footer=C2;exports.RootLayout=ts;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./proxy-2cglvzJh.cjs"),D=require("./classNames-CN12fVA7.cjs"),Y=require("react"),j=require("./toggle-group.component-DOQKWhkg.cjs"),G=require("./useTranslation-2Dz5dMlm.cjs"),Ve=require("./index-DGDeDoym.cjs");function De(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const B=De(Y);var Ae="Separator",he="horizontal",He=["horizontal","vertical"],Pe=B.forwardRef((r,e)=>{const{decorative:t,orientation:s=he,...i}=r,n=Me(s)?s:he,o=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return x.jsxRuntimeExports.jsx(j.Primitive.div,{"data-orientation":n,...o,...i,ref:e})});Pe.displayName=Ae;function Me(r){return He.includes(r)}var Ke=Pe;const g=r=>typeof r=="string",K=()=>{let r,e;const t=new Promise((s,i)=>{r=s,e=i});return t.resolve=r,t.reject=e,t},de=r=>r==null?"":""+r,ze=(r,e,t)=>{r.forEach(s=>{e[s]&&(t[s]=e[s])})},Ue=/###/g,pe=r=>r&&r.indexOf("###")>-1?r.replace(Ue,"."):r,ge=r=>!r||g(r),z=(r,e,t)=>{const s=g(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(ge(r))return{};const n=pe(s[i]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++i}return ge(r)?{}:{obj:r,k:pe(s[i])}},me=(r,e,t)=>{const{obj:s,k:i}=z(r,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Be=(r,e,t,s)=>{const{obj:i,k:n}=z(r,e,Object);i[n]=i[n]||[],i[n].push(t)},Q=(r,e)=>{const{obj:t,k:s}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},Je=(r,e,t)=>{const s=Q(r,t);return s!==void 0?s:Q(e,t)},$e=(r,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in r?g(r[s])||r[s]instanceof String||g(e[s])||e[s]instanceof String?t&&(r[s]=e[s]):$e(r[s],e[s],t):r[s]=e[s]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Ze=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>_e[e]):r;class We{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const qe=[" ",",","?","!",";"],Ye=new We(20),Ge=(r,e,t)=>{e=e||"",t=t||"";const s=qe.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=Ye.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!i.test(r);if(!n){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(n=!0)}return n},ae=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const s=e.split(t);let i=r;for(let n=0;n<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let u=n;u<s.length;++u)if(u!==n&&(o+=t),o+=s[u],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<s.length-1)continue;n+=u-n+1;break}i=a}return i},J=r=>r==null?void 0:r.replace("_","-"),Qe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,s;(s=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||s.call(t,console,e)}};class X{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Qe,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(g(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new X(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new X(this.logger,e)}}var $=new X;class te{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,n])=>{for(let a=0;a<n;a++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,n])=>{for(let a=0;a<n;a++)i.apply(i,[e,...t])})}}class xe extends te{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,i={}){var l,f;const n=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):g(s)&&n?o.push(...s.split(n)):o.push(s)));const u=Q(this.data,o);return!u&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),u||!a||!g(s)?u:ae((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],s,n)}addResource(e,t,s,i,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),me(this.data,o,i),n.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,i={silent:!1}){for(const n in s)(g(s[n])||Array.isArray(s[n]))&&this.addResource(e,t,n,s[n],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let u=Q(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?$e(u,s,n):u={...u,...s},me(this.data,o,u),a.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Ee={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,s,i){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,s,i))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function Xe(){const r=[],e=Object.create(null);let t;return e.get=(s,i)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),i===ke?r:(r.push(i),t=Proxy.revocable(s,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function oe(r,e){const{[ke]:t}=r(Xe());return t.join((e==null?void 0:e.keySeparator)??".")}const ye={},ie=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class ee extends te{constructor(e,t={}){super(),ze(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(e==null)return!1;const i=this.resolve(e,s);if((i==null?void 0:i.res)===void 0)return!1;const n=ie(i.res);return!(s.returnObjects===!1&&n)}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ge(e,s,i);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(i)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,s){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=oe(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const n=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],i),l=u[u.length-1];let f=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o;const d=this.resolve(e,i);let h=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||o,y=(d==null?void 0:d.exactUsedKey)||o,v=["[object Number]","[object Function]","[object RegExp]"],w=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=i.count!==void 0&&!g(i.count),E=ee.hasDefaultValue(i),Z=O?this.pluralResolver.getSuffix(c,i.count,i):"",k=i.ordinal&&O?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",A=O&&!i.ordinal&&i.count===0,L=A&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${Z}`]||i[`defaultValue${k}`]||i.defaultValue;let b=h;T&&!h&&E&&(b=L);const Te=ie(b),Ie=Object.prototype.toString.apply(b);if(T&&b&&Te&&v.indexOf(Ie)<0&&!(g(w)&&Array.isArray(b))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,b,{...i,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=N,d.usedParams=this.getUsedParamsDetails(i),d):N}if(a){const N=Array.isArray(b),R=N?[]:{},le=N?y:m;for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P)){const F=`${le}${a}${P}`;E&&!h?R[P]=this.translate(F,{...i,defaultValue:ie(L)?L[P]:void 0,joinArrays:!1,ns:u}):R[P]=this.translate(F,{...i,joinArrays:!1,ns:u}),R[P]===F&&(R[P]=b[P])}h=R}}else if(T&&g(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,i,s));else{let N=!1,R=!1;!this.isValidLookup(h)&&E&&(N=!0,h=L),this.isValidLookup(h)||(R=!0,h=o);const P=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:h,F=E&&L!==h&&this.options.updateMissing;if(R||N||F){if(this.logger.log(F?"updateKey":"missingKey",c,l,o,F?L:h),a){const C=this.resolve(o,{...i,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let C=0;C<W.length;C++)H.push(W[C]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(i.lng||this.language):H.push(i.lng||this.language);const ue=(C,I,M)=>{var fe;const ce=E&&M!==h?M:P;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,I,ce,F,i):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(C,l,I,ce,F,i),this.emit("missingKey",C,l,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(C=>{const I=this.pluralResolver.getSuffixes(C,i);A&&i[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(M=>{ue([C],o+M,i[`defaultValue${M}`]||L)})}):ue(H,o,L))}h=this.extendTranslation(h,e,i,d,s),R&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${f}${o}`),(R||N)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,N?h:void 0,i))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(i),d):h}extendTranslation(e,t,s,i,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const f=g(e)&&(((l=s==null?void 0:s.interpolation)==null?void 0:l.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=s.replace&&!g(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,s.lng||this.language||i.usedLng,s),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&s.applyPostProcessor!==!1&&(e=Ee.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,i,n,a,o;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(u,t),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(y=>{var v,w;this.isValidLookup(s)||(o=y,!ye[`${m[0]}-${y}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(ye[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(T=>{var Z;if(this.isValidLookup(s))return;a=T;const O=[f];if((Z=this.i18nFormat)!=null&&Z.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,T,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(T,t.count,t));const A=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(L)===0&&O.push(f+k.replace(L,this.options.pluralSeparator)),O.push(f+k),d&&O.push(f+A)),h){const b=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(b),p&&(t.ordinal&&k.indexOf(L)===0&&O.push(b+k.replace(L,this.options.pluralSeparator)),O.push(b+k),d&&O.push(b+A))}}let E;for(;E=O.pop();)this.isValidLookup(s)||(n=E,s=this.getResource(T,y,E,t))}))})}),{res:s,usedKey:i,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s,i={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!g(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const n of t)delete i[n]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return t=i;const n=this.getLanguagePartFromCode(s);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],n=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&n(this.formatLanguageCode(a))}),i}}const be={zero:0,one:1,two:2,few:3,many:4,other:5},Oe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class et{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=J(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Oe;if(!e.match(/-|_/))return Oe;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((i,n)=>be[i]-be[n]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const Le=(r,e,t,s=".",i=!0)=>{let n=Je(r,e,t);return!n&&i&&g(t)&&(n=ae(r,t,s),n===void 0&&(n=ae(e,t,s))),n},ne=r=>r.replace(/\$/g,"$$$$");class Ce{constructor(e={}){var t;this.logger=$.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(s=>s),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Ze,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?V(p):d||V("$t("),this.nestingSuffix=h?V(h):m||V(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>(t==null?void 0:t.source)===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,i){var d;let n,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const w=Le(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,s,{...i,...t,interpolationkey:h}):w}const m=h.split(this.formatSeparator),y=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(Le(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,s,{...i,...t,interpolationkey:y})};this.resetRegExp();const f=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=i==null?void 0:i.interpolation)==null?void 0:d.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>ne(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?ne(this.escape(h)):ne(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const m=n[1].trim();if(a=l(m),a===void 0)if(typeof f=="function"){const v=f(e,n,i);a=g(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=de(a));const y=h.safeValue(a);if(e=e.replace(n[0],y),c?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,s={}){let i,n,a;const o=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${V(f)}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];a={...s},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(u=i[1].slice(l).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),n=t(o.call(this,i[1].trim(),a),a),n&&i[0]===e&&!g(n))return n;g(n)||(n=de(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((f,c)=>this.format(f,c,s.lng,{...s,interpolationkey:i[1].trim()}),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}}const tt=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const s=r.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},we=r=>{const e={};return(t,s,i)=>{let n=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(n={...n,[i.interpolationkey]:void 0});const a=s+JSON.stringify(n);let o=e[a];return o||(o=r(J(s),i),e[a]=o),o(t)}},st=r=>(e,t,s)=>r(J(t),s)(e);class it{constructor(e={}){this.logger=$.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?we:st;this.formats={number:s((i,n)=>{const a=new Intl.NumberFormat(i,{...n});return o=>a.format(o)}),currency:s((i,n)=>{const a=new Intl.NumberFormat(i,{...n,style:"currency"});return o=>a.format(o)}),datetime:s((i,n)=>{const a=new Intl.DateTimeFormat(i,{...n});return o=>a.format(o)}),relativetime:s((i,n)=>{const a=new Intl.RelativeTimeFormat(i,{...n});return o=>a.format(o,n.range||"day")}),list:s((i,n)=>{const a=new Intl.ListFormat(i,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=we(t)}format(e,t,s,i={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,u)=>{var c;const{formatName:l,formatOptions:f}=tt(u);if(this.formats[l]){let p=o;try{const d=((c=i==null?void 0:i.formatParams)==null?void 0:c[i.interpolationkey])||{},h=d.locale||d.lng||i.locale||i.lng||s;p=this.formats[l](o,h,{...f,...i,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const nt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class rt extends te{constructor(e,t,s,i={}){var n,a;super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,s,i.backend,i)}queueLoad(e,t,s,i){const n={},a={},o={},u={};return e.forEach(l=>{let f=!0;t.forEach(c=>{const p=`${l}|${c}`;!s.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(o[l]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,s){const i=e.split("|"),n=i[0],a=i[1];t&&this.emit("failedLoading",n,a,t),!t&&s&&this.store.addResourceBundle(n,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(u=>{Be(u.loaded,[n],a),nt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{o[l][c]===void 0&&(o[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,s,i=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:n,callback:a});return}this.readingCalls++;const o=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,n*2,a)},n);return}a(l,f)},u=this.backend[s].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(f=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,s,i);if(!n.toLoad.length)return n.pending.length||i(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,n,a={},o=()=>{}){var u,l,f,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((p=this.backend)!=null&&p.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,s,i,d):m=h(e,t,s,i),m&&typeof m.then=="function"?m.then(y=>o(null,y)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,s,i,o,d)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const re=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ve=r=>{var e,t;return g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},q=()=>{},at=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};let Re=!1;const ot=r=>{var e,t,s,i,n,a,o,u,l;return!!(((s=(t=(e=r==null?void 0:r.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:s.indexOf("Locize"))>0||((o=(a=(n=(i=r==null?void 0:r.modules)==null?void 0:i.backend)==null?void 0:n.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(l=(u=r==null?void 0:r.options)==null?void 0:u.backend)!=null&&l.backends&&r.options.backend.backends.some(f=>{var c,p,d;return((c=f==null?void 0:f.name)==null?void 0:c.indexOf("Locize"))>0||((d=(p=f==null?void 0:f.constructor)==null?void 0:p.name)==null?void 0:d.indexOf("Locize"))>0}))};class U extends te{constructor(e={},t){if(super(),this.options=ve(e),this.services={},this.logger=$,this.modules={external:[]},at(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=re();this.options={...s,...this.options,...ve(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ot(this)&&!Re&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Re=!0);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?$.init(i(this.modules.logger),this.options):$.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=it;const f=new Se(this.options);this.store=new xe(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new et(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=i(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ce(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new rt(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ee(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const o=K(),u=()=>{const l=(f,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=q){var n,a;let s=t;const i=g(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(l)})}else s(null)}reloadResources(e,t,s){const i=K();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=q),this.services.backendConnector.reload(e,t,n=>{i.resolve(),s(n)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ee.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=K();this.emit("languageChanging",e);const i=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,u)=>{u?this.isLanguageChangingTo===e&&(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const u=g(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,s){const i=(n,a,...o)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([n,a].concat(o)):u={...a},u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||s||i.keyPrefix);const l=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=oe(c,{...this.options,...a})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=oe(n,{...this.options,...a})),f=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(f,u)};return g(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(n,e)))}loadNamespaces(e,t){const s=K();return this.options.ns?(g(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=K();g(e)&&(e=[e]);const i=this.options.preload||[],n=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=i.concat(n),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){var i,n;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=((n=this.services)==null?void 0:n.languageUtils)||new Se(re());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new U(e,t);return s.createInstance=U.createInstance,s}cloneInstance(e={},t=q){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},n=new U(i);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((f,c)=>(f[c]={...u[l][c]},f),u[l]),u),{});n.store=new xe(o,i),n.services.resourceStore=n.store}if(e.interpolation){const u={...re().interpolation,...this.options.interpolation,...e.interpolation},l={...i,interpolation:u};n.services.interpolator=new Ce(l)}return n.translator=new ee(n.services,i),n.translator.on("*",(o,...u)=>{n.emit(o,...u)}),n.init(i,t),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const S=U.createInstance();S.createInstance;S.dir;S.init;S.loadResources;S.reloadResources;S.use;S.changeLanguage;S.getFixedT;S.t;S.exists;S.setDefaultNamespace;S.hasLoadedNamespace;S.loadNamespaces;S.loadLanguages;const lt={type:"3rdParty",init(r){G.setDefaults(r.options.react),G.setI18n(r)}};function ut({i18n:r,defaultNS:e,children:t}){const s=Y.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return Y.createElement(G.I18nContext.Provider,{value:s},t)}const ct=({className:r,...e})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("[&_svg]:w-40",r),...e}),ft=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),ht=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"})),{Text:je}=j.Typography,dt=({className:r,children:e})=>{const{t}=G.useTranslation();return!e||e.trim()===""?null:x.jsxRuntimeExports.jsxs(j.Flex,{className:r,align:"center",gap:2,children:[x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:1,children:[x.jsxRuntimeExports.jsx(ft,{className:"text-primary-blue size-6"}),x.jsxRuntimeExports.jsx(je,{className:"text-primary-blue",size:"sm",weight:"semibold",children:t("layout.header.store")})]}),x.jsxRuntimeExports.jsx(je,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]})},{Text:Ne}=j.Typography,pt=({name:r,role:e,imageUrl:t,items:s=[]})=>{const{md:i}=Ve.useBreakpoint();if(!r||r.trim()==="")return null;const n=x.jsxRuntimeExports.jsxs(j.Flex,{gap:1,direction:"vertical",children:[x.jsxRuntimeExports.jsx(Ne,{className:"text-primary-blue",size:"sm",weight:"semibold",children:r}),x.jsxRuntimeExports.jsx(Ne,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]});return x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:2,children:[x.jsxRuntimeExports.jsx(j.Avatar,{src:t,alt:r,size:"sm"}),i&&n,x.jsxRuntimeExports.jsx(j.Dropdown,{classNames:{trigger:"size-6.5 p-0",content:"z-10 shadow-sm"},trigger:x.jsxRuntimeExports.jsx(ht,{className:"rotate-180"}),items:i?s:[{label:n,id:"user-name",type:"label"},{id:"separator-1",type:"separator"},...s]})]})},Fe=({className:r,children:e})=>{if(Array.isArray(e)&&e.length===0)return null;const t=s=>s===e.length-1;return x.jsxRuntimeExports.jsx(j.Flex,{align:"center",gap:4,className:D.cn(r),children:e.map((s,i)=>x.jsxRuntimeExports.jsxs(Y.Fragment,{children:[s,t(i)?null:x.jsxRuntimeExports.jsx(Ke,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:D.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},i))})};Fe.disPlayName="Layout.Header.RightSide";const _=({className:r,...e})=>x.jsxRuntimeExports.jsx("header",{className:D.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",r),...e});_.LeftSide=ct;_.Store=dt;_.User=pt;_.RightSide=Fe;const gt=({className:r,children:e,...t})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("flex w-full flex-1 flex-col px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",r),...t,children:x.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:e})}),mt=({className:r,...e})=>x.jsxRuntimeExports.jsx("footer",{className:D.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",r),...e}),xt={login:{btnLabel:"Iniciar sesión"}},yt={translation:{layout:{...xt,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};S.use(lt).init({resources:{es:yt},lng:"es",interpolation:{escapeValue:!1}});const se=({children:r,loading:e,...t})=>x.jsxRuntimeExports.jsx(ut,{i18n:S,children:x.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...t,children:[r,e&&x.jsxRuntimeExports.jsx(j.Root$3,{className:"position bg-opacity-50 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center"})]})});se.Header=_;se.Content=gt;se.Footer=mt;exports.RootLayout=se;
|