@zydon/common 1.1.99 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-f1d16bd0.js";
1
+ import { p as rt, f as C, n as B, r as mn, c as gn, i as tt, d as Ts, a as yn, v as Vs, w as ie, b as yt, e as K, g as R, t as Pt, h as et, j as Ss, k as bs, l as k, m as nt, o as vn, q as xt, s as vt, u as As, x as Ds, y as Cs, z as at, A as Ms, B as Pn, C as Kt, D as xn, E as Tn, F as w, G as zt, H as dt, P as ws, I as Ls, L as Rs, S as Bs, J as Vn, K as Sn, M as bn, N as Et, O as jt, Q as ye, R as Ht, T as Fs, U as An, V as Dn, W as Es, X as js, Y as Cn, Z as Mn, _ as ks, $ as Is, a0 as Os, a1 as Us, a2 as Ns, a3 as Gs, a4 as $s, a5 as Ks, a6 as zs, a7 as Hs } from "./index-78617918.js";
2
2
  import wn, { useContext as _t, useId as _s, useEffect as Ws } from "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -1 +1 @@
1
- {"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsC,MAAM,OAAO,CAAC;AAMtE,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,cAAc,EACtD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAGR,iBAAS,gBAAgB,CACvB,CAAC,SAAS,MAAM,mBAAmB,EACnC,CAAC,SAAS,WAAW,GAAG,cAAc,EAEtC,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,EAChD,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAGR,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACxD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC7C,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAyCR,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsC,MAAM,OAAO,CAAC;AAMtE,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,cAAc,EACtD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,SAAS,EACnB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAGR,iBAAS,gBAAgB,CACvB,CAAC,SAAS,MAAM,mBAAmB,EACnC,CAAC,SAAS,WAAW,GAAG,cAAc,EAEtC,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,EAChD,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAGR,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACxD,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC7C,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;AAwCR,eAAe,gBAAgB,CAAC"}
@@ -6281,7 +6281,7 @@ const WYr = (e, t, n) => {
6281
6281
  ...a,
6282
6282
  children: n
6283
6283
  }
