@arkyn/components 1.3.12 → 1.3.13

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.
Files changed (29) hide show
  1. package/dist/bundle.js +1300 -1644
  2. package/dist/bundle.umd.cjs +12 -17
  3. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +122 -123
  4. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts.map +1 -1
  5. package/dist/components/Input/CurrencyInput/getConfig.d.ts +121 -122
  6. package/dist/components/Input/CurrencyInput/getConfig.d.ts.map +1 -1
  7. package/dist/components/Input/MaskInput/getConfig.d.ts +124 -125
  8. package/dist/components/Input/MaskInput/getConfig.d.ts.map +1 -1
  9. package/dist/components/Input/SimpleInput/getConfig.d.ts +124 -125
  10. package/dist/components/Input/SimpleInput/getConfig.d.ts.map +1 -1
  11. package/dist/components/Modal/Container/index.d.ts +0 -1
  12. package/dist/components/Modal/Container/index.d.ts.map +1 -1
  13. package/dist/components/Select/getConfig.d.ts +122 -123
  14. package/dist/components/Select/getConfig.d.ts.map +1 -1
  15. package/dist/config/buildBadgeConfig.d.ts +100 -101
  16. package/dist/config/buildBadgeConfig.d.ts.map +1 -1
  17. package/dist/config/buildBreadcrumLinkConfig.d.ts +107 -108
  18. package/dist/config/buildBreadcrumLinkConfig.d.ts.map +1 -1
  19. package/dist/config/buildBreadcrumbConfig.d.ts +101 -102
  20. package/dist/config/buildBreadcrumbConfig.d.ts.map +1 -1
  21. package/dist/config/buildButtonConfig.d.ts +109 -110
  22. package/dist/config/buildButtonConfig.d.ts.map +1 -1
  23. package/dist/config/buildFormLabelConfig.d.ts +103 -104
  24. package/dist/config/buildFormLabelConfig.d.ts.map +1 -1
  25. package/dist/context/ModalContext.d.ts +0 -1
  26. package/dist/context/ModalContext.d.ts.map +1 -1
  27. package/dist/context/ToastContext.d.ts +0 -1
  28. package/dist/context/ToastContext.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- (function(Y,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("lucide-react"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","@remix-run/react","@react-input/mask","framer-motion","react-dom"],c):(Y=typeof globalThis<"u"?globalThis:Y||self,c(Y["@arkyn/components"]={},Y.i,Y.lucideReact,Y.react,Y.mask,Y.framerMotion,Y._n))})(this,function(Y,c,Te,at,hn,Nt,gn){"use strict";var kt={exports:{}},ot={};/**
1
+ (function(z,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react"),require("lucide-react"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","@remix-run/react","@react-input/mask","framer-motion","react-dom"],s):(z=typeof globalThis<"u"?globalThis:z||self,s(z["@arkyn/components"]={},z.e,z.lucideReact,z.react,z.mask,z.framerMotion,z.Gt))})(this,function(z,s,de,Ie,Ct,Je,jt){"use strict";var Xe={exports:{}},Pe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Wt;function vn(){if(Wt)return ot;Wt=1;var e=c,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function g(u,h,o){var y,_={},C=null,b=null;o!==void 0&&(C=""+o),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(b=h.ref);for(y in h)s.call(h,y)&&!d.hasOwnProperty(y)&&(_[y]=h[y]);if(u&&u.defaultProps)for(y in h=u.defaultProps,h)_[y]===void 0&&(_[y]=h[y]);return{$$typeof:n,type:u,key:C,ref:b,props:_,_owner:l.current}}return ot.Fragment=a,ot.jsx=g,ot.jsxs=g,ot}var st={};/**
9
+ */var lt;function Nt(){if(lt)return Pe;lt=1;var t=s,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function h(o,f,p){var g,w={},a=null,v=null;p!==void 0&&(a=""+p),f.key!==void 0&&(a=""+f.key),f.ref!==void 0&&(v=f.ref);for(g in f)i.call(f,g)&&!d.hasOwnProperty(g)&&(w[g]=f[g]);if(o&&o.defaultProps)for(g in f=o.defaultProps,f)w[g]===void 0&&(w[g]=f[g]);return{$$typeof:r,type:o,key:a,ref:v,props:w,_owner:c.current}}return Pe.Fragment=n,Pe.jsx=h,Pe.jsxs=h,Pe}var $e={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ht;function yn(){return Ht||(Ht=1,process.env.NODE_ENV!=="production"&&function(){var e=c,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),P=Symbol.iterator,A="@@iterator";function U(r){if(r===null||typeof r!="object")return null;var f=P&&r[P]||r[A];return typeof f=="function"?f:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(r){{for(var f=arguments.length,v=new Array(f>1?f-1:0),T=1;T<f;T++)v[T-1]=arguments[T];L("error",r,v)}}function L(r,f,v){{var T=w.ReactDebugCurrentFrame,H=T.getStackAddendum();H!==""&&(f+="%s",v=v.concat([H]));var t=v.map(function(m){return String(m)});t.unshift("Warning: "+f),Function.prototype.apply.call(console[r],console,t)}}var W=!1,z=!1,X=!1,te=!1,G=!1,ae;ae=Symbol.for("react.module.reference");function V(r){return!!(typeof r=="string"||typeof r=="function"||r===s||r===d||G||r===l||r===o||r===y||te||r===b||W||z||X||typeof r=="object"&&r!==null&&(r.$$typeof===C||r.$$typeof===_||r.$$typeof===g||r.$$typeof===u||r.$$typeof===h||r.$$typeof===ae||r.getModuleId!==void 0))}function $(r,f,v){var T=r.displayName;if(T)return T;var H=f.displayName||f.name||"";return H!==""?v+"("+H+")":v}function oe(r){return r.displayName||"Context"}function N(r){if(r==null)return null;if(typeof r.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case s:return"Fragment";case a:return"Portal";case d:return"Profiler";case l:return"StrictMode";case o:return"Suspense";case y:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case u:var f=r;return oe(f)+".Consumer";case g:var v=r;return oe(v._context)+".Provider";case h:return $(r,r.render,"ForwardRef");case _:var T=r.displayName||null;return T!==null?T:N(r.type)||"Memo";case C:{var H=r,t=H._payload,m=H._init;try{return N(m(t))}catch{return null}}}return null}var R=Object.assign,F=0,Z,le,Q,ce,q,B,x;function O(){}O.__reactDisabledLog=!0;function j(){{if(F===0){Z=console.log,le=console.info,Q=console.warn,ce=console.error,q=console.group,B=console.groupCollapsed,x=console.groupEnd;var r={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}F++}}function ne(){{if(F--,F===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},r,{value:Z}),info:R({},r,{value:le}),warn:R({},r,{value:Q}),error:R({},r,{value:ce}),group:R({},r,{value:q}),groupCollapsed:R({},r,{value:B}),groupEnd:R({},r,{value:x})})}F<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=w.ReactCurrentDispatcher,de;function fe(r,f,v){{if(de===void 0)try{throw Error()}catch(H){var T=H.stack.trim().match(/\n( *(at )?)/);de=T&&T[1]||""}return`
18
- `+de+r}}var Pe=!1,Ee;{var je=typeof WeakMap=="function"?WeakMap:Map;Ee=new je}function he(r,f){if(!r||Pe)return"";{var v=Ee.get(r);if(v!==void 0)return v}var T;Pe=!0;var H=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var t;t=K.current,K.current=null,j();try{if(f){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(J){T=J}Reflect.construct(r,[],m)}else{try{m.call()}catch(J){T=J}r.call(m.prototype)}}else{try{throw Error()}catch(J){T=J}r()}}catch(J){if(J&&T&&typeof J.stack=="string"){for(var i=J.stack.split(`
19
- `),k=T.stack.split(`
20
- `),M=i.length-1,I=k.length-1;M>=1&&I>=0&&i[M]!==k[I];)I--;for(;M>=1&&I>=0;M--,I--)if(i[M]!==k[I]){if(M!==1||I!==1)do if(M--,I--,I<0||i[M]!==k[I]){var ue=`
21
- `+i[M].replace(" at new "," at ");return r.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",r.displayName)),typeof r=="function"&&Ee.set(r,ue),ue}while(M>=1&&I>=0);break}}}finally{Pe=!1,K.current=t,ne(),Error.prepareStackTrace=H}var ye=r?r.displayName||r.name:"",pe=ye?fe(ye):"";return typeof r=="function"&&Ee.set(r,pe),pe}function Je(r,f,v){return he(r,!1)}function Ze(r){var f=r.prototype;return!!(f&&f.isReactComponent)}function se(r,f,v){if(r==null)return"";if(typeof r=="function")return he(r,Ze(r));if(typeof r=="string")return fe(r);switch(r){case o:return fe("Suspense");case y:return fe("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case h:return Je(r.render);case _:return se(r.type,f,v);case C:{var T=r,H=T._payload,t=T._init;try{return se(t(H),f,v)}catch{}}}return""}var ge=Object.prototype.hasOwnProperty,Fe={},Qe=w.ReactDebugCurrentFrame;function Re(r){if(r){var f=r._owner,v=se(r.type,r._source,f?f.type:null);Qe.setExtraStackFrame(v)}else Qe.setExtraStackFrame(null)}function ut(r,f,v,T,H){{var t=Function.call.bind(ge);for(var m in r)if(t(r,m)){var i=void 0;try{if(typeof r[m]!="function"){var k=Error((T||"React class")+": "+v+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}i=r[m](f,m,T,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(M){i=M}i&&!(i instanceof Error)&&(Re(H),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",v,m,typeof i),Re(null)),i instanceof Error&&!(i.message in Fe)&&(Fe[i.message]=!0,Re(H),E("Failed %s type: %s",v,i.message),Re(null))}}}var He=Array.isArray;function Ne(r){return He(r)}function xe(r){{var f=typeof Symbol=="function"&&Symbol.toStringTag,v=f&&r[Symbol.toStringTag]||r.constructor.name||"Object";return v}}function Me(r){try{return Ie(r),!1}catch{return!0}}function Ie(r){return""+r}function Ye(r){if(Me(r))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xe(r)),Ie(r)}var ze=w.ReactCurrentOwner,Ve={key:!0,ref:!0,__self:!0,__source:!0},Ge,Be,Ae;Ae={};function me(r){if(ge.call(r,"ref")){var f=Object.getOwnPropertyDescriptor(r,"ref").get;if(f&&f.isReactWarning)return!1}return r.ref!==void 0}function $e(r){if(ge.call(r,"key")){var f=Object.getOwnPropertyDescriptor(r,"key").get;if(f&&f.isReactWarning)return!1}return r.key!==void 0}function qe(r,f){if(typeof r.ref=="string"&&ze.current&&f&&ze.current.stateNode!==f){var v=N(ze.current.type);Ae[v]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(ze.current.type),r.ref),Ae[v]=!0)}}function S(r,f){{var v=function(){Ge||(Ge=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(r,"key",{get:v,configurable:!0})}}function ie(r,f){{var v=function(){Be||(Be=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(r,"ref",{get:v,configurable:!0})}}var ee=function(r,f,v,T,H,t,m){var i={$$typeof:n,type:r,key:f,ref:v,props:m,_owner:t};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:H}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function Se(r,f,v,T,H){{var t,m={},i=null,k=null;v!==void 0&&(Ye(v),i=""+v),$e(f)&&(Ye(f.key),i=""+f.key),me(f)&&(k=f.ref,qe(f,H));for(t in f)ge.call(f,t)&&!Ve.hasOwnProperty(t)&&(m[t]=f[t]);if(r&&r.defaultProps){var M=r.defaultProps;for(t in M)m[t]===void 0&&(m[t]=M[t])}if(i||k){var I=typeof r=="function"?r.displayName||r.name||"Unknown":r;i&&S(m,I),k&&ie(m,I)}return ee(r,i,k,H,T,ze.current,m)}}var ve=w.ReactCurrentOwner,re=w.ReactDebugCurrentFrame;function we(r){if(r){var f=r._owner,v=se(r.type,r._source,f?f.type:null);re.setExtraStackFrame(v)}else re.setExtraStackFrame(null)}var dt;dt=!1;function et(r){return typeof r=="object"&&r!==null&&r.$$typeof===n}function tt(){{if(ve.current){var r=N(ve.current.type);if(r)return`
17
+ */var ct;function Rt(){return ct||(ct=1,process.env.NODE_ENV!=="production"&&function(){var t=s,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),P=Symbol.iterator,j="@@iterator";function $(e){if(e===null||typeof e!="object")return null;var l=P&&e[P]||e[j];return typeof l=="function"?l:null}var b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var l=arguments.length,m=new Array(l>1?l-1:0),x=1;x<l;x++)m[x-1]=arguments[x];K("error",e,m)}}function K(e,l,m){{var x=b.ReactDebugCurrentFrame,F=x.getStackAddendum();F!==""&&(l+="%s",m=m.concat([F]));var Y=m.map(function(I){return String(I)});Y.unshift("Warning: "+l),Function.prototype.apply.call(console[e],console,Y)}}var B=!1,R=!1,W=!1,H=!1,M=!1,J;J=Symbol.for("react.module.reference");function X(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===d||M||e===c||e===p||e===g||H||e===v||B||R||W||typeof e=="object"&&e!==null&&(e.$$typeof===a||e.$$typeof===w||e.$$typeof===h||e.$$typeof===o||e.$$typeof===f||e.$$typeof===J||e.getModuleId!==void 0))}function O(e,l,m){var x=e.displayName;if(x)return x;var F=l.displayName||l.name||"";return F!==""?m+"("+F+")":m}function Z(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i:return"Fragment";case n:return"Portal";case d:return"Profiler";case c:return"StrictMode";case p:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o:var l=e;return Z(l)+".Consumer";case h:var m=e;return Z(m._context)+".Provider";case f:return O(e,e.render,"ForwardRef");case w:var x=e.displayName||null;return x!==null?x:C(e.type)||"Memo";case a:{var F=e,Y=F._payload,I=F._init;try{return C(I(Y))}catch{return null}}}return null}var q=Object.assign,L=0,V,Q,N,ee,he,_,k;function S(){}S.__reactDisabledLog=!0;function ne(){{if(L===0){V=console.log,Q=console.info,N=console.warn,ee=console.error,he=console.group,_=console.groupCollapsed,k=console.groupEnd;var e={configurable:!0,enumerable:!0,value:S,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function te(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},e,{value:V}),info:q({},e,{value:Q}),warn:q({},e,{value:N}),error:q({},e,{value:ee}),group:q({},e,{value:he}),groupCollapsed:q({},e,{value:_}),groupEnd:q({},e,{value:k})})}L<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=b.ReactCurrentDispatcher,ae;function ie(e,l,m){{if(ae===void 0)try{throw Error()}catch(F){var x=F.stack.trim().match(/\n( *(at )?)/);ae=x&&x[1]||""}return`
18
+ `+ae+e}}var ye=!1,ve;{var tt=typeof WeakMap=="function"?WeakMap:Map;ve=new tt}function Ne(e,l){if(!e||ye)return"";{var m=ve.get(e);if(m!==void 0)return m}var x;ye=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=U.current,U.current=null,ne();try{if(l){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(ue){x=ue}Reflect.construct(e,[],I)}else{try{I.call()}catch(ue){x=ue}e.call(I.prototype)}}else{try{throw Error()}catch(ue){x=ue}e()}}catch(ue){if(ue&&x&&typeof ue.stack=="string"){for(var T=ue.stack.split(`
19
+ `),le=x.stack.split(`
20
+ `),G=T.length-1,re=le.length-1;G>=1&&re>=0&&T[G]!==le[re];)re--;for(;G>=1&&re>=0;G--,re--)if(T[G]!==le[re]){if(G!==1||re!==1)do if(G--,re--,re<0||T[G]!==le[re]){var ge=`
21
+ `+T[G].replace(" at new "," at ");return e.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",e.displayName)),typeof e=="function"&&ve.set(e,ge),ge}while(G>=1&&re>=0);break}}}finally{ye=!1,U.current=Y,te(),Error.prepareStackTrace=F}var Te=e?e.displayName||e.name:"",je=Te?ie(Te):"";return typeof e=="function"&&ve.set(e,je),je}function rt(e,l,m){return Ne(e,!1)}function We(e){var l=e.prototype;return!!(l&&l.isReactComponent)}function Ce(e,l,m){if(e==null)return"";if(typeof e=="function")return Ne(e,We(e));if(typeof e=="string")return ie(e);switch(e){case p:return ie("Suspense");case g:return ie("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return rt(e.render);case w:return Ce(e.type,l,m);case a:{var x=e,F=x._payload,Y=x._init;try{return Ce(Y(F),l,m)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,Ve={},Ye=b.ReactDebugCurrentFrame;function se(e){if(e){var l=e._owner,m=Ce(e.type,e._source,l?l.type:null);Ye.setExtraStackFrame(m)}else Ye.setExtraStackFrame(null)}function Ee(e,l,m,x,F){{var Y=Function.call.bind(me);for(var I in e)if(Y(e,I)){var T=void 0;try{if(typeof e[I]!="function"){var le=Error((x||"React class")+": "+m+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw le.name="Invariant Violation",le}T=e[I](l,I,x,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){T=G}T&&!(T instanceof Error)&&(se(F),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",x||"React class",m,I,typeof T),se(null)),T instanceof Error&&!(T.message in Ve)&&(Ve[T.message]=!0,se(F),y("Failed %s type: %s",m,T.message),se(null))}}}var nt=Array.isArray;function Oe(e){return nt(e)}function Re(e){{var l=typeof Symbol=="function"&&Symbol.toStringTag,m=l&&e[Symbol.toStringTag]||e.constructor.name||"Object";return m}}function at(e){try{return ze(e),!1}catch{return!0}}function ze(e){return""+e}function _e(e){if(at(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Re(e)),ze(e)}var pe=b.ReactCurrentOwner,Ue={key:!0,ref:!0,__self:!0,__source:!0},xe,Le,Fe;Fe={};function He(e){if(me.call(e,"ref")){var l=Object.getOwnPropertyDescriptor(e,"ref").get;if(l&&l.isReactWarning)return!1}return e.ref!==void 0}function Ke(e){if(me.call(e,"key")){var l=Object.getOwnPropertyDescriptor(e,"key").get;if(l&&l.isReactWarning)return!1}return e.key!==void 0}function st(e,l){if(typeof e.ref=="string"&&pe.current&&l&&pe.current.stateNode!==l){var m=C(pe.current.type);Fe[m]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(pe.current.type),e.ref),Fe[m]=!0)}}function Be(e,l){{var m=function(){xe||(xe=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l))};m.isReactWarning=!0,Object.defineProperty(e,"key",{get:m,configurable:!0})}}function be(e,l){{var m=function(){Le||(Le=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l))};m.isReactWarning=!0,Object.defineProperty(e,"ref",{get:m,configurable:!0})}}var ot=function(e,l,m,x,F,Y,I){var T={$$typeof:r,type:e,key:l,ref:m,props:I,_owner:Y};return T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(T,"_self",{configurable:!1,enumerable:!1,writable:!1,value:x}),Object.defineProperty(T,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T};function E(e,l,m,x,F){{var Y,I={},T=null,le=null;m!==void 0&&(_e(m),T=""+m),Ke(l)&&(_e(l.key),T=""+l.key),He(l)&&(le=l.ref,st(l,F));for(Y in l)me.call(l,Y)&&!Ue.hasOwnProperty(Y)&&(I[Y]=l[Y]);if(e&&e.defaultProps){var G=e.defaultProps;for(Y in G)I[Y]===void 0&&(I[Y]=G[Y])}if(T||le){var re=typeof e=="function"?e.displayName||e.name||"Unknown":e;T&&Be(I,re),le&&be(I,re)}return ot(e,T,le,F,x,pe.current,I)}}var D=b.ReactCurrentOwner,A=b.ReactDebugCurrentFrame;function oe(e){if(e){var l=e._owner,m=Ce(e.type,e._source,l?l.type:null);A.setExtraStackFrame(m)}else A.setExtraStackFrame(null)}var ce;ce=!1;function ke(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function qe(){{if(D.current){var e=C(D.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+r+"`."}return""}}function St(r){{if(r!==void 0){var f=r.fileName.replace(/^.*[\\\/]/,""),v=r.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function Wr(e){{if(e!==void 0){var l=e.fileName.replace(/^.*[\\\/]/,""),m=e.lineNumber;return`
24
24
 
25
- Check your code at `+f+":"+v+"."}return""}}var ft={};function Ft(r){{var f=tt();if(!f){var v=typeof r=="string"?r:r.displayName||r.name;v&&(f=`
25
+ Check your code at `+l+":"+m+"."}return""}}var xt={};function Vr(e){{var l=qe();if(!l){var m=typeof e=="string"?e:e.displayName||e.name;m&&(l=`
26
26
 
27
- Check the top-level render call using <`+v+">.")}return f}}function mt(r,f){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var v=Ft(f);if(ft[v])return;ft[v]=!0;var T="";r&&r._owner&&r._owner!==ve.current&&(T=" It was passed a child from "+N(r._owner.type)+"."),we(r),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,T),we(null)}}function pt(r,f){{if(typeof r!="object")return;if(Ne(r))for(var v=0;v<r.length;v++){var T=r[v];et(T)&&mt(T,f)}else if(et(r))r._store&&(r._store.validated=!0);else if(r){var H=U(r);if(typeof H=="function"&&H!==r.entries)for(var t=H.call(r),m;!(m=t.next()).done;)et(m.value)&&mt(m.value,f)}}}function Bt(r){{var f=r.type;if(f==null||typeof f=="string")return;var v;if(typeof f=="function")v=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===h||f.$$typeof===_))v=f.propTypes;else return;if(v){var T=N(f);ut(v,r.props,"prop",T,r)}else if(f.PropTypes!==void 0&&!dt){dt=!0;var H=N(f);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",H||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ke(r){{for(var f=Object.keys(r.props),v=0;v<f.length;v++){var T=f[v];if(T!=="children"&&T!=="key"){we(r),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),we(null);break}}r.ref!==null&&(we(r),E("Invalid attribute `ref` supplied to `React.Fragment`."),we(null))}}var nt={};function ht(r,f,v,T,H,t){{var m=V(r);if(!m){var i="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k=St(H);k?i+=k:i+=tt();var M;r===null?M="null":Ne(r)?M="array":r!==void 0&&r.$$typeof===n?(M="<"+(N(r.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):M=typeof r,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M,i)}var I=Se(r,f,v,H,t);if(I==null)return I;if(m){var ue=f.children;if(ue!==void 0)if(T)if(Ne(ue)){for(var ye=0;ye<ue.length;ye++)pt(ue[ye],r);Object.freeze&&Object.freeze(ue)}else E("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 pt(ue,r)}if(ge.call(f,"key")){var pe=N(r),J=Object.keys(f).filter(function(Xr){return Xr!=="key"}),rt=J.length>0?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}";if(!nt[pe+rt]){var Ct=J.length>0?"{"+J.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+m+">.")}return l}}function wt(e,l){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var m=Vr(l);if(xt[m])return;xt[m]=!0;var x="";e&&e._owner&&e._owner!==D.current&&(x=" It was passed a child from "+C(e._owner.type)+"."),oe(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,x),oe(null)}}function St(e,l){{if(typeof e!="object")return;if(Oe(e))for(var m=0;m<e.length;m++){var x=e[m];ke(x)&&wt(x,l)}else if(ke(e))e._store&&(e._store.validated=!0);else if(e){var F=$(e);if(typeof F=="function"&&F!==e.entries)for(var Y=F.call(e),I;!(I=Y.next()).done;)ke(I.value)&&wt(I.value,l)}}}function Yr(e){{var l=e.type;if(l==null||typeof l=="string")return;var m;if(typeof l=="function")m=l.propTypes;else if(typeof l=="object"&&(l.$$typeof===f||l.$$typeof===w))m=l.propTypes;else return;if(m){var x=C(l);Ee(m,e.props,"prop",x,e)}else if(l.PropTypes!==void 0&&!ce){ce=!0;var F=C(l);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof l.getDefaultProps=="function"&&!l.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ur(e){{for(var l=Object.keys(e.props),m=0;m<l.length;m++){var x=l[m];if(x!=="children"&&x!=="key"){oe(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),oe(null);break}}e.ref!==null&&(oe(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}}var Et={};function kt(e,l,m,x,F,Y){{var I=X(e);if(!I){var T="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(T+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var le=Wr(F);le?T+=le:T+=qe();var G;e===null?G="null":Oe(e)?G="array":e!==void 0&&e.$$typeof===r?(G="<"+(C(e.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):G=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,T)}var re=E(e,l,m,F,Y);if(re==null)return re;if(I){var ge=l.children;if(ge!==void 0)if(x)if(Oe(ge)){for(var Te=0;Te<ge.length;Te++)St(ge[Te],e);Object.freeze&&Object.freeze(ge)}else y("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 St(ge,e)}if(me.call(l,"key")){var je=C(e),ue=Object.keys(l).filter(function(Gr){return Gr!=="key"}),it=ue.length>0?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}";if(!Et[je+it]){var Xr=ue.length>0?"{"+ue.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
28
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,rt,pe,Ct,pe),nt[pe+rt]=!0}}return r===s?Ke(I):Bt(I),I}}function Tt(r,f,v){return ht(r,f,v,!0)}function Ut(r,f,v){return ht(r,f,v,!1)}var _t=Ut,De=Tt;st.Fragment=s,st.jsx=_t,st.jsxs=De}()),st}process.env.NODE_ENV==="production"?kt.exports=vn():kt.exports=yn();var p=kt.exports;function gt(e,n){return n?p.jsx(n,{size:e,strokeWidth:2.5}):p.jsx(p.Fragment,{})}function bn(e){const{variant:n="ghost",scheme:a="primary",size:s="md",leftIcon:l,rightIcon:d,className:g="",children:u,...h}=e,y={md:12,lg:14}[s];return{className:`arkyn_badge ${n} ${a} ${s} ${g}`.trim(),children:u,leftIcon:gt(y,l),rightIcon:gt(y,d),...h}}function xn(e){const{leftIcon:n,children:a,rightIcon:s,...l}=bn(e);return p.jsxs("div",{...l,children:[n,a,s]})}function wn(e){const{className:n,orientation:a="horizontal",...s}=e,l=`arkyn_divider ${a} ${n}`;return p.jsx("div",{className:l,...s})}function En({className:e,...n}){const a="arkyn_skeleton "+e;return p.jsx("div",{className:a.trim(),...n})}function Sn(e){const{isLoading:n=!1,scheme:a="primary",variant:s="solid",loadingText:l,size:d="md",leftIcon:g,rightIcon:u,disabled:h,className:o="",children:y,..._}=e,b={xs:12,sm:16,md:20,lg:24}[d];return{className:`arkyn_button loading_text_${!!l} ${s} ${a} ${d} loading_${n} ${o}`.trim(),loadingText:l,children:y,iconSize:b,disabled:h||n,leftIcon:gt(b,g),rightIcon:gt(b,u),..._}}function Tn(e){const{leftIcon:n,rightIcon:a,iconSize:s,children:l,loadingText:d,...g}=Sn(e);return p.jsxs("button",{...g,children:[p.jsxs("div",{className:"spinner",children:[p.jsx(Te.Loader2,{size:s,strokeWidth:2.5}),d&&d]}),p.jsxs("div",{className:"content",children:[n,l,a]})]})}const Yt=c.createContext({});function _n({children:e,...n}){var u,h;const a=at.useActionData(),s=c.useRef(null),l=((u=s.current)==null?void 0:u.name)||"",d=((h=a==null?void 0:a.fieldErrors)==null?void 0:h[l])||null,g=c.useId();return p.jsx(Yt.Provider,{value:{error:d,id:g,inputRef:s},children:p.jsx("section",{className:"arkyn_form_controller",...n,children:e})})}function Ue(){return c.useContext(Yt)}function Cn(e){const{name:n,className:a="",size:s="md",isError:l,defaultChecked:d=!1,checked:g=null,onCheck:u,value:h,...o}=e,{id:y,inputRef:_,error:C}=Ue(),b=l||!!C,[P,A]=c.useState(d||!1),U=typeof g=="boolean"?g:P,w=`arkyn_checkbox ${s} ${b?"error":""} ${U?"checked":""} ${a}`;function E(){const L=P;A(!L),u&&u(L?"":h||"checked")}return p.jsxs("div",{id:y,className:w,onClick:E,...o,children:[p.jsx("input",{type:"hidden",name:n,ref:_,value:U?h||"checked":""}),p.jsx(Te.Check,{})]})}function Nn({children:e}){const{error:n}=Ue();return e?p.jsx("strong",{className:"arkyn_form_error",children:e}):n?p.jsx("strong",{className:"arkyn_form_error",children:n}):p.jsx(p.Fragment,{})}function kn(e){const{showAsterisk:n=!1,className:a="",...s}=e;return{className:`arkyn_form_label ${n?"show-asterisk":""} ${a}`.trim(),...s}}function Rn(e){const{id:n}=Ue();return p.jsx("label",{...kn(e),htmlFor:n})}const Vt={xs:12,sm:16,md:20,lg:24};function In(e){const{isLoading:n=!1,scheme:a="primary",variant:s="solid",size:l="md",icon:d,disabled:g,className:u="",...h}=e,o=`arkyn_icon_button ${s} ${a} ${l} loading_${n} ${u}`;return p.jsxs("button",{disabled:g||n,className:o.trim(),...h,children:[p.jsx("div",{className:"spinner",children:p.jsx(Te.Loader2,{size:Vt[l],strokeWidth:2.5})}),p.jsx("div",{className:"content "+l,children:p.jsx(d,{size:Vt[l],strokeWidth:2.5})})]})}function We(e,n,a){if(!e)return p.jsx(p.Fragment,{});if(typeof e=="string")return p.jsx("p",{className:a,children:e});const s=e;return p.jsx("p",{className:a,children:p.jsx(s,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Rt(e){return e&&e.replace(/[^0-9]/g,"")}function Gt(e,n){let a="",s=0;return Array.from(e).forEach((l,d)=>{n[d+s].match(/[0-9]/)||(a+=n[d+s],s++),a+=l}),a}function qt(e){return e.length>11?"CNPJ":"CPF"}const It={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Kt=Rt(It.CNPJ).length;function An(e,n){const{isLoading:a,isError:s,size:l="md",className:d="",variant:g="solid",prefix:u,sufix:h,leftIcon:o,rightIcon:y,disabled:_,defaultValue:C,readOnly:b,onFocus:P,onBlur:A,title:U,style:w,onChange:E,...L}=e;function W(R){let F=Rt(R);const Z=qt(F);if(!(F.length>Kt))return F=Gt(F,It[Z]),F}const z=y?"right":"left",$=`arkyn_input ${u?"hasPrefix":""} ${h?"hasSufix":""} ${g} ${l} ${_||b||a?"opacity":""} ${s?"errored":""} ${n?"focused":""} ${d}`,N={md:20,lg:20}[l];return{isLoading:a,className:$,prefix:We(u,N,"prefix"),sufix:We(h,N,"sufix"),LeftIcon:o,RightIcon:y,defaultValue:W(C||""),disabled:_,readOnly:b,onFocus:P,onBlur:A,title:U,style:w,onChange:E,loadingPosition:z,iconSize:N,Spinner:p.jsx(Te.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...L}}function Ln(e){const[n,a]=c.useState(!1),s=c.useRef(null),{inputRef:l,id:d,error:g}=Ue(),u=l||s,h=e.isError||!!g,{disabled:o,title:y,style:_,className:C,prefix:b,sufix:P,iconSize:A,loadingPosition:U,isLoading:w,LeftIcon:E,readOnly:L,onFocus:W,onBlur:z,RightIcon:X,Spinner:te,onChange:G,value:ae,defaultValue:V,...$}=An({...e,id:d,isError:h},n),[oe,N]=c.useState(V),R=E&&!w,F=X&&!w,Z=U==="left"&&w,le=U==="right"&&w;function Q(){o||!(u!=null&&u.current)||(a(!0),u.current.focus())}function ce(x){let O=Rt(x.target.value);const j=qt(O);O.length>Kt||(O=Gt(O,It[j]),x.target.value=O,N(O),G&&G(x))}function q(x){a(!0),W&&W(x)}function B(x){a(!1),z&&z(x)}return p.jsxs("section",{title:y,style:_,onClick:Q,className:C,children:[b,Z&&te,R&&p.jsx(E,{size:A,strokeWidth:2.5}),p.jsx("input",{disabled:o||w,readOnly:L,ref:u,value:ae||oe,onFocus:q,onChange:ce,onBlur:B,...$}),F&&p.jsx(X,{size:A,strokeWidth:2.5}),le&&te,P]})}function On(e,n){const{isLoading:a,isError:s,size:l="md",className:d="",variant:g="solid",prefix:u,sufix:h,leftIcon:o,rightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,showCents:w=!1,max:E=1e9,onChange:L,...W}=e,z=y?"right":"left",$=`arkyn_input ${u?"hasPrefix":""} ${h?"hasSufix":""} ${g} ${l} ${_||C||a?"opacity":""} ${s?"errored":""} ${n?"focused":""} ${d}`,N={md:20,lg:20}[l];return{isLoading:a,className:$,prefix:We(u,N,"prefix"),sufix:We(h,N,"sufix"),LeftIcon:o,RightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,max:E,onChange:L,showCents:w,loadingPosition:z,iconSize:N,Spinner:p.jsx(Te.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...W}}const Pn=/^[1-9]{1}$/,jn=/^[0-9]{1}$/,Xt=8;function Mn(e,n){if(e===0)return"";const a=(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return n?a:a.replace("R$","").trim()}function Dn(e){const{currencyValue:n,event:a,max:s,setCurrencyValue:l}=e,{key:d,keyCode:g}=a;if(n===0&&!Pn.test(d)||n!==0&&!jn.test(d)&&g!==Xt)return;const u=n.toString();let h;if(g!==Xt){const o=n===0?d:`${u}${d}`;h=Number.parseInt(o,10)}else{const o=u.slice(0,-1);h=o===""?0:Number.parseInt(o,10)}h>Number(s)||l(h)}function zn(e){const[n,a]=c.useState(!1),s=c.useRef(null),{inputRef:l,id:d,error:g}=Ue(),u=l||s,h=e.isError||!!g,{disabled:o,title:y,style:_,className:C,prefix:b,sufix:P,iconSize:A,loadingPosition:U,isLoading:w,LeftIcon:E,readOnly:L,onFocus:W,onBlur:z,RightIcon:X,Spinner:te,value:G,max:ae,onKeyDown:V,onChange:$,showCents:oe,defaultValue:N,...R}=On({...e,id:d,isError:h},n),[F,Z]=c.useState(N*100||0),le=E&&!w,Q=X&&!w,ce=U==="left"&&w,q=U==="right"&&w;function B(){o||!(u!=null&&u.current)||(a(!0),u.current.focus())}function x(ne){Dn({currencyValue:F,event:ne,max:ae,setCurrencyValue:Z}),$&&$(F/100),V&&V(ne)}function O(ne){a(!0),W&&W(ne)}function j(ne){a(!1),z&&z(ne)}return p.jsxs("section",{title:y,style:_,onClick:B,className:C,children:[b,ce&&te,le&&p.jsx(E,{size:A,strokeWidth:2.5}),p.jsx("input",{value:Mn(G||F,oe),onKeyDown:x,disabled:o||w,readOnly:L,ref:u,onFocus:O,onBlur:j,onChange:()=>{},...R}),q&&te,Q&&p.jsx(X,{size:A,strokeWidth:2.5}),P]})}function $n(e,n){const{isLoading:a,isError:s,size:l="md",className:d="",variant:g="solid",prefix:u,sufix:h,leftIcon:o,rightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,onChange:w,showMask:E=!1,type:L,...W}=e,z=y?"right":"left",$=`arkyn_input ${u?"hasPrefix":""} ${h?"hasSufix":""} ${g} ${l} ${_||C||a?"opacity":""} ${s?"errored":""} ${n?"focused":""} ${d}`,N={md:20,lg:20}[l];return{isLoading:a,className:$,prefix:We(u,N,"prefix"),sufix:We(h,N,"sufix"),LeftIcon:o,RightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,onChange:w,loadingPosition:z,iconSize:N,showMask:E,Spinner:p.jsx(Te.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...W}}const Fn=c.forwardRef((e,n)=>p.jsx("input",{ref:n,...e}));function Bn(e){const[n,a]=c.useState(!1),s=c.useRef(null),{inputRef:l,id:d,error:g}=Ue(),u=l||s,h=e.isError||!!g,{disabled:o,title:y,style:_,className:C,prefix:b,sufix:P,iconSize:A,loadingPosition:U,isLoading:w,LeftIcon:E,readOnly:L,onFocus:W,onBlur:z,RightIcon:X,Spinner:te,...G}=$n({...e,id:d,isError:h},n),ae=E&&!w,V=X&&!w,$=U==="left"&&w,oe=U==="right"&&w;function N(){o||!(u!=null&&u.current)||(a(!0),u.current.focus())}function R(Z){a(!0),W&&W(Z)}function F(Z){a(!1),z&&z(Z)}return p.jsxs("section",{title:y,style:_,onClick:N,className:C,children:[b,$&&te,ae&&p.jsx(E,{size:A,strokeWidth:2.5}),p.jsx(hn.InputMask,{component:Fn,ref:u,onFocus:R,onBlur:F,...G}),V&&p.jsx(X,{size:A,strokeWidth:2.5}),oe&&te,P]})}function Un(e,n){const{isLoading:a,isError:s,size:l="md",className:d="",variant:g="solid",prefix:u,sufix:h,leftIcon:o,rightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,onChange:w,...E}=e,L=y?"right":"left",ae=`arkyn_input ${u?"hasPrefix":""} ${h?"hasSufix":""} ${g} ${l} ${_||C||a?"opacity":""} ${s?"errored":""} ${n?"focused":""} ${d}`,$={md:20,lg:20}[l];return{isLoading:a,className:ae,prefix:We(u,$,"prefix"),sufix:We(h,$,"sufix"),LeftIcon:o,RightIcon:y,disabled:_,readOnly:C,onFocus:b,onBlur:P,title:A,style:U,onChange:w,loadingPosition:L,iconSize:$,Spinner:p.jsx(Te.Loader2,{className:"spinner",size:$,strokeWidth:2.5}),...E}}function Wn(e){const[n,a]=c.useState(!1),s=c.useRef(null),{inputRef:l,id:d,error:g}=Ue(),u=l||s,h=e.isError||!!g,{disabled:o,title:y,style:_,className:C,prefix:b,sufix:P,iconSize:A,loadingPosition:U,isLoading:w,LeftIcon:E,readOnly:L,onFocus:W,onBlur:z,RightIcon:X,type:te,Spinner:G,...ae}=Un({...e,id:d,isError:h},n),V=E&&!w,$=X&&!w,oe=U==="left"&&w,N=U==="right"&&w;function R(){o||!(u!=null&&u.current)||(a(!0),u.current.focus())}function F(le){a(!0),W&&W(le)}function Z(le){a(!1),z&&z(le)}return te==="hidden"?p.jsx("input",{type:"hidden",ref:u,...ae}):p.jsxs("section",{title:y,style:_,onClick:R,className:C,children:[b,oe&&G,V&&p.jsx(E,{size:A,strokeWidth:2.5}),p.jsx("input",{disabled:o||w,readOnly:L,ref:u,onFocus:F,onBlur:Z,type:te,...ae}),$&&p.jsx(X,{size:A,strokeWidth:2.5}),N&&G,P]})}function Hn(e){return e.type==="currency"?p.jsx(zn,{...e}):e.type==="masked"?p.jsx(Bn,{...e}):e.type==="cpf-cnpj"?p.jsx(Ln,{...e}):p.jsx(Wn,{...e})}function Yn(e,n,a){if(!e)return p.jsx(p.Fragment,{});if(typeof e=="string")return p.jsx("p",{className:a,children:e});const s=e;return p.jsx("p",{className:a,children:p.jsx(s,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Vn(e,n){const{isLoading:a,isError:s,size:l="md",className:d="",variant:g="solid",prefix:u,leftIcon:h,disabled:o,readOnly:y,onFocus:_,onBlur:C,title:b,style:P,isSearchable:A=!1,closeOnSelect:U=!0,...w}=e,X=`arkyn_select ${u?"hasPrefix":""} ${g} ${l} ${o||y||a?"opacity":""} ${s?"errored":""} ${n?"focused":""} ${d}`,G={md:20,lg:20}[l];return{isLoading:a,className:X,prefix:Yn(u,G,"prefix"),LeftIcon:h,disabled:o,readOnly:y,onFocus:_,onBlur:C,title:b,closeOnSelect:U,style:P,isSearchable:A,iconSize:G,Spinner:p.jsx(Te.Loader2,{className:"spinner",size:G,strokeWidth:2.5}),...w}}function Gn(e){var K;const[n,a]=c.useState(!1),{inputRef:s,id:l,error:d}=Ue(),g=c.useRef(null),u=s||g,h=e.isError||!!d,{disabled:o,title:y,style:_,className:C,prefix:b,iconSize:P,isLoading:A,LeftIcon:U,value:w=null,defaultValue:E="",readOnly:L,onFocus:W,onBlur:z,Spinner:X,name:te,isSearchable:G,placeholder:ae,onSelect:V,options:$,optionMaxHeight:oe,closeOnSelect:N,...R}=Vn({...e,id:l,isError:h},n),[F,Z]=c.useState(E),[le,Q]=c.useState("");function ce(){o||!(u!=null&&u.current)||(a(!0),u.current.focus())}function q(de){a(!0),W&&W(de)}function B(){a(!1),z&&u.current&&u.current.blur()}const x=typeof w=="string"?w:F,O=((K=$.find(de=>de.value===x))==null?void 0:K.label)||"",j=()=>{if(G){if(!n&&O)return!0;if(!n&&!O||n)return!1}if(!G){if(!n&&O)return!0;if(!n&&!O)return!1;if(n&&O)return!0;if(n&&!O)return!1}},ne=$.filter(de=>G?de.label.toLowerCase().includes(le.toLowerCase()):!0);return p.jsxs(p.Fragment,{children:[p.jsxs("section",{title:y,style:_,onClick:ce,className:`${C} placeholder_dark_${j()}`,children:[b,U&&p.jsx(U,{size:P,strokeWidth:2.5}),p.jsx("input",{disabled:o||A,readOnly:!G,value:le||"",placeholder:O||ae,onFocus:q,onBlur:()=>Q(""),...R,onChange:de=>Q(de.target.value)}),p.jsx("input",{type:"hidden",ref:u,name:te,value:x||"",readOnly:!0}),n&&p.jsxs("ul",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:oe},children:[ne.map(({label:de,value:fe})=>p.jsxs("li",{className:x===fe?"active":"",onClick:()=>{Z(F!==fe?fe:""),V&&V({label:de,value:fe}),N&&setTimeout(()=>B(),100)},children:[de," ",p.jsx(Te.Check,{})]},fe)),ne.length<=0&&p.jsx("p",{children:"Sem opções disponíveis"})]}),!A&&p.jsx(Te.ChevronDown,{className:"arkyn_select_arrow",size:P,strokeWidth:2.5}),A&&X]}),n&&p.jsx("aside",{className:"arkyn_select_overlay",onClick:B})]})}function qn(e){const{className:n="",...a}=e;return{className:`arkyn_breadcrumb ${n}`.trim(),...a}}function Kn(e){const{pathname:n}=at.useLocation(),{className:a="",disabled:s=!1,to:l,...d}=e,g=n===l?"active":"inactive",u=`arkyn_breadcrumb_link ${g} ${a}`;return{to:l,className:u.trim(),disabled:s||g==="active",...d}}function Xn(e){const{className:n,...a}=qn(e);return p.jsx("nav",{className:n,...a})}function Jn(e){const{children:n,className:a,disabled:s,...l}=Kn(e);return s?p.jsxs("p",{className:a,children:[p.jsx(Te.ChevronRight,{size:14,strokeWidth:2.5}),n]}):p.jsxs(at.Link,{className:a,...l,children:[p.jsx(Te.ChevronRight,{size:14,strokeWidth:2.5}),n]})}const Jt=c.createContext({});function Zn(e){const{isVisibled:n,makeInvisible:a,children:s,className:l="",...d}=e,u=`arkyn_modal_container ${n?"visible":""} ${l}`;return p.jsx(Jt.Provider,{value:{makeInvisible:a},children:p.jsx(Nt.AnimatePresence,{children:n&&p.jsxs("aside",{className:u.trim(),...d,children:[p.jsx(Nt.motion.div,{className:"overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:a}),p.jsx(Nt.motion.div,{className:"content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:s})]})})})}function Qn(e){const{alignment:n="right",className:a,...s}=e,l=`arkyn_modal_footer ${n} ${a}`;return p.jsx("footer",{className:l.trim(),...s})}function er(e){const{showCloseButton:n,className:a,children:s,...l}=e,{makeInvisible:d}=c.useContext(Jt),u=`arkyn_modal_header ${n?"show-close":""} ${a}`;return p.jsxs("header",{className:u.trim(),...l,children:[s,p.jsx("button",{type:"button",onClick:d,children:p.jsx(Te.X,{size:24})})]})}const tr={Container:Zn,Header:er,Footer:Qn};function nr(e){const{text:n,size:a="lg",children:s,orientation:l="top",className:d,...g}=e;return p.jsxs("div",{className:`arkyn_tooltip ${a} ${l} ${d}`,...g,children:[s,p.jsx("div",{className:"arkyn_tooltip_text",children:n})]})}const At=c.createContext({}),Zt=c.createContext({});function Qt(){const e=c.useContext(Zt);if(Object.entries(e).length===0)throw new Error("useToast must be used within a Provider");return e}function rr(){const e=at.useActionData(),{closeModal:n}=c.useContext(At),{successToast:a,errorToast:s}=Qt();c.useEffect(()=>{const l=e==null?void 0:e.closeModalKey;l&&n(l)},[e]),c.useEffect(()=>{typeof(e==null?void 0:e.message)=="string"&&typeof(e==null?void 0:e.success)=="boolean"&&(e!=null&&e.success?a(e==null?void 0:e.message):s(e==null?void 0:e.message))},[e])}function ar(e){const n=c.useContext(At);if(Object.entries(n).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:a,modalIsOpen:s,openModal:l,closeModal:d}=n,g=s(e),u=a(e);return{modalIsOpen:g,modalData:u,openModal:y=>l(e,y==null?void 0:y.data),closeModal:()=>d(e)}}else return n}function or(e=""){const n=at.useLocation(),a=new URLSearchParams(n.search),s=e?`${e}:`:"",l=d=>{Object.entries(d).forEach(([g,u])=>{u===void 0?a.delete(`${s}${g}`):a.set(`${s}${g}`,String(u))})};return{getParam:d=>a.get(`${s}${d}`),getScopedSearch:d=>{l(d);let g=a.toString();return g&&(g="?"+g),g}}}function sr(e){const{children:n=!1}=e,[a,s]=c.useState([]);function l(h){return!!a.some(o=>o.key===h)}function d(h){var o;return(o=a.find(y=>y.key===h))==null?void 0:o.data}function g(h,o){const y=l(h);s(y?_=>[..._.filter(b=>b.key!==h),{key:h,data:o}]:[...a,{key:h,data:o}])}function u(h){s(a.filter(o=>o.key!==h))}return p.jsx(At.Provider,{value:{modalIsOpen:l,modalData:d,openModal:g,closeModal:u},children:n})}var{entries:en,setPrototypeOf:tn,isFrozen:ir,getPrototypeOf:lr,getOwnPropertyDescriptor:cr}=Object,{freeze:be,seal:ke,create:nn}=Object,{apply:Lt,construct:Ot}=typeof Reflect<"u"&&Reflect;be||(be=function(e){return e}),ke||(ke=function(e){return e}),Lt||(Lt=function(e,n,a){return e.apply(n,a)}),Ot||(Ot=function(e,n){return new e(...n)});var vt=Ce(Array.prototype.forEach),rn=Ce(Array.prototype.pop),it=Ce(Array.prototype.push),yt=Ce(String.prototype.toLowerCase),Pt=Ce(String.prototype.toString),an=Ce(String.prototype.match),lt=Ce(String.prototype.replace),ur=Ce(String.prototype.indexOf),dr=Ce(String.prototype.trim),Le=Ce(Object.prototype.hasOwnProperty),_e=Ce(RegExp.prototype.test),ct=fr(TypeError);function Ce(e){return function(n){for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];return Lt(e,n,s)}}function fr(e){return function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return Ot(e,a)}}function D(e,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;tn&&tn(e,null);let s=n.length;for(;s--;){let l=n[s];if(typeof l=="string"){let d=a(l);d!==l&&(ir(n)||(n[s]=d),l=d)}e[l]=!0}return e}function mr(e){for(let n=0;n<e.length;n++)Le(e,n)||(e[n]=null);return e}function Xe(e){let n=nn(null);for(let[a,s]of en(e))Le(e,a)&&(Array.isArray(s)?n[a]=mr(s):s&&typeof s=="object"&&s.constructor===Object?n[a]=Xe(s):n[a]=s);return n}function bt(e,n){for(;e!==null;){let s=cr(e,n);if(s){if(s.get)return Ce(s.get);if(typeof s.value=="function")return Ce(s.value)}e=lr(e)}function a(){return null}return a}var on=be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),jt=be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Mt=be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pr=be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dt=be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hr=be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sn=be(["#text"]),ln=be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),zt=be(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),cn=be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xt=be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gr=ke(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vr=ke(/<%[\w\W]*|[\w\W]*%>/gm),yr=ke(/\${[\w\W]*}/gm),br=ke(/^data-[\-\w.\u00B7-\uFFFF]/),xr=ke(/^aria-[\-\w]+$/),un=ke(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wr=ke(/^(?:\w+script|data):/i),Er=ke(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dn=ke(/^html$/i),Sr=ke(/^[a-z][a-z\d]*(-[a-z\d]+)+$/i),fn=Object.freeze({__proto__:null,MUSTACHE_EXPR:gr,ERB_EXPR:vr,TMPLIT_EXPR:yr,DATA_ATTR:br,ARIA_ATTR:xr,IS_ALLOWED_URI:un,IS_SCRIPT_OR_DATA:wr,ATTR_WHITESPACE:Er,DOCTYPE_NAME:dn,CUSTOM_ELEMENT:Sr}),Tr=function(){return typeof window>"u"?null:window},_r=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null,s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(a=n.getAttribute(s));let l="dompurify"+(a?"#"+a:"");try{return e.createPolicy(l,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}};function mn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr(),n=t=>mn(t);if(n.version="3.0.10",n.removed=[],!e||!e.document||e.document.nodeType!==9)return n.isSupported=!1,n;let{document:a}=e,s=a,l=s.currentScript,{DocumentFragment:d,HTMLTemplateElement:g,Node:u,Element:h,NodeFilter:o,NamedNodeMap:y=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:_,DOMParser:C,trustedTypes:b}=e,P=h.prototype,A=bt(P,"cloneNode"),U=bt(P,"nextSibling"),w=bt(P,"childNodes"),E=bt(P,"parentNode");if(typeof g=="function"){let t=a.createElement("template");t.content&&t.content.ownerDocument&&(a=t.content.ownerDocument)}let L,W="",{implementation:z,createNodeIterator:X,createDocumentFragment:te,getElementsByTagName:G}=a,{importNode:ae}=s,V={};n.isSupported=typeof en=="function"&&typeof E=="function"&&z&&z.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:$,ERB_EXPR:oe,TMPLIT_EXPR:N,DATA_ATTR:R,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:Z,ATTR_WHITESPACE:le,CUSTOM_ELEMENT:Q}=fn,{IS_ALLOWED_URI:ce}=fn,q=null,B=D({},[...on,...jt,...Mt,...Dt,...sn]),x=null,O=D({},[...ln,...zt,...cn,...xt]),j=Object.seal(nn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,K=null,de=!0,fe=!0,Pe=!1,Ee=!0,je=!1,he=!1,Je=!1,Ze=!1,se=!1,ge=!1,Fe=!1,Qe=!0,Re=!1,ut="user-content-",He=!0,Ne=!1,xe={},Me=null,Ie=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ye=null,ze=D({},["audio","video","img","source","image","track"]),Ve=null,Ge=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Be="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",$e=me,qe=!1,S=null,ie=D({},[Be,Ae,me],Pt),ee=null,Se=["application/xhtml+xml","text/html"],ve="text/html",re=null,we=null,dt=a.createElement("form"),et=function(t){return t instanceof RegExp||t instanceof Function},tt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(we&&we===t)){if((!t||typeof t!="object")&&(t={}),t=Xe(t),ee=Se.indexOf(t.PARSER_MEDIA_TYPE)===-1?ve:t.PARSER_MEDIA_TYPE,re=ee==="application/xhtml+xml"?Pt:yt,q=Le(t,"ALLOWED_TAGS")?D({},t.ALLOWED_TAGS,re):B,x=Le(t,"ALLOWED_ATTR")?D({},t.ALLOWED_ATTR,re):O,S=Le(t,"ALLOWED_NAMESPACES")?D({},t.ALLOWED_NAMESPACES,Pt):ie,Ve=Le(t,"ADD_URI_SAFE_ATTR")?D(Xe(Ge),t.ADD_URI_SAFE_ATTR,re):Ge,Ye=Le(t,"ADD_DATA_URI_TAGS")?D(Xe(ze),t.ADD_DATA_URI_TAGS,re):ze,Me=Le(t,"FORBID_CONTENTS")?D({},t.FORBID_CONTENTS,re):Ie,ne=Le(t,"FORBID_TAGS")?D({},t.FORBID_TAGS,re):{},K=Le(t,"FORBID_ATTR")?D({},t.FORBID_ATTR,re):{},xe=Le(t,"USE_PROFILES")?t.USE_PROFILES:!1,de=t.ALLOW_ARIA_ATTR!==!1,fe=t.ALLOW_DATA_ATTR!==!1,Pe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,je=t.SAFE_FOR_TEMPLATES||!1,he=t.WHOLE_DOCUMENT||!1,se=t.RETURN_DOM||!1,ge=t.RETURN_DOM_FRAGMENT||!1,Fe=t.RETURN_TRUSTED_TYPE||!1,Ze=t.FORCE_BODY||!1,Qe=t.SANITIZE_DOM!==!1,Re=t.SANITIZE_NAMED_PROPS||!1,He=t.KEEP_CONTENT!==!1,Ne=t.IN_PLACE||!1,ce=t.ALLOWED_URI_REGEXP||un,$e=t.NAMESPACE||me,j=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&et(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&et(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),je&&(fe=!1),ge&&(se=!0),xe&&(q=D({},sn),x=[],xe.html===!0&&(D(q,on),D(x,ln)),xe.svg===!0&&(D(q,jt),D(x,zt),D(x,xt)),xe.svgFilters===!0&&(D(q,Mt),D(x,zt),D(x,xt)),xe.mathMl===!0&&(D(q,Dt),D(x,cn),D(x,xt))),t.ADD_TAGS&&(q===B&&(q=Xe(q)),D(q,t.ADD_TAGS,re)),t.ADD_ATTR&&(x===O&&(x=Xe(x)),D(x,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&D(Ve,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&(Me===Ie&&(Me=Xe(Me)),D(Me,t.FORBID_CONTENTS,re)),He&&(q["#text"]=!0),he&&D(q,["html","head","body"]),q.table&&(D(q,["tbody"]),delete ne.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw ct('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ct('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=t.TRUSTED_TYPES_POLICY,W=L.createHTML("")}else L===void 0&&(L=_r(b,l)),L!==null&&typeof W=="string"&&(W=L.createHTML(""));be&&be(t),we=t}},St=D({},["mi","mo","mn","ms","mtext"]),ft=D({},["foreignobject","desc","title","annotation-xml"]),Ft=D({},["title","style","font","a","script"]),mt=D({},[...jt,...Mt,...pr]),pt=D({},[...Dt,...hr]),Bt=function(t){let m=E(t);(!m||!m.tagName)&&(m={namespaceURI:$e,tagName:"template"});let i=yt(t.tagName),k=yt(m.tagName);return S[t.namespaceURI]?t.namespaceURI===Ae?m.namespaceURI===me?i==="svg":m.namespaceURI===Be?i==="svg"&&(k==="annotation-xml"||St[k]):!!mt[i]:t.namespaceURI===Be?m.namespaceURI===me?i==="math":m.namespaceURI===Ae?i==="math"&&ft[k]:!!pt[i]:t.namespaceURI===me?m.namespaceURI===Ae&&!ft[k]||m.namespaceURI===Be&&!St[k]?!1:!pt[i]&&(Ft[i]||!mt[i]):!!(ee==="application/xhtml+xml"&&S[t.namespaceURI]):!1},Ke=function(t){it(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch{t.remove()}},nt=function(t,m){try{it(n.removed,{attribute:m.getAttributeNode(t),from:m})}catch{it(n.removed,{attribute:null,from:m})}if(m.removeAttribute(t),t==="is"&&!x[t])if(se||ge)try{Ke(m)}catch{}else try{m.setAttribute(t,"")}catch{}},ht=function(t){let m=null,i=null;if(Ze)t="<remove></remove>"+t;else{let I=an(t,/^[\r\n\t ]+/);i=I&&I[0]}ee==="application/xhtml+xml"&&$e===me&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");let k=L?L.createHTML(t):t;if($e===me)try{m=new C().parseFromString(k,ee)}catch{}if(!m||!m.documentElement){m=z.createDocument($e,"template",null);try{m.documentElement.innerHTML=qe?W:k}catch{}}let M=m.body||m.documentElement;return t&&i&&M.insertBefore(a.createTextNode(i),M.childNodes[0]||null),$e===me?G.call(m,he?"html":"body")[0]:he?m.documentElement:M},Tt=function(t){return X.call(t.ownerDocument||t,t,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION,null)},Ut=function(t){return t instanceof _&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof y)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},_t=function(t){return typeof u=="function"&&t instanceof u},De=function(t,m,i){V[t]&&vt(V[t],k=>{k.call(n,m,i,we)})},r=function(t){let m=null;if(De("beforeSanitizeElements",t,null),Ut(t))return Ke(t),!0;let i=re(t.nodeName);if(De("uponSanitizeElement",t,{tagName:i,allowedTags:q}),t.hasChildNodes()&&!_t(t.firstElementChild)&&_e(/<[/\w]/g,t.innerHTML)&&_e(/<[/\w]/g,t.textContent))return Ke(t),!0;if(!q[i]||ne[i]){if(!ne[i]&&v(i)&&(j.tagNameCheck instanceof RegExp&&_e(j.tagNameCheck,i)||j.tagNameCheck instanceof Function&&j.tagNameCheck(i)))return!1;if(He&&!Me[i]){let k=E(t)||t.parentNode,M=w(t)||t.childNodes;if(M&&k){let I=M.length;for(let ue=I-1;ue>=0;--ue)k.insertBefore(A(M[ue],!0),U(t))}}return Ke(t),!0}return t instanceof h&&!Bt(t)||(i==="noscript"||i==="noembed"||i==="noframes")&&_e(/<\/no(script|embed|frames)/i,t.innerHTML)?(Ke(t),!0):(je&&t.nodeType===3&&(m=t.textContent,vt([$,oe,N],k=>{m=lt(m,k," ")}),t.textContent!==m&&(it(n.removed,{element:t.cloneNode()}),t.textContent=m)),De("afterSanitizeElements",t,null),!1)},f=function(t,m,i){if(Qe&&(m==="id"||m==="name")&&(i in a||i in dt))return!1;if(!(fe&&!K[m]&&_e(R,m))&&!(de&&_e(F,m))){if(!x[m]||K[m]){if(!(v(t)&&(j.tagNameCheck instanceof RegExp&&_e(j.tagNameCheck,t)||j.tagNameCheck instanceof Function&&j.tagNameCheck(t))&&(j.attributeNameCheck instanceof RegExp&&_e(j.attributeNameCheck,m)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(m))||m==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&_e(j.tagNameCheck,i)||j.tagNameCheck instanceof Function&&j.tagNameCheck(i))))return!1}else if(!Ve[m]&&!_e(ce,lt(i,le,""))&&!((m==="src"||m==="xlink:href"||m==="href")&&t!=="script"&&ur(i,"data:")===0&&Ye[t])&&!(Pe&&!_e(Z,lt(i,le,"")))&&i)return!1}return!0},v=function(t){return t!=="annotation-xml"&&an(t,Q)},T=function(t){De("beforeSanitizeAttributes",t,null);let{attributes:m}=t;if(!m)return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:x},k=m.length;for(;k--;){let M=m[k],{name:I,namespaceURI:ue,value:ye}=M,pe=re(I),J=I==="value"?ye:dr(ye);if(i.attrName=pe,i.attrValue=J,i.keepAttr=!0,i.forceKeepAttr=void 0,De("uponSanitizeAttribute",t,i),J=i.attrValue,i.forceKeepAttr||(nt(I,t),!i.keepAttr))continue;if(!Ee&&_e(/\/>/i,J)){nt(I,t);continue}je&&vt([$,oe,N],Ct=>{J=lt(J,Ct," ")});let rt=re(t.nodeName);if(f(rt,pe,J)){if(Re&&(pe==="id"||pe==="name")&&(nt(I,t),J=ut+J),L&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!ue)switch(b.getAttributeType(rt,pe)){case"TrustedHTML":{J=L.createHTML(J);break}case"TrustedScriptURL":{J=L.createScriptURL(J);break}}try{ue?t.setAttributeNS(ue,I,J):t.setAttribute(I,J),rn(n.removed)}catch{}}}De("afterSanitizeAttributes",t,null)},H=function t(m){let i=null,k=Tt(m);for(De("beforeSanitizeShadowDOM",m,null);i=k.nextNode();)De("uponSanitizeShadowNode",i,null),!r(i)&&(i.content instanceof d&&t(i.content),T(i));De("afterSanitizeShadowDOM",m,null)};return n.sanitize=function(t){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,k=null,M=null,I=null;if(qe=!t,qe&&(t="<!-->"),typeof t!="string"&&!_t(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw ct("dirty is not a string, aborting")}else throw ct("toString is not a function");if(!n.isSupported)return t;if(Je||tt(m),n.removed=[],typeof t=="string"&&(Ne=!1),Ne){if(t.nodeName){let pe=re(t.nodeName);if(!q[pe]||ne[pe])throw ct("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)i=ht("<!---->"),k=i.ownerDocument.importNode(t,!0),k.nodeType===1&&k.nodeName==="BODY"||k.nodeName==="HTML"?i=k:i.appendChild(k);else{if(!se&&!je&&!he&&t.indexOf("<")===-1)return L&&Fe?L.createHTML(t):t;if(i=ht(t),!i)return se?null:Fe?W:""}i&&Ze&&Ke(i.firstChild);let ue=Tt(Ne?t:i);for(;M=ue.nextNode();)r(M)||(M.content instanceof d&&H(M.content),T(M));if(Ne)return t;if(se){if(ge)for(I=te.call(i.ownerDocument);i.firstChild;)I.appendChild(i.firstChild);else I=i;return(x.shadowroot||x.shadowrootmode)&&(I=ae.call(s,I,!0)),I}let ye=he?i.outerHTML:i.innerHTML;return he&&q["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&_e(dn,i.ownerDocument.doctype.name)&&(ye="<!DOCTYPE "+i.ownerDocument.doctype.name+`>
33
- `+ye),je&&vt([$,oe,N],pe=>{ye=lt(ye,pe," ")}),L&&Fe?L.createHTML(ye):ye},n.setConfig=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tt(t),Je=!0},n.clearConfig=function(){we=null,Je=!1},n.isValidAttribute=function(t,m,i){we||tt({});let k=re(t),M=re(m);return f(k,M,i)},n.addHook=function(t,m){typeof m=="function"&&(V[t]=V[t]||[],it(V[t],m))},n.removeHook=function(t){if(V[t])return rn(V[t])},n.removeHooks=function(t){V[t]&&(V[t]=[])},n.removeAllHooks=function(){V={}},n}var Cr=mn(),Nr=e=>{switch(e){case"success":return Ir;case"info":return Lr;case"warning":return Ar;case"error":return Or;default:return null}},kr=Array(12).fill(0),Rr=({visible:e})=>c.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},c.createElement("div",{className:"sonner-spinner"},kr.map((n,a)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),Ir=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ar=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Lr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Or=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Pr=()=>{let[e,n]=c.useState(!1);return c.useEffect(()=>{let a=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),e},$t=1,jr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;let{message:a,...s}=e,l=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:$t++,d=this.toasts.find(u=>u.id===l),g=e.dismissible===void 0?!0:e.dismissible;return d?this.toasts=this.toasts.map(u=>u.id===l?(this.publish({...u,...e,id:l,title:a}),{...u,...e,id:l,dismissible:g,title:a}):u):this.addToast({title:a,...s,dismissible:g,id:l}),l},this.dismiss=e=>(e||this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:e,dismiss:!0})),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let s=e instanceof Promise?e:e(),l=a!==void 0;return s.then(d=>{if(d&&typeof d.ok=="boolean"&&!d.ok){l=!1;let g=typeof n.error=="function"?n.error(`HTTP error! status: ${d.status}`):n.error,u=typeof n.description=="function"?n.description(`HTTP error! status: ${d.status}`):n.description;this.create({id:a,type:"error",message:g,description:u})}else if(n.success!==void 0){l=!1;let g=typeof n.success=="function"?n.success(d):n.success,u=typeof n.description=="function"?n.description(d):n.description;this.create({id:a,type:"success",message:g,description:u})}}).catch(d=>{if(n.error!==void 0){l=!1;let g=typeof n.error=="function"?n.error(d):n.error,u=typeof n.description=="function"?n.description(d):n.description;this.create({id:a,type:"error",message:g,description:u})}}).finally(()=>{var d;l&&(this.dismiss(a),a=void 0),(d=n.finally)==null||d.call(n)}),a},this.custom=(e,n)=>{let a=(n==null?void 0:n.id)||$t++;return this.create({jsx:e(a),id:a,...n}),a},this.subscribers=[],this.toasts=[]}},Oe=new jr,Mr=(e,n)=>{let a=(n==null?void 0:n.id)||$t++;return Oe.addToast({title:e,...n,id:a}),a},Dr=Mr,wt=Object.assign(Dr,{success:Oe.success,info:Oe.info,warning:Oe.warning,error:Oe.error,custom:Oe.custom,message:Oe.message,promise:Oe.promise,dismiss:Oe.dismiss,loading:Oe.loading});function zr(e,{insertAt:n}={}){if(!e||typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n==="top"&&a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}zr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info],[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning],[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
34
- `);function Et(e){return e.label!==void 0&&typeof e.onClick=="function"}var $r=3,Fr="32px",Br=4e3,Ur=356,Wr=14,Hr=20,Yr=200;function Vr(...e){return e.filter(Boolean).join(" ")}var Gr=e=>{var n,a,s,l,d,g,u;let{invert:h,toast:o,unstyled:y,interacting:_,setHeights:C,visibleToasts:b,heights:P,index:A,toasts:U,expanded:w,removeToast:E,closeButton:L,style:W,cancelButtonStyle:z,actionButtonStyle:X,className:te="",descriptionClassName:G="",duration:ae,position:V,gap:$,loadingIcon:oe,expandByDefault:N,classNames:R,icons:F,closeButtonAriaLabel:Z="Close toast",pauseWhenPageIsHidden:le,cn:Q}=e,[ce,q]=c.useState(!1),[B,x]=c.useState(!1),[O,j]=c.useState(!1),[ne,K]=c.useState(!1),[de,fe]=c.useState(0),[Pe,Ee]=c.useState(0),je=c.useRef(null),he=c.useRef(null),Je=A===0,Ze=A+1<=b,se=o.type,ge=o.dismissible!==!1,Fe=o.className||"",Qe=o.descriptionClassName||"",Re=c.useMemo(()=>P.findIndex(S=>S.toastId===o.id)||0,[P,o.id]),ut=c.useMemo(()=>{var S;return(S=o.closeButton)!=null?S:L},[o.closeButton,L]),He=c.useMemo(()=>o.duration||ae||Br,[o.duration,ae]),Ne=c.useRef(0),xe=c.useRef(0),Me=c.useRef(0),Ie=c.useRef(null),[Ye,ze]=V.split("-"),Ve=c.useMemo(()=>P.reduce((S,ie,ee)=>ee>=Re?S:S+ie.height,0),[P,Re]),Ge=Pr(),Be=o.invert||h,Ae=se==="loading";xe.current=c.useMemo(()=>Re*$+Ve,[Re,Ve]),c.useEffect(()=>{q(!0)},[]),c.useLayoutEffect(()=>{if(!ce)return;let S=he.current,ie=S.style.height;S.style.height="auto";let ee=S.getBoundingClientRect().height;S.style.height=ie,Ee(ee),C(Se=>Se.find(ve=>ve.toastId===o.id)?Se.map(ve=>ve.toastId===o.id?{...ve,height:ee}:ve):[{toastId:o.id,height:ee,position:o.position},...Se])},[ce,o.title,o.description,C,o.id]);let me=c.useCallback(()=>{x(!0),fe(xe.current),C(S=>S.filter(ie=>ie.toastId!==o.id)),setTimeout(()=>{E(o)},Yr)},[o,E,C,xe]);c.useEffect(()=>{if(o.promise&&se==="loading"||o.duration===1/0||o.type==="loading")return;let S,ie=He;return w||_||le&&Ge?(()=>{if(Me.current<Ne.current){let ee=new Date().getTime()-Ne.current;ie=ie-ee}Me.current=new Date().getTime()})():ie!==1/0&&(Ne.current=new Date().getTime(),S=setTimeout(()=>{var ee;(ee=o.onAutoClose)==null||ee.call(o,o),me()},ie)),()=>clearTimeout(S)},[w,_,N,o,He,me,o.promise,se,le,Ge]),c.useEffect(()=>{let S=he.current;if(S){let ie=S.getBoundingClientRect().height;return Ee(ie),C(ee=>[{toastId:o.id,height:ie,position:o.position},...ee]),()=>C(ee=>ee.filter(Se=>Se.toastId!==o.id))}},[C,o.id]),c.useEffect(()=>{o.delete&&me()},[me,o.delete]);function $e(){return F!=null&&F.loading?c.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},F.loading):oe?c.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},oe):c.createElement(Rr,{visible:se==="loading"})}function qe(S){return{__html:Cr.sanitize(S)}}return c.createElement("li",{"aria-live":o.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:he,className:Q(te,Fe,R==null?void 0:R.toast,(n=o==null?void 0:o.classNames)==null?void 0:n.toast,R==null?void 0:R.default,R==null?void 0:R[se],(a=o==null?void 0:o.classNames)==null?void 0:a[se]),"data-sonner-toast":"","data-styled":!(o.jsx||o.unstyled||y),"data-mounted":ce,"data-promise":!!o.promise,"data-removed":B,"data-visible":Ze,"data-y-position":Ye,"data-x-position":ze,"data-index":A,"data-front":Je,"data-swiping":O,"data-dismissible":ge,"data-type":se,"data-invert":Be,"data-swipe-out":ne,"data-expanded":!!(w||N&&ce),style:{"--index":A,"--toasts-before":A,"--z-index":U.length-A,"--offset":`${B?de:xe.current}px`,"--initial-height":N?"auto":`${Pe}px`,...W,...o.style},onPointerDown:S=>{Ae||!ge||(je.current=new Date,fe(xe.current),S.target.setPointerCapture(S.pointerId),S.target.tagName!=="BUTTON"&&(j(!0),Ie.current={x:S.clientX,y:S.clientY}))},onPointerUp:()=>{var S,ie,ee,Se;if(ne||!ge)return;Ie.current=null;let ve=Number(((S=he.current)==null?void 0:S.style.getPropertyValue("--swipe-amount").replace("px",""))||0),re=new Date().getTime()-((ie=je.current)==null?void 0:ie.getTime()),we=Math.abs(ve)/re;if(Math.abs(ve)>=Hr||we>.11){fe(xe.current),(ee=o.onDismiss)==null||ee.call(o,o),me(),K(!0);return}(Se=he.current)==null||Se.style.setProperty("--swipe-amount","0px"),j(!1)},onPointerMove:S=>{var ie;if(!Ie.current||!ge)return;let ee=S.clientY-Ie.current.y,Se=S.clientX-Ie.current.x,ve=(Ye==="top"?Math.min:Math.max)(0,ee),re=S.pointerType==="touch"?10:2;Math.abs(ve)>re?(ie=he.current)==null||ie.style.setProperty("--swipe-amount",`${ee}px`):Math.abs(Se)>re&&(Ie.current=null)}},ut&&!o.jsx?c.createElement("button",{"aria-label":Z,"data-disabled":Ae,"data-close-button":!0,onClick:Ae||!ge?()=>{}:()=>{var S;me(),(S=o.onDismiss)==null||S.call(o,o)},className:Q(R==null?void 0:R.closeButton,(s=o==null?void 0:o.classNames)==null?void 0:s.closeButton)},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,o.jsx||c.isValidElement(o.title)?o.jsx||o.title:c.createElement(c.Fragment,null,se||o.icon||o.promise?c.createElement("div",{"data-icon":"",className:Q(R==null?void 0:R.icon)},o.promise||o.type==="loading"&&!o.icon?o.icon||$e():null,o.type!=="loading"?o.icon||(F==null?void 0:F[se])||Nr(se):null):null,c.createElement("div",{"data-content":"",className:Q(R==null?void 0:R.content)},c.createElement("div",{"data-title":"",className:Q(R==null?void 0:R.title,(l=o==null?void 0:o.classNames)==null?void 0:l.title),dangerouslySetInnerHTML:qe(o.title)}),o.description?c.createElement("div",{"data-description":"",className:Q(G,Qe,R==null?void 0:R.description,(d=o==null?void 0:o.classNames)==null?void 0:d.description),dangerouslySetInnerHTML:qe(o.description)}):null),c.isValidElement(o.cancel)?o.cancel:o.cancel&&Et(o.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:o.cancelButtonStyle||z,onClick:S=>{Et(o.cancel)&&ge&&(me(),o.cancel.onClick(S))},className:Q(R==null?void 0:R.cancelButton,(g=o==null?void 0:o.classNames)==null?void 0:g.cancelButton)},o.cancel.label):null,c.isValidElement(o.action)?o.action:o.action&&Et(o.action)?c.createElement("button",{"data-button":"",style:o.actionButtonStyle||X,onClick:S=>{Et(o.action)&&(o.action.onClick(S),!S.defaultPrevented&&me())},className:Q(R==null?void 0:R.actionButton,(u=o==null?void 0:o.classNames)==null?void 0:u.actionButton)},o.action.label):null))};function pn(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var qr=e=>{let{invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:l,closeButton:d,className:g,offset:u,theme:h="light",richColors:o,duration:y,style:_,visibleToasts:C=$r,toastOptions:b,dir:P=pn(),gap:A=Wr,loadingIcon:U,icons:w,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:L,cn:W=Vr}=e,[z,X]=c.useState([]),te=c.useMemo(()=>Array.from(new Set([a].concat(z.filter(B=>B.position).map(B=>B.position)))),[z,a]),[G,ae]=c.useState([]),[V,$]=c.useState(!1),[oe,N]=c.useState(!1),[R,F]=c.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=c.useRef(null),le=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=c.useRef(null),ce=c.useRef(!1),q=c.useCallback(B=>X(x=>x.filter(({id:O})=>O!==B.id)),[]);return c.useEffect(()=>Oe.subscribe(B=>{if(B.dismiss){X(x=>x.map(O=>O.id===B.id?{...O,delete:!0}:O));return}setTimeout(()=>{gn.flushSync(()=>{X(x=>{let O=x.findIndex(j=>j.id===B.id);return O!==-1?[...x.slice(0,O),{...x[O],...B},...x.slice(O+1)]:[B,...x]})})})}),[]),c.useEffect(()=>{if(h!=="system"){F(h);return}h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:B})=>{F(B?"dark":"light")})},[h]),c.useEffect(()=>{z.length<=1&&$(!1)},[z]),c.useEffect(()=>{let B=x=>{var O,j;s.every(ne=>x[ne]||x.code===ne)&&($(!0),(O=Z.current)==null||O.focus()),x.code==="Escape"&&(document.activeElement===Z.current||(j=Z.current)!=null&&j.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),c.useEffect(()=>{if(Z.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,ce.current=!1)}},[Z.current]),z.length?c.createElement("section",{"aria-label":`${E} ${le}`,tabIndex:-1},te.map((B,x)=>{var O;let[j,ne]=B.split("-");return c.createElement("ol",{key:B,dir:P==="auto"?pn():P,tabIndex:-1,ref:Z,className:g,"data-sonner-toaster":!0,"data-theme":R,"data-rich-colors":o,"data-y-position":j,"data-x-position":ne,style:{"--front-toast-height":`${((O=G[0])==null?void 0:O.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Fr,"--width":`${Ur}px`,"--gap":`${A}px`,..._},onBlur:K=>{ce.current&&!K.currentTarget.contains(K.relatedTarget)&&(ce.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||ce.current||(ce.current=!0,Q.current=K.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{oe||$(!1)},onPointerDown:K=>{K.target instanceof HTMLElement&&K.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},z.filter(K=>!K.position&&x===0||K.position===B).map((K,de)=>{var fe,Pe;return c.createElement(Gr,{key:K.id,icons:w,index:de,toast:K,duration:(fe=b==null?void 0:b.duration)!=null?fe:y,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:n,visibleToasts:C,closeButton:(Pe=b==null?void 0:b.closeButton)!=null?Pe:d,interacting:oe,position:B,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,removeToast:q,toasts:z.filter(Ee=>Ee.position==K.position),heights:G.filter(Ee=>Ee.position==K.position),setHeights:ae,expandByDefault:l,gap:A,loadingIcon:U,expanded:V,pauseWhenPageIsHidden:L,cn:W})}))})):null};/*! Bundled license information:
35
-
36
- dompurify/dist/purify.es.mjs:
37
- (*! @license DOMPurify 3.0.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.10/LICENSE *)
38
- */function Kr({children:e}){function n(d){wt.success(d)}function a(d){wt.info(d)}function s(d){wt.error(d)}function l(d){wt.warning(d)}return p.jsxs(Zt.Provider,{value:{errorToast:s,warningToast:l,successToast:n,infoToast:a},children:[p.jsx(qr,{richColors:!0}),e]})}Y.Badge=xn,Y.Breadcrumb=Xn,Y.BreadcrumbLink=Jn,Y.Button=Tn,Y.Checkbox=Cn,Y.Divider=wn,Y.FormController=_n,Y.FormError=Nn,Y.FormLabel=Rn,Y.IconButton=In,Y.Input=Hn,Y.Modal=tr,Y.ModalProvider=sr,Y.Select=Gn,Y.Skeleton=En,Y.ToastProvider=Kr,Y.Tooltip=nr,Y.useAutomation=rr,Y.useModal=ar,Y.useScopedParams=or,Y.useToast=Qt,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
32
+ <%s key={someKey} {...props} />`,it,je,Xr,je),Et[je+it]=!0}}return e===i?Ur(re):Yr(re),re}}function Hr(e,l,m){return kt(e,l,m,!0)}function Kr(e,l,m){return kt(e,l,m,!1)}var qr=Kr,Jr=Hr;$e.Fragment=i,$e.jsx=qr,$e.jsxs=Jr}()),$e}process.env.NODE_ENV==="production"?Xe.exports=Nt():Xe.exports=Rt();var u=Xe.exports;function Me(t,r){return r?u.jsx(r,{size:t,strokeWidth:2.5}):u.jsx(u.Fragment,{})}function _t(t){const{variant:r="ghost",scheme:n="primary",size:i="md",leftIcon:c,rightIcon:d,className:h="",children:o,...f}=t,g={md:12,lg:14}[i];return{className:`arkyn_badge ${r} ${n} ${i} ${h}`.trim(),children:o,leftIcon:Me(g,c),rightIcon:Me(g,d),...f}}function Tt(t){const{leftIcon:r,children:n,rightIcon:i,...c}=_t(t);return u.jsxs("div",{...c,children:[r,n,i]})}function It(t){const{className:r,orientation:n="horizontal",...i}=t,c=`arkyn_divider ${n} ${r}`;return u.jsx("div",{className:c,...i})}function Pt({className:t,...r}){const n="arkyn_skeleton "+t;return u.jsx("div",{className:n.trim(),...r})}function $t(t){const{isLoading:r=!1,scheme:n="primary",variant:i="solid",loadingText:c,size:d="md",leftIcon:h,rightIcon:o,disabled:f,className:p="",children:g,...w}=t,v={xs:12,sm:16,md:20,lg:24}[d];return{className:`arkyn_button loading_text_${!!c} ${i} ${n} ${d} loading_${r} ${p}`.trim(),loadingText:c,children:g,iconSize:v,disabled:f||r,leftIcon:Me(v,h),rightIcon:Me(v,o),...w}}function Ot(t){const{leftIcon:r,rightIcon:n,iconSize:i,children:c,loadingText:d,...h}=$t(t);return u.jsxs("button",{...h,children:[u.jsxs("div",{className:"spinner",children:[u.jsx(de.Loader2,{size:i,strokeWidth:2.5}),d&&d]}),u.jsxs("div",{className:"content",children:[r,c,n]})]})}const ut=s.createContext({});function zt({children:t,...r}){var o,f;const n=Ie.useActionData(),i=s.useRef(null),c=((o=i.current)==null?void 0:o.name)||"",d=((f=n==null?void 0:n.fieldErrors)==null?void 0:f[c])||null,h=s.useId();return u.jsx(ut.Provider,{value:{error:d,id:h,inputRef:i},children:u.jsx("section",{className:"arkyn_form_controller",...r,children:t})})}function we(){return s.useContext(ut)}function Lt(t){const{name:r,className:n="",size:i="md",isError:c,defaultChecked:d=!1,checked:h=null,onCheck:o,value:f,...p}=t,{id:g,inputRef:w,error:a}=we(),v=c||!!a,[P,j]=s.useState(d||!1),$=typeof h=="boolean"?h:P,b=`arkyn_checkbox ${i} ${v?"error":""} ${$?"checked":""} ${n}`;function y(){const K=P;j(!K),o&&o(K?"":f||"checked")}return u.jsxs("div",{id:g,className:b,onClick:y,...p,children:[u.jsx("input",{type:"hidden",name:r,ref:w,value:$?f||"checked":""}),u.jsx(de.Check,{})]})}function Ft({children:t}){const{error:r}=we();return t?u.jsx("strong",{className:"arkyn_form_error",children:t}):r?u.jsx("strong",{className:"arkyn_form_error",children:r}):u.jsx(u.Fragment,{})}function Bt(t){const{showAsterisk:r=!1,className:n="",...i}=t;return{className:`arkyn_form_label ${r?"show-asterisk":""} ${n}`.trim(),...i}}function Mt(t){const{id:r}=we();return u.jsx("label",{...Bt(t),htmlFor:r})}const dt={xs:12,sm:16,md:20,lg:24};function Dt(t){const{isLoading:r=!1,scheme:n="primary",variant:i="solid",size:c="md",icon:d,disabled:h,className:o="",...f}=t,p=`arkyn_icon_button ${i} ${n} ${c} loading_${r} ${o}`;return u.jsxs("button",{disabled:h||r,className:p.trim(),...f,children:[u.jsx("div",{className:"spinner",children:u.jsx(de.Loader2,{size:dt[c],strokeWidth:2.5})}),u.jsx("div",{className:"content "+c,children:u.jsx(d,{size:dt[c],strokeWidth:2.5})})]})}function Se(t,r,n){if(!t)return u.jsx(u.Fragment,{});if(typeof t=="string")return u.jsx("p",{className:n,children:t});const i=t;return u.jsx("p",{className:n,children:u.jsx(i,{color:"var(--secondary-600)",size:r,strokeWidth:2.5})})}function Ge(t){return t&&t.replace(/[^0-9]/g,"")}function ft(t,r){let n="",i=0;return Array.from(t).forEach((c,d)=>{r[d+i].match(/[0-9]/)||(n+=r[d+i],i++),n+=c}),n}function ht(t){return t.length>11?"CNPJ":"CPF"}const Ze={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},mt=Ge(Ze.CNPJ).length;function At(t,r){const{isLoading:n,isError:i,size:c="md",className:d="",variant:h="solid",prefix:o,sufix:f,leftIcon:p,rightIcon:g,disabled:w,defaultValue:a,readOnly:v,onFocus:P,onBlur:j,title:$,style:b,onChange:y,...K}=t;function B(q){let L=Ge(q);const V=ht(L);if(!(L.length>mt))return L=ft(L,Ze[V]),L}const R=g?"right":"left",O=`arkyn_input ${o?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${w||v||n?"opacity":""} ${i?"errored":""} ${r?"focused":""} ${d}`,C={md:20,lg:20}[c];return{isLoading:n,className:O,prefix:Se(o,C,"prefix"),sufix:Se(f,C,"sufix"),LeftIcon:p,RightIcon:g,defaultValue:B(a||""),disabled:w,readOnly:v,onFocus:P,onBlur:j,title:$,style:b,onChange:y,loadingPosition:R,iconSize:C,Spinner:u.jsx(de.Loader2,{className:"spinner",size:C,strokeWidth:2.5}),...K}}function Wt(t){const[r,n]=s.useState(!1),i=s.useRef(null),{inputRef:c,id:d,error:h}=we(),o=c||i,f=t.isError||!!h,{disabled:p,title:g,style:w,className:a,prefix:v,sufix:P,iconSize:j,loadingPosition:$,isLoading:b,LeftIcon:y,readOnly:K,onFocus:B,onBlur:R,RightIcon:W,Spinner:H,onChange:M,value:J,defaultValue:X,...O}=At({...t,id:d,isError:f},r),[Z,C]=s.useState(X),q=y&&!b,L=W&&!b,V=$==="left"&&b,Q=$==="right"&&b;function N(){p||!(o!=null&&o.current)||(n(!0),o.current.focus())}function ee(k){let S=Ge(k.target.value);const ne=ht(S);S.length>mt||(S=ft(S,Ze[ne]),k.target.value=S,C(S),M&&M(k))}function he(k){n(!0),B&&B(k)}function _(k){n(!1),R&&R(k)}return u.jsxs("section",{title:g,style:w,onClick:N,className:a,children:[v,V&&H,q&&u.jsx(y,{size:j,strokeWidth:2.5}),u.jsx("input",{disabled:p||b,readOnly:K,ref:o,value:J||Z,onFocus:he,onChange:ee,onBlur:_,...O}),L&&u.jsx(W,{size:j,strokeWidth:2.5}),Q&&H,P]})}function Vt(t,r){const{isLoading:n,isError:i,size:c="md",className:d="",variant:h="solid",prefix:o,sufix:f,leftIcon:p,rightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,showCents:b=!1,max:y=1e9,onChange:K,...B}=t,R=g?"right":"left",O=`arkyn_input ${o?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${w||a||n?"opacity":""} ${i?"errored":""} ${r?"focused":""} ${d}`,C={md:20,lg:20}[c];return{isLoading:n,className:O,prefix:Se(o,C,"prefix"),sufix:Se(f,C,"sufix"),LeftIcon:p,RightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,max:y,onChange:K,showCents:b,loadingPosition:R,iconSize:C,Spinner:u.jsx(de.Loader2,{className:"spinner",size:C,strokeWidth:2.5}),...B}}const Yt=/^[1-9]{1}$/,Ut=/^[0-9]{1}$/,pt=8;function Ht(t,r){if(t===0)return"";const n=(t/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return r?n:n.replace("R$","").trim()}function Kt(t){const{currencyValue:r,event:n,max:i,setCurrencyValue:c}=t,{key:d,keyCode:h}=n;if(r===0&&!Yt.test(d)||r!==0&&!Ut.test(d)&&h!==pt)return;const o=r.toString();let f;if(h!==pt){const p=r===0?d:`${o}${d}`;f=Number.parseInt(p,10)}else{const p=o.slice(0,-1);f=p===""?0:Number.parseInt(p,10)}f>Number(i)||c(f)}function qt(t){const[r,n]=s.useState(!1),i=s.useRef(null),{inputRef:c,id:d,error:h}=we(),o=c||i,f=t.isError||!!h,{disabled:p,title:g,style:w,className:a,prefix:v,sufix:P,iconSize:j,loadingPosition:$,isLoading:b,LeftIcon:y,readOnly:K,onFocus:B,onBlur:R,RightIcon:W,Spinner:H,value:M,max:J,onKeyDown:X,onChange:O,showCents:Z,defaultValue:C,...q}=Vt({...t,id:d,isError:f},r),[L,V]=s.useState(C*100||0),Q=y&&!b,N=W&&!b,ee=$==="left"&&b,he=$==="right"&&b;function _(){p||!(o!=null&&o.current)||(n(!0),o.current.focus())}function k(te){Kt({currencyValue:L,event:te,max:J,setCurrencyValue:V}),O&&O(L/100),X&&X(te)}function S(te){n(!0),B&&B(te)}function ne(te){n(!1),R&&R(te)}return u.jsxs("section",{title:g,style:w,onClick:_,className:a,children:[v,ee&&H,Q&&u.jsx(y,{size:j,strokeWidth:2.5}),u.jsx("input",{value:Ht(M||L,Z),onKeyDown:k,disabled:p||b,readOnly:K,ref:o,onFocus:S,onBlur:ne,onChange:()=>{},...q}),he&&H,N&&u.jsx(W,{size:j,strokeWidth:2.5}),P]})}function Jt(t,r){const{isLoading:n,isError:i,size:c="md",className:d="",variant:h="solid",prefix:o,sufix:f,leftIcon:p,rightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,onChange:b,showMask:y=!1,type:K,...B}=t,R=g?"right":"left",O=`arkyn_input ${o?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${w||a||n?"opacity":""} ${i?"errored":""} ${r?"focused":""} ${d}`,C={md:20,lg:20}[c];return{isLoading:n,className:O,prefix:Se(o,C,"prefix"),sufix:Se(f,C,"sufix"),LeftIcon:p,RightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,onChange:b,loadingPosition:R,iconSize:C,showMask:y,Spinner:u.jsx(de.Loader2,{className:"spinner",size:C,strokeWidth:2.5}),...B}}const Xt=s.forwardRef((t,r)=>u.jsx("input",{ref:r,...t}));function Gt(t){const[r,n]=s.useState(!1),i=s.useRef(null),{inputRef:c,id:d,error:h}=we(),o=c||i,f=t.isError||!!h,{disabled:p,title:g,style:w,className:a,prefix:v,sufix:P,iconSize:j,loadingPosition:$,isLoading:b,LeftIcon:y,readOnly:K,onFocus:B,onBlur:R,RightIcon:W,Spinner:H,...M}=Jt({...t,id:d,isError:f},r),J=y&&!b,X=W&&!b,O=$==="left"&&b,Z=$==="right"&&b;function C(){p||!(o!=null&&o.current)||(n(!0),o.current.focus())}function q(V){n(!0),B&&B(V)}function L(V){n(!1),R&&R(V)}return u.jsxs("section",{title:g,style:w,onClick:C,className:a,children:[v,O&&H,J&&u.jsx(y,{size:j,strokeWidth:2.5}),u.jsx(Ct.InputMask,{component:Xt,ref:o,onFocus:q,onBlur:L,...M}),X&&u.jsx(W,{size:j,strokeWidth:2.5}),Z&&H,P]})}function Zt(t,r){const{isLoading:n,isError:i,size:c="md",className:d="",variant:h="solid",prefix:o,sufix:f,leftIcon:p,rightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,onChange:b,...y}=t,K=g?"right":"left",J=`arkyn_input ${o?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${w||a||n?"opacity":""} ${i?"errored":""} ${r?"focused":""} ${d}`,O={md:20,lg:20}[c];return{isLoading:n,className:J,prefix:Se(o,O,"prefix"),sufix:Se(f,O,"sufix"),LeftIcon:p,RightIcon:g,disabled:w,readOnly:a,onFocus:v,onBlur:P,title:j,style:$,onChange:b,loadingPosition:K,iconSize:O,Spinner:u.jsx(de.Loader2,{className:"spinner",size:O,strokeWidth:2.5}),...y}}function Qt(t){const[r,n]=s.useState(!1),i=s.useRef(null),{inputRef:c,id:d,error:h}=we(),o=c||i,f=t.isError||!!h,{disabled:p,title:g,style:w,className:a,prefix:v,sufix:P,iconSize:j,loadingPosition:$,isLoading:b,LeftIcon:y,readOnly:K,onFocus:B,onBlur:R,RightIcon:W,type:H,Spinner:M,...J}=Zt({...t,id:d,isError:f},r),X=y&&!b,O=W&&!b,Z=$==="left"&&b,C=$==="right"&&b;function q(){p||!(o!=null&&o.current)||(n(!0),o.current.focus())}function L(Q){n(!0),B&&B(Q)}function V(Q){n(!1),R&&R(Q)}return H==="hidden"?u.jsx("input",{type:"hidden",ref:o,...J}):u.jsxs("section",{title:g,style:w,onClick:q,className:a,children:[v,Z&&M,X&&u.jsx(y,{size:j,strokeWidth:2.5}),u.jsx("input",{disabled:p||b,readOnly:K,ref:o,onFocus:L,onBlur:V,type:H,...J}),O&&u.jsx(W,{size:j,strokeWidth:2.5}),C&&M,P]})}function er(t){return t.type==="currency"?u.jsx(qt,{...t}):t.type==="masked"?u.jsx(Gt,{...t}):t.type==="cpf-cnpj"?u.jsx(Wt,{...t}):u.jsx(Qt,{...t})}function tr(t,r,n){if(!t)return u.jsx(u.Fragment,{});if(typeof t=="string")return u.jsx("p",{className:n,children:t});const i=t;return u.jsx("p",{className:n,children:u.jsx(i,{color:"var(--secondary-600)",size:r,strokeWidth:2.5})})}function rr(t,r){const{isLoading:n,isError:i,size:c="md",className:d="",variant:h="solid",prefix:o,leftIcon:f,disabled:p,readOnly:g,onFocus:w,onBlur:a,title:v,style:P,isSearchable:j=!1,closeOnSelect:$=!0,...b}=t,W=`arkyn_select ${o?"hasPrefix":""} ${h} ${c} ${p||g||n?"opacity":""} ${i?"errored":""} ${r?"focused":""} ${d}`,M={md:20,lg:20}[c];return{isLoading:n,className:W,prefix:tr(o,M,"prefix"),LeftIcon:f,disabled:p,readOnly:g,onFocus:w,onBlur:a,title:v,closeOnSelect:$,style:P,isSearchable:j,iconSize:M,Spinner:u.jsx(de.Loader2,{className:"spinner",size:M,strokeWidth:2.5}),...b}}function nr(t){var U;const[r,n]=s.useState(!1),{inputRef:i,id:c,error:d}=we(),h=s.useRef(null),o=i||h,f=t.isError||!!d,{disabled:p,title:g,style:w,className:a,prefix:v,iconSize:P,isLoading:j,LeftIcon:$,value:b=null,defaultValue:y="",readOnly:K,onFocus:B,onBlur:R,Spinner:W,name:H,isSearchable:M,placeholder:J,onSelect:X,options:O,optionMaxHeight:Z,closeOnSelect:C,...q}=rr({...t,id:c,isError:f},r),[L,V]=s.useState(y),[Q,N]=s.useState("");function ee(){p||!(o!=null&&o.current)||(n(!0),o.current.focus())}function he(ae){n(!0),B&&B(ae)}function _(){n(!1),R&&o.current&&o.current.blur()}const k=typeof b=="string"?b:L,S=((U=O.find(ae=>ae.value===k))==null?void 0:U.label)||"",ne=()=>{if(M){if(!r&&S)return!0;if(!r&&!S||r)return!1}if(!M){if(!r&&S)return!0;if(!r&&!S)return!1;if(r&&S)return!0;if(r&&!S)return!1}},te=O.filter(ae=>M?ae.label.toLowerCase().includes(Q.toLowerCase()):!0);return u.jsxs(u.Fragment,{children:[u.jsxs("section",{title:g,style:w,onClick:ee,className:`${a} placeholder_dark_${ne()}`,children:[v,$&&u.jsx($,{size:P,strokeWidth:2.5}),u.jsx("input",{disabled:p||j,readOnly:!M,value:Q||"",placeholder:S||J,onFocus:he,onBlur:()=>N(""),...q,onChange:ae=>N(ae.target.value)}),u.jsx("input",{type:"hidden",ref:o,name:H,value:k||"",readOnly:!0}),r&&u.jsxs("ul",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:Z},children:[te.map(({label:ae,value:ie})=>u.jsxs("li",{className:k===ie?"active":"",onClick:()=>{V(L!==ie?ie:""),X&&X({label:ae,value:ie}),C&&setTimeout(()=>_(),100)},children:[ae," ",u.jsx(de.Check,{})]},ie)),te.length<=0&&u.jsx("p",{children:"Sem opções disponíveis"})]}),!j&&u.jsx(de.ChevronDown,{className:"arkyn_select_arrow",size:P,strokeWidth:2.5}),j&&W]}),r&&u.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function ar(t){const{className:r="",...n}=t;return{className:`arkyn_breadcrumb ${r}`.trim(),...n}}function sr(t){const{pathname:r}=Ie.useLocation(),{className:n="",disabled:i=!1,to:c,...d}=t,h=r===c?"active":"inactive",o=`arkyn_breadcrumb_link ${h} ${n}`;return{to:c,className:o.trim(),disabled:i||h==="active",...d}}function or(t){const{className:r,...n}=ar(t);return u.jsx("nav",{className:r,...n})}function ir(t){const{children:r,className:n,disabled:i,...c}=sr(t);return i?u.jsxs("p",{className:n,children:[u.jsx(de.ChevronRight,{size:14,strokeWidth:2.5}),r]}):u.jsxs(Ie.Link,{className:n,...c,children:[u.jsx(de.ChevronRight,{size:14,strokeWidth:2.5}),r]})}const gt=s.createContext({});function lr(t){const{isVisibled:r,makeInvisible:n,children:i,className:c="",...d}=t,o=`arkyn_modal_container ${r?"visible":""} ${c}`;return u.jsx(gt.Provider,{value:{makeInvisible:n},children:u.jsx(Je.AnimatePresence,{children:r&&u.jsxs("aside",{className:o.trim(),...d,children:[u.jsx(Je.motion.div,{className:"overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),u.jsx(Je.motion.div,{className:"content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:i})]})})})}function cr(t){const{alignment:r="right",className:n,...i}=t,c=`arkyn_modal_footer ${r} ${n}`;return u.jsx("footer",{className:c.trim(),...i})}function ur(t){const{showCloseButton:r,className:n,children:i,...c}=t,{makeInvisible:d}=s.useContext(gt),o=`arkyn_modal_header ${r?"show-close":""} ${n}`;return u.jsxs("header",{className:o.trim(),...c,children:[i,u.jsx("button",{type:"button",onClick:d,children:u.jsx(de.X,{size:24})})]})}const dr={Container:lr,Header:ur,Footer:cr};function fr(t){const{text:r,size:n="lg",children:i,orientation:c="top",className:d,...h}=t;return u.jsxs("div",{className:`arkyn_tooltip ${n} ${c} ${d}`,...h,children:[i,u.jsx("div",{className:"arkyn_tooltip_text",children:r})]})}const Qe=s.createContext({}),vt=s.createContext({});function bt(){const t=s.useContext(vt);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function hr(){const t=Ie.useActionData(),{closeModal:r}=s.useContext(Qe),{successToast:n,errorToast:i}=bt();s.useEffect(()=>{const c=t==null?void 0:t.closeModalKey;c&&r(c)},[t]),s.useEffect(()=>{typeof(t==null?void 0:t.message)=="string"&&typeof(t==null?void 0:t.success)=="boolean"&&(t!=null&&t.success?n(t==null?void 0:t.message):i(t==null?void 0:t.message))},[t])}function mr(t){const r=s.useContext(Qe);if(Object.entries(r).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:i,openModal:c,closeModal:d}=r,h=i(t),o=n(t);return{modalIsOpen:h,modalData:o,openModal:g=>c(t,g==null?void 0:g.data),closeModal:()=>d(t)}}else return r}function pr(t=""){const r=Ie.useLocation(),n=new URLSearchParams(r.search),i=t?`${t}:`:"",c=d=>{Object.entries(d).forEach(([h,o])=>{o===void 0?n.delete(`${i}${h}`):n.set(`${i}${h}`,String(o))})};return{getParam:d=>n.get(`${i}${d}`),getScopedSearch:d=>{c(d);let h=n.toString();return h&&(h="?"+h),h}}}function gr(t){const{children:r=!1}=t,[n,i]=s.useState([]);function c(f){return!!n.some(p=>p.key===f)}function d(f){var p;return(p=n.find(g=>g.key===f))==null?void 0:p.data}function h(f,p){const g=c(f);i(g?w=>[...w.filter(v=>v.key!==f),{key:f,data:p}]:[...n,{key:f,data:p}])}function o(f){i(n.filter(p=>p.key!==f))}return u.jsx(Qe.Provider,{value:{modalIsOpen:c,modalData:d,openModal:h,closeModal:o},children:r})}var vr=t=>{switch(t){case"success":return xr;case"info":return Sr;case"warning":return wr;case"error":return Er;default:return null}},br=Array(12).fill(0),yr=({visible:t})=>s.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},s.createElement("div",{className:"sonner-spinner"},br.map((r,n)=>s.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),xr=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),wr=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Sr=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Er=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),kr=()=>{let[t,r]=s.useState(document.hidden);return s.useEffect(()=>{let n=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},et=1,Cr=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:n,...i}=t,c=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:et++,d=this.toasts.find(o=>o.id===c),h=t.dismissible===void 0?!0:t.dismissible;return d?this.toasts=this.toasts.map(o=>o.id===c?(this.publish({...o,...t,id:c,title:n}),{...o,...t,id:c,dismissible:h,title:n}):o):this.addToast({title:n,...i,dismissible:h,id:c}),c},this.dismiss=t=>(t||this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:t,dismiss:!0})),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let i=t instanceof Promise?t:t(),c=n!==void 0;return i.then(async d=>{if(Nr(d)&&!d.ok){c=!1;let h=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,o=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description;this.create({id:n,type:"error",message:h,description:o})}else if(r.success!==void 0){c=!1;let h=typeof r.success=="function"?await r.success(d):r.success,o=typeof r.description=="function"?await r.description(d):r.description;this.create({id:n,type:"success",message:h,description:o})}}).catch(async d=>{if(r.error!==void 0){c=!1;let h=typeof r.error=="function"?await r.error(d):r.error,o=typeof r.description=="function"?await r.description(d):r.description;this.create({id:n,type:"error",message:h,description:o})}}).finally(()=>{var d;c&&(this.dismiss(n),n=void 0),(d=r.finally)==null||d.call(r)}),n},this.custom=(t,r)=>{let n=(r==null?void 0:r.id)||et++;return this.create({jsx:t(n),id:n,...r}),n},this.subscribers=[],this.toasts=[]}},fe=new Cr,jr=(t,r)=>{let n=(r==null?void 0:r.id)||et++;return fe.addToast({title:t,...r,id:n}),n},Nr=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Rr=jr,_r=()=>fe.toasts,De=Object.assign(Rr,{success:fe.success,info:fe.info,warning:fe.warning,error:fe.error,custom:fe.custom,message:fe.message,promise:fe.promise,dismiss:fe.dismiss,loading:fe.loading},{getHistory:_r});function Tr(t,{insertAt:r}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}Tr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
33
+ `);function Ae(t){return t.label!==void 0}var Ir=3,Pr="32px",$r=4e3,Or=356,zr=14,Lr=20,Fr=200;function Br(...t){return t.filter(Boolean).join(" ")}var Mr=t=>{var r,n,i,c,d,h,o,f,p,g;let{invert:w,toast:a,unstyled:v,interacting:P,setHeights:j,visibleToasts:$,heights:b,index:y,toasts:K,expanded:B,removeToast:R,defaultRichColors:W,closeButton:H,style:M,cancelButtonStyle:J,actionButtonStyle:X,className:O="",descriptionClassName:Z="",duration:C,position:q,gap:L,loadingIcon:V,expandByDefault:Q,classNames:N,icons:ee,closeButtonAriaLabel:he="Close toast",pauseWhenPageIsHidden:_,cn:k}=t,[S,ne]=s.useState(!1),[te,U]=s.useState(!1),[ae,ie]=s.useState(!1),[ye,ve]=s.useState(!1),[tt,Ne]=s.useState(0),[rt,We]=s.useState(0),Ce=s.useRef(null),me=s.useRef(null),Ve=y===0,Ye=y+1<=$,se=a.type,Ee=a.dismissible!==!1,nt=a.className||"",Oe=a.descriptionClassName||"",Re=s.useMemo(()=>b.findIndex(E=>E.toastId===a.id)||0,[b,a.id]),at=s.useMemo(()=>{var E;return(E=a.closeButton)!=null?E:H},[a.closeButton,H]),ze=s.useMemo(()=>a.duration||C||$r,[a.duration,C]),_e=s.useRef(0),pe=s.useRef(0),Ue=s.useRef(0),xe=s.useRef(null),[Le,Fe]=q.split("-"),He=s.useMemo(()=>b.reduce((E,D,A)=>A>=Re?E:E+D.height,0),[b,Re]),Ke=kr(),st=a.invert||w,Be=se==="loading";pe.current=s.useMemo(()=>Re*L+He,[Re,He]),s.useEffect(()=>{ne(!0)},[]),s.useLayoutEffect(()=>{if(!S)return;let E=me.current,D=E.style.height;E.style.height="auto";let A=E.getBoundingClientRect().height;E.style.height=D,We(A),j(oe=>oe.find(ce=>ce.toastId===a.id)?oe.map(ce=>ce.toastId===a.id?{...ce,height:A}:ce):[{toastId:a.id,height:A,position:a.position},...oe])},[S,a.title,a.description,j,a.id]);let be=s.useCallback(()=>{U(!0),Ne(pe.current),j(E=>E.filter(D=>D.toastId!==a.id)),setTimeout(()=>{R(a)},Fr)},[a,R,j,pe]);s.useEffect(()=>{if(a.promise&&se==="loading"||a.duration===1/0||a.type==="loading")return;let E,D=ze;return B||P||_&&Ke?(()=>{if(Ue.current<_e.current){let A=new Date().getTime()-_e.current;D=D-A}Ue.current=new Date().getTime()})():D!==1/0&&(_e.current=new Date().getTime(),E=setTimeout(()=>{var A;(A=a.onAutoClose)==null||A.call(a,a),be()},D)),()=>clearTimeout(E)},[B,P,Q,a,ze,be,a.promise,se,_,Ke]),s.useEffect(()=>{let E=me.current;if(E){let D=E.getBoundingClientRect().height;return We(D),j(A=>[{toastId:a.id,height:D,position:a.position},...A]),()=>j(A=>A.filter(oe=>oe.toastId!==a.id))}},[j,a.id]),s.useEffect(()=>{a.delete&&be()},[be,a.delete]);function ot(){return ee!=null&&ee.loading?s.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},ee.loading):V?s.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},V):s.createElement(yr,{visible:se==="loading"})}return s.createElement("li",{"aria-live":a.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:me,className:k(O,nt,N==null?void 0:N.toast,(r=a==null?void 0:a.classNames)==null?void 0:r.toast,N==null?void 0:N.default,N==null?void 0:N[se],(n=a==null?void 0:a.classNames)==null?void 0:n[se]),"data-sonner-toast":"","data-rich-colors":(i=a.richColors)!=null?i:W,"data-styled":!(a.jsx||a.unstyled||v),"data-mounted":S,"data-promise":!!a.promise,"data-removed":te,"data-visible":Ye,"data-y-position":Le,"data-x-position":Fe,"data-index":y,"data-front":Ve,"data-swiping":ae,"data-dismissible":Ee,"data-type":se,"data-invert":st,"data-swipe-out":ye,"data-expanded":!!(B||Q&&S),style:{"--index":y,"--toasts-before":y,"--z-index":K.length-y,"--offset":`${te?tt:pe.current}px`,"--initial-height":Q?"auto":`${rt}px`,...M,...a.style},onPointerDown:E=>{Be||!Ee||(Ce.current=new Date,Ne(pe.current),E.target.setPointerCapture(E.pointerId),E.target.tagName!=="BUTTON"&&(ie(!0),xe.current={x:E.clientX,y:E.clientY}))},onPointerUp:()=>{var E,D,A,oe;if(ye||!Ee)return;xe.current=null;let ce=Number(((E=me.current)==null?void 0:E.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ke=new Date().getTime()-((D=Ce.current)==null?void 0:D.getTime()),qe=Math.abs(ce)/ke;if(Math.abs(ce)>=Lr||qe>.11){Ne(pe.current),(A=a.onDismiss)==null||A.call(a,a),be(),ve(!0);return}(oe=me.current)==null||oe.style.setProperty("--swipe-amount","0px"),ie(!1)},onPointerMove:E=>{var D;if(!xe.current||!Ee)return;let A=E.clientY-xe.current.y,oe=E.clientX-xe.current.x,ce=(Le==="top"?Math.min:Math.max)(0,A),ke=E.pointerType==="touch"?10:2;Math.abs(ce)>ke?(D=me.current)==null||D.style.setProperty("--swipe-amount",`${A}px`):Math.abs(oe)>ke&&(xe.current=null)}},at&&!a.jsx?s.createElement("button",{"aria-label":he,"data-disabled":Be,"data-close-button":!0,onClick:Be||!Ee?()=>{}:()=>{var E;be(),(E=a.onDismiss)==null||E.call(a,a)},className:k(N==null?void 0:N.closeButton,(c=a==null?void 0:a.classNames)==null?void 0:c.closeButton)},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,a.jsx||s.isValidElement(a.title)?a.jsx||a.title:s.createElement(s.Fragment,null,se||a.icon||a.promise?s.createElement("div",{"data-icon":"",className:k(N==null?void 0:N.icon,(d=a==null?void 0:a.classNames)==null?void 0:d.icon)},a.promise||a.type==="loading"&&!a.icon?a.icon||ot():null,a.type!=="loading"?a.icon||(ee==null?void 0:ee[se])||vr(se):null):null,s.createElement("div",{"data-content":"",className:k(N==null?void 0:N.content,(h=a==null?void 0:a.classNames)==null?void 0:h.content)},s.createElement("div",{"data-title":"",className:k(N==null?void 0:N.title,(o=a==null?void 0:a.classNames)==null?void 0:o.title)},a.title),a.description?s.createElement("div",{"data-description":"",className:k(Z,Oe,N==null?void 0:N.description,(f=a==null?void 0:a.classNames)==null?void 0:f.description)},a.description):null),s.isValidElement(a.cancel)?a.cancel:a.cancel&&Ae(a.cancel)?s.createElement("button",{"data-button":!0,"data-cancel":!0,style:a.cancelButtonStyle||J,onClick:E=>{var D,A;Ae(a.cancel)&&Ee&&((A=(D=a.cancel).onClick)==null||A.call(D,E),be())},className:k(N==null?void 0:N.cancelButton,(p=a==null?void 0:a.classNames)==null?void 0:p.cancelButton)},a.cancel.label):null,s.isValidElement(a.action)?a.action:a.action&&Ae(a.action)?s.createElement("button",{"data-button":!0,"data-action":!0,style:a.actionButtonStyle||X,onClick:E=>{var D,A;Ae(a.action)&&(E.defaultPrevented||((A=(D=a.action).onClick)==null||A.call(D,E),be()))},className:k(N==null?void 0:N.actionButton,(g=a==null?void 0:a.classNames)==null?void 0:g.actionButton)},a.action.label):null))};function yt(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var Dr=t=>{let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:c,closeButton:d,className:h,offset:o,theme:f="light",richColors:p,duration:g,style:w,visibleToasts:a=Ir,toastOptions:v,dir:P=yt(),gap:j=zr,loadingIcon:$,icons:b,containerAriaLabel:y="Notifications",pauseWhenPageIsHidden:K,cn:B=Br}=t,[R,W]=s.useState([]),H=s.useMemo(()=>Array.from(new Set([n].concat(R.filter(_=>_.position).map(_=>_.position)))),[R,n]),[M,J]=s.useState([]),[X,O]=s.useState(!1),[Z,C]=s.useState(!1),[q,L]=s.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=s.useRef(null),Q=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=s.useRef(null),ee=s.useRef(!1),he=s.useCallback(_=>{var k;(k=R.find(S=>S.id===_.id))!=null&&k.delete||fe.dismiss(_.id),W(S=>S.filter(({id:ne})=>ne!==_.id))},[R]);return s.useEffect(()=>fe.subscribe(_=>{if(_.dismiss){W(k=>k.map(S=>S.id===_.id?{...S,delete:!0}:S));return}setTimeout(()=>{jt.flushSync(()=>{W(k=>{let S=k.findIndex(ne=>ne.id===_.id);return S!==-1?[...k.slice(0,S),{...k[S],..._},...k.slice(S+1)]:[_,...k]})})})}),[]),s.useEffect(()=>{if(f!=="system"){L(f);return}f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:_})=>{L(_?"dark":"light")})},[f]),s.useEffect(()=>{R.length<=1&&O(!1)},[R]),s.useEffect(()=>{let _=k=>{var S,ne;i.every(te=>k[te]||k.code===te)&&(O(!0),(S=V.current)==null||S.focus()),k.code==="Escape"&&(document.activeElement===V.current||(ne=V.current)!=null&&ne.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[i]),s.useEffect(()=>{if(V.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,ee.current=!1)}},[V.current]),R.length?s.createElement("section",{"aria-label":`${y} ${Q}`,tabIndex:-1},H.map((_,k)=>{var S;let[ne,te]=_.split("-");return s.createElement("ol",{key:_,dir:P==="auto"?yt():P,tabIndex:-1,ref:V,className:h,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":ne,"data-x-position":te,style:{"--front-toast-height":`${((S=M[0])==null?void 0:S.height)||0}px`,"--offset":typeof o=="number"?`${o}px`:o||Pr,"--width":`${Or}px`,"--gap":`${j}px`,...w},onBlur:U=>{ee.current&&!U.currentTarget.contains(U.relatedTarget)&&(ee.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||ee.current||(ee.current=!0,N.current=U.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Z||O(!1)},onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||C(!0)},onPointerUp:()=>C(!1)},R.filter(U=>!U.position&&k===0||U.position===_).map((U,ae)=>{var ie,ye;return s.createElement(Mr,{key:U.id,icons:b,index:ae,toast:U,defaultRichColors:p,duration:(ie=v==null?void 0:v.duration)!=null?ie:g,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:a,closeButton:(ye=v==null?void 0:v.closeButton)!=null?ye:d,interacting:Z,position:_,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:he,toasts:R.filter(ve=>ve.position==U.position),heights:M.filter(ve=>ve.position==U.position),setHeights:J,expandByDefault:c,gap:j,loadingIcon:$,expanded:X,pauseWhenPageIsHidden:K,cn:B})}))})):null};function Ar({children:t}){function r(d){De.success(d)}function n(d){De.info(d)}function i(d){De.error(d)}function c(d){De.warning(d)}return u.jsxs(vt.Provider,{value:{errorToast:i,warningToast:c,successToast:r,infoToast:n},children:[u.jsx(Dr,{richColors:!0}),t]})}z.Badge=Tt,z.Breadcrumb=or,z.BreadcrumbLink=ir,z.Button=Ot,z.Checkbox=Lt,z.Divider=It,z.FormController=zt,z.FormError=Ft,z.FormLabel=Mt,z.IconButton=Dt,z.Input=er,z.Modal=dr,z.ModalProvider=gr,z.Select=nr,z.Skeleton=Pt,z.ToastProvider=Ar,z.Tooltip=fr,z.useAutomation=hr,z.useModal=mr,z.useScopedParams=pr,z.useToast=bt,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});