@arkyn/components 1.3.63 → 1.3.65

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- (function(C,l){typeof exports=="object"&&typeof module<"u"?l(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"],l):(C=typeof globalThis<"u"?globalThis:C||self,l(C["@arkyn/components"]={},C.e,C.lucideReact,C.react,C.mask,C.framerMotion,C.Gt))})(this,function(C,l,Z,Se,$t,Ne,Rt){"use strict";var qe={exports:{}},Ie={};/**
1
+ (function(k,l){typeof exports=="object"&&typeof module<"u"?l(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"],l):(k=typeof globalThis<"u"?globalThis:k||self,l(k["@arkyn/components"]={},k.e,k.lucideReact,k.react,k.mask,k.framerMotion,k.Gt))})(this,function(k,l,Q,Re,Tt,je,It){"use strict";var Ge={exports:{}},Oe={};/**
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 it;function Pt(){if(it)return Ie;it=1;var e=l,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function h(u,d,p){var m,b={},a=null,v=null;p!==void 0&&(a=""+p),d.key!==void 0&&(a=""+d.key),d.ref!==void 0&&(v=d.ref);for(m in d)o.call(d,m)&&!c.hasOwnProperty(m)&&(b[m]=d[m]);if(u&&u.defaultProps)for(m in d=u.defaultProps,d)b[m]===void 0&&(b[m]=d[m]);return{$$typeof:n,type:u,key:a,ref:v,props:b,_owner:i.current}}return Ie.Fragment=r,Ie.jsx=h,Ie.jsxs=h,Ie}var Oe={};/**
9
+ */var ct;function Ot(){if(ct)return Oe;ct=1;var e=l,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function m(u,f,p){var h,b={},a=null,v=null;p!==void 0&&(a=""+p),f.key!==void 0&&(a=""+f.key),f.ref!==void 0&&(v=f.ref);for(h in f)o.call(f,h)&&!c.hasOwnProperty(h)&&(b[h]=f[h]);if(u&&u.defaultProps)for(h in f=u.defaultProps,f)b[h]===void 0&&(b[h]=f[h]);return{$$typeof:n,type:u,key:a,ref:v,props:b,_owner:i.current}}return Oe.Fragment=r,Oe.jsx=m,Oe.jsxs=m,Oe}var ze={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +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 lt;function Tt(){return lt||(lt=1,process.env.NODE_ENV!=="production"&&function(){var e=l,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),j=Symbol.iterator,x="@@iterator";function N(t){if(t===null||typeof t!="object")return null;var f=j&&t[j]||t[x];return typeof f=="function"?f:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(t){{for(var f=arguments.length,g=new Array(f>1?f-1:0),k=1;k<f;k++)g[k-1]=arguments[k];H("error",t,g)}}function H(t,f,g){{var k=y.ReactDebugCurrentFrame,L=k.getStackAddendum();L!==""&&(f+="%s",g=g.concat([L]));var Y=g.map(function(O){return String(O)});Y.unshift("Warning: "+f),Function.prototype.apply.call(console[t],console,Y)}}var D=!1,R=!1,W=!1,B=!1,J=!1,X;X=Symbol.for("react.module.reference");function U(t){return!!(typeof t=="string"||typeof t=="function"||t===o||t===c||J||t===i||t===p||t===m||B||t===v||D||R||W||typeof t=="object"&&t!==null&&(t.$$typeof===a||t.$$typeof===b||t.$$typeof===h||t.$$typeof===u||t.$$typeof===d||t.$$typeof===X||t.getModuleId!==void 0))}function z(t,f,g){var k=t.displayName;if(k)return k;var L=f.displayName||f.name||"";return L!==""?g+"("+L+")":g}function te(t){return t.displayName||"Context"}function E(t){if(t==null)return null;if(typeof t.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case o:return"Fragment";case r:return"Portal";case c:return"Profiler";case i:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case u:var f=t;return te(f)+".Consumer";case h:var g=t;return te(g._context)+".Provider";case d:return z(t,t.render,"ForwardRef");case b:var k=t.displayName||null;return k!==null?k:E(t.type)||"Memo";case a:{var L=t,Y=L._payload,O=L._init;try{return E(O(Y))}catch{return null}}}return null}var G=Object.assign,F=0,K,ae,P,ne,le,$,S;function T(){}T.__reactDisabledLog=!0;function q(){{if(F===0){K=console.log,ae=console.info,P=console.warn,ne=console.error,le=console.group,$=console.groupCollapsed,S=console.groupEnd;var t={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}F++}}function Q(){{if(F--,F===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},t,{value:K}),info:G({},t,{value:ae}),warn:G({},t,{value:P}),error:G({},t,{value:ne}),group:G({},t,{value:le}),groupCollapsed:G({},t,{value:$}),groupEnd:G({},t,{value:S})})}F<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=y.ReactCurrentDispatcher,_e;function pe(t,f,g){{if(_e===void 0)try{throw Error()}catch(L){var k=L.stack.trim().match(/\n( *(at )?)/);_e=k&&k[1]||""}return`
18
- `+_e+t}}var ye=!1,ge;{var et=typeof WeakMap=="function"?WeakMap:Map;ge=new et}function $e(t,f){if(!t||ye)return"";{var g=ge.get(t);if(g!==void 0)return g}var k;ye=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=V.current,V.current=null,q();try{if(f){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(ue){k=ue}Reflect.construct(t,[],O)}else{try{O.call()}catch(ue){k=ue}t.call(O.prototype)}}else{try{throw Error()}catch(ue){k=ue}t()}}catch(ue){if(ue&&k&&typeof ue.stack=="string"){for(var I=ue.stack.split(`
19
- `),ie=k.stack.split(`
20
- `),ee=I.length-1,re=ie.length-1;ee>=1&&re>=0&&I[ee]!==ie[re];)re--;for(;ee>=1&&re>=0;ee--,re--)if(I[ee]!==ie[re]){if(ee!==1||re!==1)do if(ee--,re--,re<0||I[ee]!==ie[re]){var me=`
21
- `+I[ee].replace(" at new "," at ");return t.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",t.displayName)),typeof t=="function"&&ge.set(t,me),me}while(ee>=1&&re>=0);break}}}finally{ye=!1,V.current=Y,Q(),Error.prepareStackTrace=L}var Te=t?t.displayName||t.name:"",Ee=Te?pe(Te):"";return typeof t=="function"&&ge.set(t,Ee),Ee}function tt(t,f,g){return $e(t,!1)}function We(t){var f=t.prototype;return!!(f&&f.isReactComponent)}function je(t,f,g){if(t==null)return"";if(typeof t=="function")return $e(t,We(t));if(typeof t=="string")return pe(t);switch(t){case p:return pe("Suspense");case m:return pe("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case d:return tt(t.render);case b:return je(t.type,f,g);case a:{var k=t,L=k._payload,Y=k._init;try{return je(Y(L),f,g)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,Ve={},Ye=y.ReactDebugCurrentFrame;function se(t){if(t){var f=t._owner,g=je(t.type,t._source,f?f.type:null);Ye.setExtraStackFrame(g)}else Ye.setExtraStackFrame(null)}function Ce(t,f,g,k,L){{var Y=Function.call.bind(fe);for(var O in t)if(Y(t,O)){var I=void 0;try{if(typeof t[O]!="function"){var ie=Error((k||"React class")+": "+g+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ie.name="Invariant Violation",ie}I=t[O](f,O,k,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ee){I=ee}I&&!(I instanceof Error)&&(se(L),w("%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).",k||"React class",g,O,typeof I),se(null)),I instanceof Error&&!(I.message in Ve)&&(Ve[I.message]=!0,se(L),w("Failed %s type: %s",g,I.message),se(null))}}}var nt=Array.isArray;function ze(t){return nt(t)}function Re(t){{var f=typeof Symbol=="function"&&Symbol.toStringTag,g=f&&t[Symbol.toStringTag]||t.constructor.name||"Object";return g}}function rt(t){try{return De(t),!1}catch{return!0}}function De(t){return""+t}function Pe(t){if(rt(t))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Re(t)),De(t)}var he=y.ReactCurrentOwner,He={key:!0,ref:!0,__self:!0,__source:!0},xe,Fe,Le;Le={};function Ue(t){if(fe.call(t,"ref")){var f=Object.getOwnPropertyDescriptor(t,"ref").get;if(f&&f.isReactWarning)return!1}return t.ref!==void 0}function Ke(t){if(fe.call(t,"key")){var f=Object.getOwnPropertyDescriptor(t,"key").get;if(f&&f.isReactWarning)return!1}return t.key!==void 0}function at(t,f){if(typeof t.ref=="string"&&he.current&&f&&he.current.stateNode!==f){var g=E(he.current.type);Le[g]||(w('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',E(he.current.type),t.ref),Le[g]=!0)}}function Be(t,f){{var g=function(){xe||(xe=!0,w("%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))};g.isReactWarning=!0,Object.defineProperty(t,"key",{get:g,configurable:!0})}}function ve(t,f){{var g=function(){Fe||(Fe=!0,w("%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))};g.isReactWarning=!0,Object.defineProperty(t,"ref",{get:g,configurable:!0})}}var st=function(t,f,g,k,L,Y,O){var I={$$typeof:n,type:t,key:f,ref:g,props:O,_owner:Y};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:k}),Object.defineProperty(I,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I};function _(t,f,g,k,L){{var Y,O={},I=null,ie=null;g!==void 0&&(Pe(g),I=""+g),Ke(f)&&(Pe(f.key),I=""+f.key),Ue(f)&&(ie=f.ref,at(f,L));for(Y in f)fe.call(f,Y)&&!He.hasOwnProperty(Y)&&(O[Y]=f[Y]);if(t&&t.defaultProps){var ee=t.defaultProps;for(Y in ee)O[Y]===void 0&&(O[Y]=ee[Y])}if(I||ie){var re=typeof t=="function"?t.displayName||t.name||"Unknown":t;I&&Be(O,re),ie&&ve(O,re)}return st(t,I,ie,L,k,he.current,O)}}var M=y.ReactCurrentOwner,A=y.ReactDebugCurrentFrame;function oe(t){if(t){var f=t._owner,g=je(t.type,t._source,f?f.type:null);A.setExtraStackFrame(g)}else A.setExtraStackFrame(null)}var ce;ce=!1;function ke(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Xe(){{if(M.current){var t=E(M.current.type);if(t)return`
17
+ */var ut;function zt(){return ut||(ut=1,process.env.NODE_ENV!=="production"&&function(){var e=l,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),S=Symbol.iterator,x="@@iterator";function _(t){if(t===null||typeof t!="object")return null;var d=S&&t[S]||t[x];return typeof d=="function"?d:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(t){{for(var d=arguments.length,g=new Array(d>1?d-1:0),C=1;C<d;C++)g[C-1]=arguments[C];D("error",t,g)}}function D(t,d,g){{var C=y.ReactDebugCurrentFrame,L=C.getStackAddendum();L!==""&&(d+="%s",g=g.concat([L]));var H=g.map(function(O){return String(O)});H.unshift("Warning: "+d),Function.prototype.apply.call(console[t],console,H)}}var F=!1,T=!1,Y=!1,B=!1,J=!1,U;U=Symbol.for("react.module.reference");function K(t){return!!(typeof t=="string"||typeof t=="function"||t===o||t===c||J||t===i||t===p||t===h||B||t===v||F||T||Y||typeof t=="object"&&t!==null&&(t.$$typeof===a||t.$$typeof===b||t.$$typeof===m||t.$$typeof===u||t.$$typeof===f||t.$$typeof===U||t.getModuleId!==void 0))}function z(t,d,g){var C=t.displayName;if(C)return C;var L=d.displayName||d.name||"";return L!==""?g+"("+L+")":g}function te(t){return t.displayName||"Context"}function j(t){if(t==null)return null;if(typeof t.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case o:return"Fragment";case r:return"Portal";case c:return"Profiler";case i:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case u:var d=t;return te(d)+".Consumer";case m:var g=t;return te(g._context)+".Provider";case f:return z(t,t.render,"ForwardRef");case b:var C=t.displayName||null;return C!==null?C:j(t.type)||"Memo";case a:{var L=t,H=L._payload,O=L._init;try{return j(O(H))}catch{return null}}}return null}var X=Object.assign,M=0,q,ne,$,re,ue,R,E;function P(){}P.__reactDisabledLog=!0;function G(){{if(M===0){q=console.log,ne=console.info,$=console.warn,re=console.error,ue=console.group,R=console.groupCollapsed,E=console.groupEnd;var t={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}M++}}function se(){{if(M--,M===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:X({},t,{value:q}),info:X({},t,{value:ne}),warn:X({},t,{value:$}),error:X({},t,{value:re}),group:X({},t,{value:ue}),groupCollapsed:X({},t,{value:R}),groupEnd:X({},t,{value:E})})}M<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var A=y.ReactCurrentDispatcher,xe;function he(t,d,g){{if(xe===void 0)try{throw Error()}catch(L){var C=L.stack.trim().match(/\n( *(at )?)/);xe=C&&C[1]||""}return`
18
+ `+xe+t}}var Z=!1,oe;{var Ce=typeof WeakMap=="function"?WeakMap:Map;oe=new Ce}function $e(t,d){if(!t||Z)return"";{var g=oe.get(t);if(g!==void 0)return g}var C;Z=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var H;H=A.current,A.current=null,G();try{if(d){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(fe){C=fe}Reflect.construct(t,[],O)}else{try{O.call()}catch(fe){C=fe}t.call(O.prototype)}}else{try{throw Error()}catch(fe){C=fe}t()}}catch(fe){if(fe&&C&&typeof fe.stack=="string"){for(var I=fe.stack.split(`
19
+ `),ce=C.stack.split(`
20
+ `),ee=I.length-1,ae=ce.length-1;ee>=1&&ae>=0&&I[ee]!==ce[ae];)ae--;for(;ee>=1&&ae>=0;ee--,ae--)if(I[ee]!==ce[ae]){if(ee!==1||ae!==1)do if(ee--,ae--,ae<0||I[ee]!==ce[ae]){var ve=`
21
+ `+I[ee].replace(" at new "," at ");return t.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",t.displayName)),typeof t=="function"&&oe.set(t,ve),ve}while(ee>=1&&ae>=0);break}}}finally{Z=!1,A.current=H,se(),Error.prepareStackTrace=L}var Ie=t?t.displayName||t.name:"",Ee=Ie?he(Ie):"";return typeof t=="function"&&oe.set(t,Ee),Ee}function rt(t,d,g){return $e(t,!1)}function Ye(t){var d=t.prototype;return!!(d&&d.isReactComponent)}function Se(t,d,g){if(t==null)return"";if(typeof t=="function")return $e(t,Ye(t));if(typeof t=="string")return he(t);switch(t){case p:return he("Suspense");case h:return he("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return rt(t.render);case b:return Se(t.type,d,g);case a:{var C=t,L=C._payload,H=C._init;try{return Se(H(L),d,g)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,He={},Ue=y.ReactDebugCurrentFrame;function ie(t){if(t){var d=t._owner,g=Se(t.type,t._source,d?d.type:null);Ue.setExtraStackFrame(g)}else Ue.setExtraStackFrame(null)}function Ne(t,d,g,C,L){{var H=Function.call.bind(pe);for(var O in t)if(H(t,O)){var I=void 0;try{if(typeof t[O]!="function"){var ce=Error((C||"React class")+": "+g+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}I=t[O](d,O,C,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ee){I=ee}I&&!(I instanceof Error)&&(ie(L),w("%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).",C||"React class",g,O,typeof I),ie(null)),I instanceof Error&&!(I.message in He)&&(He[I.message]=!0,ie(L),w("Failed %s type: %s",g,I.message),ie(null))}}}var at=Array.isArray;function Fe(t){return at(t)}function Pe(t){{var d=typeof Symbol=="function"&&Symbol.toStringTag,g=d&&t[Symbol.toStringTag]||t.constructor.name||"Object";return g}}function st(t){try{return Le(t),!1}catch{return!0}}function Le(t){return""+t}function Te(t){if(st(t))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pe(t)),Le(t)}var ge=y.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},we,De,Be;Be={};function Xe(t){if(pe.call(t,"ref")){var d=Object.getOwnPropertyDescriptor(t,"ref").get;if(d&&d.isReactWarning)return!1}return t.ref!==void 0}function qe(t){if(pe.call(t,"key")){var d=Object.getOwnPropertyDescriptor(t,"key").get;if(d&&d.isReactWarning)return!1}return t.key!==void 0}function ot(t,d){if(typeof t.ref=="string"&&ge.current&&d&&ge.current.stateNode!==d){var g=j(ge.current.type);Be[g]||(w('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',j(ge.current.type),t.ref),Be[g]=!0)}}function Me(t,d){{var g=function(){we||(we=!0,w("%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)",d))};g.isReactWarning=!0,Object.defineProperty(t,"key",{get:g,configurable:!0})}}function be(t,d){{var g=function(){De||(De=!0,w("%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)",d))};g.isReactWarning=!0,Object.defineProperty(t,"ref",{get:g,configurable:!0})}}var it=function(t,d,g,C,L,H,O){var I={$$typeof:n,type:t,key:d,ref:g,props:O,_owner:H};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:C}),Object.defineProperty(I,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I};function N(t,d,g,C,L){{var H,O={},I=null,ce=null;g!==void 0&&(Te(g),I=""+g),qe(d)&&(Te(d.key),I=""+d.key),Xe(d)&&(ce=d.ref,ot(d,L));for(H in d)pe.call(d,H)&&!Ke.hasOwnProperty(H)&&(O[H]=d[H]);if(t&&t.defaultProps){var ee=t.defaultProps;for(H in ee)O[H]===void 0&&(O[H]=ee[H])}if(I||ce){var ae=typeof t=="function"?t.displayName||t.name||"Unknown":t;I&&Me(O,ae),ce&&be(O,ae)}return it(t,I,ce,L,C,ge.current,O)}}var W=y.ReactCurrentOwner,V=y.ReactDebugCurrentFrame;function le(t){if(t){var d=t._owner,g=Se(t.type,t._source,d?d.type:null);V.setExtraStackFrame(g)}else V.setExtraStackFrame(null)}var de;de=!1;function _e(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Je(){{if(W.current){var t=j(W.current.type);if(t)return`
22
22
 
23
- Check the render method of \``+t+"`."}return""}}function rr(t){{if(t!==void 0){var f=t.fileName.replace(/^.*[\\\/]/,""),g=t.lineNumber;return`
23
+ Check the render method of \``+t+"`."}return""}}function ar(t){{if(t!==void 0){var d=t.fileName.replace(/^.*[\\\/]/,""),g=t.lineNumber;return`
24
24
 
25
- Check your code at `+f+":"+g+"."}return""}}var Nt={};function ar(t){{var f=Xe();if(!f){var g=typeof t=="string"?t:t.displayName||t.name;g&&(f=`
25
+ Check your code at `+d+":"+g+"."}return""}}var St={};function sr(t){{var d=Je();if(!d){var g=typeof t=="string"?t:t.displayName||t.name;g&&(d=`
26
26
 
27
- Check the top-level render call using <`+g+">.")}return f}}function _t(t,f){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var g=ar(f);if(Nt[g])return;Nt[g]=!0;var k="";t&&t._owner&&t._owner!==M.current&&(k=" It was passed a child from "+E(t._owner.type)+"."),oe(t),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,k),oe(null)}}function jt(t,f){{if(typeof t!="object")return;if(ze(t))for(var g=0;g<t.length;g++){var k=t[g];ke(k)&&_t(k,f)}else if(ke(t))t._store&&(t._store.validated=!0);else if(t){var L=N(t);if(typeof L=="function"&&L!==t.entries)for(var Y=L.call(t),O;!(O=Y.next()).done;)ke(O.value)&&_t(O.value,f)}}}function sr(t){{var f=t.type;if(f==null||typeof f=="string")return;var g;if(typeof f=="function")g=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===d||f.$$typeof===b))g=f.propTypes;else return;if(g){var k=E(f);Ce(g,t.props,"prop",k,t)}else if(f.PropTypes!==void 0&&!ce){ce=!0;var L=E(f);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function or(t){{for(var f=Object.keys(t.props),g=0;g<f.length;g++){var k=f[g];if(k!=="children"&&k!=="key"){oe(t),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),oe(null);break}}t.ref!==null&&(oe(t),w("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}}var Et={};function St(t,f,g,k,L,Y){{var O=U(t);if(!O){var I="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).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 ie=rr(L);ie?I+=ie:I+=Xe();var ee;t===null?ee="null":ze(t)?ee="array":t!==void 0&&t.$$typeof===n?(ee="<"+(E(t.type)||"Unknown")+" />",I=" Did you accidentally export a JSX literal instead of a component?"):ee=typeof t,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ee,I)}var re=_(t,f,g,L,Y);if(re==null)return re;if(O){var me=f.children;if(me!==void 0)if(k)if(ze(me)){for(var Te=0;Te<me.length;Te++)jt(me[Te],t);Object.freeze&&Object.freeze(me)}else w("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 jt(me,t)}if(fe.call(f,"key")){var Ee=E(t),ue=Object.keys(f).filter(function(fr){return fr!=="key"}),ot=ue.length>0?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}";if(!Et[Ee+ot]){var dr=ue.length>0?"{"+ue.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+g+">.")}return d}}function Et(t,d){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var g=sr(d);if(St[g])return;St[g]=!0;var C="";t&&t._owner&&t._owner!==W.current&&(C=" It was passed a child from "+j(t._owner.type)+"."),le(t),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,C),le(null)}}function Rt(t,d){{if(typeof t!="object")return;if(Fe(t))for(var g=0;g<t.length;g++){var C=t[g];_e(C)&&Et(C,d)}else if(_e(t))t._store&&(t._store.validated=!0);else if(t){var L=_(t);if(typeof L=="function"&&L!==t.entries)for(var H=L.call(t),O;!(O=H.next()).done;)_e(O.value)&&Et(O.value,d)}}}function or(t){{var d=t.type;if(d==null||typeof d=="string")return;var g;if(typeof d=="function")g=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===f||d.$$typeof===b))g=d.propTypes;else return;if(g){var C=j(d);Ne(g,t.props,"prop",C,t)}else if(d.PropTypes!==void 0&&!de){de=!0;var L=j(d);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(t){{for(var d=Object.keys(t.props),g=0;g<d.length;g++){var C=d[g];if(C!=="children"&&C!=="key"){le(t),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",C),le(null);break}}t.ref!==null&&(le(t),w("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}var $t={};function Pt(t,d,g,C,L,H){{var O=K(t);if(!O){var I="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).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 ce=ar(L);ce?I+=ce:I+=Je();var ee;t===null?ee="null":Fe(t)?ee="array":t!==void 0&&t.$$typeof===n?(ee="<"+(j(t.type)||"Unknown")+" />",I=" Did you accidentally export a JSX literal instead of a component?"):ee=typeof t,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ee,I)}var ae=N(t,d,g,L,H);if(ae==null)return ae;if(O){var ve=d.children;if(ve!==void 0)if(C)if(Fe(ve)){for(var Ie=0;Ie<ve.length;Ie++)Rt(ve[Ie],t);Object.freeze&&Object.freeze(ve)}else w("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 Rt(ve,t)}if(pe.call(d,"key")){var Ee=j(t),fe=Object.keys(d).filter(function(mr){return mr!=="key"}),lt=fe.length>0?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}";if(!$t[Ee+lt]){var fr=fe.length>0?"{"+fe.join(": ..., ")+": ...}":"{}";w(`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} />`,ot,Ee,dr,Ee),Et[Ee+ot]=!0}}return t===o?or(re):sr(re),re}}function ir(t,f,g){return St(t,f,g,!0)}function lr(t,f,g){return St(t,f,g,!1)}var cr=lr,ur=ir;Oe.Fragment=o,Oe.jsx=cr,Oe.jsxs=ur}()),Oe}process.env.NODE_ENV==="production"?qe.exports=Pt():qe.exports=Tt();var s=qe.exports;function Me(e,n){return n?s.jsx(n,{size:e,strokeWidth:2.5}):s.jsx(s.Fragment,{})}function ct(e,n){return[...new Array(n-e)].map((r,o)=>e+o+1).filter(r=>r>0)}function It(e,n,r){return e>=r?[]:ct(e+1,e+n)}function Ot(e,n){return e<=1?[]:ct(e-1-n,e-1)}function zt(e,n,r){if(!e)return s.jsx(s.Fragment,{});if(typeof e=="string")return s.jsx("p",{className:r,children:e});const o=e;return s.jsx("p",{className:r,children:s.jsx(o,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Dt(e){const{variant:n="ghost",scheme:r="primary",size:o="md",leftIcon:i,rightIcon:c,className:h="",children:u,...d}=e,m={md:12,lg:14}[o],b=`arkyn_badge ${n} ${r} ${o} ${h}`;return s.jsxs("div",{className:b.trim(),...d,children:[Me(m,i),u,Me(m,i)]})}function Ft(e){const{className:n,orientation:r="horizontal",...o}=e,i=`arkyn_divider ${r} ${n}`;return s.jsx("div",{className:i,...o})}function Lt(e){const{className:n,...r}=e,o=`arkyn_skeleton ${n}`;return s.jsx("aside",{className:o.trim(),...r})}function Bt(e){const{className:n,...r}=e,o=`arkyn_table_body ${n}`;return s.jsx("tbody",{className:o.trim(),...r})}function Mt(e){const{className:n,children:r,...o}=e,i=`arkyn_table_caption ${n}`;return s.jsx("caption",{className:i.trim(),...o,children:s.jsx("div",{className:"arkyn_table_caption-content",children:r})})}function At(e){const{children:n,className:r,...o}=e,i=`arkyn_table_container ${r}`;return s.jsx("div",{className:i.trim(),...o,children:s.jsx("table",{children:n})})}function Wt(e){const{className:n,children:r,...o}=e,i=`arkyn_table_footer ${n}`;return s.jsxs("tfoot",{className:i.trim(),...o,children:[s.jsx("tr",{className:"spacing-row"}),s.jsx("tr",{children:s.jsx("th",{colSpan:100,children:s.jsx("div",{className:"arkyn_table_footer-content",children:r})})})]})}function Vt(e){const{className:n,children:r,...o}=e,i=`arkyn_table_header ${n}`;return s.jsxs("thead",{className:i.trim(),...o,children:[s.jsx("tr",{children:r}),s.jsx("tr",{className:"spacing-row"})]})}function Yt(e){const{isLoading:n=!1,scheme:r="primary",variant:o="solid",loadingText:i,size:c="md",leftIcon:h,rightIcon:u,disabled:d,className:p="",children:m,...b}=e,v={xs:12,sm:16,md:20,lg:24}[c],j=`arkyn_button loading_text_${!!i} ${o} ${r} ${c} loading_${n} ${p}`;return s.jsxs("button",{className:j,disabled:d||n,...b,children:[s.jsxs("div",{className:"arkyn_button-spinner",children:[s.jsx(Z.Loader2,{size:v,strokeWidth:2.5}),i&&i]}),s.jsxs("div",{className:"arkyn_button-content",children:[Me(v,h),m,Me(v,u)]})]})}const ut=l.createContext({});function Ht(e){var m,b;const n=Se.useActionData(),{children:r,className:o,...i}=e,c=l.useRef(null),h=((m=c.current)==null?void 0:m.name)||"",u=((b=n==null?void 0:n.fieldErrors)==null?void 0:b[h])||null,d=l.useId(),p=`arkyn_form_controller ${o}`;return s.jsx(ut.Provider,{value:{error:u,id:d,inputRef:c},children:s.jsx("section",{className:p.trim(),...i,children:r})})}function be(){return l.useContext(ut)}function Ut(e){const{name:n,className:r="",size:o="md",isError:i,defaultChecked:c=!1,checked:h=null,onCheck:u,value:d,...p}=e,{id:m,inputRef:b,error:a}=be(),v=i||!!a,[j,x]=l.useState(c||!1),N=typeof h=="boolean"?h:j,y=`arkyn_checkbox ${o} ${v?"error":""} ${N?"checked":""} ${r}`;function w(){const H=j;x(!H),u&&u(H?"":d||"checked")}return s.jsxs("button",{type:"button",id:m,className:y,onClick:w,...p,children:[s.jsx("input",{type:"hidden",name:n,ref:b,value:N?d||"checked":""}),s.jsx(Z.Check,{})]})}function Kt(e){const{children:n,className:r,...o}=e,i=`arkyn_form_error ${r}`,{error:c}=be();return n?s.jsx("strong",{className:i.trim(),...o,children:n}):c?s.jsx("strong",{className:i.trim(),...o,children:c}):s.jsx(s.Fragment,{})}function Xt(e){const{showAsterisk:n=!1,className:r="",...o}=e,{id:i}=be(),h=`arkyn_form_label ${n?"show-asterisk":""} ${r}`;return s.jsx("label",{...o,className:h.trim(),htmlFor:i})}function qt(e){const{isLoading:n=!1,scheme:r="primary",variant:o="solid",size:i="md",icon:c,disabled:h,className:u="",...d}=e,p={xs:12,sm:16,md:20,lg:24},m=`arkyn_icon_button ${o} ${r} ${i} loading_${n} ${u}`;return s.jsxs("button",{disabled:h||n,className:m.trim(),...d,children:[s.jsx("div",{className:"arkyn_icon_button-spinner",children:s.jsx(Z.Loader2,{size:p[i],strokeWidth:2.5})}),s.jsx("div",{className:"arkyn_icon_button-content",children:s.jsx(c,{size:p[i],strokeWidth:2.5})})]})}function we(e,n,r){if(!e)return s.jsx(s.Fragment,{});if(typeof e=="string")return s.jsx("p",{className:r,children:e});const o=e;return s.jsx("p",{className:r,children:s.jsx(o,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Je(e){return e&&e.replace(/[^0-9]/g,"")}function dt(e,n){let r="",o=0;return Array.from(e).forEach((i,c)=>{n[c+o].match(/[0-9]/)||(r+=n[c+o],o++),r+=i}),r}function ft(e){return e.length>11?"CNPJ":"CPF"}const Ge={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},ht=Je(Ge.CNPJ).length;function Jt(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:h="solid",prefix:u,sufix:d,leftIcon:p,rightIcon:m,disabled:b,defaultValue:a,readOnly:v,onFocus:j,onBlur:x,title:N,style:y,onChange:w,...H}=e;function D(G){let F=Je(G);const K=ft(F);if(!(F.length>ht))return F=dt(F,Ge[K]),F}const R=m?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${i} ${b||v||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,E={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:we(u,E,"prefix"),sufix:we(d,E,"sufix"),LeftIcon:p,RightIcon:m,defaultValue:D(a||""),disabled:b,readOnly:v,onFocus:j,onBlur:x,title:N,style:y,onChange:w,loadingPosition:R,iconSize:E,Spinner:s.jsx(Z.Loader2,{className:"spinner",size:E,strokeWidth:2.5}),...H}}function Gt(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:h}=be(),u=i||o,d=e.isError||!!h,{disabled:p,title:m,style:b,className:a,prefix:v,sufix:j,iconSize:x,loadingPosition:N,isLoading:y,LeftIcon:w,readOnly:H,onFocus:D,onBlur:R,RightIcon:W,Spinner:B,onChange:J,value:X,defaultValue:U,...z}=Jt({...e,id:c,isError:d},n),[te,E]=l.useState(U),G=w&&!y,F=W&&!y,K=N==="left"&&y,ae=N==="right"&&y;function P(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function ne(S){let T=Je(S.target.value);const q=ft(T);T.length>ht||(T=dt(T,Ge[q]),S.target.value=T,E(T),J&&J(S))}function le(S){r(!0),D&&D(S)}function $(S){r(!1),R&&R(S)}return s.jsxs("section",{title:m,style:b,onClick:P,className:a,children:[v,K&&B,G&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx("input",{disabled:p||y,readOnly:H,ref:u,value:X||te,onFocus:le,onChange:ne,onBlur:$,...z}),F&&s.jsx(W,{size:x,strokeWidth:2.5}),ae&&B,j]})}function Zt(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:h="solid",prefix:u,sufix:d,leftIcon:p,rightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,showCents:y=!1,max:w=1e9,onChange:H,...D}=e,R=m?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,E={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:we(u,E,"prefix"),sufix:we(d,E,"sufix"),LeftIcon:p,RightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,max:w,onChange:H,showCents:y,loadingPosition:R,iconSize:E,Spinner:s.jsx(Z.Loader2,{className:"spinner",size:E,strokeWidth:2.5}),...D}}const Qt=/^[1-9]{1}$/,en=/^[0-9]{1}$/,mt=8;function tn(e,n){if(e===0)return"";const r=(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return n?r:r.replace("R$","").trim()}function nn(e){const{currencyValue:n,event:r,max:o,setCurrencyValue:i}=e,{key:c,keyCode:h}=r;if(n===0&&!Qt.test(c)||n!==0&&!en.test(c)&&h!==mt)return;const u=n.toString();let d;if(h!==mt){const p=n===0?c:`${u}${c}`;d=Number.parseInt(p,10)}else{const p=u.slice(0,-1);d=p===""?0:Number.parseInt(p,10)}d>Number(o)||i(d)}function rn(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:h}=be(),u=i||o,d=e.isError||!!h,{disabled:p,title:m,style:b,className:a,prefix:v,sufix:j,iconSize:x,loadingPosition:N,isLoading:y,LeftIcon:w,readOnly:H,onFocus:D,onBlur:R,RightIcon:W,Spinner:B,value:J,max:X,onKeyDown:U,onChange:z,showCents:te,defaultValue:E,...G}=Zt({...e,id:c,isError:d},n),[F,K]=l.useState(E*100||0),ae=w&&!y,P=W&&!y,ne=N==="left"&&y,le=N==="right"&&y;function $(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function S(Q){nn({currencyValue:F,event:Q,max:X,setCurrencyValue:K}),z&&z(F/100),U&&U(Q)}function T(Q){r(!0),D&&D(Q)}function q(Q){r(!1),R&&R(Q)}return s.jsxs("section",{title:m,style:b,onClick:$,className:a,children:[v,ne&&B,ae&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx("input",{value:tn(J||F,te),onKeyDown:S,disabled:p||y,readOnly:H,ref:u,onFocus:T,onBlur:q,onChange:()=>{},...G}),le&&B,P&&s.jsx(W,{size:x,strokeWidth:2.5}),j]})}function an(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:h="solid",prefix:u,sufix:d,leftIcon:p,rightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,onChange:y,showMask:w=!1,type:H,...D}=e,R=m?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,E={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:we(u,E,"prefix"),sufix:we(d,E,"sufix"),LeftIcon:p,RightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,onChange:y,loadingPosition:R,iconSize:E,showMask:w,Spinner:s.jsx(Z.Loader2,{className:"spinner",size:E,strokeWidth:2.5}),...D}}const sn=l.forwardRef((e,n)=>s.jsx("input",{ref:n,...e}));function on(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:h}=be(),u=i||o,d=e.isError||!!h,{disabled:p,title:m,style:b,className:a,prefix:v,sufix:j,iconSize:x,loadingPosition:N,isLoading:y,LeftIcon:w,readOnly:H,onFocus:D,onBlur:R,RightIcon:W,Spinner:B,...J}=an({...e,id:c,isError:d},n),X=w&&!y,U=W&&!y,z=N==="left"&&y,te=N==="right"&&y;function E(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function G(K){r(!0),D&&D(K)}function F(K){r(!1),R&&R(K)}return s.jsxs("section",{title:m,style:b,onClick:E,className:a,children:[v,z&&B,X&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx($t.InputMask,{component:sn,ref:u,onFocus:G,onBlur:F,...J}),U&&s.jsx(W,{size:x,strokeWidth:2.5}),te&&B,j]})}function ln(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:h="solid",prefix:u,sufix:d,leftIcon:p,rightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,onChange:y,...w}=e,H=m?"right":"left",X=`arkyn_input ${u?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,z={md:20,lg:20}[i];return{isLoading:r,className:X,prefix:we(u,z,"prefix"),sufix:we(d,z,"sufix"),LeftIcon:p,RightIcon:m,disabled:b,readOnly:a,onFocus:v,onBlur:j,title:x,style:N,onChange:y,loadingPosition:H,iconSize:z,Spinner:s.jsx(Z.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...w}}function cn(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:h}=be(),u=i||o,d=e.isError||!!h,{disabled:p,title:m,style:b,className:a,prefix:v,sufix:j,iconSize:x,loadingPosition:N,isLoading:y,LeftIcon:w,readOnly:H,onFocus:D,onBlur:R,RightIcon:W,type:B,Spinner:J,...X}=ln({...e,id:c,isError:d},n),U=w&&!y,z=W&&!y,te=N==="left"&&y,E=N==="right"&&y;function G(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function F(ae){r(!0),D&&D(ae)}function K(ae){r(!1),R&&R(ae)}return B==="hidden"?s.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:u,...X}):s.jsxs("section",{title:m,style:b,onClick:G,className:a,children:[v,te&&J,U&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx("input",{disabled:p||y,readOnly:H,ref:u,onFocus:F,onBlur:K,type:B,...X}),z&&s.jsx(W,{size:x,strokeWidth:2.5}),E&&J,j]})}function un(e){return e.type==="currency"?s.jsx(rn,{...e}):e.type==="masked"?s.jsx(on,{...e}):e.type==="cpf-cnpj"?s.jsx(Gt,{...e}):s.jsx(cn,{...e})}function dn(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:h="solid",prefix:u,leftIcon:d,disabled:p,readOnly:m,onFocus:b,onBlur:a,title:v,style:j,closeOnSelect:x=!0,...N}=e,R=`arkyn_select ${u?"hasPrefix":""} ${h} ${i} ${p||m||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,B={md:20,lg:20}[i];return{isLoading:r,className:R,prefix:zt(u,B,"prefix"),LeftIcon:d,disabled:p,readOnly:m,onFocus:b,onBlur:a,title:v,closeOnSelect:x,style:j,iconSize:B,Spinner:s.jsx(Z.Loader2,{className:"spinner",size:B,strokeWidth:2.5}),...N}}function fn(e){var T;const[n,r]=l.useState(!1),{inputRef:o,id:i,error:c}=be(),h=l.useRef(null),u=o||h,d=e.isError||!!c,{disabled:p,title:m,style:b,className:a,prefix:v,iconSize:j,isLoading:x,LeftIcon:N,value:y=null,defaultValue:w="",readOnly:H,onFocus:D,onBlur:R,Spinner:W,name:B,placeholder:J,onSelect:X,options:U,optionMaxHeight:z,closeOnSelect:te,...E}=dn({...e,id:i,isError:d},n),[G,F]=l.useState(w);function K(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function ae(q){n||(r(!0),D&&D(q))}function P(){r(!1),R&&u.current&&u.current.blur()}function ne(q){const{label:Q,value:V}=q;F(G!==V?V:""),X&&X({label:Q,value:V}),te&&P()}const le=typeof y=="string"?y:G,$=((T=U.find(q=>q.value===le))==null?void 0:T.label)||"",S=()=>{if(!n&&$)return!0;if(!n&&!$)return!1;if(n&&$)return!0;if(n&&!$)return!1};return s.jsxs(s.Fragment,{children:[s.jsxs("section",{title:m,style:b,onClick:K,className:`${a} placeholder_dark_${S()}`,children:[v,N&&s.jsx(N,{size:j,strokeWidth:2.5}),s.jsx("input",{disabled:p||x,readOnly:!0,placeholder:$||J,onFocus:ae,...E}),s.jsx("input",{type:"hidden",ref:u,name:B,value:le||"",readOnly:!0}),n&&s.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:z},children:[U.map(({label:q,value:Q})=>s.jsxs("div",{onClick:()=>ne({label:q,value:Q}),className:le===Q?"arkyn_select_option active":"arkyn_select_option",children:[q," ",s.jsx(Z.Check,{})]},Q)),U.length<=0&&s.jsx("p",{children:"Sem opções disponíveis"})]}),!x&&s.jsx(Z.ChevronDown,{className:"arkyn_select_arrow",size:j,strokeWidth:2.5}),x&&W]}),n&&s.jsx("aside",{className:"arkyn_select_overlay",onClick:P})]})}function hn(e){const{variant:n="solid",size:r="md",className:o,disabled:i=!1,readOnly:c=!1,onFocus:h,onBlur:u,title:d,style:p,...m}=e,[b,a]=l.useState(!1),{inputRef:v,id:j,error:x}=be(),N=l.useRef(null),y=v||N,H=e.isError||!!x?"errored":"",W=`arkyn_textarea ${n} ${r} ${i||c?"opacity":""} ${H} ${b?"focused":""} ${o}`;function B(){i||!(y!=null&&y.current)||(a(!0),y.current.focus())}function J(U){a(!0),h&&h(U)}function X(U){a(!1),u&&u(U)}return s.jsx("section",{title:d,style:p,onClick:B,className:W,children:s.jsx("textarea",{id:j,disabled:i,readOnly:c,ref:y,onFocus:J,onBlur:X,...m})})}function mn(e){const{className:n="",...r}=e,o=`arkyn_breadcrumb_container ${n}`;return s.jsx("nav",{className:o,...r})}function pn(e){const{pathname:n}=Se.useLocation(),{className:r="",disabled:o=!1,children:i,to:c,...h}=e,d=`arkyn_breadcrumb_link ${n===c?"active":"inactive"} ${r}`;return o?s.jsxs("p",{className:d,children:[s.jsx(Z.ChevronRight,{size:14,strokeWidth:2.5}),i]}):s.jsxs(Se.Link,{to:c,className:d,...h,children:[s.jsx(Z.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function pt(e=""){const n=Se.useLocation(),r=new URLSearchParams(n.search),o=e?`${e}:`:"",i=c=>{Object.entries(c).forEach(([h,u])=>{u===void 0?r.delete(`${o}${h}`):r.set(`${o}${h}`,String(u))})};return{getParam:c=>r.get(`${o}${c}`),getScopedSearch:c=>{i(c);let h=r.toString();return h&&(h="?"+h),h}}}function gn(e){const{scope:n,totalCountRegisters:r,perPageKey:o="per_page",pageKey:i="page",siblingsCount:c=2,...h}=e,u=Se.useNavigate(),{getParam:d,getScopedSearch:p}=pt(n),m=Number(d(i))||1,b=Number(d(o))||20,a=Math.ceil(r/b),v=Ot(m,c),j=It(m,c,a);function x(N){u(p({page:N}))}return s.jsxs("div",{className:"arkyn_pagination",...h,children:[s.jsx("button",{className:"arkyn_pagination-icon_button",disabled:m<=1,onClick:()=>x(m-1),children:s.jsx(Z.ChevronLeft,{})}),m>1+c&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"arkyn_pagination-page_button",onClick:()=>x(1),children:"1"}),m>2+c&&s.jsx("button",{disabled:!0,className:"arkyn_pagination-spread",children:s.jsx(Z.Ellipsis,{})})]}),v.map((N,y)=>s.jsx("button",{onClick:()=>x(N),className:"arkyn_pagination-page_button",children:N},y)),s.jsx("button",{className:"arkyn_pagination-current",disabled:!0,children:m}),j.map((N,y)=>s.jsx("button",{onClick:()=>x(N),className:"arkyn_pagination-page_button",children:N},y)),m+c<a&&s.jsxs(s.Fragment,{children:[m+1+c<a&&s.jsx("button",{disabled:!0,className:"arkyn_pagination-spread",children:s.jsx(Z.Ellipsis,{})}),s.jsx("button",{className:"arkyn_pagination-page_button",onClick:()=>x(a),children:a})]}),s.jsx("button",{className:"arkyn_pagination-icon_button",disabled:m>=a,onClick:()=>x(m+1),children:s.jsx(Z.ChevronRight,{})})]})}function vn(e){const{children:n,value:r,className:o,defaultActive:i,...c}=e,h=`arkyn_tab_button ${i?"active":""} ${o||""}`;return s.jsx("button",{className:h.trim(),...c,children:n})}function bn(e){const{children:n,onClick:r,className:o,...i}=e,c=l.useRef(null),h=`arkyn_tab_container ${o||""}`,[u,d]=l.useState({width:"0px",left:"0px",transition:"none"}),p=(b,a)=>{const v=b.getBoundingClientRect(),j=c.current.getBoundingClientRect();d({transition:a?void 0:"none",width:`${v.width}px`,left:`${v.left-j.left}px`})};l.useLayoutEffect(()=>{const b=c.current;if(!b)return;let a=null;a=b.querySelector("button.active"),a&&p(a)},[]);const m=b=>{const a=b.target,v=c.current;a&&v&&v.contains(a)&&(v.querySelectorAll("button").forEach(x=>x.classList.remove("active")),a.classList.add("active"),p(a,!0),r&&r(a.value))};return s.jsxs("nav",{ref:c,onClick:m,className:h.trim(),...i,children:[n,s.jsx("div",{className:"active-line",style:u})]})}const gt=l.createContext({});function yn(e){const{isVisibled:n,makeInvisible:r,orientation:o="left",children:i,className:c,...h}=e,u=o==="left"?"-100%":"100%",p=`arkyn_drawer_container ${o} ${n?"visible":""} ${c}`;return s.jsx(gt.Provider,{value:{makeInvisible:r},children:s.jsx(Ne.AnimatePresence,{children:n&&s.jsxs("aside",{className:p.trim(),...h,children:[s.jsx(Ne.motion.div,{className:"arkyn_drawer_container-overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),s.jsx(Ne.motion.div,{className:"arkyn_drawer_container-content",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${u})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${u})`},children:i})]})})})}function xn(e){const{showCloseButton:n=!0,className:r,children:o,...i}=e,{makeInvisible:c}=l.useContext(gt),h=`arkyn_drawer_header ${r}`;return s.jsxs("header",{className:h.trim(),...i,children:[o,n&&s.jsx("button",{className:"arkyn_drawer_header-close_button",type:"button",onClick:c,"aria-label":"Close drawer",children:s.jsx(Z.X,{size:24})})]})}const vt=l.createContext({});function wn(e){const{isVisibled:n,makeInvisible:r,children:o,className:i="",...c}=e,u=`arkyn_modal_container ${n?"visible":""} ${i}`;return s.jsx(vt.Provider,{value:{makeInvisible:r},children:s.jsx(Ne.AnimatePresence,{children:n&&s.jsxs("aside",{className:u.trim(),...c,children:[s.jsx(Ne.motion.div,{className:"arkyn_modal_container-overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),s.jsx(Ne.motion.div,{className:"arkyn_modal_container-content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Cn(e){const{alignment:n="right",className:r,...o}=e,i=`arkyn_modal_footer ${n} ${r}`;return s.jsx("footer",{className:i.trim(),...o})}function kn(e){const{showCloseButton:n=!0,className:r,children:o,...i}=e,{makeInvisible:c}=l.useContext(vt),h=`arkyn_modal_header ${r}`;return s.jsxs("header",{className:h.trim(),...i,children:[o,n&&s.jsx("button",{type:"button",onClick:c,"aria-label":"Close modal button",className:"arkyn_modal_header-close_button",children:s.jsx(Z.X,{size:24})})]})}function Nn(e){const{children:n,button:r,closeOnClick:o,orientation:i="bottom-left"}=e,[c,h]=l.useState(!1),u=`arkyn_popover ${i} ${c?"show":""}`;function d(){c||h(!0)}return s.jsxs("div",{className:u,onClick:d,children:[r,s.jsx(Ne.motion.div,{style:{visibility:c?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:c?1:0},exit:{opacity:0},onClick:()=>o&&h(!1),className:"arkyn_popover-content",children:n}),c&&s.jsx("div",{onClick:()=>h(!1),className:"arkyn_popover-overlay"})]})}function bt(e){const{message:n,title:r,type:o,size:i="lg"}=e,c=`arkyn_toast ${o} ${i}`;function h(){switch(o){case"info":return s.jsx(Z.Info,{});case"success":return s.jsx(Z.CheckCircle2,{});case"danger":return s.jsx(Z.XCircle,{});case"warning":return s.jsx(Z.AlertCircle,{});default:return s.jsx(Z.Info,{})}}return s.jsxs("aside",{className:c,children:[s.jsxs("div",{children:[s.jsx("div",{className:"bg"}),s.jsx(h,{})]}),s.jsxs("p",{children:[s.jsx("strong",{title:r,children:r}),s.jsx("span",{children:n})]})]})}function _n(e){const{text:n,size:r="lg",children:o,orientation:i="top",className:c,...h}=e,u=`arkyn_tooltip ${r} ${i} ${c}`;return s.jsxs("div",{className:u.trim(),...h,children:[o,s.jsx("div",{className:"arkyn_tooltip-text",children:n})]})}const Ze=l.createContext({}),yt=l.createContext({});function xt(){const e=l.useContext(yt);if(Object.entries(e).length===0)throw new Error("useToast must be used within a Provider");return e}function wt(e){return e&&typeof e.title=="string"&&typeof e.message=="string"&&(e.size===void 0||e.size==="md"||e.size==="lg")&&(e.type==="info"||e.type==="success"||e.type==="danger"||e.type==="warning")}function jn(){const e=Se.useActionData(),{closeModal:n}=l.useContext(Ze),{showToast:r}=xt();l.useEffect(()=>{const o=e==null?void 0:e.closeModalKey;o&&n(o)},[e]),l.useEffect(()=>{const o=e==null?void 0:e.toast,i=e==null?void 0:e.message;wt(o)&&r(o),!wt(o)&&i&&r({message:i,title:"Atenção!",type:"warning"})},[e])}const Ct=l.createContext({});function En(e){const n=l.useContext(Ct);if(Object.entries(n).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:r,drawerIsOpen:o,openDrawer:i,closeDrawer:c}=n,h=o(e),u=r(e);return{drawerIsOpen:h,drawerData:u,openDrawer:m=>i(e,m),closeDrawer:()=>c(e)}}else return n}function Sn(e){const n=l.useContext(Ze);if(Object.entries(n).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:r,modalIsOpen:o,openModal:i,closeModal:c}=n,h=o(e),u=r(e);return{modalIsOpen:h,modalData:u,openModal:m=>i(e,m),closeModal:()=>c(e)}}else return n}function $n(e){const{children:n=!1}=e,[r,o]=l.useState([]);function i(d){return!!r.some(p=>p.key===d)}function c(d){var p;return(p=r.find(m=>m.key===d))==null?void 0:p.data}function h(d,p){const m=i(d);o(m?b=>[...b.filter(v=>v.key!==d),{key:d,data:p}]:[...r,{key:d,data:p}])}function u(d){o(r.filter(p=>p.key!==d))}return s.jsx(Ct.Provider,{value:{drawerIsOpen:i,drawerData:c,openDrawer:h,closeDrawer:u},children:n})}function Rn(e){const{children:n=!1}=e,[r,o]=l.useState([]);function i(d){return!!r.some(p=>p.key===d)}function c(d){var p;return(p=r.find(m=>m.key===d))==null?void 0:p.data}function h(d,p){const m=i(d);o(m?b=>[...b.filter(v=>v.key!==d),{key:d,data:p}]:[...r,{key:d,data:p}])}function u(d){o(r.filter(p=>p.key!==d))}return s.jsx(Ze.Provider,{value:{modalIsOpen:i,modalData:c,openModal:h,closeModal:u},children:n})}var Pn=e=>{switch(e){case"success":return On;case"info":return Dn;case"warning":return zn;case"error":return Fn;default:return null}},Tn=Array(12).fill(0),In=({visible:e})=>l.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},l.createElement("div",{className:"sonner-spinner"},Tn.map((n,r)=>l.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),On=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),zn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l.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"})),Dn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),Fn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),Ln=()=>{let[e,n]=l.useState(document.hidden);return l.useEffect(()=>{let r=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Qe=1,Bn=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:r,...o}=e,i=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:Qe++,c=this.toasts.find(u=>u.id===i),h=e.dismissible===void 0?!0:e.dismissible;return c?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:r}),{...u,...e,id:i,dismissible:h,title:r}):u):this.addToast({title:r,...o,dismissible:h,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({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 r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let o=e instanceof Promise?e:e(),i=r!==void 0;return o.then(async c=>{if(An(c)&&!c.ok){i=!1;let h=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,u=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description;this.create({id:r,type:"error",message:h,description:u})}else if(n.success!==void 0){i=!1;let h=typeof n.success=="function"?await n.success(c):n.success,u=typeof n.description=="function"?await n.description(c):n.description;this.create({id:r,type:"success",message:h,description:u})}}).catch(async c=>{if(n.error!==void 0){i=!1;let h=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description;this.create({id:r,type:"error",message:h,description:u})}}).finally(()=>{var c;i&&(this.dismiss(r),r=void 0),(c=n.finally)==null||c.call(n)}),r},this.custom=(e,n)=>{let r=(n==null?void 0:n.id)||Qe++;return this.create({jsx:e(r),id:r,...n}),r},this.subscribers=[],this.toasts=[]}},de=new Bn,Mn=(e,n)=>{let r=(n==null?void 0:n.id)||Qe++;return de.addToast({title:e,...n,id:r}),r},An=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Wn=Mn,Vn=()=>de.toasts,Yn=Object.assign(Wn,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:Vn});function Hn(e,{insertAt:n}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}Hn(`: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(e){return e.label!==void 0}var Un=3,Kn="32px",Xn=4e3,qn=356,Jn=14,Gn=20,Zn=200;function Qn(...e){return e.filter(Boolean).join(" ")}var er=e=>{var n,r,o,i,c,h,u,d,p,m;let{invert:b,toast:a,unstyled:v,interacting:j,setHeights:x,visibleToasts:N,heights:y,index:w,toasts:H,expanded:D,removeToast:R,defaultRichColors:W,closeButton:B,style:J,cancelButtonStyle:X,actionButtonStyle:U,className:z="",descriptionClassName:te="",duration:E,position:G,gap:F,loadingIcon:K,expandByDefault:ae,classNames:P,icons:ne,closeButtonAriaLabel:le="Close toast",pauseWhenPageIsHidden:$,cn:S}=e,[T,q]=l.useState(!1),[Q,V]=l.useState(!1),[_e,pe]=l.useState(!1),[ye,ge]=l.useState(!1),[et,$e]=l.useState(0),[tt,We]=l.useState(0),je=l.useRef(null),fe=l.useRef(null),Ve=w===0,Ye=w+1<=N,se=a.type,Ce=a.dismissible!==!1,nt=a.className||"",ze=a.descriptionClassName||"",Re=l.useMemo(()=>y.findIndex(_=>_.toastId===a.id)||0,[y,a.id]),rt=l.useMemo(()=>{var _;return(_=a.closeButton)!=null?_:B},[a.closeButton,B]),De=l.useMemo(()=>a.duration||E||Xn,[a.duration,E]),Pe=l.useRef(0),he=l.useRef(0),He=l.useRef(0),xe=l.useRef(null),[Fe,Le]=G.split("-"),Ue=l.useMemo(()=>y.reduce((_,M,A)=>A>=Re?_:_+M.height,0),[y,Re]),Ke=Ln(),at=a.invert||b,Be=se==="loading";he.current=l.useMemo(()=>Re*F+Ue,[Re,Ue]),l.useEffect(()=>{q(!0)},[]),l.useLayoutEffect(()=>{if(!T)return;let _=fe.current,M=_.style.height;_.style.height="auto";let A=_.getBoundingClientRect().height;_.style.height=M,We(A),x(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])},[T,a.title,a.description,x,a.id]);let ve=l.useCallback(()=>{V(!0),$e(he.current),x(_=>_.filter(M=>M.toastId!==a.id)),setTimeout(()=>{R(a)},Zn)},[a,R,x,he]);l.useEffect(()=>{if(a.promise&&se==="loading"||a.duration===1/0||a.type==="loading")return;let _,M=De;return D||j||$&&Ke?(()=>{if(He.current<Pe.current){let A=new Date().getTime()-Pe.current;M=M-A}He.current=new Date().getTime()})():M!==1/0&&(Pe.current=new Date().getTime(),_=setTimeout(()=>{var A;(A=a.onAutoClose)==null||A.call(a,a),ve()},M)),()=>clearTimeout(_)},[D,j,ae,a,De,ve,a.promise,se,$,Ke]),l.useEffect(()=>{let _=fe.current;if(_){let M=_.getBoundingClientRect().height;return We(M),x(A=>[{toastId:a.id,height:M,position:a.position},...A]),()=>x(A=>A.filter(oe=>oe.toastId!==a.id))}},[x,a.id]),l.useEffect(()=>{a.delete&&ve()},[ve,a.delete]);function st(){return ne!=null&&ne.loading?l.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},ne.loading):K?l.createElement("div",{className:"sonner-loader","data-visible":se==="loading"},K):l.createElement(In,{visible:se==="loading"})}return l.createElement("li",{"aria-live":a.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:fe,className:S(z,nt,P==null?void 0:P.toast,(n=a==null?void 0:a.classNames)==null?void 0:n.toast,P==null?void 0:P.default,P==null?void 0:P[se],(r=a==null?void 0:a.classNames)==null?void 0:r[se]),"data-sonner-toast":"","data-rich-colors":(o=a.richColors)!=null?o:W,"data-styled":!(a.jsx||a.unstyled||v),"data-mounted":T,"data-promise":!!a.promise,"data-removed":Q,"data-visible":Ye,"data-y-position":Fe,"data-x-position":Le,"data-index":w,"data-front":Ve,"data-swiping":_e,"data-dismissible":Ce,"data-type":se,"data-invert":at,"data-swipe-out":ye,"data-expanded":!!(D||ae&&T),style:{"--index":w,"--toasts-before":w,"--z-index":H.length-w,"--offset":`${Q?et:he.current}px`,"--initial-height":ae?"auto":`${tt}px`,...J,...a.style},onPointerDown:_=>{Be||!Ce||(je.current=new Date,$e(he.current),_.target.setPointerCapture(_.pointerId),_.target.tagName!=="BUTTON"&&(pe(!0),xe.current={x:_.clientX,y:_.clientY}))},onPointerUp:()=>{var _,M,A,oe;if(ye||!Ce)return;xe.current=null;let ce=Number(((_=fe.current)==null?void 0:_.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ke=new Date().getTime()-((M=je.current)==null?void 0:M.getTime()),Xe=Math.abs(ce)/ke;if(Math.abs(ce)>=Gn||Xe>.11){$e(he.current),(A=a.onDismiss)==null||A.call(a,a),ve(),ge(!0);return}(oe=fe.current)==null||oe.style.setProperty("--swipe-amount","0px"),pe(!1)},onPointerMove:_=>{var M;if(!xe.current||!Ce)return;let A=_.clientY-xe.current.y,oe=_.clientX-xe.current.x,ce=(Fe==="top"?Math.min:Math.max)(0,A),ke=_.pointerType==="touch"?10:2;Math.abs(ce)>ke?(M=fe.current)==null||M.style.setProperty("--swipe-amount",`${A}px`):Math.abs(oe)>ke&&(xe.current=null)}},rt&&!a.jsx?l.createElement("button",{"aria-label":le,"data-disabled":Be,"data-close-button":!0,onClick:Be||!Ce?()=>{}:()=>{var _;ve(),(_=a.onDismiss)==null||_.call(a,a)},className:S(P==null?void 0:P.closeButton,(i=a==null?void 0:a.classNames)==null?void 0:i.closeButton)},l.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"},l.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,a.jsx||l.isValidElement(a.title)?a.jsx||a.title:l.createElement(l.Fragment,null,se||a.icon||a.promise?l.createElement("div",{"data-icon":"",className:S(P==null?void 0:P.icon,(c=a==null?void 0:a.classNames)==null?void 0:c.icon)},a.promise||a.type==="loading"&&!a.icon?a.icon||st():null,a.type!=="loading"?a.icon||(ne==null?void 0:ne[se])||Pn(se):null):null,l.createElement("div",{"data-content":"",className:S(P==null?void 0:P.content,(h=a==null?void 0:a.classNames)==null?void 0:h.content)},l.createElement("div",{"data-title":"",className:S(P==null?void 0:P.title,(u=a==null?void 0:a.classNames)==null?void 0:u.title)},a.title),a.description?l.createElement("div",{"data-description":"",className:S(te,ze,P==null?void 0:P.description,(d=a==null?void 0:a.classNames)==null?void 0:d.description)},a.description):null),l.isValidElement(a.cancel)?a.cancel:a.cancel&&Ae(a.cancel)?l.createElement("button",{"data-button":!0,"data-cancel":!0,style:a.cancelButtonStyle||X,onClick:_=>{var M,A;Ae(a.cancel)&&Ce&&((A=(M=a.cancel).onClick)==null||A.call(M,_),ve())},className:S(P==null?void 0:P.cancelButton,(p=a==null?void 0:a.classNames)==null?void 0:p.cancelButton)},a.cancel.label):null,l.isValidElement(a.action)?a.action:a.action&&Ae(a.action)?l.createElement("button",{"data-button":!0,"data-action":!0,style:a.actionButtonStyle||U,onClick:_=>{var M,A;Ae(a.action)&&(_.defaultPrevented||((A=(M=a.action).onClick)==null||A.call(M,_),ve()))},className:S(P==null?void 0:P.actionButton,(m=a==null?void 0:a.classNames)==null?void 0:m.actionButton)},a.action.label):null))};function kt(){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 tr=e=>{let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:c,className:h,offset:u,theme:d="light",richColors:p,duration:m,style:b,visibleToasts:a=Un,toastOptions:v,dir:j=kt(),gap:x=Jn,loadingIcon:N,icons:y,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:H,cn:D=Qn}=e,[R,W]=l.useState([]),B=l.useMemo(()=>Array.from(new Set([r].concat(R.filter($=>$.position).map($=>$.position)))),[R,r]),[J,X]=l.useState([]),[U,z]=l.useState(!1),[te,E]=l.useState(!1),[G,F]=l.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=l.useRef(null),ae=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=l.useRef(null),ne=l.useRef(!1),le=l.useCallback($=>{var S;(S=R.find(T=>T.id===$.id))!=null&&S.delete||de.dismiss($.id),W(T=>T.filter(({id:q})=>q!==$.id))},[R]);return l.useEffect(()=>de.subscribe($=>{if($.dismiss){W(S=>S.map(T=>T.id===$.id?{...T,delete:!0}:T));return}setTimeout(()=>{Rt.flushSync(()=>{W(S=>{let T=S.findIndex(q=>q.id===$.id);return T!==-1?[...S.slice(0,T),{...S[T],...$},...S.slice(T+1)]:[$,...S]})})})}),[]),l.useEffect(()=>{if(d!=="system"){F(d);return}d==="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:$})=>{F($?"dark":"light")})},[d]),l.useEffect(()=>{R.length<=1&&z(!1)},[R]),l.useEffect(()=>{let $=S=>{var T,q;o.every(Q=>S[Q]||S.code===Q)&&(z(!0),(T=K.current)==null||T.focus()),S.code==="Escape"&&(document.activeElement===K.current||(q=K.current)!=null&&q.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[o]),l.useEffect(()=>{if(K.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,ne.current=!1)}},[K.current]),R.length?l.createElement("section",{"aria-label":`${w} ${ae}`,tabIndex:-1},B.map(($,S)=>{var T;let[q,Q]=$.split("-");return l.createElement("ol",{key:$,dir:j==="auto"?kt():j,tabIndex:-1,ref:K,className:h,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":q,"data-x-position":Q,style:{"--front-toast-height":`${((T=J[0])==null?void 0:T.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Kn,"--width":`${qn}px`,"--gap":`${x}px`,...b},onBlur:V=>{ne.current&&!V.currentTarget.contains(V.relatedTarget)&&(ne.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||ne.current||(ne.current=!0,P.current=V.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{te||z(!1)},onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||E(!0)},onPointerUp:()=>E(!1)},R.filter(V=>!V.position&&S===0||V.position===$).map((V,_e)=>{var pe,ye;return l.createElement(er,{key:V.id,icons:y,index:_e,toast:V,defaultRichColors:p,duration:(pe=v==null?void 0:v.duration)!=null?pe:m,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:a,closeButton:(ye=v==null?void 0:v.closeButton)!=null?ye:c,interacting:te,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:le,toasts:R.filter(ge=>ge.position==V.position),heights:J.filter(ge=>ge.position==V.position),setHeights:X,expandByDefault:i,gap:x,loadingIcon:N,expanded:U,pauseWhenPageIsHidden:H,cn:D})}))})):null};function nr({children:e}){function n(r){Yn.custom(o=>s.jsx(bt,{...r}))}return s.jsxs(yt.Provider,{value:{showToast:n},children:[s.jsx(tr,{}),e]})}C.Badge=Dt,C.BreadcrumbContainer=mn,C.BreadcrumbLink=pn,C.Button=Yt,C.Checkbox=Ut,C.Divider=Ft,C.DrawerContainer=yn,C.DrawerHeader=xn,C.DrawerProvider=$n,C.FormController=Ht,C.FormError=Kt,C.FormLabel=Xt,C.IconButton=qt,C.Input=un,C.ModalContainer=wn,C.ModalFooter=Cn,C.ModalHeader=kn,C.ModalProvider=Rn,C.Pagination=gn,C.Popover=Nn,C.Select=fn,C.Skeleton=Lt,C.TabButton=vn,C.TabContainer=bn,C.TableBody=Bt,C.TableCaption=Mt,C.TableContainer=At,C.TableFooter=Wt,C.TableHeader=Vt,C.Textarea=hn,C.Toast=bt,C.ToastProvider=nr,C.Tooltip=_n,C.useAutomation=jn,C.useDrawer=En,C.useModal=Sn,C.useScopedParams=pt,C.useToast=xt,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
32
+ <%s key={someKey} {...props} />`,lt,Ee,fr,Ee),$t[Ee+lt]=!0}}return t===o?ir(ae):or(ae),ae}}function lr(t,d,g){return Pt(t,d,g,!0)}function cr(t,d,g){return Pt(t,d,g,!1)}var ur=cr,dr=lr;ze.Fragment=o,ze.jsx=ur,ze.jsxs=dr}()),ze}process.env.NODE_ENV==="production"?Ge.exports=Ot():Ge.exports=zt();var s=Ge.exports;function Ae(e,n){return n?s.jsx(n,{size:e,strokeWidth:2.5}):s.jsx(s.Fragment,{})}function dt(e,n){return[...new Array(n-e)].map((r,o)=>e+o+1).filter(r=>r>0)}function Ft(e,n,r){return e>=r?[]:dt(e+1,e+n)}function Lt(e,n){return e<=1?[]:dt(e-1-n,e-1)}function Dt(e,n,r){if(!e)return s.jsx(s.Fragment,{});if(typeof e=="string")return s.jsx("p",{className:r,children:e});const o=e;return s.jsx("p",{className:r,children:s.jsx(o,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Bt(e){const{variant:n="ghost",scheme:r="primary",size:o="md",leftIcon:i,rightIcon:c,className:m="",children:u,...f}=e,h={md:12,lg:14}[o],b=`arkyn_badge ${n} ${r} ${o} ${m}`;return s.jsxs("div",{className:b.trim(),...f,children:[Ae(h,i),u,Ae(h,i)]})}function Mt(e){const{className:n,orientation:r="horizontal",...o}=e,i=`arkyn_divider ${r} ${n}`;return s.jsx("div",{className:i,...o})}function At(e){const{className:n,...r}=e,o=`arkyn_skeleton ${n}`;return s.jsx("aside",{className:o.trim(),...r})}function Wt(e){const{className:n,...r}=e,o=`arkyn_table_body ${n}`;return s.jsx("tbody",{className:o.trim(),...r})}function Vt(e){const{className:n,children:r,...o}=e,i=`arkyn_table_caption ${n}`;return s.jsx("caption",{className:i.trim(),...o,children:s.jsx("div",{className:"arkyn_table_caption-content",children:r})})}function Yt(e){const{children:n,className:r,...o}=e,i=`arkyn_table_container ${r}`;return s.jsx("div",{className:i.trim(),...o,children:s.jsx("table",{children:n})})}function Ht(e){const{className:n,children:r,...o}=e,i=`arkyn_table_footer ${n}`;return s.jsxs("tfoot",{className:i.trim(),...o,children:[s.jsx("tr",{className:"spacing-row"}),s.jsx("tr",{children:s.jsx("th",{colSpan:100,children:s.jsx("div",{className:"arkyn_table_footer-content",children:r})})})]})}function Ut(e){const{className:n,children:r,...o}=e,i=`arkyn_table_header ${n}`;return s.jsxs("thead",{className:i.trim(),...o,children:[s.jsx("tr",{children:r}),s.jsx("tr",{className:"spacing-row"})]})}function Kt(e){const{isLoading:n=!1,scheme:r="primary",variant:o="solid",loadingText:i,size:c="md",leftIcon:m,rightIcon:u,disabled:f,className:p="",children:h,...b}=e,v={xs:12,sm:16,md:20,lg:24}[c],S=`arkyn_button loading_text_${!!i} ${o} ${r} ${c} loading_${n} ${p}`;return s.jsxs("button",{className:S,disabled:f||n,...b,children:[s.jsxs("div",{className:"arkyn_button-spinner",children:[s.jsx(Q.Loader2,{size:v,strokeWidth:2.5}),i&&i]}),s.jsxs("div",{className:"arkyn_button-content",children:[Ae(v,m),h,Ae(v,u)]})]})}const ft=l.createContext({});function Xt(e){var h,b;const n=Re.useActionData(),{children:r,className:o,...i}=e,c=l.useRef(null),m=((h=c.current)==null?void 0:h.name)||"",u=((b=n==null?void 0:n.fieldErrors)==null?void 0:b[m])||null,f=l.useId(),p=`arkyn_form_controller ${o}`;return s.jsx(ft.Provider,{value:{error:u,id:f,inputRef:c},children:s.jsx("section",{className:p.trim(),...i,children:r})})}function ye(){return l.useContext(ft)}function qt(e){const{name:n,className:r="",size:o="md",isError:i,defaultChecked:c=!1,checked:m=null,onCheck:u,value:f,...p}=e,{id:h,inputRef:b,error:a}=ye(),v=i||!!a,[S,x]=l.useState(c||!1),_=typeof m=="boolean"?m:S,y=`arkyn_checkbox ${o} ${v?"error":""} ${_?"checked":""} ${r}`;function w(){const D=S;x(!D),u&&u(D?"":f||"checked")}return s.jsxs("button",{type:"button",id:h,className:y,onClick:w,...p,children:[s.jsx("input",{type:"hidden",name:n,ref:b,value:_?f||"checked":""}),s.jsx(Q.Check,{})]})}function Jt(e){const{children:n,className:r,...o}=e,i=`arkyn_form_error ${r}`,{error:c}=ye();return n?s.jsx("strong",{className:i.trim(),...o,children:n}):c?s.jsx("strong",{className:i.trim(),...o,children:c}):s.jsx(s.Fragment,{})}function Gt(e){const{showAsterisk:n=!1,className:r="",...o}=e,{id:i}=ye(),m=`arkyn_form_label ${n?"show-asterisk":""} ${r}`;return s.jsx("label",{...o,className:m.trim(),htmlFor:i})}function Zt(e){const{isLoading:n=!1,scheme:r="primary",variant:o="solid",size:i="md",icon:c,disabled:m,className:u="",...f}=e,p={xs:12,sm:16,md:20,lg:24},h=`arkyn_icon_button ${o} ${r} ${i} loading_${n} ${u}`;return s.jsxs("button",{disabled:m||n,className:h.trim(),...f,children:[s.jsx("div",{className:"arkyn_icon_button-spinner",children:s.jsx(Q.Loader2,{size:p[i],strokeWidth:2.5})}),s.jsx("div",{className:"arkyn_icon_button-content",children:s.jsx(c,{size:p[i],strokeWidth:2.5})})]})}function ke(e,n,r){if(!e)return s.jsx(s.Fragment,{});if(typeof e=="string")return s.jsx("p",{className:r,children:e});const o=e;return s.jsx("p",{className:r,children:s.jsx(o,{color:"var(--secondary-600)",size:n,strokeWidth:2.5})})}function Ze(e){return e&&e.replace(/[^0-9]/g,"")}function mt(e,n){let r="",o=0;return Array.from(e).forEach((i,c)=>{n[c+o].match(/[0-9]/)||(r+=n[c+o],o++),r+=i}),r}function ht(e){return e.length>11?"CNPJ":"CPF"}const Qe={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},pt=Ze(Qe.CNPJ).length;function Qt(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:m="solid",prefix:u,sufix:f,leftIcon:p,rightIcon:h,disabled:b,defaultValue:a,readOnly:v,onFocus:S,onBlur:x,title:_,style:y,onChange:w,...D}=e;function F(X){let M=Ze(X);const q=ht(M);if(!(M.length>pt))return M=mt(M,Qe[q]),M}const T=h?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${m} ${i} ${b||v||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,j={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:ke(u,j,"prefix"),sufix:ke(f,j,"sufix"),LeftIcon:p,RightIcon:h,defaultValue:F(a||""),disabled:b,readOnly:v,onFocus:S,onBlur:x,title:_,style:y,onChange:w,loadingPosition:T,iconSize:j,Spinner:s.jsx(Q.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...D}}function en(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:m}=ye(),u=i||o,f=e.isError||!!m,{disabled:p,title:h,style:b,className:a,prefix:v,sufix:S,iconSize:x,loadingPosition:_,isLoading:y,LeftIcon:w,readOnly:D,onFocus:F,onBlur:T,RightIcon:Y,Spinner:B,onChange:J,value:U,defaultValue:K,...z}=Qt({...e,id:c,isError:f},n),[te,j]=l.useState(K),X=w&&!y,M=Y&&!y,q=_==="left"&&y,ne=_==="right"&&y;function $(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function re(E){let P=Ze(E.target.value);const G=ht(P);P.length>pt||(P=mt(P,Qe[G]),E.target.value=P,j(P),J&&J(E))}function ue(E){r(!0),F&&F(E)}function R(E){r(!1),T&&T(E)}return s.jsxs("section",{title:h,style:b,onClick:$,className:a,children:[v,q&&B,X&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx("input",{disabled:p||y,readOnly:D,ref:u,value:U||te,onFocus:ue,onChange:re,onBlur:R,...z}),M&&s.jsx(Y,{size:x,strokeWidth:2.5}),ne&&B,S]})}const tn=3,nn=(e="pt-BR",n,r="BRL",o=!0)=>new Intl.NumberFormat(e,{style:"currency",currency:r,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(n).slice(o?tn:0),We=2,gt=e=>typeof e=="number"?e:Number(e.toString().replace(/[^0-9-]/g,"")),et=e=>{let n=e;return typeof e=="string"?(n=gt(e),n%1!==0&&(n=n.toFixed(We))):n=Number.isInteger(e)?Number(e)*10**We:e.toFixed(We),gt(n)/10**We},vt=(e,n,r)=>{if(!n)return[0,""];const o=et(n),i=nn(e,o,r);return[o,i]};function rn(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:m="solid",prefix:u,sufix:f,leftIcon:p,rightIcon:h,disabled:b,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,max:y=1e9,locale:w="pt-BR",currency:D="BRL",...F}=e,T=h?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${m} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,j={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:ke(u,j,"prefix"),sufix:ke(f,j,"sufix"),LeftIcon:p,RightIcon:h,disabled:b,locale:w,currency:D,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,max:y,loadingPosition:T,iconSize:j,Spinner:s.jsx(Q.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...F}}function an(e){const[n,r]=l.useState(!1),[o,i]=l.useState("0"),c=l.useRef(null),{inputRef:m,id:u,error:f}=ye(),p=m||c,h=e.isError||!!f,{disabled:b,title:a,style:v,className:S,prefix:x,sufix:_,iconSize:y,loadingPosition:w,isLoading:D,LeftIcon:F,readOnly:T,onFocus:Y,onBlur:B,RightIcon:J,Spinner:U,value:K,max:z,onChangeValue:te,onKeyPress:j,currency:X,locale:M,name:q,defaultValue:ne,...$}=rn({...e,id:u,isError:h},n),re=F&&!D,ue=J&&!D,R=w==="left"&&D,E=w==="right"&&D;function P(){b||!(p!=null&&p.current)||(r(!0),p.current.focus())}function G(Z){r(!0),Y&&Y(Z)}function se(Z){r(!1),B&&B(Z)}const A=Z=>{const[oe,Ce]=vt(M,Z,X);return!z||oe<=z?(i(Ce),[oe,Ce]):[et(o),o]},xe=Z=>{Z.preventDefault();const[oe,Ce]=A(Z.target.value);te(Z,String(oe),String(Ce))},he=Z=>j&&j(Z,Z.key,Z.key);return l.useEffect(()=>{const Z=K||ne||void 0,[,oe]=vt(M,Z,X);i(oe)},[X,ne,K]),s.jsxs("section",{title:a,style:v,onClick:P,className:S,children:[x,R&&U,re&&s.jsx(F,{size:y,strokeWidth:2.5}),s.jsx("input",{value:o,onChange:xe,onBlur:se,onFocus:G,onKeyUp:he,disabled:b||D,readOnly:T,ref:p,...$}),s.jsx("input",{type:"hidden",name:q,value:et(o)}),E&&U,ue&&s.jsx(J,{size:y,strokeWidth:2.5}),_]})}function sn(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:m="solid",prefix:u,sufix:f,leftIcon:p,rightIcon:h,disabled:b,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,onChange:y,showMask:w=!1,type:D,...F}=e,T=h?"right":"left",z=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${m} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,j={md:20,lg:20}[i];return{isLoading:r,className:z,prefix:ke(u,j,"prefix"),sufix:ke(f,j,"sufix"),LeftIcon:p,RightIcon:h,disabled:b,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,onChange:y,loadingPosition:T,iconSize:j,showMask:w,Spinner:s.jsx(Q.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...F}}const on=l.forwardRef((e,n)=>s.jsx("input",{ref:n,...e}));function ln(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:m}=ye(),u=i||o,f=e.isError||!!m,{disabled:p,title:h,style:b,className:a,prefix:v,sufix:S,iconSize:x,loadingPosition:_,isLoading:y,LeftIcon:w,readOnly:D,onFocus:F,onBlur:T,RightIcon:Y,Spinner:B,...J}=sn({...e,id:c,isError:f},n),U=w&&!y,K=Y&&!y,z=_==="left"&&y,te=_==="right"&&y;function j(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function X(q){r(!0),F&&F(q)}function M(q){r(!1),T&&T(q)}return s.jsxs("section",{title:h,style:b,onClick:j,className:a,children:[v,z&&B,U&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx(Tt.InputMask,{component:on,ref:u,onFocus:X,onBlur:M,...J}),K&&s.jsx(Y,{size:x,strokeWidth:2.5}),te&&B,S]})}function cn(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:m="solid",prefix:u,sufix:f,leftIcon:p,rightIcon:h,disabled:b,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,onChange:y,...w}=e,D=h?"right":"left",U=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${m} ${i} ${b||a||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,z={md:20,lg:20}[i];return{isLoading:r,className:U,prefix:ke(u,z,"prefix"),sufix:ke(f,z,"sufix"),LeftIcon:p,RightIcon:h,disabled:b,readOnly:a,onFocus:v,onBlur:S,title:x,style:_,onChange:y,loadingPosition:D,iconSize:z,Spinner:s.jsx(Q.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...w}}function un(e){const[n,r]=l.useState(!1),o=l.useRef(null),{inputRef:i,id:c,error:m}=ye(),u=i||o,f=e.isError||!!m,{disabled:p,title:h,style:b,className:a,prefix:v,sufix:S,iconSize:x,loadingPosition:_,isLoading:y,LeftIcon:w,readOnly:D,onFocus:F,onBlur:T,RightIcon:Y,type:B,Spinner:J,...U}=cn({...e,id:c,isError:f},n),K=w&&!y,z=Y&&!y,te=_==="left"&&y,j=_==="right"&&y;function X(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function M(ne){r(!0),F&&F(ne)}function q(ne){r(!1),T&&T(ne)}return B==="hidden"?s.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:u,...U}):s.jsxs("section",{title:h,style:b,onClick:X,className:a,children:[v,te&&J,K&&s.jsx(w,{size:x,strokeWidth:2.5}),s.jsx("input",{disabled:p||y,readOnly:D,ref:u,onFocus:M,onBlur:q,type:B,...U}),z&&s.jsx(Y,{size:x,strokeWidth:2.5}),j&&J,S]})}function dn(e){return e.type==="currency"?s.jsx(an,{...e}):e.type==="masked"?s.jsx(ln,{...e}):e.type==="cpf-cnpj"?s.jsx(en,{...e}):s.jsx(un,{...e})}function fn(e,n){const{isLoading:r,isError:o,size:i="md",className:c="",variant:m="solid",prefix:u,leftIcon:f,disabled:p,readOnly:h,onFocus:b,onBlur:a,title:v,style:S,closeOnSelect:x=!0,..._}=e,T=`arkyn_select ${u?"hasPrefix":""} ${m} ${i} ${p||h||r?"opacity":""} ${o?"errored":""} ${n?"focused":""} ${c}`,B={md:20,lg:20}[i];return{isLoading:r,className:T,prefix:Dt(u,B,"prefix"),LeftIcon:f,disabled:p,readOnly:h,onFocus:b,onBlur:a,title:v,closeOnSelect:x,style:S,iconSize:B,Spinner:s.jsx(Q.Loader2,{className:"spinner",size:B,strokeWidth:2.5}),..._}}function mn(e){var P;const[n,r]=l.useState(!1),{inputRef:o,id:i,error:c}=ye(),m=l.useRef(null),u=o||m,f=e.isError||!!c,{disabled:p,title:h,style:b,className:a,prefix:v,iconSize:S,isLoading:x,LeftIcon:_,value:y=null,defaultValue:w="",readOnly:D,onFocus:F,onBlur:T,Spinner:Y,name:B,placeholder:J,onSelect:U,options:K,optionMaxHeight:z,closeOnSelect:te,...j}=fn({...e,id:i,isError:f},n),[X,M]=l.useState(w);function q(){p||!(u!=null&&u.current)||(r(!0),u.current.focus())}function ne(G){n||(r(!0),F&&F(G))}function $(){r(!1),T&&u.current&&u.current.blur()}function re(G){const{label:se,value:A}=G;M(X!==A?A:""),U&&U({label:se,value:A}),te&&$()}const ue=typeof y=="string"?y:X,R=((P=K.find(G=>G.value===ue))==null?void 0:P.label)||"",E=()=>{if(!n&&R)return!0;if(!n&&!R)return!1;if(n&&R)return!0;if(n&&!R)return!1};return s.jsxs(s.Fragment,{children:[s.jsxs("section",{title:h,style:b,onClick:q,className:`${a} placeholder_dark_${E()}`,children:[v,_&&s.jsx(_,{size:S,strokeWidth:2.5}),s.jsx("input",{disabled:p||x,readOnly:!0,placeholder:R||J,onFocus:ne,...j}),s.jsx("input",{type:"hidden",ref:u,name:B,value:ue||"",readOnly:!0}),n&&s.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:z},children:[K.map(({label:G,value:se})=>s.jsxs("div",{onClick:()=>re({label:G,value:se}),className:ue===se?"arkyn_select_option active":"arkyn_select_option",children:[G," ",s.jsx(Q.Check,{})]},se)),K.length<=0&&s.jsx("p",{children:"Sem opções disponíveis"})]}),!x&&s.jsx(Q.ChevronDown,{className:"arkyn_select_arrow",size:S,strokeWidth:2.5}),x&&Y]}),n&&s.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function hn(e){const{variant:n="solid",size:r="md",className:o,disabled:i=!1,readOnly:c=!1,onFocus:m,onBlur:u,title:f,style:p,...h}=e,[b,a]=l.useState(!1),{inputRef:v,id:S,error:x}=ye(),_=l.useRef(null),y=v||_,D=e.isError||!!x?"errored":"",Y=`arkyn_textarea ${n} ${r} ${i||c?"opacity":""} ${D} ${b?"focused":""} ${o}`;function B(){i||!(y!=null&&y.current)||(a(!0),y.current.focus())}function J(K){a(!0),m&&m(K)}function U(K){a(!1),u&&u(K)}return s.jsx("section",{title:f,style:p,onClick:B,className:Y,children:s.jsx("textarea",{id:S,disabled:i,readOnly:c,ref:y,onFocus:J,onBlur:U,...h})})}function pn(e){const{className:n="",...r}=e,o=`arkyn_breadcrumb_container ${n}`;return s.jsx("nav",{className:o,...r})}function gn(e){const{pathname:n}=Re.useLocation(),{className:r="",disabled:o=!1,children:i,to:c,...m}=e,f=`arkyn_breadcrumb_link ${n===c?"active":"inactive"} ${r}`;return o?s.jsxs("p",{className:f,children:[s.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),i]}):s.jsxs(Re.Link,{to:c,className:f,...m,children:[s.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function bt(e=""){const n=Re.useLocation(),r=new URLSearchParams(n.search),o=e?`${e}:`:"",i=c=>{Object.entries(c).forEach(([m,u])=>{u===void 0?r.delete(`${o}${m}`):r.set(`${o}${m}`,String(u))})};return{getParam:c=>r.get(`${o}${c}`),getScopedSearch:c=>{i(c);let m=r.toString();return m&&(m="?"+m),m}}}function vn(e){const{scope:n,totalCountRegisters:r,perPageKey:o="per_page",pageKey:i="page",siblingsCount:c=2,...m}=e,u=Re.useNavigate(),{getParam:f,getScopedSearch:p}=bt(n),h=Number(f(i))||1,b=Number(f(o))||20,a=Math.ceil(r/b),v=Lt(h,c),S=Ft(h,c,a);function x(_){u(p({page:_}))}return s.jsxs("div",{className:"arkyn_pagination",...m,children:[s.jsx("button",{className:"arkyn_pagination-icon_button",disabled:h<=1,onClick:()=>x(h-1),children:s.jsx(Q.ChevronLeft,{})}),h>1+c&&s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"arkyn_pagination-page_button",onClick:()=>x(1),children:"1"}),h>2+c&&s.jsx("button",{disabled:!0,className:"arkyn_pagination-spread",children:s.jsx(Q.Ellipsis,{})})]}),v.map((_,y)=>s.jsx("button",{onClick:()=>x(_),className:"arkyn_pagination-page_button",children:_},y)),s.jsx("button",{className:"arkyn_pagination-current",disabled:!0,children:h}),S.map((_,y)=>s.jsx("button",{onClick:()=>x(_),className:"arkyn_pagination-page_button",children:_},y)),h+c<a&&s.jsxs(s.Fragment,{children:[h+1+c<a&&s.jsx("button",{disabled:!0,className:"arkyn_pagination-spread",children:s.jsx(Q.Ellipsis,{})}),s.jsx("button",{className:"arkyn_pagination-page_button",onClick:()=>x(a),children:a})]}),s.jsx("button",{className:"arkyn_pagination-icon_button",disabled:h>=a,onClick:()=>x(h+1),children:s.jsx(Q.ChevronRight,{})})]})}function bn(e){const{children:n,value:r,className:o,defaultActive:i,...c}=e,m=`arkyn_tab_button ${i?"active":""} ${o||""}`;return s.jsx("button",{className:m.trim(),...c,children:n})}function yn(e){const{children:n,onClick:r,className:o,...i}=e,c=l.useRef(null),m=`arkyn_tab_container ${o||""}`,[u,f]=l.useState({width:"0px",left:"0px",transition:"none"}),p=(b,a)=>{const v=b.getBoundingClientRect(),S=c.current.getBoundingClientRect();f({transition:a?void 0:"none",width:`${v.width}px`,left:`${v.left-S.left}px`})};l.useLayoutEffect(()=>{const b=c.current;if(!b)return;let a=null;a=b.querySelector("button.active"),a&&p(a)},[]);const h=b=>{const a=b.target,v=c.current;a&&v&&v.contains(a)&&(v.querySelectorAll("button").forEach(x=>x.classList.remove("active")),a.classList.add("active"),p(a,!0),r&&r(a.value))};return s.jsxs("nav",{ref:c,onClick:h,className:m.trim(),...i,children:[n,s.jsx("div",{className:"active-line",style:u})]})}const yt=l.createContext({});function xn(e){const{isVisibled:n,makeInvisible:r,orientation:o="left",children:i,className:c,...m}=e,u=o==="left"?"-100%":"100%",p=`arkyn_drawer_container ${o} ${n?"visible":""} ${c}`;return s.jsx(yt.Provider,{value:{makeInvisible:r},children:s.jsx(je.AnimatePresence,{children:n&&s.jsxs("aside",{className:p.trim(),...m,children:[s.jsx(je.motion.div,{className:"arkyn_drawer_container-overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),s.jsx(je.motion.div,{className:"arkyn_drawer_container-content",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${u})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${u})`},children:i})]})})})}function wn(e){const{showCloseButton:n=!0,className:r,children:o,...i}=e,{makeInvisible:c}=l.useContext(yt),m=`arkyn_drawer_header ${r}`;return s.jsxs("header",{className:m.trim(),...i,children:[o,n&&s.jsx("button",{className:"arkyn_drawer_header-close_button",type:"button",onClick:c,"aria-label":"Close drawer",children:s.jsx(Q.X,{size:24})})]})}const xt=l.createContext({});function kn(e){const{isVisibled:n,makeInvisible:r,children:o,className:i="",...c}=e,u=`arkyn_modal_container ${n?"visible":""} ${i}`;return s.jsx(xt.Provider,{value:{makeInvisible:r},children:s.jsx(je.AnimatePresence,{children:n&&s.jsxs("aside",{className:u.trim(),...c,children:[s.jsx(je.motion.div,{className:"arkyn_modal_container-overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),s.jsx(je.motion.div,{className:"arkyn_modal_container-content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Cn(e){const{alignment:n="right",className:r,...o}=e,i=`arkyn_modal_footer ${n} ${r}`;return s.jsx("footer",{className:i.trim(),...o})}function Nn(e){const{showCloseButton:n=!0,className:r,children:o,...i}=e,{makeInvisible:c}=l.useContext(xt),m=`arkyn_modal_header ${r}`;return s.jsxs("header",{className:m.trim(),...i,children:[o,n&&s.jsx("button",{type:"button",onClick:c,"aria-label":"Close modal button",className:"arkyn_modal_header-close_button",children:s.jsx(Q.X,{size:24})})]})}function _n(e){const{children:n,button:r,closeOnClick:o,orientation:i="bottom-left"}=e,[c,m]=l.useState(!1),u=`arkyn_popover ${i} ${c?"show":""}`;function f(){c||m(!0)}return s.jsxs("div",{className:u,onClick:f,children:[r,s.jsx(je.motion.div,{style:{visibility:c?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:c?1:0},exit:{opacity:0},onClick:()=>o&&m(!1),className:"arkyn_popover-content",children:n}),c&&s.jsx("div",{onClick:()=>m(!1),className:"arkyn_popover-overlay"})]})}function wt(e){const{message:n,title:r,type:o,size:i="lg"}=e,c=`arkyn_toast ${o} ${i}`;function m(){switch(o){case"info":return s.jsx(Q.Info,{});case"success":return s.jsx(Q.CheckCircle2,{});case"danger":return s.jsx(Q.XCircle,{});case"warning":return s.jsx(Q.AlertCircle,{});default:return s.jsx(Q.Info,{})}}return s.jsxs("aside",{className:c,children:[s.jsxs("div",{children:[s.jsx("div",{className:"bg"}),s.jsx(m,{})]}),s.jsxs("p",{children:[s.jsx("strong",{title:r,children:r}),s.jsx("span",{children:n})]})]})}function jn(e){const{text:n,size:r="lg",children:o,orientation:i="top",className:c,...m}=e,u=`arkyn_tooltip ${r} ${i} ${c}`;return s.jsxs("div",{className:u.trim(),...m,children:[o,s.jsx("div",{className:"arkyn_tooltip-text",children:n})]})}const tt=l.createContext({}),kt=l.createContext({});function Ct(){const e=l.useContext(kt);if(Object.entries(e).length===0)throw new Error("useToast must be used within a Provider");return e}function Nt(e){return e&&typeof e.title=="string"&&typeof e.message=="string"&&(e.size===void 0||e.size==="md"||e.size==="lg")&&(e.type==="info"||e.type==="success"||e.type==="danger"||e.type==="warning")}function Sn(){const e=Re.useActionData(),{closeModal:n}=l.useContext(tt),{showToast:r}=Ct();l.useEffect(()=>{const o=e==null?void 0:e.closeModalKey;o&&n(o)},[e]),l.useEffect(()=>{const o=e==null?void 0:e.toast,i=e==null?void 0:e.message;Nt(o)&&r(o),!Nt(o)&&i&&r({message:i,title:"Atenção!",type:"warning"})},[e])}const _t=l.createContext({});function En(e){const n=l.useContext(_t);if(Object.entries(n).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:r,drawerIsOpen:o,openDrawer:i,closeDrawer:c}=n,m=o(e),u=r(e);return{drawerIsOpen:m,drawerData:u,openDrawer:h=>i(e,h),closeDrawer:()=>c(e)}}else return n}function Rn(e){const n=l.useContext(tt);if(Object.entries(n).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:r,modalIsOpen:o,openModal:i,closeModal:c}=n,m=o(e),u=r(e);return{modalIsOpen:m,modalData:u,openModal:h=>i(e,h),closeModal:()=>c(e)}}else return n}function $n(e){const{children:n=!1}=e,[r,o]=l.useState([]);function i(f){return!!r.some(p=>p.key===f)}function c(f){var p;return(p=r.find(h=>h.key===f))==null?void 0:p.data}function m(f,p){const h=i(f);o(h?b=>[...b.filter(v=>v.key!==f),{key:f,data:p}]:[...r,{key:f,data:p}])}function u(f){o(r.filter(p=>p.key!==f))}return s.jsx(_t.Provider,{value:{drawerIsOpen:i,drawerData:c,openDrawer:m,closeDrawer:u},children:n})}function Pn(e){const{children:n=!1}=e,[r,o]=l.useState([]);function i(f){return!!r.some(p=>p.key===f)}function c(f){var p;return(p=r.find(h=>h.key===f))==null?void 0:p.data}function m(f,p){const h=i(f);o(h?b=>[...b.filter(v=>v.key!==f),{key:f,data:p}]:[...r,{key:f,data:p}])}function u(f){o(r.filter(p=>p.key!==f))}return s.jsx(tt.Provider,{value:{modalIsOpen:i,modalData:c,openModal:m,closeModal:u},children:n})}var Tn=e=>{switch(e){case"success":return zn;case"info":return Ln;case"warning":return Fn;case"error":return Dn;default:return null}},In=Array(12).fill(0),On=({visible:e})=>l.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},l.createElement("div",{className:"sonner-spinner"},In.map((n,r)=>l.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),zn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),Fn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l.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"})),Ln=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),Dn=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.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"})),Bn=()=>{let[e,n]=l.useState(document.hidden);return l.useEffect(()=>{let r=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},nt=1,Mn=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:r,...o}=e,i=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:nt++,c=this.toasts.find(u=>u.id===i),m=e.dismissible===void 0?!0:e.dismissible;return c?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...e,id:i,title:r}),{...u,...e,id:i,dismissible:m,title:r}):u):this.addToast({title:r,...o,dismissible:m,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({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 r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let o=e instanceof Promise?e:e(),i=r!==void 0;return o.then(async c=>{if(Wn(c)&&!c.ok){i=!1;let m=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,u=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description;this.create({id:r,type:"error",message:m,description:u})}else if(n.success!==void 0){i=!1;let m=typeof n.success=="function"?await n.success(c):n.success,u=typeof n.description=="function"?await n.description(c):n.description;this.create({id:r,type:"success",message:m,description:u})}}).catch(async c=>{if(n.error!==void 0){i=!1;let m=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description;this.create({id:r,type:"error",message:m,description:u})}}).finally(()=>{var c;i&&(this.dismiss(r),r=void 0),(c=n.finally)==null||c.call(n)}),r},this.custom=(e,n)=>{let r=(n==null?void 0:n.id)||nt++;return this.create({jsx:e(r),id:r,...n}),r},this.subscribers=[],this.toasts=[]}},me=new Mn,An=(e,n)=>{let r=(n==null?void 0:n.id)||nt++;return me.addToast({title:e,...n,id:r}),r},Wn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vn=An,Yn=()=>me.toasts,Hn=Object.assign(Vn,{success:me.success,info:me.info,warning:me.warning,error:me.error,custom:me.custom,message:me.message,promise:me.promise,dismiss:me.dismiss,loading:me.loading},{getHistory:Yn});function Un(e,{insertAt:n}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}Un(`: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 Ve(e){return e.label!==void 0}var Kn=3,Xn="32px",qn=4e3,Jn=356,Gn=14,Zn=20,Qn=200;function er(...e){return e.filter(Boolean).join(" ")}var tr=e=>{var n,r,o,i,c,m,u,f,p,h;let{invert:b,toast:a,unstyled:v,interacting:S,setHeights:x,visibleToasts:_,heights:y,index:w,toasts:D,expanded:F,removeToast:T,defaultRichColors:Y,closeButton:B,style:J,cancelButtonStyle:U,actionButtonStyle:K,className:z="",descriptionClassName:te="",duration:j,position:X,gap:M,loadingIcon:q,expandByDefault:ne,classNames:$,icons:re,closeButtonAriaLabel:ue="Close toast",pauseWhenPageIsHidden:R,cn:E}=e,[P,G]=l.useState(!1),[se,A]=l.useState(!1),[xe,he]=l.useState(!1),[Z,oe]=l.useState(!1),[Ce,$e]=l.useState(0),[rt,Ye]=l.useState(0),Se=l.useRef(null),pe=l.useRef(null),He=w===0,Ue=w+1<=_,ie=a.type,Ne=a.dismissible!==!1,at=a.className||"",Fe=a.descriptionClassName||"",Pe=l.useMemo(()=>y.findIndex(N=>N.toastId===a.id)||0,[y,a.id]),st=l.useMemo(()=>{var N;return(N=a.closeButton)!=null?N:B},[a.closeButton,B]),Le=l.useMemo(()=>a.duration||j||qn,[a.duration,j]),Te=l.useRef(0),ge=l.useRef(0),Ke=l.useRef(0),we=l.useRef(null),[De,Be]=X.split("-"),Xe=l.useMemo(()=>y.reduce((N,W,V)=>V>=Pe?N:N+W.height,0),[y,Pe]),qe=Bn(),ot=a.invert||b,Me=ie==="loading";ge.current=l.useMemo(()=>Pe*M+Xe,[Pe,Xe]),l.useEffect(()=>{G(!0)},[]),l.useLayoutEffect(()=>{if(!P)return;let N=pe.current,W=N.style.height;N.style.height="auto";let V=N.getBoundingClientRect().height;N.style.height=W,Ye(V),x(le=>le.find(de=>de.toastId===a.id)?le.map(de=>de.toastId===a.id?{...de,height:V}:de):[{toastId:a.id,height:V,position:a.position},...le])},[P,a.title,a.description,x,a.id]);let be=l.useCallback(()=>{A(!0),$e(ge.current),x(N=>N.filter(W=>W.toastId!==a.id)),setTimeout(()=>{T(a)},Qn)},[a,T,x,ge]);l.useEffect(()=>{if(a.promise&&ie==="loading"||a.duration===1/0||a.type==="loading")return;let N,W=Le;return F||S||R&&qe?(()=>{if(Ke.current<Te.current){let V=new Date().getTime()-Te.current;W=W-V}Ke.current=new Date().getTime()})():W!==1/0&&(Te.current=new Date().getTime(),N=setTimeout(()=>{var V;(V=a.onAutoClose)==null||V.call(a,a),be()},W)),()=>clearTimeout(N)},[F,S,ne,a,Le,be,a.promise,ie,R,qe]),l.useEffect(()=>{let N=pe.current;if(N){let W=N.getBoundingClientRect().height;return Ye(W),x(V=>[{toastId:a.id,height:W,position:a.position},...V]),()=>x(V=>V.filter(le=>le.toastId!==a.id))}},[x,a.id]),l.useEffect(()=>{a.delete&&be()},[be,a.delete]);function it(){return re!=null&&re.loading?l.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},re.loading):q?l.createElement("div",{className:"sonner-loader","data-visible":ie==="loading"},q):l.createElement(On,{visible:ie==="loading"})}return l.createElement("li",{"aria-live":a.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:E(z,at,$==null?void 0:$.toast,(n=a==null?void 0:a.classNames)==null?void 0:n.toast,$==null?void 0:$.default,$==null?void 0:$[ie],(r=a==null?void 0:a.classNames)==null?void 0:r[ie]),"data-sonner-toast":"","data-rich-colors":(o=a.richColors)!=null?o:Y,"data-styled":!(a.jsx||a.unstyled||v),"data-mounted":P,"data-promise":!!a.promise,"data-removed":se,"data-visible":Ue,"data-y-position":De,"data-x-position":Be,"data-index":w,"data-front":He,"data-swiping":xe,"data-dismissible":Ne,"data-type":ie,"data-invert":ot,"data-swipe-out":Z,"data-expanded":!!(F||ne&&P),style:{"--index":w,"--toasts-before":w,"--z-index":D.length-w,"--offset":`${se?Ce:ge.current}px`,"--initial-height":ne?"auto":`${rt}px`,...J,...a.style},onPointerDown:N=>{Me||!Ne||(Se.current=new Date,$e(ge.current),N.target.setPointerCapture(N.pointerId),N.target.tagName!=="BUTTON"&&(he(!0),we.current={x:N.clientX,y:N.clientY}))},onPointerUp:()=>{var N,W,V,le;if(Z||!Ne)return;we.current=null;let de=Number(((N=pe.current)==null?void 0:N.style.getPropertyValue("--swipe-amount").replace("px",""))||0),_e=new Date().getTime()-((W=Se.current)==null?void 0:W.getTime()),Je=Math.abs(de)/_e;if(Math.abs(de)>=Zn||Je>.11){$e(ge.current),(V=a.onDismiss)==null||V.call(a,a),be(),oe(!0);return}(le=pe.current)==null||le.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:N=>{var W;if(!we.current||!Ne)return;let V=N.clientY-we.current.y,le=N.clientX-we.current.x,de=(De==="top"?Math.min:Math.max)(0,V),_e=N.pointerType==="touch"?10:2;Math.abs(de)>_e?(W=pe.current)==null||W.style.setProperty("--swipe-amount",`${V}px`):Math.abs(le)>_e&&(we.current=null)}},st&&!a.jsx?l.createElement("button",{"aria-label":ue,"data-disabled":Me,"data-close-button":!0,onClick:Me||!Ne?()=>{}:()=>{var N;be(),(N=a.onDismiss)==null||N.call(a,a)},className:E($==null?void 0:$.closeButton,(i=a==null?void 0:a.classNames)==null?void 0:i.closeButton)},l.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"},l.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,a.jsx||l.isValidElement(a.title)?a.jsx||a.title:l.createElement(l.Fragment,null,ie||a.icon||a.promise?l.createElement("div",{"data-icon":"",className:E($==null?void 0:$.icon,(c=a==null?void 0:a.classNames)==null?void 0:c.icon)},a.promise||a.type==="loading"&&!a.icon?a.icon||it():null,a.type!=="loading"?a.icon||(re==null?void 0:re[ie])||Tn(ie):null):null,l.createElement("div",{"data-content":"",className:E($==null?void 0:$.content,(m=a==null?void 0:a.classNames)==null?void 0:m.content)},l.createElement("div",{"data-title":"",className:E($==null?void 0:$.title,(u=a==null?void 0:a.classNames)==null?void 0:u.title)},a.title),a.description?l.createElement("div",{"data-description":"",className:E(te,Fe,$==null?void 0:$.description,(f=a==null?void 0:a.classNames)==null?void 0:f.description)},a.description):null),l.isValidElement(a.cancel)?a.cancel:a.cancel&&Ve(a.cancel)?l.createElement("button",{"data-button":!0,"data-cancel":!0,style:a.cancelButtonStyle||U,onClick:N=>{var W,V;Ve(a.cancel)&&Ne&&((V=(W=a.cancel).onClick)==null||V.call(W,N),be())},className:E($==null?void 0:$.cancelButton,(p=a==null?void 0:a.classNames)==null?void 0:p.cancelButton)},a.cancel.label):null,l.isValidElement(a.action)?a.action:a.action&&Ve(a.action)?l.createElement("button",{"data-button":!0,"data-action":!0,style:a.actionButtonStyle||K,onClick:N=>{var W,V;Ve(a.action)&&(N.defaultPrevented||((V=(W=a.action).onClick)==null||V.call(W,N),be()))},className:E($==null?void 0:$.actionButton,(h=a==null?void 0:a.classNames)==null?void 0:h.actionButton)},a.action.label):null))};function jt(){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 nr=e=>{let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:c,className:m,offset:u,theme:f="light",richColors:p,duration:h,style:b,visibleToasts:a=Kn,toastOptions:v,dir:S=jt(),gap:x=Gn,loadingIcon:_,icons:y,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:D,cn:F=er}=e,[T,Y]=l.useState([]),B=l.useMemo(()=>Array.from(new Set([r].concat(T.filter(R=>R.position).map(R=>R.position)))),[T,r]),[J,U]=l.useState([]),[K,z]=l.useState(!1),[te,j]=l.useState(!1),[X,M]=l.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=l.useRef(null),ne=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=l.useRef(null),re=l.useRef(!1),ue=l.useCallback(R=>{var E;(E=T.find(P=>P.id===R.id))!=null&&E.delete||me.dismiss(R.id),Y(P=>P.filter(({id:G})=>G!==R.id))},[T]);return l.useEffect(()=>me.subscribe(R=>{if(R.dismiss){Y(E=>E.map(P=>P.id===R.id?{...P,delete:!0}:P));return}setTimeout(()=>{It.flushSync(()=>{Y(E=>{let P=E.findIndex(G=>G.id===R.id);return P!==-1?[...E.slice(0,P),{...E[P],...R},...E.slice(P+1)]:[R,...E]})})})}),[]),l.useEffect(()=>{if(f!=="system"){M(f);return}f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:R})=>{M(R?"dark":"light")})},[f]),l.useEffect(()=>{T.length<=1&&z(!1)},[T]),l.useEffect(()=>{let R=E=>{var P,G;o.every(se=>E[se]||E.code===se)&&(z(!0),(P=q.current)==null||P.focus()),E.code==="Escape"&&(document.activeElement===q.current||(G=q.current)!=null&&G.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[o]),l.useEffect(()=>{if(q.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[q.current]),T.length?l.createElement("section",{"aria-label":`${w} ${ne}`,tabIndex:-1},B.map((R,E)=>{var P;let[G,se]=R.split("-");return l.createElement("ol",{key:R,dir:S==="auto"?jt():S,tabIndex:-1,ref:q,className:m,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":G,"data-x-position":se,style:{"--front-toast-height":`${((P=J[0])==null?void 0:P.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Xn,"--width":`${Jn}px`,"--gap":`${x}px`,...b},onBlur:A=>{re.current&&!A.currentTarget.contains(A.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=A.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{te||z(!1)},onPointerDown:A=>{A.target instanceof HTMLElement&&A.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},T.filter(A=>!A.position&&E===0||A.position===R).map((A,xe)=>{var he,Z;return l.createElement(tr,{key:A.id,icons:y,index:xe,toast:A,defaultRichColors:p,duration:(he=v==null?void 0:v.duration)!=null?he:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:a,closeButton:(Z=v==null?void 0:v.closeButton)!=null?Z:c,interacting:te,position:R,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:ue,toasts:T.filter(oe=>oe.position==A.position),heights:J.filter(oe=>oe.position==A.position),setHeights:U,expandByDefault:i,gap:x,loadingIcon:_,expanded:K,pauseWhenPageIsHidden:D,cn:F})}))})):null};function rr({children:e}){function n(r){Hn.custom(o=>s.jsx(wt,{...r}))}return s.jsxs(kt.Provider,{value:{showToast:n},children:[s.jsx(nr,{}),e]})}k.Badge=Bt,k.BreadcrumbContainer=pn,k.BreadcrumbLink=gn,k.Button=Kt,k.Checkbox=qt,k.Divider=Mt,k.DrawerContainer=xn,k.DrawerHeader=wn,k.DrawerProvider=$n,k.FormController=Xt,k.FormError=Jt,k.FormLabel=Gt,k.IconButton=Zt,k.Input=dn,k.ModalContainer=kn,k.ModalFooter=Cn,k.ModalHeader=Nn,k.ModalProvider=Pn,k.Pagination=vn,k.Popover=_n,k.Select=mn,k.Skeleton=At,k.TabButton=bn,k.TabContainer=yn,k.TableBody=Wt,k.TableCaption=Vt,k.TableContainer=Yt,k.TableFooter=Ht,k.TableHeader=Ut,k.Textarea=hn,k.Toast=wt,k.ToastProvider=rr,k.Tooltip=jn,k.useAutomation=Sn,k.useDrawer=En,k.useModal=Rn,k.useScopedParams=bt,k.useToast=Ct,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
@@ -99,7 +99,7 @@ declare function getConfig(props: CurrencyInputProps, isFocused: boolean): {
99
99
  onErrorCapture?: import("react").ReactEventHandler<HTMLInputElement>;
100
100
  onKeyDown?: import("react").KeyboardEventHandler<HTMLInputElement>;
101
101
  onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLInputElement>;
102
- onKeyPress?: import("react").KeyboardEventHandler<HTMLInputElement>;
102
+ onKeyPress?: import("react").KeyboardEventHandler<HTMLInputElement> & ((event: import("react").KeyboardEvent<HTMLInputElement>, originalValue: string, maskedValue: string) => void);
103
103
  onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLInputElement>;
104
104
  onKeyUp?: import("react").KeyboardEventHandler<HTMLInputElement>;
105
105
  onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLInputElement>;
@@ -283,8 +283,9 @@ declare function getConfig(props: CurrencyInputProps, isFocused: boolean): {
283
283
  placeholder?: string | undefined;
284
284
  required?: boolean | undefined;
285
285
  src?: string | undefined;
286
- defaultValue?: number;
287
- value?: number;
286
+ defaultValue?: string;
287
+ onChangeValue?: (event: import("react").ChangeEvent<HTMLInputElement>, originalValue: string, maskedValue: string) => void;
288
+ value?: string;
288
289
  isLoading: boolean;
289
290
  className: string;
290
291
  prefix: import("react/jsx-runtime").JSX.Element;
@@ -292,14 +293,14 @@ declare function getConfig(props: CurrencyInputProps, isFocused: boolean): {
292
293
  LeftIcon: import("lucide-react").LucideIcon;
293
294
  RightIcon: import("lucide-react").LucideIcon;
294
295
  disabled: boolean;
296
+ locale: string;
297
+ currency: string;
295
298
  readOnly: boolean;
296
299
  onFocus: import("react").FocusEventHandler<HTMLInputElement>;
297
300
  onBlur: import("react").FocusEventHandler<HTMLInputElement>;
298
301
  title: string;
299
302
  style: import("react").CSSProperties;
300
303
  max: number;
301
- onChange: (value: number) => void;
302
- showCents: boolean;
303
304
  loadingPosition: string;
304
305
  iconSize: number;
305
306
  Spinner: import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKvD,iBAAS,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwD/D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKvD,iBAAS,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0D/D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -2,7 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Loader2 } from "lucide-react";
3
3
  import { morpheme } from "../utils/morpheme";
4
4
  function getConfig(props, isFocused) {
5
- const { isLoading, isError, size = "md", className: baseClassName = "", variant = "solid", prefix: basePrefix, sufix: baseSufix, leftIcon: LeftIcon, rightIcon: RightIcon, disabled, readOnly, onFocus, onBlur, title, style, showCents = false, max = 1000000000, onChange, ...rest } = props;
5
+ const { isLoading, isError, size = "md", className: baseClassName = "", variant = "solid", prefix: basePrefix, sufix: baseSufix, leftIcon: LeftIcon, rightIcon: RightIcon, disabled, readOnly, onFocus, onBlur, title, style,
6
+ // showCents = false,
7
+ max = 1000000000, locale = "pt-BR", currency = "BRL", ...rest } = props;
6
8
  const loadingPosition = RightIcon ? "right" : "left";
7
9
  const hasPrefix = !!basePrefix ? "hasPrefix" : "";
8
10
  const hasSufix = !!baseSufix ? "hasSufix" : "";
@@ -20,14 +22,15 @@ function getConfig(props, isFocused) {
20
22
  LeftIcon,
21
23
  RightIcon,
22
24
  disabled,
25
+ locale,
26
+ currency,
23
27
  readOnly,
24
28
  onFocus,
25
29
  onBlur,
26
30
  title,
27
31
  style,
28
32
  max,
29
- onChange,
30
- showCents,
33
+ // showCents,
31
34
  loadingPosition,
32
35
  iconSize: iconSize,
33
36
  Spinner: _jsx(Loader2, { className: "spinner", size: iconSize, strokeWidth: 2.5 }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AASvD,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CA6F/C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAUvD,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAyH/C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,16 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef, useState } from "react";
2
+ import { useEffect, useRef, useState } from "react";
3
3
  import { useFormController } from "../../../components/Form/FormController";
4
+ import { maskValues } from "../../../services/maskValues";
5
+ import { normalizeValue } from "../../../services/normalizeValue";
4
6
  import { getConfig } from "./getConfig";
5
- import { currencyInputKeyDown, valueDisplay } from "./utils";
6
7
  function CurrencyInput(props) {
7
8
  const [isFocused, setIsFocused] = useState(false);
9
+ const [maskedValue, setMaskedValue] = useState("0");
8
10
  const baseRef = useRef(null);
9
11
  const { inputRef, id, error } = useFormController();
10
12
  const ref = inputRef || baseRef;
11
13
  const isError = props.isError || !!error;
12
- const { disabled, title, style, className, prefix, sufix, iconSize, loadingPosition, isLoading, LeftIcon, readOnly, onFocus, onBlur, RightIcon, Spinner, value, max, onKeyDown, onChange, showCents, defaultValue, ...rest } = getConfig({ ...props, id, isError }, isFocused);
13
- const [currencyValue, setCurrencyValue] = useState(defaultValue * 100 || 0);
14
+ const { disabled, title, style, className, prefix, sufix, iconSize, loadingPosition, isLoading, LeftIcon, readOnly, onFocus, onBlur, RightIcon, Spinner, value, max, onChangeValue, onKeyPress, currency, locale, name, defaultValue, ...rest } = getConfig({ ...props, id, isError }, isFocused);
14
15
  const showLeftIcon = LeftIcon && !isLoading;
15
16
  const showRightIcon = RightIcon && !isLoading;
16
17
  const showLeftSpinner = loadingPosition === "left" && isLoading;
@@ -21,21 +22,35 @@ function CurrencyInput(props) {
21
22
  setIsFocused(true);
22
23
  ref.current.focus();
23
24
  }
24
- function handleKeyDown(event) {
25
- currencyInputKeyDown({ currencyValue, event, max, setCurrencyValue });
26
- onChange && onChange(currencyValue / 100);
27
- onKeyDown && onKeyDown(event);
28
- }
29
- function handleFocus(e) {
25
+ function handleFocus(event) {
30
26
  setIsFocused(true);
31
27
  if (onFocus)
32
- onFocus(e);
28
+ onFocus(event);
33
29
  }
34
30
  function handleBlur(e) {
35
31
  setIsFocused(false);
36
32
  if (onBlur)
37
33
  onBlur(e);
38
34
  }
39
- return (_jsxs("section", { title: title, style: style, onClick: handleSectionClick, className: className, children: [prefix, showLeftSpinner && Spinner, showLeftIcon && _jsx(LeftIcon, { size: iconSize, strokeWidth: 2.5 }), _jsx("input", { value: valueDisplay(value || currencyValue, showCents), onKeyDown: handleKeyDown, disabled: disabled || isLoading, readOnly: readOnly, ref: ref, onFocus: handleFocus, onBlur: handleBlur, onChange: () => { }, ...rest }), showRightSpinner && Spinner, showRightIcon && _jsx(RightIcon, { size: iconSize, strokeWidth: 2.5 }), sufix] }));
35
+ const updateValues = (originalValue) => {
36
+ const [calculatedValue, calculatedMaskedValue] = maskValues(locale, originalValue, currency);
37
+ if (!max || calculatedValue <= max) {
38
+ setMaskedValue(calculatedMaskedValue);
39
+ return [calculatedValue, calculatedMaskedValue];
40
+ }
41
+ return [normalizeValue(maskedValue), maskedValue];
42
+ };
43
+ const handleChange = (event) => {
44
+ event.preventDefault();
45
+ const [originalValue, maskedValue] = updateValues(event.target.value);
46
+ onChangeValue(event, String(originalValue), String(maskedValue));
47
+ };
48
+ const handleKeyUp = (event) => onKeyPress && onKeyPress(event, event.key, event.key);
49
+ useEffect(() => {
50
+ const currentValue = value || defaultValue || undefined;
51
+ const [, maskedValue] = maskValues(locale, currentValue, currency);
52
+ setMaskedValue(maskedValue);
53
+ }, [currency, defaultValue, value]);
54
+ return (_jsxs("section", { title: title, style: style, onClick: handleSectionClick, className: className, children: [prefix, showLeftSpinner && Spinner, showLeftIcon && _jsx(LeftIcon, { size: iconSize, strokeWidth: 2.5 }), _jsx("input", { value: maskedValue, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyUp: handleKeyUp, disabled: disabled || isLoading, readOnly: readOnly, ref: ref, ...rest }), _jsx("input", { type: "hidden", name: name, value: normalizeValue(maskedValue) }), showRightSpinner && Spinner, showRightIcon && _jsx(RightIcon, { size: iconSize, strokeWidth: 2.5 }), sufix] }));
40
55
  }
41
56
  export { CurrencyInput };
@@ -0,0 +1,3 @@
1
+ declare const MAXIMUM_FRACTION_DIGITS = 2;
2
+ export { MAXIMUM_FRACTION_DIGITS };
3
+ //# sourceMappingURL=decimals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimals.d.ts","sourceRoot":"","sources":["../../src/constants/decimals.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,uBAAuB,IAAI,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ const MAXIMUM_FRACTION_DIGITS = 2;
2
+ export { MAXIMUM_FRACTION_DIGITS };
@@ -0,0 +1,3 @@
1
+ declare const clearNumber: (number: any) => number;
2
+ export { clearNumber };
3
+ //# sourceMappingURL=clearNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearNumber.d.ts","sourceRoot":"","sources":["../../src/services/clearNumber.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,WAAY,GAAG,WAG/B,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ const clearNumber = (number) => {
2
+ if (typeof number === "number")
3
+ return number;
4
+ return Number(number.toString().replace(/[^0-9-]/g, ""));
5
+ };
6
+ export { clearNumber };
@@ -0,0 +1,3 @@
1
+ declare const formatCurrency: (locale: string, value: number, currencyType?: string, hideSymbol?: boolean) => string;
2
+ export { formatCurrency };
3
+ //# sourceMappingURL=format.d.ts.map