6284
- ), BYr = () => import("./features-7af5a1f5.js").then((e) => e.default), PWn = ({ children: e }) => /* @__PURE__ */ _.jsx(TTr, { strict: !0, features: BYr, children: /* @__PURE__ */ _.jsxs(fn.div, { style: { height: "100%" }, children: [
6284
+ ), BYr = () => import("./features-b1736b73.js").then((e) => e.default), PWn = ({ children: e }) => /* @__PURE__ */ _.jsx(TTr, { strict: !0, features: BYr, children: /* @__PURE__ */ _.jsxs(fn.div, { style: { height: "100%" }, children: [
6285
6285
  " ",
6286
6286
  e,
6287
6287
  " "
@@ -264173,8 +264173,8 @@ lG2.displayName = "Label";
264173
264173
  const fG2 = ct(Ye)({
264174
264174
  padding: "0 40px",
264175
264175
  width: "100%",
264176
- flexGrow: 1,
264177
264176
  minHeight: "100%",
264177
+ flexGrow: 1,
264178
264178
  display: "flex",
264179
264179
  alignItems: "center",
264180
264180
  justifyContent: "center"
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a8 as d, aP as p, a9 as m, aQ as c, aK as v, ae as C, aR as S, aT as k, aU as T, aa as P, ab as g, ac as A, ad as F, af as I, ag as h, ah as B, aV as M, aW as f, aX as y, ai as D, b8 as x, aj as E, ak as R, al as w, ba as U, aY as L, am as N, aZ as O, an as W, ao as G, bb as H, ap as V, aq as q, ar as z, a_ as K, as as Z, at as j, au as J, a$ as Q, bw as X, av as Y, aw as _, ax as $, bd as aa, be as sa, bc as ea, aS as oa, ay as ra, b0 as ta, b1 as ba, aA as ia, az as na, b2 as la, aB as ua, aC as da, aD as pa, bx as ma, by as ca, aE as va, aF as Ca, aG as Sa, aH as ka, b3 as Ta, bf as Pa, aI as ga, b9 as Aa, aJ as Fa, b4 as Ia, bz as ha, aL as Ba, aM as Ma, b6 as fa, aN as ya, aO as Da, b5 as xa, b7 as Ea, bA as Ra, bS as wa, bB as Ua, bP as La, bQ as Na, bR as Oa, bZ as Wa, bX as Ga, bW as Ha, bT as Va, bU as qa, bD as za, bE as Ka, bF as Za, bG as ja, bH as Ja, bI as Qa, bO as Xa, bN as Ya, bM as _a, bJ as $a, bC as as, bK as ss, bL as es, bY as os, bV as rs, bt as ts, bu as bs, bv as is, bm as ns, bp as ls, bh as us, bj as ds, bo as ps, bg as ms, bn as cs, bl as vs, bk as Cs, br as Ss, bs as ks, bq as Ts, bi as Ps } from "./index-f1d16bd0.js";
1
+ import { a8 as d, aP as p, a9 as m, aQ as c, aK as v, ae as C, aR as S, aT as k, aU as T, aa as P, ab as g, ac as A, ad as F, af as I, ag as h, ah as B, aV as M, aW as f, aX as y, ai as D, b8 as x, aj as E, ak as R, al as w, ba as U, aY as L, am as N, aZ as O, an as W, ao as G, bb as H, ap as V, aq as q, ar as z, a_ as K, as as Z, at as j, au as J, a$ as Q, bw as X, av as Y, aw as _, ax as $, bd as aa, be as sa, bc as ea, aS as oa, ay as ra, b0 as ta, b1 as ba, aA as ia, az as na, b2 as la, aB as ua, aC as da, aD as pa, bx as ma, by as ca, aE as va, aF as Ca, aG as Sa, aH as ka, b3 as Ta, bf as Pa, aI as ga, b9 as Aa, aJ as Fa, b4 as Ia, bz as ha, aL as Ba, aM as Ma, b6 as fa, aN as ya, aO as Da, b5 as xa, b7 as Ea, bA as Ra, bS as wa, bB as Ua, bP as La, bQ as Na, bR as Oa, bZ as Wa, bX as Ga, bW as Ha, bT as Va, bU as qa, bD as za, bE as Ka, bF as Za, bG as ja, bH as Ja, bI as Qa, bO as Xa, bN as Ya, bM as _a, bJ as $a, bC as as, bK as ss, bL as es, bY as os, bV as rs, bt as ts, bu as bs, bv as is, bm as ns, bp as ls, bh as us, bj as ds, bo as ps, bg as ms, bn as cs, bl as vs, bk as Cs, br as Ss, bs as ks, bq as Ts, bi as Ps } from "./index-78617918.js";
2
2
  import "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -35417,7 +35417,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
35417
35417
  Prefix can't start with '-' when allowNegative is true.
35418
35418
  prefix: `+r+`
35419
35419
  allowNegative: `+u+`
35420
- `),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function CUo(e){e=hUo(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=nO);var u=e.onBlur;u===void 0&&(u=nO);var c=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,g=e.value,_=e.valueIsNumericString,m=e.onValueChange,C=FHn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=Kmt(e),b=h.decimalSeparator,y=h.allowedDecimalSeparators,p=function(z){return JHn(z,e)},j=function(z,U){return mUo(z,U,e)},E=Lue(g)?d:g,O=_??_Uo(E,f,t);Lue(g)?Lue(d)||(O=O||typeof d=="number"):O=O||typeof g=="number";var P=function(z){return NHn(z)?z:(typeof z=="number"&&(z=GHn(z)),O&&typeof l=="number"?YHn(z,l,!!s):z)},L=QHn(P(g),P(d),!!O,p,j,m),S=L[0],B=S.numAsString,A=S.formattedValue,T=L[1],me=function(z){var U=z.target,Oe=z.key,de=U.selectionStart,W=U.selectionEnd,I=U.value;if(I===void 0&&(I=""),de!==W){r(z);return}Oe==="Backspace"&&I[0]==="-"&&de===f.length+1&&n&&iN(U,1),l&&s&&(Oe==="Backspace"&&I[de-1]===b?(iN(U,de-1),z.preventDefault()):Oe==="Delete"&&I[de]===b&&z.preventDefault()),y!=null&&y.includes(Oe)&&I[de]===b&&iN(U,de+1);var Z=c===!0?",":c;Oe==="Backspace"&&I[de-1]===Z&&iN(U,de-1),Oe==="Delete"&&I[de]===Z&&iN(U,de+1),r(z)},ae=function(z){var U=B;if(U.match(/\d/g)||(U=""),a||(U=nUo(U)),s&&l&&(U=YHn(U,l,s)),U!==B){var Oe=JHn(U,e);T({formattedValue:Oe,value:U,floatValue:parseFloat(U)},{event:z,source:jgt.event})}u(z)},K=function(z){return z===b?!0:wgt(z)},Y=function(z){var U=z.currentValue,Oe=z.lastValue,de=z.formattedValue,W=z.currentValueIndex,I=z.formattedValueIndex,Z=U[W],ce=de[I],J=KHn(Oe,U),fe=J.to;return W>=fe.start&&W<fe.end&&y&&y.includes(Z)&&ce===b?!0:Z===ce};return Object.assign(Object.assign({},C),{value:A,valueIsNumericString:!1,isValidInputCharacter:K,isCharacterSame:Y,onValueChange:T,format:p,removeFormatting:j,getCaretBoundary:function(z){return vUo(z,e)},onKeyDown:me,onBlur:ae})}function bUo(e){var t=CUo(e);return o.createElement(sUo,Object.assign({},t))}const Xmt=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:s,InputProps:f,size:d,disabled:g,name:_,helperText:m,error:C,fullWidth:h,label:b,required:y,onChange:p,tabIndex:j},E)=>{const O=o.useRef(null),P=L=>{p&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{const{floatValue:S}=L,B=S||0;if(r!==void 0&&r>B){p({target:{name:_,value:r}});return}if(S!==void 0&&u<B){p({target:{name:_,value:u}});return}p({target:{name:_,value:S}})},600))};return o.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]),v.jsx(bUo,{getInputRef:E,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:P,customInput:w.TextField,InputProps:{...f},inputProps:{...s,tabIndex:j},disabled:g,size:d,helperText:m,error:C,fullWidth:h,label:b,required:y})});Xmt.displayName="NumberInput";const TEn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:s,disabled:f,tabIndex:d,...g},_)=>{const m=RHn(r,t,s),C=()=>{if(!a&&r-t<0)return;const y=r-t,p=Math.floor(r/t)*t,j=!m&&n?p:y;c!==void 0&&y<c?u(c):u(FEn(j))},h=()=>{const y=Number(r)+t,p=Math.ceil(r/t)*t,E=FEn(!m&&n?p:y);l!==void 0&&y>=l?u(l):u(c!==void 0&&E<=c?c:E)},b=y=>{const p=Number(y.target.value),j=Math.ceil(p/t)*t,E=n?j:p;if(c!==void 0&&p<=c){u(c);return}if(l!==void 0&&p>=l){u(l);return}u(E)};return v.jsx(Xmt,{ref:_,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:s,InputProps:{startAdornment:v.jsx(w.InputAdornment,{position:"start",children:v.jsx(w.IconButton,{size:"medium",disabled:f||(a?!1:!r),onClick:C,children:v.jsx(Ke,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(w.InputAdornment,{position:"end",children:v.jsx(w.IconButton,{size:"medium",onClick:h,disabled:f,children:v.jsx(Ke,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:d},onChange:b,disabled:f,...g})});TEn.displayName="Incrementer";const yUo=i8(w.Box)(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",a=t.variant==="filled",r=t.variant==="outlined",u=t.variant==="soft",c={...t.color==="default"&&{...r&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${H(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:H(e.palette.grey[500],.16)}}},l={...t.color!=="default"&&{...a&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...r&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...u&&{color:e.palette[t.color][n?"dark":"light"],backgroundColor:H(e.palette[t.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:e.spacing(0,1),color:e.palette.grey[800],fontSize:e.typography.pxToRem(12),fontFamily:e.typography.fontFamily,backgroundColor:e.palette.grey[300],fontWeight:e.typography.fontWeightBold,...l,...c}}),qHn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const s=zN(),f={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(yUo,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:s,...c,children:[a&&v.jsxs(w.Box,{sx:{mr:.75,...f},children:[" ",a," "]}),e,r&&v.jsxs(w.Box,{sx:{ml:.75,...f},children:[" ",r," "]})]})});qHn.displayName="Label";const pUo=w.styled(w.Box)({padding:"0 40px",width:"100%",flexGrow:1,minHeight:"100%",display:"flex",alignItems:"center",justifyContent:"center"}),OUo=()=>v.jsx(pUo,{children:v.jsx(w.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function rO(e){return typeof e=="string"||e instanceof String}function eAn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function tAn(e,t){return Array.isArray(t)?tAn(e,(n,a)=>t.includes(a)):Object.entries(e).reduce((n,a)=>{let[r,u]=a;return t(u,r)&&(n[r]=u),n},{})}const se={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function jUo(e){switch(e){case se.LEFT:return se.FORCE_LEFT;case se.RIGHT:return se.FORCE_RIGHT;default:return e}}function UEn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Qmt(e,t){if(t===e)return!0;const n=Array.isArray(t),a=Array.isArray(e);let r;if(n&&a){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!Qmt(t[r],e[r]))return!1;return!0}if(n!=a)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const u=t instanceof Date,c=e instanceof Date;if(u&&c)return t.getTime()==e.getTime();if(u!=c)return!1;const l=t instanceof RegExp,s=e instanceof RegExp;if(l&&s)return t.toString()==e.toString();if(l!=s)return!1;const f=Object.keys(t);for(r=0;r<f.length;r++)if(!Object.prototype.hasOwnProperty.call(e,f[r]))return!1;for(r=0;r<f.length;r++)if(!Qmt(e[f[r]],t[f[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class wUo{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?se.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?se.RIGHT:se.LEFT}}function pe(e,t){return new pe.InputMask(e,t)}function nAn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?pe.MaskedRegExp:rO(e)?pe.MaskedPattern:e===Date?pe.MaskedDate:e===Number?pe.MaskedNumber:Array.isArray(e)||e===Array?pe.MaskedDynamic:pe.Masked&&e.prototype instanceof pe.Masked?e:pe.Masked&&e instanceof pe.Masked?e.constructor:e instanceof Function?pe.MaskedFunction:(console.warn("Mask not found for mask",e),pe.Masked)}function Jmt(e){if(!e)throw new Error("Options in not defined");if(pe.Masked){if(e.prototype instanceof pe.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof pe.Masked?{mask:e}:eAn(e)&&e.mask instanceof pe.Masked?e:{};if(t){const a=t.mask;return{...tAn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return eAn(e)?{...e}:{mask:e}}function oN(e){if(pe.Masked&&e instanceof pe.Masked)return e;const t=Jmt(e),n=nAn(t.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}pe.createMask=oN;class GEn{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}pe.MaskElement=GEn;class uN extends GEn{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,n,a;return(t=(n=(a=this.input).getRootNode)==null?void 0:n.call(a))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(n=>this._toggleEventHandler(uN.EVENTS_MAP[n],t[n]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,n){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),n&&(this.input.addEventListener(t,n),this._handlers[t]=n)}}uN.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},pe.HTMLMaskElement=uN;class MUo extends uN{constructor(t){super(t),this.input=t,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}pe.HTMLMaskElement=uN;class rAn extends uN{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a<r?a:r}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a>r?a:r}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,t),a.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,u=r.getSelection&&r.getSelection();u&&(u.removeAllRanges(),u.addRange(a))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}pe.HTMLContenteditableMaskElement=rAn;class LUo{constructor(t,n){this.el=t instanceof GEn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new rAn(t):new MUo(t),this.masked=oN(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof pe.Masked)&&this.masked.constructor===nAn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof pe.Masked?t:oN({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,n){const a=this._listeners[t];a&&a.forEach(r=>r(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const t=this.masked.unmaskedValue,n=this.masked.value,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==n;this._unmaskedValue=t,this._value=n,this.el.value!==a&&(this.el.value=a),r&&this._fireChangeEvents()}updateOptions(t){const{mask:n,...a}=t,r=!this.maskEquals(n),u=!Qmt(this.masked,a);r&&(this.mask=n),u&&this.masked.updateOptions(a),(r||u)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,se.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const a=this._listeners[t].indexOf(n);return a>=0&&this._listeners[t].splice(a,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new wUo({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,u=a===this.masked.rawInputValue?n.removeDirection:se.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==se.NONE&&(c=this.masked.nearestInputPos(c,se.NONE)),this.updateControl(),this.updateCursor(c),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}pe.InputMask=LUo;class qe{static normalize(t){return Array.isArray(t)?t:[t,new qe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}pe.ChangeDetails=qe;class G9{constructor(t,n,a){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=a}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Xn{constructor(t){this._value="",this._update({...Xn.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new G9(this.extractInput(t,n),t)}appendTail(t){return rO(t)&&(t=new G9(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new qe({inserted:t,rawInserted:t})):new qe}_appendChar(t,n,a){n===void 0&&(n={});const r=this.state;let u;if([t,u]=this.doPrepareChar(t,n),u=u.aggregate(this._appendCharRaw(t,n)),u.inserted){let c,l=this.doValidate(n)!==!1;if(l&&a!=null){const s=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let f=this.appendTail(a);l=f.rawInserted===a.toString(),!(l&&f.inserted)&&this.overwrite==="shift"&&(this.state=s,c=a.state,a.shift(),f=this.appendTail(a),l=f.rawInserted===a.toString()),l&&f.inserted&&(this.state=s)}l||(u=new qe,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new qe}_appendEager(){return new qe}append(t,n,a){if(!rO(t))throw new Error("value should be string");const r=rO(a)?new G9(String(a)):a;n!=null&&n.tail&&(n._beforeTailState=this.state);let u;[t,u]=this.doPrepare(t,n);for(let c=0;c<t.length;++c){const l=this._appendChar(t[c],n,r);if(!l.rawInserted&&!this.doSkipInvalid(t[c],n,r))break;u.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&u.aggregate(this._appendEager()),r!=null&&(u.tailShift+=this.appendTail(r).tailShift),u}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new qe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,a=this.value,r=t();return this.rawInputValue=n,this.value&&this.value!==a&&a.indexOf(this.value)===0&&this.append(a.slice(this.displayValue.length),{},""),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,a=t(this);return this.state=n,delete this._isolated,a}doSkipInvalid(t,n,a){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),qe.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),qe.normalize(this.prepareChar?this.prepareChar(t,this,n):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,n,a,r,u){r===void 0&&(r=se.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),s=this.eager===!0||this.eager==="remove";let f;s&&(r=jUo(r),f=this.extractInput(0,c,{raw:!0}));let d=t;const g=new qe;if(r!==se.NONE&&(d=this.nearestInputPos(t,n>1&&t!==0&&!s?se.NONE:r),g.tailShift=d-t),g.aggregate(this.remove(d)),s&&r!==se.NONE&&f===this.rawInputValue)if(r===se.FORCE_LEFT){let _;for(;f===this.rawInputValue&&(_=this.displayValue.length);)g.aggregate(new qe({tailShift:-1})).aggregate(this.remove(_-1))}else r===se.FORCE_RIGHT&&l.unshift();return g.aggregate(this.append(a,u,l))}maskEquals(t){return this.mask===t}typedValueEquals(t){const n=this.typedValue;return t===n||Xn.EMPTY_VALUES.includes(t)&&Xn.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Xn.DEFAULTS={skipInvalid:!0},Xn.EMPTY_VALUES=[void 0,null,""],pe.Masked=Xn;class cN{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=rO(t)?new G9(String(t)):t;const n=this.chunks[this.chunks.length-1],a=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof G9)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof cN){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof pe.MaskedPattern))return new G9(this.toString()).appendTo(t);const n=new qe;for(let a=0;a<this.chunks.length&&!n.skip;++a){const r=this.chunks[a],u=t._mapPosToBlock(t.displayValue.length),c=r.stop;let l;if(c!=null&&(!u||u.index<=c)){if(r instanceof cN||t._stops.indexOf(c)>=0){const s=t._appendPlaceholder(c);n.aggregate(s)}l=r instanceof cN&&t._blocks[c]}if(l){const s=l.appendTail(r);s.skip=!1,n.aggregate(s),t._value+=s.inserted;const f=r.toString().slice(s.rawInserted.length);f&&n.aggregate(t.append(f,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...a}=t;Object.assign(this,a),this.chunks=n.map(r=>{const u="chunks"in r?new cN:new G9;return u.state=r,u})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let a=0;for(;a<this.chunks.length;){const r=this.chunks[a],u=r.unshift(n);if(r.toString()){if(!u)break;++a}else this.chunks.splice(a,1);if(u)return u}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],a=n.shift();if(n.toString()){if(!a)break;--t}else this.chunks.splice(t,1);if(a)return a}return""}}class PUo{constructor(t,n){this.masked=t,this._log=[];const{offset:a,index:r}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}}class aAn{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new qe}nearestInputPos(t,n){n===void 0&&(n=se.NONE);const a=0,r=this._value.length;switch(n){case se.LEFT:case se.FORCE_LEFT:return a;case se.NONE:case se.RIGHT:case se.FORCE_RIGHT:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){n===void 0&&(n={});const a=new qe;if(this.isFilled)return a;const r=this.eager===!0||this.eager==="append",c=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail;return c&&(a.rawInserted=this.char),this._value=a.inserted=this.char,this._isRawInput=c&&(n.raw||n.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new qe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new G9("")}appendTail(t){return rO(t)&&(t=new G9(String(t))),t.appendTo(this)}append(t,n,a){const r=this._appendChar(t[0],n);return a!=null&&(r.tailShift+=this.appendTail(a).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class qmt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...s}=t;this.masked=oN(s),Object.assign(this,{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new qe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,n){if(n===void 0&&(n={}),this.isFilled)return new qe;const a=this.masked.state,r=this.masked._appendChar(t,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r.inserted=r.rawInserted="",this.masked.state=a),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,n,a){return this.masked.append(t,this.currentMaskFlags(n),a)}_appendPlaceholder(){const t=new qe;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new qe}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,a)}nearestInputPos(t,n){n===void 0&&(n=se.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case se.LEFT:case se.FORCE_LEFT:return this.isComplete?u:a;case se.RIGHT:case se.FORCE_RIGHT:return this.isComplete?u:r;case se.NONE:default:return u}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||(t==null?void 0:t._beforeTailState)}}}qmt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class EUo extends Xn{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}pe.MaskedRegExp=EUo;class Qn extends Xn{constructor(t){super({...Qn.DEFAULTS,...t,definitions:Object.assign({},qmt.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!t)return;let a=!1,r=!1;for(let u=0;u<n.length;++u){if(this.blocks){const f=n.slice(u),d=Object.keys(this.blocks).filter(_=>f.indexOf(_)===0);d.sort((_,m)=>m.length-_.length);const g=d[0];if(g){const{expose:_,...m}=Jmt(this.blocks[g]),C=oN({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...m,parent:this});C&&(this._blocks.push(C),_&&(this.exposeBlock=C),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),u+=g.length-1;continue}}let c=n[u],l=c in t;if(c===Qn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===Qn.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const s=l?new qmt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Jmt(t[c]),parent:this}):new aAn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:n,...a}=t;this._blocks.forEach((r,u)=>r.state=n[u]),super.state=a}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new qe;let a=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(a==null)return n;this._blocks[a].isFilled&&++a;for(let r=a;r<this._blocks.length;++r){const u=this._blocks[r]._appendEager();if(!u.inserted)break;n.aggregate(u)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._mapPosToBlock(this.displayValue.length),r=new qe;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const s=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),f=s.skip;if(r.aggregate(s),f||s.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new cN;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const s=r.extractTail(c,l);s.stop=this._findStopBefore(u),s.from=this._blockStartPos(u),s instanceof cN&&(s.blockIndex=u),a.extend(s)}),a}extractInput(t,n,a){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),a===void 0&&(a={}),t===n)return"";let r="";return this._forEachBlocksInRange(t,n,(u,c,l,s)=>{r+=u.extractInput(l,s,a)}),r}_findStopBefore(t){let n;for(let a=0;a<this._stops.length;++a){const r=this._stops[a];if(r<=t)n=r;else break}return n}_appendPlaceholder(t){const n=new qe;if(this.lazy&&t==null)return n;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return n;const r=a.index,u=t??this._blocks.length;return this._blocks.slice(r,u).forEach(c=>{if(!c.lazy||t!=null){var l;const s=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=s.inserted,n.aggregate(s)}}),n}_mapPosToBlock(t){let n="";for(let a=0;a<this._blocks.length;++a){const r=this._blocks[a],u=n.length;if(n+=r.displayValue,t<=n.length)return{index:a,offset:t-u}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,a)=>n+=a.displayValue.length,0)}_forEachBlocksInRange(t,n,a){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const u=this._mapPosToBlock(n),c=u&&r.index===u.index,l=r.offset,s=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,s),u&&!c){for(let f=r.index+1;f<u.index;++f)a(this._blocks[f],f,0,this._blocks[f].displayValue.length);a(this._blocks[u.index],u.index,0,u.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=super.remove(t,n);return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a.aggregate(r.remove(c,l))}),a}nearestInputPos(t,n){if(n===void 0&&(n=se.NONE),!this._blocks.length)return 0;const a=new PUo(this,t);if(n===se.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===se.LEFT||n===se.FORCE_LEFT){if(n===se.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===se.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=t||(a.popState(),a.ok&&a.pos<=t))return a.pos;a.popState()}return a.ok?a.pos:n===se.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===se.RIGHT||n===se.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===se.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,se.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let a=0;return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a+=r.totalInputPositions(c,l)}),a}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(a=>this._blocks[a]):[]}}Qn.DEFAULTS={lazy:!0,placeholderChar:"_"},Qn.STOP_CHAR="`",Qn.ESCAPE_CHAR="\\",Qn.InputDefinition=qmt,Qn.FixedDefinition=aAn,pe.MaskedPattern=Qn;class evt extends Qn{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:a=this.from||0,maxLength:r=this.maxLength||0,autofix:u=this.autofix,...c}=t;this.to=n,this.from=a,this.maxLength=Math.max(String(n).length,r),this.autofix=u;const l=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let f=0;for(;f<s.length&&s[f]===l[f];)++f;c.mask=s.slice(0,f).replace(/0/g,"\\0")+"0".repeat(this.maxLength-f),super._update(c)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",a="";const[,r,u]=t.match(/^(\D*)(\d*)(\D*)/)||[];return u&&(n="0".repeat(r.length)+u,a="9".repeat(r.length)+u),n=n.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[n,a]}doPrepareChar(t,n){n===void 0&&(n={});let a;if([t,a]=super.doPrepareChar(t.replace(/\D/g,""),n),!this.autofix||!t)return[t,a];const r=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),c=this.value+t;if(c.length>this.maxLength)return["",a];const[l,s]=this.boundaries(c);return Number(s)<this.from?[r[c.length-1],a]:Number(l)>this.to?this.autofix==="pad"&&c.length<this.maxLength?["",a.aggregate(this.append(r[c.length-1]+t,n))]:[u[c.length-1],a]:[t,a]}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,u]=this.boundaries(n);return this.from<=Number(u)&&Number(r)<=this.to&&super.doValidate(t)}}pe.MaskedRange=evt;class lN extends Qn{constructor(t){const{mask:n,pattern:a,...r}={...lN.DEFAULTS,...t};super({...r,mask:rO(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...lN.DEFAULTS,...t},c=Object.assign({},lN.GET_DEFAULT_BLOCKS());t.min&&(c.Y.from=t.min.getFullYear()),t.max&&(c.Y.to=t.max.getFullYear()),t.min&&t.max&&c.Y.from===c.Y.to&&(c.m.from=t.min.getMonth()+1,c.m.to=t.max.getMonth()+1,c.m.from===c.m.to&&(c.d.from=t.min.getDate(),c.d.to=t.max.getDate())),Object.assign(c,this.blocks,r),Object.keys(c).forEach(l=>{const s=c[l];!("autofix"in s)&&"autofix"in t&&(s.autofix=t.autofix)}),super._update({...u,mask:rO(n)?n:a,blocks:c})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}}lN.GET_DEFAULT_BLOCKS=()=>({d:{mask:evt,from:1,to:31,maxLength:2},m:{mask:evt,from:1,to:12,maxLength:2},Y:{mask:evt,from:1900,to:9999}}),lN.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return[n,a,r].join(".")},parse:(e,t)=>{const[n,a,r]=e.split(".").map(Number);return new Date(r,a-1,n)}},pe.MaskedDate=lN;class Mgt extends Xn{constructor(t){super({...Mgt.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(n=>{const{expose:a,...r}=Jmt(n),u=oN({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return a&&(this.exposeMask=u),u}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._applyDispatch(t,n);return this.currentMask&&a.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),a}_applyDispatch(t,n,a){t===void 0&&(t=""),n===void 0&&(n={}),a===void 0&&(a="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,u=this.rawInputValue,c=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:u,l=u.slice(c.length),s=this.currentMask,f=new qe,d=s==null?void 0:s.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==s){if(this.currentMask.reset(),c){const g=this.currentMask.append(c,{raw:!0});f.tailShift=g.inserted.length-r.length}l&&(f.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else d&&(this.currentMask.state=d);return f}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const n=new qe;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,a;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((a=t._beforeTailState)==null?void 0:a.currentMask)||t._beforeTailState}}doDispatch(t,n,a){return n===void 0&&(n={}),a===void 0&&(a=""),this.dispatch(t,this,n,a)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[a,r]=super.doPrepare(t,n);if(this.currentMask){let u;[a,u]=super.doPrepare(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}doPrepareChar(t,n){n===void 0&&(n={});let[a,r]=super.doPrepareChar(t,n);if(this.currentMask){let u;[a,u]=super.doPrepareChar(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,n){const a=new qe;return this.currentMask&&a.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),a}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:a,currentMask:r,...u}=t;n&&this.compiledMasks.forEach((c,l)=>c.state=n[l]),a!=null&&(this.currentMask=a,this.currentMask.state=r),super.state=u}extractInput(t,n,a){return this.currentMask?this.currentMask.extractInput(t,n,a):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((n,a)=>{if(!t[a])return;const{mask:r,...u}=t[a];return Qmt(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}Mgt.DEFAULTS=void 0,Mgt.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const s=t.currentMask===c,f=s?c.displayValue.length:c.nearestInputPos(c.displayValue.length,se.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):s||c.remove(f),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(f,c.nearestInputPos(c.displayValue.length,se.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},pe.MaskedDynamic=Mgt;class kUo extends Qn{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...a}=t;if(n){const r=n.map(l=>l.length),u=Math.min(...r),c=Math.max(...r)-u;a.mask="*".repeat(u),c&&(a.mask+="["+"*".repeat(c)+"]"),this.enum=n}super._update(a)}doValidate(t){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}pe.MaskedEnum=kUo;class SUo extends Xn{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}pe.MaskedFunction=SUo;class Tr extends Xn{constructor(t){super({...Tr.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+UEn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(UEn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(UEn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[a,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!a&&(r.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&r.aggregate(this._appendChar("-")),[a,r]}_separatorsCount(t,n){n===void 0&&(n=!1);let a=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++a,n&&(t+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,a))}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(t,n);const a=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const u=super._appendCharRaw(t,n);this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(c);return u.tailShift+=(l-r)*this.thousandsSeparator.length,u.skip=!u.rawInserted&&t===this.thousandsSeparator,u}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,n);if(a<=t)return a}return-1}_adjustRangeWithSeparators(t,n){const a=this._findSeparatorAround(t);a>=0&&(t=a);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const a=this.value.slice(0,t),r=this.value.slice(n),u=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+r));const c=this._separatorsCountFromSlice(a);return new qe({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case se.NONE:case se.LEFT:case se.FORCE_LEFT:{const a=this._findSeparatorAround(t-1);if(a>=0){const r=a+this.thousandsSeparator.length;if(t<r||this.value.length<=r||n===se.FORCE_LEFT)return a}break}case se.RIGHT:case se.FORCE_RIGHT:{const a=this._findSeparatorAround(t);if(a>=0)return a+this.thousandsSeparator.length}}return t}doValidate(t){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const a=this.number;n=n&&!isNaN(a)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(a,r,u,c)=>r+c),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,a){n===void 0&&(n={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===Tr.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,a)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tr.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Tr.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Tr.EMPTY_VALUES.includes(t)&&Tr.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Tr.UNMASKED_RADIX=".",Tr.EMPTY_VALUES=[...Xn.EMPTY_VALUES,0],Tr.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tr.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},pe.MaskedNumber=Tr;const YEn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function iAn(e,t,n){t===void 0&&(t=YEn.MASKED),n===void 0&&(n=YEn.MASKED);const a=oN(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function DUo(e,t,n,a){return iAn(t,n,a)(e)}pe.PIPE_TYPE=YEn,pe.createPipe=iAn,pe.pipe=DUo;try{globalThis.IMask=pe}catch{}const oAn={mask:k.oneOfType([k.array,k.func,k.string,k.instanceOf(RegExp),k.oneOf([Date,Number,pe.Masked]),k.instanceOf(pe.Masked)]),value:k.any,unmask:k.oneOfType([k.bool,k.oneOf(["typed"])]),prepare:k.func,prepareChar:k.func,validate:k.func,commit:k.func,overwrite:k.oneOfType([k.bool,k.oneOf(["shift"])]),eager:k.oneOfType([k.bool,k.oneOf(["append","remove"])]),skipInvalid:k.bool,onAccept:k.func,onComplete:k.func,placeholderChar:k.string,displayChar:k.string,lazy:k.bool,definitions:k.object,blocks:k.object,enum:k.arrayOf(k.string),maxLength:k.number,from:k.number,to:k.number,pattern:k.string,format:k.func,parse:k.func,autofix:k.oneOfType([k.bool,k.oneOf(["pad"])]),radix:k.string,thousandsSeparator:k.string,mapToRadix:k.arrayOf(k.string),scale:k.number,normalizeZeros:k.bool,padFractionalZeros:k.bool,min:k.oneOfType([k.number,k.instanceOf(Date)]),max:k.oneOfType([k.number,k.instanceOf(Date)]),dispatch:k.func,inputRef:k.oneOfType([k.func,k.shape({current:k.object})])},uAn=Object.keys(oAn).filter(e=>e!=="value"),BUo=["value","unmask","onAccept","onComplete","inputRef"],WUo=uAn.filter(e=>BUo.indexOf(e)<0);function cAn(e){var t;const n=(t=class extends o.Component{constructor(u){super(u),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const u=this.props,c=this._extractMaskOptionsFromProps(u);if(c.mask)this.maskRef?(this.maskRef.updateOptions(c),"value"in u&&u.value!==void 0&&(this.maskValue=u.value)):this.initMask(c);else if(this.destroyMask(),"value"in u&&u.value!==void 0){var l;(l=this.element)!=null&&l.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=u.value:this.element.value=u.value}}componentWillUnmount(){this.destroyMask()}_inputRef(u){this.element=u,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=u:this.props.inputRef(u))}initMask(u){u===void 0&&(u=this._extractMaskOptionsFromProps(this.props)),this.maskRef=pe(this.element,u).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(u){const{...c}=u;return Object.keys(c).filter(l=>WUo.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return uAn.forEach(l=>{delete c[l]}),"defaultValue"in c||(c.defaultValue=u.mask?"":c.value),delete c.value,c}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(u){this.maskRef&&(u=u==null&&this.props.unmask!=="typed"?"":u,this.props.unmask==="typed"?this.maskRef.typedValue=u:this.props.unmask?this.maskRef.unmaskedValue=u:this.maskRef.value=u)}_onAccept(u){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,u)}_onComplete(u){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,u)}render(){return o.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),a=e.displayName||e.name||"Component";return n.displayName="IMask("+a+")",n.propTypes=oAn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const IUo=cAn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),$Uo=(e,t)=>o.createElement(IUo,{...e,ref:t});o.forwardRef($Uo);const xUo=cAn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return v.jsx(w.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),KEn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return v.jsx(xUo,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});KEn.displayName="MaskedInput";function zUo(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const HUo=i8("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${H(t.palette.grey[500],.12)}`,u={borderRadius:"0 0 3px 0",top:-6,borderBottom:r,borderRight:r},c={borderRadius:"3px 0 0 0",bottom:-6,borderTop:r,borderLeft:r},l={borderRadius:"0 3px 0 0",left:-6,borderTop:r,borderRight:r},s={borderRadius:"0 0 0 3px",right:-6,borderBottom:r,borderLeft:r};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...u,left:20},...e==="top-center"&&{...u,left:0,right:0,margin:"auto"},...e==="top-right"&&{...u,right:20},...e==="bottom-left"&&{...c,left:20},...e==="bottom-center"&&{...c,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...c,right:20},...e==="left-top"&&{...l,top:20},...e==="left-center"&&{...l,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...l,bottom:20},...e==="right-top"&&{...s,top:20},...e==="right-center"&&{...s,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...s,bottom:20}}}),AUo=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:s}=zUo(n);return v.jsxs(w.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:s,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...c,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...r}},...u,children:[!a&&v.jsx(HUo,{arrow:n}),t]})},RUo=w.styled(w.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),VUo=w.styled(w.DialogContent)({padding:"24px !important"}),FUo=w.styled(w.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),NUo=({children:e,actionsProps:t})=>v.jsx(FUo,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),lAn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...s})=>{const f=l||"modal-actions";return v.jsxs(w.Dialog,{id:l,scroll:"body",...s,onClose:c,children:[v.jsxs(RUo,{children:[r&&v.jsx(w.DialogTitle,{variant:"subtitle1",...u,children:r}),v.jsx(w.IconButton,{onClick:c,children:v.jsx(Ke,{icon:"CLOSE_MARK_BUTTON"})})]}),v.jsx(VUo,{...a,children:n}),e&&v.jsx(NUo,{actionsProps:{...t,id:f},children:e})]})},fAn=({children:e,container:t,waitBeforeShow:n=50})=>{const[a,r]=o.useState(!1);return o.useEffect(()=>{const u=setTimeout(()=>r(!0),n);return()=>clearTimeout(u)},[n]),a?vkn.createPortal(e,document.getElementById(t)||document.body):null},ZUo=({children:e,id:t="modal-actions"})=>v.jsx(fAn,{container:t,children:e}),TUo=e=>{if(!e||(e=e==null?void 0:e.replace(/[^\d]+/g,""),e.length!==11||e==="00000000000"||e==="11111111111"||e==="22222222222"||e==="33333333333"||e==="44444444444"||e==="55555555555"||e==="66666666666"||e==="77777777777"||e==="88888888888"||e==="99999999999"))return!1;let t=0;for(let a=0;a<9;a++)t+=parseInt(e.charAt(a))*(10-a);let n=11-t%11;if((n===10||n===11)&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let a=0;a<10;a++)t+=parseInt(e.charAt(a))*(11-a);return n=11-t%11,(n===10||n===11)&&(n=0),n===parseInt(e.charAt(10))},UUo=e=>{if(!e||(e=e.replace(/[^\d]+/g,""),e.length!==14)||e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999")return!1;let t=e.length-2,n=e.substring(0,t);const a=e.substring(t);let r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);let c=r%11<2?0:11-r%11;if(c!==parseInt(a.charAt(0)))return!1;t+=1,n=e.substring(0,t),r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);return c=r%11<2?0:11-r%11,c===parseInt(a.charAt(1))},tvt=(e="",t=[8,20],n=!1,a=!1,r=!1)=>{const u=e.length>=t[0]&&e.length<=t[1],c=!r||/[A-Z]/.test(e),l=!a||/[!@#$%^&*(),.?":{}|<>]/.test(e),s=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:s}},GUo=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:UUo,cpfIsValid:TUo,validatePassword:tvt},Symbol.toStringTag,{value:"Module"})),YUo=w.styled(w.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${w.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),KUo=w.styled(w.Stack)(()=>({gap:4})),nvt=w.styled(w.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:8,color:e.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:e.palette.text.primary}})),rvt=({passed:e})=>e?v.jsx(Ke,{icon:"SAVE_MARK",color:"success.main"}):v.jsx(Ke,{icon:"WARNING_TRIANGULE",color:"warning.main"}),XUo=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1})=>{const{hasSpecialCharacter:u,hasUpperCaseChar:c,isLengthValid:l,hasNumberChar:s}=tvt(e,t,n,a,r);return v.jsxs(YUo,{children:[v.jsx(w.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(KUo,{children:[v.jsxs(nvt,{children:[v.jsx(rvt,{passed:l}),v.jsxs(w.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:c}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),n&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:s}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),a&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:u}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},QUo=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(e,t,n)=>{const a=`data:application/octet-stream;base64,${n}`,r=document.createElement("a"),u=`${e.replace(t,"")}.${t}`;r.href=a,r.download=u,r.click()}},Symbol.toStringTag,{value:"Module"}));function JUo(e){return nEn({},e)}var sAn=1440,qUo=2520,XEn=43200,eGo=86400;function tGo(e,t,n){var a,r;R(2,arguments);var u=Sa(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:Mmt;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=due(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var s=nEn(JUo(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),f,d;l>0?(f=V(t),d=V(e)):(f=V(e),d=V(t));var g=zxn(d,f),_=(gue(d)-gue(f))/1e3,m=Math.round((g-_)/60),C;if(m<2)return n!=null&&n.includeSeconds?g<5?c.formatDistance("lessThanXSeconds",5,s):g<10?c.formatDistance("lessThanXSeconds",10,s):g<20?c.formatDistance("lessThanXSeconds",20,s):g<40?c.formatDistance("halfAMinute",0,s):g<60?c.formatDistance("lessThanXMinutes",1,s):c.formatDistance("xMinutes",1,s):m===0?c.formatDistance("lessThanXMinutes",1,s):c.formatDistance("xMinutes",m,s);if(m<45)return c.formatDistance("xMinutes",m,s);if(m<90)return c.formatDistance("aboutXHours",1,s);if(m<sAn){var h=Math.round(m/60);return c.formatDistance("aboutXHours",h,s)}else{if(m<qUo)return c.formatDistance("xDays",1,s);if(m<XEn){var b=Math.round(m/sAn);return c.formatDistance("xDays",b,s)}else if(m<eGo)return C=Math.round(m/XEn),c.formatDistance("aboutXMonths",C,s)}if(C=YPn(d,f),C<12){var y=Math.round(m/XEn);return c.formatDistance("xMonths",y,s)}else{var p=C%12,j=Math.floor(C/12);return p<3?c.formatDistance("aboutXYears",j,s):p<9?c.formatDistance("overXYears",j,s):c.formatDistance("almostXYears",j+1,s)}}function nGo(e,t){return R(1,arguments),tGo(e,Date.now(),t)}function rGo(e){R(1,arguments);var t=V(e),n=t.getTime();return n}function QEn(e,t){const n=t||"dd/MM/yyyy";return e?eEn(new Date(e),n):null}function aGo(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?eEn(new Date(e),n):null}function iGo(e){return e?rGo(new Date(e)):null}function oGo(e){return e?nGo(new Date(e),{addSuffix:!0}):null}function uGo(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=izn(e,t,new Date);return QPn(n)?n:null}const cGo=Object.freeze(Object.defineProperty({__proto__:null,fDate:QEn,fDateTime:aGo,fTimestamp:iGo,fToNow:oGo,stringToDate:uGo},Symbol.toStringTag,{value:"Module"}));function dAn(e){const t=(e==null?void 0:e.color)||"#000000",n=(e==null?void 0:e.blur)||6,a=(e==null?void 0:e.opacity)||.8,r=e==null?void 0:e.imgUrl;return r?{position:"relative",backgroundImage:`url(${r})`,"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:H(t,a)}}:{backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:H(t,a)}}function lGo(e){const t=(e==null?void 0:e.direction)||"to bottom",n=e==null?void 0:e.startColor,a=e==null?void 0:e.endColor,r=e==null?void 0:e.imgUrl,u=e==null?void 0:e.color;return r?{background:`linear-gradient(${t}, ${n||u}, ${a||u}), url(${r})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}:{background:`linear-gradient(${t}, ${n}, ${a})`}}function fGo(e){return{background:`-webkit-linear-gradient(${e})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}function sGo(e){return{filter:e,WebkitFilter:e,MozFilter:e}}const dGo=Object.freeze(Object.defineProperty({__proto__:null,bgBlur:dAn,bgGradient:lGo,filterStyles:sGo,hideScrollbarX:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},hideScrollbarY:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}},textGradient:fGo},Symbol.toStringTag,{value:"Module"}));function gGo(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const _Go=Object.freeze(Object.defineProperty({__proto__:null,getRoot:gGo},Symbol.toStringTag,{value:"Module"}));function mGo(e,t,n="asc"){return e.slice().sort((a,r)=>{const u=a[t],c=r[t];return u<c?n==="asc"?-1:1:u>c?n==="asc"?1:-1:0})}function vGo(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const hGo=Object.freeze(Object.defineProperty({__proto__:null,sort:mGo,updatePosition:vGo},Symbol.toStringTag,{value:"Module"})),JEn=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},CGo=Object.freeze(Object.defineProperty({__proto__:null,applyMask:JEn,cnpjMask:e=>JEn(e.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:e=>JEn(e.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function bGo(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}const yGo=e=>function(n){return v.jsx(o.Suspense,{fallback:v.jsx(Wmt,{}),children:v.jsx(e,{...n})})},avt=({children:e})=>v.jsx(w.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),pGo=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=QEn(n,"HH:mm");return a?v.jsxs(w.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",v.jsx(avt,{children:"Hoje"})," às"," ",v.jsx(avt,{children:r})]}):v.jsxs(w.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",v.jsx(avt,{children:QEn(n)})," às"," ",v.jsx(avt,{children:r})]})},OGo=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=v.jsx(w.InputAdornment,{position:a,children:v.jsx(w.IconButton,{color:"inherit",onClick:()=>{var s;e((s=c.current)==null?void 0:s.value)},children:v.jsx(Ke,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return v.jsx(w.TextField,{inputRef:c,InputProps:{onKeyDown:s=>{var f;s.key==="Enter"&&e((f=c.current)==null?void 0:f.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:s=>{if(n==="change"){e(s.target.value);return}s.target.value===""&&e(""),t&&t(s)},...u})},jGo=({children:e})=>v.jsx(w.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:v.jsxs(v.Fragment,{children:[v.jsx(Nt.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:e}),v.jsx(w.Box,{component:Nt.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,position:"absolute",border:t=>`solid 3px ${w.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(w.Box,{component:Nt.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,position:"absolute",border:t=>`solid 8px ${w.alpha(t.palette.primary.dark,.24)}`}})]})}),wGo=w.styled(w.StepConnector)(({theme:e})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:e.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:e.palette.primary.main}}})),MGo=({active:e,completed:t})=>v.jsx(w.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(Ke,{icon:"SIMPLE_CHECK",color:"primary.main"}):v.jsx(w.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),LGo=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>v.jsx(w.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(wGo,{}),sx:a,...r,children:e.map(u=>v.jsx(w.Step,{children:v.jsx(w.StepLabel,{StepIconComponent:MGo,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),PGo=w.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>v.jsx(w.Tab,{disableRipple:!0,...r,label:v.jsxs(w.Stack,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:u=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:u.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[n,e,v.jsx(Ke,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:u=>{t(),u.stopPropagation()}}),a&&v.jsx("span",{children:v.jsx("span",{})})]})}))(({theme:e})=>({textTransform:"none",fontSize:e.typography.pxToRem(14),margin:"0 !important",color:`${e.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:e.palette.primary.dark,border:`1px solid ${w.alpha(e.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${e.palette.text.primary} !important`,backgroundColor:e.palette.background.paper,borderColor:e.palette.primary.dark,svg:{color:e.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),EGo=w.styled(e=>v.jsx(w.Tabs,{...e,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),kGo=({children:e,value:t,index:n,sx:a})=>v.jsx(w.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...t.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...a},children:e}),SGo=60,DGo=w.styled(w.Stack)(({theme:e})=>({position:"sticky",width:"100%",minHeight:SGo,top:0,flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"0 24px",gap:12,borderBottom:`1px solid ${w.alpha(e.palette.grey[500],.25)}`,backgroundColor:"#fff",zIndex:999,"& .logo svg":{width:24,height:24,color:e.palette.primary.main}})),gAn=w.styled(w.Stack)({flex:1,background:`linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),
35420
+ `),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function CUo(e){e=hUo(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=nO);var u=e.onBlur;u===void 0&&(u=nO);var c=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var d=e.defaultValue,g=e.value,_=e.valueIsNumericString,m=e.onValueChange,C=FHn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=Kmt(e),b=h.decimalSeparator,y=h.allowedDecimalSeparators,p=function(z){return JHn(z,e)},j=function(z,U){return mUo(z,U,e)},E=Lue(g)?d:g,O=_??_Uo(E,f,t);Lue(g)?Lue(d)||(O=O||typeof d=="number"):O=O||typeof g=="number";var P=function(z){return NHn(z)?z:(typeof z=="number"&&(z=GHn(z)),O&&typeof l=="number"?YHn(z,l,!!s):z)},L=QHn(P(g),P(d),!!O,p,j,m),S=L[0],B=S.numAsString,A=S.formattedValue,T=L[1],me=function(z){var U=z.target,Oe=z.key,de=U.selectionStart,W=U.selectionEnd,I=U.value;if(I===void 0&&(I=""),de!==W){r(z);return}Oe==="Backspace"&&I[0]==="-"&&de===f.length+1&&n&&iN(U,1),l&&s&&(Oe==="Backspace"&&I[de-1]===b?(iN(U,de-1),z.preventDefault()):Oe==="Delete"&&I[de]===b&&z.preventDefault()),y!=null&&y.includes(Oe)&&I[de]===b&&iN(U,de+1);var Z=c===!0?",":c;Oe==="Backspace"&&I[de-1]===Z&&iN(U,de-1),Oe==="Delete"&&I[de]===Z&&iN(U,de+1),r(z)},ae=function(z){var U=B;if(U.match(/\d/g)||(U=""),a||(U=nUo(U)),s&&l&&(U=YHn(U,l,s)),U!==B){var Oe=JHn(U,e);T({formattedValue:Oe,value:U,floatValue:parseFloat(U)},{event:z,source:jgt.event})}u(z)},K=function(z){return z===b?!0:wgt(z)},Y=function(z){var U=z.currentValue,Oe=z.lastValue,de=z.formattedValue,W=z.currentValueIndex,I=z.formattedValueIndex,Z=U[W],ce=de[I],J=KHn(Oe,U),fe=J.to;return W>=fe.start&&W<fe.end&&y&&y.includes(Z)&&ce===b?!0:Z===ce};return Object.assign(Object.assign({},C),{value:A,valueIsNumericString:!1,isValidInputCharacter:K,isCharacterSame:Y,onValueChange:T,format:p,removeFormatting:j,getCaretBoundary:function(z){return vUo(z,e)},onKeyDown:me,onBlur:ae})}function bUo(e){var t=CUo(e);return o.createElement(sUo,Object.assign({},t))}const Xmt=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:s,InputProps:f,size:d,disabled:g,name:_,helperText:m,error:C,fullWidth:h,label:b,required:y,onChange:p,tabIndex:j},E)=>{const O=o.useRef(null),P=L=>{p&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{const{floatValue:S}=L,B=S||0;if(r!==void 0&&r>B){p({target:{name:_,value:r}});return}if(S!==void 0&&u<B){p({target:{name:_,value:u}});return}p({target:{name:_,value:S}})},600))};return o.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]),v.jsx(bUo,{getInputRef:E,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:P,customInput:w.TextField,InputProps:{...f},inputProps:{...s,tabIndex:j},disabled:g,size:d,helperText:m,error:C,fullWidth:h,label:b,required:y})});Xmt.displayName="NumberInput";const TEn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:s,disabled:f,tabIndex:d,...g},_)=>{const m=RHn(r,t,s),C=()=>{if(!a&&r-t<0)return;const y=r-t,p=Math.floor(r/t)*t,j=!m&&n?p:y;c!==void 0&&y<c?u(c):u(FEn(j))},h=()=>{const y=Number(r)+t,p=Math.ceil(r/t)*t,E=FEn(!m&&n?p:y);l!==void 0&&y>=l?u(l):u(c!==void 0&&E<=c?c:E)},b=y=>{const p=Number(y.target.value),j=Math.ceil(p/t)*t,E=n?j:p;if(c!==void 0&&p<=c){u(c);return}if(l!==void 0&&p>=l){u(l);return}u(E)};return v.jsx(Xmt,{ref:_,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:s,InputProps:{startAdornment:v.jsx(w.InputAdornment,{position:"start",children:v.jsx(w.IconButton,{size:"medium",disabled:f||(a?!1:!r),onClick:C,children:v.jsx(Ke,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(w.InputAdornment,{position:"end",children:v.jsx(w.IconButton,{size:"medium",onClick:h,disabled:f,children:v.jsx(Ke,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:d},onChange:b,disabled:f,...g})});TEn.displayName="Incrementer";const yUo=i8(w.Box)(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",a=t.variant==="filled",r=t.variant==="outlined",u=t.variant==="soft",c={...t.color==="default"&&{...r&&{backgroundColor:"transparent",color:e.palette.text.primary,border:`1px solid ${H(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:H(e.palette.grey[500],.16)}}},l={...t.color!=="default"&&{...a&&{color:e.palette[t.color].contrastText,backgroundColor:e.palette[t.color].main},...r&&{backgroundColor:"transparent",color:e.palette[t.color].main,border:`1px solid ${e.palette[t.color].main}`},...u&&{color:e.palette[t.color][n?"dark":"light"],backgroundColor:H(e.palette[t.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:e.spacing(0,1),color:e.palette.grey[800],fontSize:e.typography.pxToRem(12),fontFamily:e.typography.fontFamily,backgroundColor:e.palette.grey[300],fontWeight:e.typography.fontWeightBold,...l,...c}}),qHn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const s=zN(),f={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(yUo,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:s,...c,children:[a&&v.jsxs(w.Box,{sx:{mr:.75,...f},children:[" ",a," "]}),e,r&&v.jsxs(w.Box,{sx:{ml:.75,...f},children:[" ",r," "]})]})});qHn.displayName="Label";const pUo=w.styled(w.Box)({padding:"0 40px",width:"100%",minHeight:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"}),OUo=()=>v.jsx(pUo,{children:v.jsx(w.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function rO(e){return typeof e=="string"||e instanceof String}function eAn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function tAn(e,t){return Array.isArray(t)?tAn(e,(n,a)=>t.includes(a)):Object.entries(e).reduce((n,a)=>{let[r,u]=a;return t(u,r)&&(n[r]=u),n},{})}const se={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function jUo(e){switch(e){case se.LEFT:return se.FORCE_LEFT;case se.RIGHT:return se.FORCE_RIGHT;default:return e}}function UEn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Qmt(e,t){if(t===e)return!0;const n=Array.isArray(t),a=Array.isArray(e);let r;if(n&&a){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!Qmt(t[r],e[r]))return!1;return!0}if(n!=a)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const u=t instanceof Date,c=e instanceof Date;if(u&&c)return t.getTime()==e.getTime();if(u!=c)return!1;const l=t instanceof RegExp,s=e instanceof RegExp;if(l&&s)return t.toString()==e.toString();if(l!=s)return!1;const f=Object.keys(t);for(r=0;r<f.length;r++)if(!Object.prototype.hasOwnProperty.call(e,f[r]))return!1;for(r=0;r<f.length;r++)if(!Qmt(e[f[r]],t[f[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class wUo{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?se.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?se.RIGHT:se.LEFT}}function pe(e,t){return new pe.InputMask(e,t)}function nAn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?pe.MaskedRegExp:rO(e)?pe.MaskedPattern:e===Date?pe.MaskedDate:e===Number?pe.MaskedNumber:Array.isArray(e)||e===Array?pe.MaskedDynamic:pe.Masked&&e.prototype instanceof pe.Masked?e:pe.Masked&&e instanceof pe.Masked?e.constructor:e instanceof Function?pe.MaskedFunction:(console.warn("Mask not found for mask",e),pe.Masked)}function Jmt(e){if(!e)throw new Error("Options in not defined");if(pe.Masked){if(e.prototype instanceof pe.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof pe.Masked?{mask:e}:eAn(e)&&e.mask instanceof pe.Masked?e:{};if(t){const a=t.mask;return{...tAn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return eAn(e)?{...e}:{mask:e}}function oN(e){if(pe.Masked&&e instanceof pe.Masked)return e;const t=Jmt(e),n=nAn(t.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}pe.createMask=oN;class GEn{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}pe.MaskElement=GEn;class uN extends GEn{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,n,a;return(t=(n=(a=this.input).getRootNode)==null?void 0:n.call(a))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(n=>this._toggleEventHandler(uN.EVENTS_MAP[n],t[n]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,n){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),n&&(this.input.addEventListener(t,n),this._handlers[t]=n)}}uN.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},pe.HTMLMaskElement=uN;class MUo extends uN{constructor(t){super(t),this.input=t,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}pe.HTMLMaskElement=uN;class rAn extends uN{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a<r?a:r}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),a=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||a==null||a>r?a:r}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,t),a.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,u=r.getSelection&&r.getSelection();u&&(u.removeAllRanges(),u.addRange(a))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}pe.HTMLContenteditableMaskElement=rAn;class LUo{constructor(t,n){this.el=t instanceof GEn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new rAn(t):new MUo(t),this.masked=oN(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof pe.Masked)&&this.masked.constructor===nAn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof pe.Masked?t:oN({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,n){const a=this._listeners[t];a&&a.forEach(r=>r(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const t=this.masked.unmaskedValue,n=this.masked.value,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==n;this._unmaskedValue=t,this._value=n,this.el.value!==a&&(this.el.value=a),r&&this._fireChangeEvents()}updateOptions(t){const{mask:n,...a}=t,r=!this.maskEquals(n),u=!Qmt(this.masked,a);r&&(this.mask=n),u&&this.masked.updateOptions(a),(r||u)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,se.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const a=this._listeners[t].indexOf(n);return a>=0&&this._listeners[t].splice(a,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new wUo({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,u=a===this.masked.rawInputValue?n.removeDirection:se.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==se.NONE&&(c=this.masked.nearestInputPos(c,se.NONE)),this.updateControl(),this.updateCursor(c),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}pe.InputMask=LUo;class qe{static normalize(t){return Array.isArray(t)?t:[t,new qe]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}pe.ChangeDetails=qe;class G9{constructor(t,n,a){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=a}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Xn{constructor(t){this._value="",this._update({...Xn.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new G9(this.extractInput(t,n),t)}appendTail(t){return rO(t)&&(t=new G9(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new qe({inserted:t,rawInserted:t})):new qe}_appendChar(t,n,a){n===void 0&&(n={});const r=this.state;let u;if([t,u]=this.doPrepareChar(t,n),u=u.aggregate(this._appendCharRaw(t,n)),u.inserted){let c,l=this.doValidate(n)!==!1;if(l&&a!=null){const s=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let f=this.appendTail(a);l=f.rawInserted===a.toString(),!(l&&f.inserted)&&this.overwrite==="shift"&&(this.state=s,c=a.state,a.shift(),f=this.appendTail(a),l=f.rawInserted===a.toString()),l&&f.inserted&&(this.state=s)}l||(u=new qe,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new qe}_appendEager(){return new qe}append(t,n,a){if(!rO(t))throw new Error("value should be string");const r=rO(a)?new G9(String(a)):a;n!=null&&n.tail&&(n._beforeTailState=this.state);let u;[t,u]=this.doPrepare(t,n);for(let c=0;c<t.length;++c){const l=this._appendChar(t[c],n,r);if(!l.rawInserted&&!this.doSkipInvalid(t[c],n,r))break;u.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&u.aggregate(this._appendEager()),r!=null&&(u.tailShift+=this.appendTail(r).tailShift),u}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new qe}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,a=this.value,r=t();return this.rawInputValue=n,this.value&&this.value!==a&&a.indexOf(this.value)===0&&this.append(a.slice(this.displayValue.length),{},""),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,a=t(this);return this.state=n,delete this._isolated,a}doSkipInvalid(t,n,a){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),qe.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),qe.normalize(this.prepareChar?this.prepareChar(t,this,n):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,n,a,r,u){r===void 0&&(r=se.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),s=this.eager===!0||this.eager==="remove";let f;s&&(r=jUo(r),f=this.extractInput(0,c,{raw:!0}));let d=t;const g=new qe;if(r!==se.NONE&&(d=this.nearestInputPos(t,n>1&&t!==0&&!s?se.NONE:r),g.tailShift=d-t),g.aggregate(this.remove(d)),s&&r!==se.NONE&&f===this.rawInputValue)if(r===se.FORCE_LEFT){let _;for(;f===this.rawInputValue&&(_=this.displayValue.length);)g.aggregate(new qe({tailShift:-1})).aggregate(this.remove(_-1))}else r===se.FORCE_RIGHT&&l.unshift();return g.aggregate(this.append(a,u,l))}maskEquals(t){return this.mask===t}typedValueEquals(t){const n=this.typedValue;return t===n||Xn.EMPTY_VALUES.includes(t)&&Xn.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Xn.DEFAULTS={skipInvalid:!0},Xn.EMPTY_VALUES=[void 0,null,""],pe.Masked=Xn;class cN{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=rO(t)?new G9(String(t)):t;const n=this.chunks[this.chunks.length-1],a=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof G9)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof cN){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof pe.MaskedPattern))return new G9(this.toString()).appendTo(t);const n=new qe;for(let a=0;a<this.chunks.length&&!n.skip;++a){const r=this.chunks[a],u=t._mapPosToBlock(t.displayValue.length),c=r.stop;let l;if(c!=null&&(!u||u.index<=c)){if(r instanceof cN||t._stops.indexOf(c)>=0){const s=t._appendPlaceholder(c);n.aggregate(s)}l=r instanceof cN&&t._blocks[c]}if(l){const s=l.appendTail(r);s.skip=!1,n.aggregate(s),t._value+=s.inserted;const f=r.toString().slice(s.rawInserted.length);f&&n.aggregate(t.append(f,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...a}=t;Object.assign(this,a),this.chunks=n.map(r=>{const u="chunks"in r?new cN:new G9;return u.state=r,u})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let a=0;for(;a<this.chunks.length;){const r=this.chunks[a],u=r.unshift(n);if(r.toString()){if(!u)break;++a}else this.chunks.splice(a,1);if(u)return u}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],a=n.shift();if(n.toString()){if(!a)break;--t}else this.chunks.splice(t,1);if(a)return a}return""}}class PUo{constructor(t,n){this.masked=t,this._log=[];const{offset:a,index:r}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}}class aAn{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new qe}nearestInputPos(t,n){n===void 0&&(n=se.NONE);const a=0,r=this._value.length;switch(n){case se.LEFT:case se.FORCE_LEFT:return a;case se.NONE:case se.RIGHT:case se.FORCE_RIGHT:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){n===void 0&&(n={});const a=new qe;if(this.isFilled)return a;const r=this.eager===!0||this.eager==="append",c=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail;return c&&(a.rawInserted=this.char),this._value=a.inserted=this.char,this._isRawInput=c&&(n.raw||n.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new qe;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new G9("")}appendTail(t){return rO(t)&&(t=new G9(String(t))),t.appendTo(this)}append(t,n,a){const r=this._appendChar(t[0],n);return a!=null&&(r.tailShift+=this.appendTail(a).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class qmt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...s}=t;this.masked=oN(s),Object.assign(this,{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new qe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,n){if(n===void 0&&(n={}),this.isFilled)return new qe;const a=this.masked.state,r=this.masked._appendChar(t,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r.inserted=r.rawInserted="",this.masked.state=a),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,n,a){return this.masked.append(t,this.currentMaskFlags(n),a)}_appendPlaceholder(){const t=new qe;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new qe}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,a)}nearestInputPos(t,n){n===void 0&&(n=se.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case se.LEFT:case se.FORCE_LEFT:return this.isComplete?u:a;case se.RIGHT:case se.FORCE_RIGHT:return this.isComplete?u:r;case se.NONE:default:return u}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||(t==null?void 0:t._beforeTailState)}}}qmt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class EUo extends Xn{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}pe.MaskedRegExp=EUo;class Qn extends Xn{constructor(t){super({...Qn.DEFAULTS,...t,definitions:Object.assign({},qmt.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!t)return;let a=!1,r=!1;for(let u=0;u<n.length;++u){if(this.blocks){const f=n.slice(u),d=Object.keys(this.blocks).filter(_=>f.indexOf(_)===0);d.sort((_,m)=>m.length-_.length);const g=d[0];if(g){const{expose:_,...m}=Jmt(this.blocks[g]),C=oN({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...m,parent:this});C&&(this._blocks.push(C),_&&(this.exposeBlock=C),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),u+=g.length-1;continue}}let c=n[u],l=c in t;if(c===Qn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===Qn.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const s=l?new qmt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Jmt(t[c]),parent:this}):new aAn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:n,...a}=t;this._blocks.forEach((r,u)=>r.state=n[u]),super.state=a}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new qe;let a=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(a==null)return n;this._blocks[a].isFilled&&++a;for(let r=a;r<this._blocks.length;++r){const u=this._blocks[r]._appendEager();if(!u.inserted)break;n.aggregate(u)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._mapPosToBlock(this.displayValue.length),r=new qe;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const s=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),f=s.skip;if(r.aggregate(s),f||s.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new cN;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const s=r.extractTail(c,l);s.stop=this._findStopBefore(u),s.from=this._blockStartPos(u),s instanceof cN&&(s.blockIndex=u),a.extend(s)}),a}extractInput(t,n,a){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),a===void 0&&(a={}),t===n)return"";let r="";return this._forEachBlocksInRange(t,n,(u,c,l,s)=>{r+=u.extractInput(l,s,a)}),r}_findStopBefore(t){let n;for(let a=0;a<this._stops.length;++a){const r=this._stops[a];if(r<=t)n=r;else break}return n}_appendPlaceholder(t){const n=new qe;if(this.lazy&&t==null)return n;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return n;const r=a.index,u=t??this._blocks.length;return this._blocks.slice(r,u).forEach(c=>{if(!c.lazy||t!=null){var l;const s=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=s.inserted,n.aggregate(s)}}),n}_mapPosToBlock(t){let n="";for(let a=0;a<this._blocks.length;++a){const r=this._blocks[a],u=n.length;if(n+=r.displayValue,t<=n.length)return{index:a,offset:t-u}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,a)=>n+=a.displayValue.length,0)}_forEachBlocksInRange(t,n,a){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const u=this._mapPosToBlock(n),c=u&&r.index===u.index,l=r.offset,s=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,s),u&&!c){for(let f=r.index+1;f<u.index;++f)a(this._blocks[f],f,0,this._blocks[f].displayValue.length);a(this._blocks[u.index],u.index,0,u.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=super.remove(t,n);return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a.aggregate(r.remove(c,l))}),a}nearestInputPos(t,n){if(n===void 0&&(n=se.NONE),!this._blocks.length)return 0;const a=new PUo(this,t);if(n===se.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===se.LEFT||n===se.FORCE_LEFT){if(n===se.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===se.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=t||(a.popState(),a.ok&&a.pos<=t))return a.pos;a.popState()}return a.ok?a.pos:n===se.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===se.RIGHT||n===se.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===se.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,se.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let a=0;return this._forEachBlocksInRange(t,n,(r,u,c,l)=>{a+=r.totalInputPositions(c,l)}),a}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(a=>this._blocks[a]):[]}}Qn.DEFAULTS={lazy:!0,placeholderChar:"_"},Qn.STOP_CHAR="`",Qn.ESCAPE_CHAR="\\",Qn.InputDefinition=qmt,Qn.FixedDefinition=aAn,pe.MaskedPattern=Qn;class evt extends Qn{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:a=this.from||0,maxLength:r=this.maxLength||0,autofix:u=this.autofix,...c}=t;this.to=n,this.from=a,this.maxLength=Math.max(String(n).length,r),this.autofix=u;const l=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let f=0;for(;f<s.length&&s[f]===l[f];)++f;c.mask=s.slice(0,f).replace(/0/g,"\\0")+"0".repeat(this.maxLength-f),super._update(c)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",a="";const[,r,u]=t.match(/^(\D*)(\d*)(\D*)/)||[];return u&&(n="0".repeat(r.length)+u,a="9".repeat(r.length)+u),n=n.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[n,a]}doPrepareChar(t,n){n===void 0&&(n={});let a;if([t,a]=super.doPrepareChar(t.replace(/\D/g,""),n),!this.autofix||!t)return[t,a];const r=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),c=this.value+t;if(c.length>this.maxLength)return["",a];const[l,s]=this.boundaries(c);return Number(s)<this.from?[r[c.length-1],a]:Number(l)>this.to?this.autofix==="pad"&&c.length<this.maxLength?["",a.aggregate(this.append(r[c.length-1]+t,n))]:[u[c.length-1],a]:[t,a]}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,u]=this.boundaries(n);return this.from<=Number(u)&&Number(r)<=this.to&&super.doValidate(t)}}pe.MaskedRange=evt;class lN extends Qn{constructor(t){const{mask:n,pattern:a,...r}={...lN.DEFAULTS,...t};super({...r,mask:rO(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...lN.DEFAULTS,...t},c=Object.assign({},lN.GET_DEFAULT_BLOCKS());t.min&&(c.Y.from=t.min.getFullYear()),t.max&&(c.Y.to=t.max.getFullYear()),t.min&&t.max&&c.Y.from===c.Y.to&&(c.m.from=t.min.getMonth()+1,c.m.to=t.max.getMonth()+1,c.m.from===c.m.to&&(c.d.from=t.min.getDate(),c.d.to=t.max.getDate())),Object.assign(c,this.blocks,r),Object.keys(c).forEach(l=>{const s=c[l];!("autofix"in s)&&"autofix"in t&&(s.autofix=t.autofix)}),super._update({...u,mask:rO(n)?n:a,blocks:c})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}}lN.GET_DEFAULT_BLOCKS=()=>({d:{mask:evt,from:1,to:31,maxLength:2},m:{mask:evt,from:1,to:12,maxLength:2},Y:{mask:evt,from:1900,to:9999}}),lN.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return[n,a,r].join(".")},parse:(e,t)=>{const[n,a,r]=e.split(".").map(Number);return new Date(r,a-1,n)}},pe.MaskedDate=lN;class Mgt extends Xn{constructor(t){super({...Mgt.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(n=>{const{expose:a,...r}=Jmt(n),u=oN({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return a&&(this.exposeMask=u),u}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const a=this._applyDispatch(t,n);return this.currentMask&&a.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),a}_applyDispatch(t,n,a){t===void 0&&(t=""),n===void 0&&(n={}),a===void 0&&(a="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,u=this.rawInputValue,c=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:u,l=u.slice(c.length),s=this.currentMask,f=new qe,d=s==null?void 0:s.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==s){if(this.currentMask.reset(),c){const g=this.currentMask.append(c,{raw:!0});f.tailShift=g.inserted.length-r.length}l&&(f.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else d&&(this.currentMask.state=d);return f}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const n=new qe;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,a;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((a=t._beforeTailState)==null?void 0:a.currentMask)||t._beforeTailState}}doDispatch(t,n,a){return n===void 0&&(n={}),a===void 0&&(a=""),this.dispatch(t,this,n,a)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[a,r]=super.doPrepare(t,n);if(this.currentMask){let u;[a,u]=super.doPrepare(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}doPrepareChar(t,n){n===void 0&&(n={});let[a,r]=super.doPrepareChar(t,n);if(this.currentMask){let u;[a,u]=super.doPrepareChar(a,this.currentMaskFlags(n)),r=r.aggregate(u)}return[a,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,n){const a=new qe;return this.currentMask&&a.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),a}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:a,currentMask:r,...u}=t;n&&this.compiledMasks.forEach((c,l)=>c.state=n[l]),a!=null&&(this.currentMask=a,this.currentMask.state=r),super.state=u}extractInput(t,n,a){return this.currentMask?this.currentMask.extractInput(t,n,a):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((n,a)=>{if(!t[a])return;const{mask:r,...u}=t[a];return Qmt(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}Mgt.DEFAULTS=void 0,Mgt.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const s=t.currentMask===c,f=s?c.displayValue.length:c.nearestInputPos(c.displayValue.length,se.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):s||c.remove(f),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(f,c.nearestInputPos(c.displayValue.length,se.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},pe.MaskedDynamic=Mgt;class kUo extends Qn{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...a}=t;if(n){const r=n.map(l=>l.length),u=Math.min(...r),c=Math.max(...r)-u;a.mask="*".repeat(u),c&&(a.mask+="["+"*".repeat(c)+"]"),this.enum=n}super._update(a)}doValidate(t){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}pe.MaskedEnum=kUo;class SUo extends Xn{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}pe.MaskedFunction=SUo;class Tr extends Xn{constructor(t){super({...Tr.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+UEn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(UEn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(UEn(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[a,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!a&&(r.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&r.aggregate(this._appendChar("-")),[a,r]}_separatorsCount(t,n){n===void 0&&(n=!1);let a=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++a,n&&(t+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,a){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,a))}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(t,n);const a=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const u=super._appendCharRaw(t,n);this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(c);return u.tailShift+=(l-r)*this.thousandsSeparator.length,u.skip=!u.rawInserted&&t===this.thousandsSeparator,u}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,n);if(a<=t)return a}return-1}_adjustRangeWithSeparators(t,n){const a=this._findSeparatorAround(t);a>=0&&(t=a);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const a=this.value.slice(0,t),r=this.value.slice(n),u=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+r));const c=this._separatorsCountFromSlice(a);return new qe({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case se.NONE:case se.LEFT:case se.FORCE_LEFT:{const a=this._findSeparatorAround(t-1);if(a>=0){const r=a+this.thousandsSeparator.length;if(t<r||this.value.length<=r||n===se.FORCE_LEFT)return a}break}case se.RIGHT:case se.FORCE_RIGHT:{const a=this._findSeparatorAround(t);if(a>=0)return a+this.thousandsSeparator.length}}return t}doValidate(t){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const a=this.number;n=n&&!isNaN(a)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(a,r,u,c)=>r+c),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,a){n===void 0&&(n={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===Tr.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,a)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tr.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Tr.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Tr.EMPTY_VALUES.includes(t)&&Tr.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Tr.UNMASKED_RADIX=".",Tr.EMPTY_VALUES=[...Xn.EMPTY_VALUES,0],Tr.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tr.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},pe.MaskedNumber=Tr;const YEn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function iAn(e,t,n){t===void 0&&(t=YEn.MASKED),n===void 0&&(n=YEn.MASKED);const a=oN(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function DUo(e,t,n,a){return iAn(t,n,a)(e)}pe.PIPE_TYPE=YEn,pe.createPipe=iAn,pe.pipe=DUo;try{globalThis.IMask=pe}catch{}const oAn={mask:k.oneOfType([k.array,k.func,k.string,k.instanceOf(RegExp),k.oneOf([Date,Number,pe.Masked]),k.instanceOf(pe.Masked)]),value:k.any,unmask:k.oneOfType([k.bool,k.oneOf(["typed"])]),prepare:k.func,prepareChar:k.func,validate:k.func,commit:k.func,overwrite:k.oneOfType([k.bool,k.oneOf(["shift"])]),eager:k.oneOfType([k.bool,k.oneOf(["append","remove"])]),skipInvalid:k.bool,onAccept:k.func,onComplete:k.func,placeholderChar:k.string,displayChar:k.string,lazy:k.bool,definitions:k.object,blocks:k.object,enum:k.arrayOf(k.string),maxLength:k.number,from:k.number,to:k.number,pattern:k.string,format:k.func,parse:k.func,autofix:k.oneOfType([k.bool,k.oneOf(["pad"])]),radix:k.string,thousandsSeparator:k.string,mapToRadix:k.arrayOf(k.string),scale:k.number,normalizeZeros:k.bool,padFractionalZeros:k.bool,min:k.oneOfType([k.number,k.instanceOf(Date)]),max:k.oneOfType([k.number,k.instanceOf(Date)]),dispatch:k.func,inputRef:k.oneOfType([k.func,k.shape({current:k.object})])},uAn=Object.keys(oAn).filter(e=>e!=="value"),BUo=["value","unmask","onAccept","onComplete","inputRef"],WUo=uAn.filter(e=>BUo.indexOf(e)<0);function cAn(e){var t;const n=(t=class extends o.Component{constructor(u){super(u),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const u=this.props,c=this._extractMaskOptionsFromProps(u);if(c.mask)this.maskRef?(this.maskRef.updateOptions(c),"value"in u&&u.value!==void 0&&(this.maskValue=u.value)):this.initMask(c);else if(this.destroyMask(),"value"in u&&u.value!==void 0){var l;(l=this.element)!=null&&l.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=u.value:this.element.value=u.value}}componentWillUnmount(){this.destroyMask()}_inputRef(u){this.element=u,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=u:this.props.inputRef(u))}initMask(u){u===void 0&&(u=this._extractMaskOptionsFromProps(this.props)),this.maskRef=pe(this.element,u).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(u){const{...c}=u;return Object.keys(c).filter(l=>WUo.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return uAn.forEach(l=>{delete c[l]}),"defaultValue"in c||(c.defaultValue=u.mask?"":c.value),delete c.value,c}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(u){this.maskRef&&(u=u==null&&this.props.unmask!=="typed"?"":u,this.props.unmask==="typed"?this.maskRef.typedValue=u:this.props.unmask?this.maskRef.unmaskedValue=u:this.maskRef.value=u)}_onAccept(u){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,u)}_onComplete(u){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,u)}render(){return o.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},t.displayName=void 0,t.propTypes=void 0,t),a=e.displayName||e.name||"Component";return n.displayName="IMask("+a+")",n.propTypes=oAn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const IUo=cAn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),$Uo=(e,t)=>o.createElement(IUo,{...e,ref:t});o.forwardRef($Uo);const xUo=cAn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return v.jsx(w.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),KEn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return v.jsx(xUo,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});KEn.displayName="MaskedInput";function zUo(e){let t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return t}const HUo=i8("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${H(t.palette.grey[500],.12)}`,u={borderRadius:"0 0 3px 0",top:-6,borderBottom:r,borderRight:r},c={borderRadius:"3px 0 0 0",bottom:-6,borderTop:r,borderLeft:r},l={borderRadius:"0 3px 0 0",left:-6,borderTop:r,borderRight:r},s={borderRadius:"0 0 0 3px",right:-6,borderBottom:r,borderLeft:r};return{display:"none",[t.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:t.palette.background.paper},...e==="top-left"&&{...u,left:20},...e==="top-center"&&{...u,left:0,right:0,margin:"auto"},...e==="top-right"&&{...u,right:20},...e==="bottom-left"&&{...c,left:20},...e==="bottom-center"&&{...c,left:0,right:0,margin:"auto"},...e==="bottom-right"&&{...c,right:20},...e==="left-top"&&{...l,top:20},...e==="left-center"&&{...l,top:0,bottom:0,margin:"auto"},...e==="left-bottom"&&{...l,bottom:20},...e==="right-top"&&{...s,top:20},...e==="right-center"&&{...s,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...s,bottom:20}}}),AUo=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:s}=zUo(n);return v.jsxs(w.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:s,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...c,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...r}},...u,children:[!a&&v.jsx(HUo,{arrow:n}),t]})},RUo=w.styled(w.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),VUo=w.styled(w.DialogContent)({padding:"24px !important"}),FUo=w.styled(w.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),NUo=({children:e,actionsProps:t})=>v.jsx(FUo,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),lAn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...s})=>{const f=l||"modal-actions";return v.jsxs(w.Dialog,{id:l,scroll:"body",...s,onClose:c,children:[v.jsxs(RUo,{children:[r&&v.jsx(w.DialogTitle,{variant:"subtitle1",...u,children:r}),v.jsx(w.IconButton,{onClick:c,children:v.jsx(Ke,{icon:"CLOSE_MARK_BUTTON"})})]}),v.jsx(VUo,{...a,children:n}),e&&v.jsx(NUo,{actionsProps:{...t,id:f},children:e})]})},fAn=({children:e,container:t,waitBeforeShow:n=50})=>{const[a,r]=o.useState(!1);return o.useEffect(()=>{const u=setTimeout(()=>r(!0),n);return()=>clearTimeout(u)},[n]),a?vkn.createPortal(e,document.getElementById(t)||document.body):null},ZUo=({children:e,id:t="modal-actions"})=>v.jsx(fAn,{container:t,children:e}),TUo=e=>{if(!e||(e=e==null?void 0:e.replace(/[^\d]+/g,""),e.length!==11||e==="00000000000"||e==="11111111111"||e==="22222222222"||e==="33333333333"||e==="44444444444"||e==="55555555555"||e==="66666666666"||e==="77777777777"||e==="88888888888"||e==="99999999999"))return!1;let t=0;for(let a=0;a<9;a++)t+=parseInt(e.charAt(a))*(10-a);let n=11-t%11;if((n===10||n===11)&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let a=0;a<10;a++)t+=parseInt(e.charAt(a))*(11-a);return n=11-t%11,(n===10||n===11)&&(n=0),n===parseInt(e.charAt(10))},UUo=e=>{if(!e||(e=e.replace(/[^\d]+/g,""),e.length!==14)||e==="00000000000000"||e==="11111111111111"||e==="22222222222222"||e==="33333333333333"||e==="44444444444444"||e==="55555555555555"||e==="66666666666666"||e==="77777777777777"||e==="88888888888888"||e==="99999999999999")return!1;let t=e.length-2,n=e.substring(0,t);const a=e.substring(t);let r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);let c=r%11<2?0:11-r%11;if(c!==parseInt(a.charAt(0)))return!1;t+=1,n=e.substring(0,t),r=0,u=t-7;for(let l=t;l>=1;l--)r+=parseInt(n.charAt(t-l))*u--,u<2&&(u=9);return c=r%11<2?0:11-r%11,c===parseInt(a.charAt(1))},tvt=(e="",t=[8,20],n=!1,a=!1,r=!1)=>{const u=e.length>=t[0]&&e.length<=t[1],c=!r||/[A-Z]/.test(e),l=!a||/[!@#$%^&*(),.?":{}|<>]/.test(e),s=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:s}},GUo=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:UUo,cpfIsValid:TUo,validatePassword:tvt},Symbol.toStringTag,{value:"Module"})),YUo=w.styled(w.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${w.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),KUo=w.styled(w.Stack)(()=>({gap:4})),nvt=w.styled(w.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",gap:8,color:e.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:e.palette.text.primary}})),rvt=({passed:e})=>e?v.jsx(Ke,{icon:"SAVE_MARK",color:"success.main"}):v.jsx(Ke,{icon:"WARNING_TRIANGULE",color:"warning.main"}),XUo=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1})=>{const{hasSpecialCharacter:u,hasUpperCaseChar:c,isLengthValid:l,hasNumberChar:s}=tvt(e,t,n,a,r);return v.jsxs(YUo,{children:[v.jsx(w.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(KUo,{children:[v.jsxs(nvt,{children:[v.jsx(rvt,{passed:l}),v.jsxs(w.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:c}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),n&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:s}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),a&&v.jsxs(nvt,{children:[v.jsx(rvt,{passed:u}),v.jsxs(w.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},QUo=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(e,t,n)=>{const a=`data:application/octet-stream;base64,${n}`,r=document.createElement("a"),u=`${e.replace(t,"")}.${t}`;r.href=a,r.download=u,r.click()}},Symbol.toStringTag,{value:"Module"}));function JUo(e){return nEn({},e)}var sAn=1440,qUo=2520,XEn=43200,eGo=86400;function tGo(e,t,n){var a,r;R(2,arguments);var u=Sa(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:Mmt;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=due(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var s=nEn(JUo(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),f,d;l>0?(f=V(t),d=V(e)):(f=V(e),d=V(t));var g=zxn(d,f),_=(gue(d)-gue(f))/1e3,m=Math.round((g-_)/60),C;if(m<2)return n!=null&&n.includeSeconds?g<5?c.formatDistance("lessThanXSeconds",5,s):g<10?c.formatDistance("lessThanXSeconds",10,s):g<20?c.formatDistance("lessThanXSeconds",20,s):g<40?c.formatDistance("halfAMinute",0,s):g<60?c.formatDistance("lessThanXMinutes",1,s):c.formatDistance("xMinutes",1,s):m===0?c.formatDistance("lessThanXMinutes",1,s):c.formatDistance("xMinutes",m,s);if(m<45)return c.formatDistance("xMinutes",m,s);if(m<90)return c.formatDistance("aboutXHours",1,s);if(m<sAn){var h=Math.round(m/60);return c.formatDistance("aboutXHours",h,s)}else{if(m<qUo)return c.formatDistance("xDays",1,s);if(m<XEn){var b=Math.round(m/sAn);return c.formatDistance("xDays",b,s)}else if(m<eGo)return C=Math.round(m/XEn),c.formatDistance("aboutXMonths",C,s)}if(C=YPn(d,f),C<12){var y=Math.round(m/XEn);return c.formatDistance("xMonths",y,s)}else{var p=C%12,j=Math.floor(C/12);return p<3?c.formatDistance("aboutXYears",j,s):p<9?c.formatDistance("overXYears",j,s):c.formatDistance("almostXYears",j+1,s)}}function nGo(e,t){return R(1,arguments),tGo(e,Date.now(),t)}function rGo(e){R(1,arguments);var t=V(e),n=t.getTime();return n}function QEn(e,t){const n=t||"dd/MM/yyyy";return e?eEn(new Date(e),n):null}function aGo(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?eEn(new Date(e),n):null}function iGo(e){return e?rGo(new Date(e)):null}function oGo(e){return e?nGo(new Date(e),{addSuffix:!0}):null}function uGo(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=izn(e,t,new Date);return QPn(n)?n:null}const cGo=Object.freeze(Object.defineProperty({__proto__:null,fDate:QEn,fDateTime:aGo,fTimestamp:iGo,fToNow:oGo,stringToDate:uGo},Symbol.toStringTag,{value:"Module"}));function dAn(e){const t=(e==null?void 0:e.color)||"#000000",n=(e==null?void 0:e.blur)||6,a=(e==null?void 0:e.opacity)||.8,r=e==null?void 0:e.imgUrl;return r?{position:"relative",backgroundImage:`url(${r})`,"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:H(t,a)}}:{backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:H(t,a)}}function lGo(e){const t=(e==null?void 0:e.direction)||"to bottom",n=e==null?void 0:e.startColor,a=e==null?void 0:e.endColor,r=e==null?void 0:e.imgUrl,u=e==null?void 0:e.color;return r?{background:`linear-gradient(${t}, ${n||u}, ${a||u}), url(${r})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}:{background:`linear-gradient(${t}, ${n}, ${a})`}}function fGo(e){return{background:`-webkit-linear-gradient(${e})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}function sGo(e){return{filter:e,WebkitFilter:e,MozFilter:e}}const dGo=Object.freeze(Object.defineProperty({__proto__:null,bgBlur:dAn,bgGradient:lGo,filterStyles:sGo,hideScrollbarX:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},hideScrollbarY:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}},textGradient:fGo},Symbol.toStringTag,{value:"Module"}));function gGo(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const _Go=Object.freeze(Object.defineProperty({__proto__:null,getRoot:gGo},Symbol.toStringTag,{value:"Module"}));function mGo(e,t,n="asc"){return e.slice().sort((a,r)=>{const u=a[t],c=r[t];return u<c?n==="asc"?-1:1:u>c?n==="asc"?1:-1:0})}function vGo(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const hGo=Object.freeze(Object.defineProperty({__proto__:null,sort:mGo,updatePosition:vGo},Symbol.toStringTag,{value:"Module"})),JEn=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},CGo=Object.freeze(Object.defineProperty({__proto__:null,applyMask:JEn,cnpjMask:e=>JEn(e.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:e=>JEn(e.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function bGo(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}const yGo=e=>function(n){return v.jsx(o.Suspense,{fallback:v.jsx(Wmt,{}),children:v.jsx(e,{...n})})},avt=({children:e})=>v.jsx(w.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),pGo=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=QEn(n,"HH:mm");return a?v.jsxs(w.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",v.jsx(avt,{children:"Hoje"})," às"," ",v.jsx(avt,{children:r})]}):v.jsxs(w.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",v.jsx(avt,{children:QEn(n)})," às"," ",v.jsx(avt,{children:r})]})},OGo=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=v.jsx(w.InputAdornment,{position:a,children:v.jsx(w.IconButton,{color:"inherit",onClick:()=>{var s;e((s=c.current)==null?void 0:s.value)},children:v.jsx(Ke,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return v.jsx(w.TextField,{inputRef:c,InputProps:{onKeyDown:s=>{var f;s.key==="Enter"&&e((f=c.current)==null?void 0:f.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:s=>{if(n==="change"){e(s.target.value);return}s.target.value===""&&e(""),t&&t(s)},...u})},jGo=({children:e})=>v.jsx(w.Box,{sx:{right:0,width:1,bottom:0,height:1,zIndex:9998,display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",bgcolor:"background.default"},children:v.jsxs(v.Fragment,{children:[v.jsx(Nt.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:e}),v.jsx(w.Box,{component:Nt.div,animate:{scale:[1.6,1,1,1.6,1.6],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,position:"absolute",border:t=>`solid 3px ${w.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(w.Box,{component:Nt.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,position:"absolute",border:t=>`solid 8px ${w.alpha(t.palette.primary.dark,.24)}`}})]})}),wGo=w.styled(w.StepConnector)(({theme:e})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:e.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:e.palette.primary.main}}})),MGo=({active:e,completed:t})=>v.jsx(w.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(Ke,{icon:"SIMPLE_CHECK",color:"primary.main"}):v.jsx(w.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),LGo=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>v.jsx(w.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(wGo,{}),sx:a,...r,children:e.map(u=>v.jsx(w.Step,{children:v.jsx(w.StepLabel,{StepIconComponent:MGo,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),PGo=w.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>v.jsx(w.Tab,{disableRipple:!0,...r,label:v.jsxs(w.Stack,{position:"relative",direction:"row",alignItems:"center",gap:1.5,sx:u=>({"> span":{position:"absolute",top:-14,right:-10,span:{position:"fixed",width:10,height:10,backgroundColor:u.palette.warning.main,border:"1px solid #fff",borderRadius:"50%",zIndex:999}}}),children:[n,e,v.jsx(Ke,{icon:"CLOSE_MARK_BUTTON",width:16,onClick:u=>{t(),u.stopPropagation()}}),a&&v.jsx("span",{children:v.jsx("span",{})})]})}))(({theme:e})=>({textTransform:"none",fontSize:e.typography.pxToRem(14),margin:"0 !important",color:`${e.palette.primary.lighter} !important`,minHeight:"initial",padding:"10px 16px",backgroundColor:e.palette.primary.dark,border:`1px solid ${w.alpha(e.palette.primary.darker,.25)}`,borderBottom:0,borderRadius:"8px 8px 0 0",fontWeight:600,overflow:"initial !important",lineHeight:1,"&.Mui-selected":{color:`${e.palette.text.primary} !important`,backgroundColor:e.palette.background.paper,borderColor:e.palette.primary.dark,svg:{color:e.palette.text.disabled}},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"svg:hover":{opacity:.85}})),EGo=w.styled(e=>v.jsx(w.Tabs,{...e,variant:"scrollable",scrollButtons:"auto"}))({height:"100%",alignItems:"flex-end",gap:8,"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"},"& > .MuiButtonBase-root":{height:32,width:32,color:"#fff",marginBottom:2},"& .MuiTabs-flexContainer":{gap:4}}),kGo=({children:e,value:t,index:n,sx:a})=>v.jsx(w.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...t.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...a},children:e}),SGo=60,DGo=w.styled(w.Stack)(({theme:e})=>({position:"sticky",width:"100%",minHeight:SGo,top:0,flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"0 24px",gap:12,borderBottom:`1px solid ${w.alpha(e.palette.grey[500],.25)}`,backgroundColor:"#fff",zIndex:999,"& .logo svg":{width:24,height:24,color:e.palette.primary.main}})),gAn=w.styled(w.Stack)({flex:1,background:`linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),
35421
35421
  linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space),
35422
35422
  var(--dot-color)`});gAn.defaultProps={style:{"--dot-bg":"#F1F2FD","--dot-color":"#000","--dot-size":"1px","--dot-space":"56px"}};const BGo=({children:e,header:t,onClickHelp:n})=>v.jsxs(v.Fragment,{children:[v.jsxs(DGo,{children:[t,v.jsx(w.Stack,{direction:"row",alignItems:"center",gap:2,children:v.jsx(Gzn,{onClick:n,children:"Ajuda"})})]}),v.jsx(gAn,{children:e})]});function Pue(e,t,n,a){function r(u){return u instanceof n?u:new n(function(c){c(u)})}return new(n||(n=Promise))(function(u,c){function l(d){try{f(a.next(d))}catch(g){c(g)}}function s(d){try{f(a.throw(d))}catch(g){c(g)}}function f(d){d.done?u(d.value):r(d.value).then(l,s)}f((a=a.apply(e,t||[])).next())})}function Eue(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,r,u,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(f){return function(d){return s([f,d])}}function s(f){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,f[0]&&(n=0)),n;)try{if(a=1,r&&(u=f[0]&2?r.return:f[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,f[1])).done)return u;switch(r=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,r=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){n.label=f[1];break}if(f[0]===6&&n.label<u[1]){n.label=u[1],u=f;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(f);break}u[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(d){f=[6,d],r=0}finally{a=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function _An(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,u=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)u.push(r.value)}catch(l){c={error:l}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return u}function mAn(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,u;a<r;a++)(u||!(a in t))&&(u||(u=Array.prototype.slice.call(t,0,a)),u[a]=t[a]);return e.concat(u||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var WGo=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Lgt(e,t){var n=IGo(e);if(typeof n.path!="string"){var a=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof a=="string"&&a.length>0?a:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function IGo(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var a=t.split(".").pop().toLowerCase(),r=WGo.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var $Go=[".DS_Store","Thumbs.db"];function xGo(e){return Pue(this,void 0,void 0,function(){return Eue(this,function(t){return ivt(e)&&zGo(e.dataTransfer)?[2,VGo(e.dataTransfer,e.type)]:HGo(e)?[2,AGo(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,RGo(e)]:[2,[]]})})}function zGo(e){return ivt(e)}function HGo(e){return ivt(e)&&ivt(e.target)}function ivt(e){return typeof e=="object"&&e!==null}function AGo(e){return qEn(e.target.files).map(function(t){return Lgt(t)})}function RGo(e){return Pue(this,void 0,void 0,function(){var t;return Eue(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(a){return a.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(a){return Lgt(a)})]}})})}function VGo(e,t){return Pue(this,void 0,void 0,function(){var n,a;return Eue(this,function(r){switch(r.label){case 0:return e.items?(n=qEn(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(FGo))]):[3,2];case 1:return a=r.sent(),[2,vAn(hAn(a))];case 2:return[2,vAn(qEn(e.files).map(function(u){return Lgt(u)}))]}})})}function vAn(e){return e.filter(function(t){return $Go.indexOf(t.name)===-1})}function qEn(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var a=e[n];t.push(a)}return t}function FGo(e){if(typeof e.webkitGetAsEntry!="function")return CAn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?bAn(t):CAn(e)}function hAn(e){return e.reduce(function(t,n){return mAn(mAn([],_An(t),!1),_An(Array.isArray(n)?hAn(n):[n]),!1)},[])}function CAn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Lgt(t);return Promise.resolve(n)}function NGo(e){return Pue(this,void 0,void 0,function(){return Eue(this,function(t){return[2,e.isDirectory?bAn(e):ZGo(e)]})})}function bAn(e){var t=e.createReader();return new Promise(function(n,a){var r=[];function u(){var c=this;t.readEntries(function(l){return Pue(c,void 0,void 0,function(){var s,f,d;return Eue(this,function(g){switch(g.label){case 0:if(l.length)return[3,5];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return s=g.sent(),n(s),[3,4];case 3:return f=g.sent(),a(f),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(NGo)),r.push(d),u(),g.label=6;case 6:return[2]}})})},function(l){a(l)})}u()})}function ZGo(e){return Pue(this,void 0,void 0,function(){return Eue(this,function(t){return[2,new Promise(function(n,a){e.file(function(r){var u=Lgt(r,e.fullPath);n(u)},function(r){a(r)})})]})})}var TGo=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",r=(e.type||"").toLowerCase(),u=r.replace(/\/.*$/,"");return n.some(function(c){var l=c.trim().toLowerCase();return l.charAt(0)==="."?a.toLowerCase().endsWith(l):l.endsWith("/*")?u===l.replace(/\/.*$/,""):r===l})}return!0};function yAn(e){return YGo(e)||GGo(e)||wAn(e)||UGo()}function UGo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35423
35423
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GGo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YGo(e){if(Array.isArray(e))return ekn(e)}function pAn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function OAn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pAn(Object(n),!0).forEach(function(a){jAn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pAn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jAn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pgt(e,t){return QGo(e)||XGo(e,t)||wAn(e,t)||KGo()}function KGo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
3
  "private": false,
4
- "version": "1.1.99",
4
+ "version": "1.2.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",