@zydon/common 1.2.11 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAoMA,QAAA,MAAM,GAAG,+CAgCR,CAAC;AAEF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAqMA,QAAA,MAAM,GAAG,+CA4DR,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordRules/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AAY3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2E/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordRules/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AAY3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6E/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/PasswordField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqF/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/PasswordField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4F/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -5,5 +5,9 @@ export type PasswordFieldProps = BaseField<TextFieldProps> & {
5
5
  specialCharacter?: boolean;
6
6
  upperCaseChar?: boolean;
7
7
  numberChar?: boolean;
8
+ showErrorMessage?: boolean;
9
+ match?: {
10
+ fieldPassword: string;
11
+ };
8
12
  };
9
13
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/PasswordField/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC,cAAc,CAAC,GAAG;IAC3D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/PasswordField/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC,cAAc,CAAC,GAAG;IAC3D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE;QACN,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,CAAC"}
@@ -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-7ec1a48a.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-d30e2227.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";
@@ -6737,7 +6737,7 @@ const N2u = ({
6737
6737
  ...a,
6738
6738
  children: n
6739
6739
  }
6740
- ), bn1 = () => import("./features-e96f9064.js").then((e) => e.default), nHn = ({ children: e }) => /* @__PURE__ */ m.jsx(iQr, { strict: !0, features: bn1, children: /* @__PURE__ */ m.jsxs(Wn.div, { style: { height: "100%" }, children: [
6740
+ ), bn1 = () => import("./features-526ecab1.js").then((e) => e.default), nHn = ({ children: e }) => /* @__PURE__ */ m.jsx(iQr, { strict: !0, features: bn1, children: /* @__PURE__ */ m.jsxs(Wn.div, { style: { height: "100%" }, children: [
6741
6741
  " ",
6742
6742
  e,
6743
6743
  " "
@@ -273720,7 +273720,7 @@ const Uau = Rt("span")(({
273720
273720
  ] }),
273721
273721
  u && /* @__PURE__ */ m.jsxs(nse, { children: [
273722
273722
  /* @__PURE__ */ m.jsx(rse, { passed: u.passwordMatch }),
273723
- /* @__PURE__ */ m.jsx(dt, { component: "div", children: "As senha devem ser iguais" })
273723
+ /* @__PURE__ */ m.jsx(dt, { component: "div", children: "Senha e confirmação de senha devem ser iguais" })
273724
273724
  ] })
273725
273725
  ] })
273726
273726
  ] });
@@ -277562,15 +277562,17 @@ const gNn = ({
277562
277562
  specialCharacter: r,
277563
277563
  upperCaseChar: u,
277564
277564
  numberChar: c,
277565
- ...l
277565
+ showErrorMessage: l,
277566
+ match: f,
277567
+ ...s
277566
277568
  }) => {
277567
- const { watch: f } = At(), s = f(e), [d, g] = ct(!1), {
277568
- hasNumberChar: _,
277569
- hasSpecialCharacter: v,
277570
- hasUpperCaseChar: C,
277571
- isLengthValid: h
277569
+ const { watch: d } = At(), g = d(e), [_, v] = ct(!1), {
277570
+ hasNumberChar: C,
277571
+ hasSpecialCharacter: h,
277572
+ hasUpperCaseChar: b,
277573
+ isLengthValid: p
277572
277574
  } = Lvt(
277573
- s,
277575
+ g,
277574
277576
  a,
277575
277577
  c,
277576
277578
  r,
@@ -277579,22 +277581,17 @@ const gNn = ({
277579
277581
  return /* @__PURE__ */ m.jsx(
277580
277582
  gn,
277581
277583
  {
277582
- ...l,
277584
+ ...s,
277583
277585
  name: e,
277584
- type: d ? "text" : "password",
277586
+ type: _ ? "text" : "password",
277585
277587
  InputProps: {
277586
277588
  endAdornment: /* @__PURE__ */ m.jsx(EN, { position: "end", children: /* @__PURE__ */ m.jsx(
277587
277589
  _n,
277588
277590
  {
277589
- onClick: () => g(!d),
277591
+ onClick: () => v(!_),
277590
277592
  edge: "end",
277591
277593
  "aria-label": "Mostrar/Ocultar senha",
277592
- children: /* @__PURE__ */ m.jsx(
277593
- lt,
277594
- {
277595
- icon: d ? "VIEW_OFF" : "VIEW_ON"
277596
- }
277597
- )
277594
+ children: /* @__PURE__ */ m.jsx(lt, { icon: _ ? "VIEW_OFF" : "VIEW_ON" })
277598
277595
  }
277599
277596
  ) })
277600
277597
  },
@@ -277602,22 +277599,22 @@ const gNn = ({
277602
277599
  ...n,
277603
277600
  validate: {
277604
277601
  ...n == null ? void 0 : n.validate,
277605
- validationPassword: (b) => {
277606
- const p = Lvt(
277607
- b,
277602
+ validationPassword: (y) => {
277603
+ const M = Lvt(
277604
+ y,
277608
277605
  a,
277609
277606
  c,
277610
277607
  r,
277611
277608
  u
277612
277609
  );
277613
- return !p.hasNumberChar || !p.hasSpecialCharacter || !p.hasUpperCaseChar || !p.isLengthValid ? "Senha inválida" : !0;
277610
+ return !M.hasNumberChar || !M.hasSpecialCharacter || !M.hasUpperCaseChar || !M.isLengthValid ? "Senha inválida" : f && f.fieldPassword && d(f.fieldPassword) !== y ? "As senhas devem ser iguais" : !0;
277614
277611
  }
277615
277612
  }
277616
277613
  },
277617
277614
  sx: {
277618
277615
  ...t,
277619
277616
  "& .MuiFormHelperText-root": {
277620
- display: !v || !C || !h || !_ ? "none" : void 0
277617
+ display: (!h || !b || !p || !C) && !l ? "none" : void 0
277621
277618
  }
277622
277619
  }
277623
277620
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aa as c, aU as d, ab as m, aV as p, ac as C, ad as v, bH as T, bL as S, bK as g, bJ as k, aW as A, aY as P, aZ as I, ae as h, af as F, ag as B, ah as x, ai as y, aj as D, ak as M, a_ as f, a$ as w, b0 as R, al as E, bc as L, am as N, an as U, ao as W, be as H, b1 as O, ap as G, b2 as V, aq as q, ar as z, bf as K, as as Z, at as j, au as J, b3 as Q, av as X, a8 as Y, aw as _, ax as $, b4 as aa, bA as sa, ay as ea, az as oa, aA as ra, bh as ta, bi as ba, bg as ia, aX as na, aB as la, b5 as ua, b6 as ca, aC as da, aD as ma, b7 as pa, aE as Ca, aF as va, aG as Ta, bB as Sa, bC as ga, aH as ka, aI as Aa, aJ as Pa, aK as Ia, b8 as ha, bj as Fa, aL as Ba, bP as xa, bQ as ya, bN as Da, bS as Ma, bR as fa, bO as wa, bd as Ra, aM as Ea, aN as La, b9 as Na, bD as Ua, aO as Wa, aP as Ha, ba as Oa, aQ as Ga, aR as Va, bb as qa, aT as za, aS as Ka, bE as Za, ce as ja, c8 as Ja, bT as Qa, bF as Xa, c5 as Ya, c6 as _a, c7 as $a, bU as as, cg as ss, cd as es, cc as os, c9 as rs, ca as ts, bV as bs, bI as is, bW as ns, bX as ls, bY as us, bZ as cs, b_ as ds, a9 as ms, c4 as ps, c3 as Cs, c2 as vs, b$ as Ts, bG as Ss, bM as gs, c0 as ks, c1 as As, cf as Ps, cb as Is, bx as hs, by as Fs, bz as Bs, bq as xs, bt as ys, bl as Ds, bn as Ms, bs as fs, bk as ws, br as Rs, bp as Es, bo as Ls, bv as Ns, bw as Us, bu as Ws, bm as Hs } from "./index-7ec1a48a.js";
1
+ import { aa as c, aU as d, ab as m, aV as p, ac as C, ad as v, bH as T, bL as S, bK as g, bJ as k, aW as A, aY as P, aZ as I, ae as h, af as F, ag as B, ah as x, ai as y, aj as D, ak as M, a_ as f, a$ as w, b0 as R, al as E, bc as L, am as N, an as U, ao as W, be as H, b1 as O, ap as G, b2 as V, aq as q, ar as z, bf as K, as as Z, at as j, au as J, b3 as Q, av as X, a8 as Y, aw as _, ax as $, b4 as aa, bA as sa, ay as ea, az as oa, aA as ra, bh as ta, bi as ba, bg as ia, aX as na, aB as la, b5 as ua, b6 as ca, aC as da, aD as ma, b7 as pa, aE as Ca, aF as va, aG as Ta, bB as Sa, bC as ga, aH as ka, aI as Aa, aJ as Pa, aK as Ia, b8 as ha, bj as Fa, aL as Ba, bP as xa, bQ as ya, bN as Da, bS as Ma, bR as fa, bO as wa, bd as Ra, aM as Ea, aN as La, b9 as Na, bD as Ua, aO as Wa, aP as Ha, ba as Oa, aQ as Ga, aR as Va, bb as qa, aT as za, aS as Ka, bE as Za, ce as ja, c8 as Ja, bT as Qa, bF as Xa, c5 as Ya, c6 as _a, c7 as $a, bU as as, cg as ss, cd as es, cc as os, c9 as rs, ca as ts, bV as bs, bI as is, bW as ns, bX as ls, bY as us, bZ as cs, b_ as ds, a9 as ms, c4 as ps, c3 as Cs, c2 as vs, b$ as Ts, bG as Ss, bM as gs, c0 as ks, c1 as As, cf as Ps, cb as Is, bx as hs, by as Fs, bz as Bs, bq as xs, bt as ys, bl as Ds, bn as Ms, bs as fs, bk as ws, br as Rs, bp as Es, bo as Ls, bv as Ns, bw as Us, bu as Ws, bm as Hs } from "./index-d30e2227.js";
2
2
  import "react";
3
3
  import "@mui/material";
4
4
  import "@emotion/react";
@@ -35499,8 +35499,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
35499
35499
  Prefix can't start with '-' when allowNegative is true.
35500
35500
  prefix: `+r+`
35501
35501
  allowNegative: `+u+`
35502
- `),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function Fr2(e){e=Vr2(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=zO);var u=e.onBlur;u===void 0&&(u=zO);var c=e.thousandSeparator,l=e.decimalScale,f=e.fixedDecimalScale,s=e.prefix;s===void 0&&(s="");var d=e.defaultValue,g=e.value,_=e.valueIsNumericString,m=e.onValueChange,C=YTn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=Xht(e),b=h.decimalSeparator,p=h.allowedDecimalSeparators,y=function($){return aZn($,e)},w=function($,F){return Ar2($,F,e)},L=Dce(g)?d:g,j=_??Hr2(L,s,t);Dce(g)?Dce(d)||(j=j||typeof d=="number"):j=j||typeof g=="number";var P=function($){return KTn($)?$:(typeof $=="number"&&($=qTn($)),j&&typeof l=="number"?eZn($,l,!!f):$)},k=rZn(P(g),P(d),!!j,y,w,m),D=k[0],S=D.numAsString,B=D.formattedValue,z=k[1],V=function($){var F=$.target,ne=$.key,re=F.selectionStart,H=F.selectionEnd,R=F.value;if(R===void 0&&(R=""),re!==H){r($);return}ne==="Backspace"&&R[0]==="-"&&re===s.length+1&&n&&JN(F,1),l&&f&&(ne==="Backspace"&&R[re-1]===b?(JN(F,re-1),$.preventDefault()):ne==="Delete"&&R[re]===b&&$.preventDefault()),p!=null&&p.includes(ne)&&R[re]===b&&JN(F,re+1);var G=c===!0?",":c;ne==="Backspace"&&R[re-1]===G&&JN(F,re-1),ne==="Delete"&&R[re]===G&&JN(F,re+1),r($)},I=function($){var F=S;if(F.match(/\d/g)||(F=""),a||(F=Lr2(F)),f&&l&&(F=eZn(F,l,f)),F!==S){var ne=aZn(F,e);z({formattedValue:ne,value:F,floatValue:parseFloat(F)},{event:$,source:R_t.event})}u($)},x=function($){return $===b?!0:V_t($)},N=function($){var F=$.currentValue,ne=$.lastValue,re=$.formattedValue,H=$.currentValueIndex,R=$.formattedValueIndex,G=F[H],ue=re[R],q=tZn(ne,F),de=q.to;return H>=de.start&&H<de.end&&p&&p.includes(G)&&ue===b?!0:G===ue};return Object.assign(Object.assign({},C),{value:B,valueIsNumericString:!1,isValidInputCharacter:x,isCharacterSame:N,onValueChange:z,format:y,removeFormatting:w,getCaretBoundary:function($){return Rr2($,e)},onKeyDown:V,onBlur:I})}function Nr2(e){var t=Fr2(e);return o.createElement($r2,Object.assign({},t))}const Qht=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:f,InputProps:s,size:d,disabled:g,name:_,helperText:m,error:C,fullWidth:h,label:b,required:p,onChange:y,tabIndex:w},L)=>{const j=o.useRef(null),P=k=>{y&&(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{const{floatValue:D}=k,S=D||0;if(r!==void 0&&r>S){y({target:{name:_,value:r}});return}if(D!==void 0&&u<S){y({target:{name:_,value:u}});return}y({target:{name:_,value:D}})},600))};return o.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]),v.jsx(Nr2,{getInputRef:L,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:P,customInput:E.TextField,InputProps:{...s},inputProps:{...f,tabIndex:w},disabled:g,size:d,helperText:m,error:C,fullWidth:h,label:b,required:p})});Qht.displayName="NumberInput";const XDn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:f,disabled:s,tabIndex:d,...g},_)=>{const m=UTn(r,t,f),C=()=>{if(!a&&r-t<0)return;const p=r-t,y=Math.floor(r/t)*t,w=!m&&n?y:p;c!==void 0&&p<c?u(c):u(GDn(w))},h=()=>{const p=Number(r)+t,y=Math.ceil(r/t)*t,L=GDn(!m&&n?y:p);l!==void 0&&p>=l?u(l):u(c!==void 0&&L<=c?c:L)},b=p=>{const y=Number(p.target.value),w=Math.ceil(y/t)*t,L=n?w:y;if(c!==void 0&&y<=c){u(c);return}if(l!==void 0&&y>=l){u(l);return}u(L)};return v.jsx(Qht,{ref:_,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:f,InputProps:{startAdornment:v.jsx(E.InputAdornment,{position:"start",children:v.jsx(E.IconButton,{size:"medium",disabled:s||(a?!1:!r),onClick:C,children:v.jsx(tt,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{size:"medium",onClick:h,disabled:s,children:v.jsx(tt,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:d},onChange:b,disabled:s,...g})});XDn.displayName="Incrementer";const Tr2=Ht(E.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 ${Y(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:Y(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:Y(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}}),iZn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const f=kr(),s={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(Tr2,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:f,...c,children:[a&&v.jsxs(E.Box,{sx:{mr:.75,...s},children:[" ",a," "]}),e,r&&v.jsxs(E.Box,{sx:{ml:.75,...s},children:[" ",r," "]})]})});iZn.displayName="Label";const Zr2=E.styled(E.Box)({padding:"0 40px",width:"100%",minHeight:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"}),Ur2=()=>v.jsx(Zr2,{children:v.jsx(E.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function HO(e){return typeof e=="string"||e instanceof String}function oZn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function uZn(e,t){return Array.isArray(t)?uZn(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 Me={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gr2(e){switch(e){case Me.LEFT:return Me.FORCE_LEFT;case Me.RIGHT:return Me.FORCE_RIGHT;default:return e}}function QDn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Jht(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(!Jht(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,f=e instanceof RegExp;if(l&&f)return t.toString()==e.toString();if(l!=f)return!1;const s=Object.keys(t);for(r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;for(r=0;r<s.length;r++)if(!Jht(e[s[r]],t[s[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class Yr2{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?Me.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Me.RIGHT:Me.LEFT}}function De(e,t){return new De.InputMask(e,t)}function cZn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?De.MaskedRegExp:HO(e)?De.MaskedPattern:e===Date?De.MaskedDate:e===Number?De.MaskedNumber:Array.isArray(e)||e===Array?De.MaskedDynamic:De.Masked&&e.prototype instanceof De.Masked?e:De.Masked&&e instanceof De.Masked?e.constructor:e instanceof Function?De.MaskedFunction:(console.warn("Mask not found for mask",e),De.Masked)}function qht(e){if(!e)throw new Error("Options in not defined");if(De.Masked){if(e.prototype instanceof De.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof De.Masked?{mask:e}:oZn(e)&&e.mask instanceof De.Masked?e:{};if(t){const a=t.mask;return{...uZn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return oZn(e)?{...e}:{mask:e}}function qN(e){if(De.Masked&&e instanceof De.Masked)return e;const t=qht(e),n=cZn(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)}De.createMask=qN;class JDn{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}}De.MaskElement=JDn;class eT extends JDn{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(eT.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)}}eT.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},De.HTMLMaskElement=eT;class Kr2 extends eT{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}}De.HTMLMaskElement=eT;class lZn extends eT{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}}De.HTMLContenteditableMaskElement=lZn;class Xr2{constructor(t,n){this.el=t instanceof JDn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new lZn(t):new Kr2(t),this.masked=qN(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 De.Masked)&&this.masked.constructor===cZn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof De.Masked?t:qN({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=!Jht(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,Me.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 Yr2({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:Me.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==Me.NONE&&(c=this.masked.nearestInputPos(c,Me.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}}De.InputMask=Xr2;class dt{static normalize(t){return Array.isArray(t)?t:[t,new dt]}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}}De.ChangeDetails=dt;class w8{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 Or{constructor(t){this._value="",this._update({...Or.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 w8(this.extractInput(t,n),t)}appendTail(t){return HO(t)&&(t=new w8(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new dt({inserted:t,rawInserted:t})):new dt}_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 f=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let s=this.appendTail(a);l=s.rawInserted===a.toString(),!(l&&s.inserted)&&this.overwrite==="shift"&&(this.state=f,c=a.state,a.shift(),s=this.appendTail(a),l=s.rawInserted===a.toString()),l&&s.inserted&&(this.state=f)}l||(u=new dt,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new dt}_appendEager(){return new dt}append(t,n,a){if(!HO(t))throw new Error("value should be string");const r=HO(a)?new w8(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 dt}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={}),dt.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),dt.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=Me.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),f=this.eager===!0||this.eager==="remove";let s;f&&(r=Gr2(r),s=this.extractInput(0,c,{raw:!0}));let d=t;const g=new dt;if(r!==Me.NONE&&(d=this.nearestInputPos(t,n>1&&t!==0&&!f?Me.NONE:r),g.tailShift=d-t),g.aggregate(this.remove(d)),f&&r!==Me.NONE&&s===this.rawInputValue)if(r===Me.FORCE_LEFT){let _;for(;s===this.rawInputValue&&(_=this.displayValue.length);)g.aggregate(new dt({tailShift:-1})).aggregate(this.remove(_-1))}else r===Me.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||Or.EMPTY_VALUES.includes(t)&&Or.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Or.DEFAULTS={skipInvalid:!0},Or.EMPTY_VALUES=[void 0,null,""],De.Masked=Or;class tT{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=HO(t)?new w8(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 w8)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof tT){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 De.MaskedPattern))return new w8(this.toString()).appendTo(t);const n=new dt;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 tT||t._stops.indexOf(c)>=0){const f=t._appendPlaceholder(c);n.aggregate(f)}l=r instanceof tT&&t._blocks[c]}if(l){const f=l.appendTail(r);f.skip=!1,n.aggregate(f),t._value+=f.inserted;const s=r.toString().slice(f.rawInserted.length);s&&n.aggregate(t.append(s,{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 tT:new w8;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 Qr2{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,Me.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Me.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Me.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Me.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,Me.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Me.NONE),!0})}}class fZn{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 dt}nearestInputPos(t,n){n===void 0&&(n=Me.NONE);const a=0,r=this._value.length;switch(n){case Me.LEFT:case Me.FORCE_LEFT:return a;case Me.NONE:case Me.RIGHT:case Me.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 dt;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 dt;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new w8("")}appendTail(t){return HO(t)&&(t=new w8(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 eCt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...f}=t;this.masked=qN(f),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 dt}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 dt;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 dt;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new dt}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=Me.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case Me.LEFT:case Me.FORCE_LEFT:return this.isComplete?u:a;case Me.RIGHT:case Me.FORCE_RIGHT:return this.isComplete?u:r;case Me.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)}}}eCt.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 Jr2 extends Or{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}De.MaskedRegExp=Jr2;class jr extends Or{constructor(t){super({...jr.DEFAULTS,...t,definitions:Object.assign({},eCt.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 s=n.slice(u),d=Object.keys(this.blocks).filter(_=>s.indexOf(_)===0);d.sort((_,m)=>m.length-_.length);const g=d[0];if(g){const{expose:_,...m}=qht(this.blocks[g]),C=qN({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===jr.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===jr.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const f=l?new eCt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...qht(t[c]),parent:this}):new fZn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(f)}}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 dt;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 dt;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const f=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),s=f.skip;if(r.aggregate(f),s||f.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new tT;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const f=r.extractTail(c,l);f.stop=this._findStopBefore(u),f.from=this._blockStartPos(u),f instanceof tT&&(f.blockIndex=u),a.extend(f)}),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,f)=>{r+=u.extractInput(l,f,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 dt;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 f=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=f.inserted,n.aggregate(f)}}),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,f=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,f),u&&!c){for(let s=r.index+1;s<u.index;++s)a(this._blocks[s],s,0,this._blocks[s].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=Me.NONE),!this._blocks.length)return 0;const a=new Qr2(this,t);if(n===Me.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===Me.LEFT||n===Me.FORCE_LEFT){if(n===Me.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===Me.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===Me.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===Me.RIGHT||n===Me.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===Me.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,Me.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]):[]}}jr.DEFAULTS={lazy:!0,placeholderChar:"_"},jr.STOP_CHAR="`",jr.ESCAPE_CHAR="\\",jr.InputDefinition=eCt,jr.FixedDefinition=fZn,De.MaskedPattern=jr;class tCt extends jr{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"),f=String(this.to).padStart(this.maxLength,"0");let s=0;for(;s<f.length&&f[s]===l[s];)++s;c.mask=f.slice(0,s).replace(/0/g,"\\0")+"0".repeat(this.maxLength-s),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,f]=this.boundaries(c);return Number(f)<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)}}De.MaskedRange=tCt;class nT extends jr{constructor(t){const{mask:n,pattern:a,...r}={...nT.DEFAULTS,...t};super({...r,mask:HO(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...nT.DEFAULTS,...t},c=Object.assign({},nT.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 f=c[l];!("autofix"in f)&&"autofix"in t&&(f.autofix=t.autofix)}),super._update({...u,mask:HO(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)}}nT.GET_DEFAULT_BLOCKS=()=>({d:{mask:tCt,from:1,to:31,maxLength:2},m:{mask:tCt,from:1,to:12,maxLength:2},Y:{mask:tCt,from:1900,to:9999}}),nT.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)}},De.MaskedDate=nT;class F_t extends Or{constructor(t){super({...F_t.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}=qht(n),u=qN({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),f=this.currentMask,s=new dt,d=f==null?void 0:f.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==f){if(this.currentMask.reset(),c){const g=this.currentMask.append(c,{raw:!0});s.tailShift=g.inserted.length-r.length}l&&(s.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else d&&(this.currentMask.state=d);return s}_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 dt;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 dt;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 Jht(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}F_t.DEFAULTS=void 0,F_t.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const f=t.currentMask===c,s=f?c.displayValue.length:c.nearestInputPos(c.displayValue.length,Me.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):f||c.remove(s),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(s,c.nearestInputPos(c.displayValue.length,Me.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},De.MaskedDynamic=F_t;class qr2 extends jr{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)}}De.MaskedEnum=qr2;class e12 extends Or{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}De.MaskedFunction=e12;class O1 extends Or{constructor(t){super({...O1.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+QDn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(QDn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(QDn(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 dt({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case Me.NONE:case Me.LEFT:case Me.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===Me.FORCE_LEFT)return a}break}case Me.RIGHT:case Me.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===O1.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,O1.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(O1.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)||O1.EMPTY_VALUES.includes(t)&&O1.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}O1.UNMASKED_RADIX=".",O1.EMPTY_VALUES=[...Or.EMPTY_VALUES,0],O1.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O1.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})},De.MaskedNumber=O1;const qDn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function sZn(e,t,n){t===void 0&&(t=qDn.MASKED),n===void 0&&(n=qDn.MASKED);const a=qN(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function t12(e,t,n,a){return sZn(t,n,a)(e)}De.PIPE_TYPE=qDn,De.createPipe=sZn,De.pipe=t12;try{globalThis.IMask=De}catch{}const dZn={mask:M.oneOfType([M.array,M.func,M.string,M.instanceOf(RegExp),M.oneOf([Date,Number,De.Masked]),M.instanceOf(De.Masked)]),value:M.any,unmask:M.oneOfType([M.bool,M.oneOf(["typed"])]),prepare:M.func,prepareChar:M.func,validate:M.func,commit:M.func,overwrite:M.oneOfType([M.bool,M.oneOf(["shift"])]),eager:M.oneOfType([M.bool,M.oneOf(["append","remove"])]),skipInvalid:M.bool,onAccept:M.func,onComplete:M.func,placeholderChar:M.string,displayChar:M.string,lazy:M.bool,definitions:M.object,blocks:M.object,enum:M.arrayOf(M.string),maxLength:M.number,from:M.number,to:M.number,pattern:M.string,format:M.func,parse:M.func,autofix:M.oneOfType([M.bool,M.oneOf(["pad"])]),radix:M.string,thousandsSeparator:M.string,mapToRadix:M.arrayOf(M.string),scale:M.number,normalizeZeros:M.bool,padFractionalZeros:M.bool,min:M.oneOfType([M.number,M.instanceOf(Date)]),max:M.oneOfType([M.number,M.instanceOf(Date)]),dispatch:M.func,inputRef:M.oneOfType([M.func,M.shape({current:M.object})])},gZn=Object.keys(dZn).filter(e=>e!=="value"),n12=["value","unmask","onAccept","onComplete","inputRef"],r12=gZn.filter(e=>n12.indexOf(e)<0);function _Zn(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=De(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=>r12.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return gZn.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=dZn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const a12=_Zn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),i12=(e,t)=>o.createElement(a12,{...e,ref:t});o.forwardRef(i12);const o12=_Zn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return v.jsx(E.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),eBn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return v.jsx(o12,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});eBn.displayName="MaskedInput";function u12(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 c12=Ht("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${Y(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},f={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"&&{...f,top:20},...e==="right-center"&&{...f,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...f,bottom:20}}}),l12=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:f}=u12(n);return v.jsxs(E.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:f,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(c12,{arrow:n}),t]})},f12=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),s12=E.styled(E.DialogContent)({padding:"24px !important"}),d12=E.styled(E.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),g12=({children:e,actionsProps:t})=>v.jsx(d12,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),mZn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...f})=>{const s=l||"modal-actions";return v.jsxs(E.Dialog,{id:l,scroll:"body",...f,onClose:c,children:[v.jsxs(f12,{children:[r&&v.jsx(E.DialogTitle,{variant:"subtitle1",...u,children:r}),v.jsx(E.IconButton,{onClick:c,children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON"})})]}),v.jsx(s12,{...a,children:n}),e&&v.jsx(g12,{actionsProps:{...t,id:s},children:e})]})},vZn=({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?hCt.createPortal(e,document.getElementById(t)||document.body):null},_12=({children:e,id:t="modal-actions"})=>v.jsx(vZn,{container:t,children:e}),m12=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))},v12=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))},nCt=(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),f=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:f}},h12=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:v12,cpfIsValid:m12,validatePassword:nCt},Symbol.toStringTag,{value:"Module"})),C12=E.styled(E.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${E.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),b12=E.styled(E.Stack)(()=>({gap:4})),N_t=E.styled(E.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}})),T_t=({passed:e})=>e?v.jsx(tt,{icon:"SAVE_MARK",color:"success.main"}):v.jsx(tt,{icon:"WARNING_TRIANGULE",color:"warning.main"}),y12=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1,match:u})=>{const{hasSpecialCharacter:c,hasUpperCaseChar:l,isLengthValid:f,hasNumberChar:s}=nCt(e,t,n,a,r);return v.jsxs(C12,{children:[v.jsx(E.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(b12,{children:[v.jsxs(N_t,{children:[v.jsx(T_t,{passed:f}),v.jsxs(E.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:l}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),n&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:s}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),a&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:c}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]}),u&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:u.passwordMatch}),v.jsx(E.Typography,{component:"div",children:"As senha devem ser iguais"})]})]})]})},p12=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 O12(e){return MDn({},e)}var hZn=1440,j12=2520,tBn=43200,w12=86400;function M12(e,t,n){var a,r;ee(2,arguments);var u=di(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:Bht;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=hce(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f=MDn(O12(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),s,d;l>0?(s=te(t),d=te(e)):(s=te(e),d=te(t));var g=bNn(d,s),_=(Cce(d)-Cce(s))/1e3,m=Math.round((g-_)/60),C;if(m<2)return n!=null&&n.includeSeconds?g<5?c.formatDistance("lessThanXSeconds",5,f):g<10?c.formatDistance("lessThanXSeconds",10,f):g<20?c.formatDistance("lessThanXSeconds",20,f):g<40?c.formatDistance("halfAMinute",0,f):g<60?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",1,f):m===0?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",m,f);if(m<45)return c.formatDistance("xMinutes",m,f);if(m<90)return c.formatDistance("aboutXHours",1,f);if(m<hZn){var h=Math.round(m/60);return c.formatDistance("aboutXHours",h,f)}else{if(m<j12)return c.formatDistance("xDays",1,f);if(m<tBn){var b=Math.round(m/hZn);return c.formatDistance("xDays",b,f)}else if(m<w12)return C=Math.round(m/tBn),c.formatDistance("aboutXMonths",C,f)}if(C=hDn(d,s),C<12){var p=Math.round(m/tBn);return c.formatDistance("xMonths",p,f)}else{var y=C%12,w=Math.floor(C/12);return y<3?c.formatDistance("aboutXYears",w,f):y<9?c.formatDistance("overXYears",w,f):c.formatDistance("almostXYears",w+1,f)}}function L12(e,t){return ee(1,arguments),M12(e,Date.now(),t)}function P12(e){ee(1,arguments);var t=te(e),n=t.getTime();return n}function nBn(e,t){const n=t||"dd/MM/yyyy";return e?jDn(new Date(e),n):null}function E12(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?jDn(new Date(e),n):null}function k12(e){return e?P12(new Date(e)):null}function S12(e){return e?L12(new Date(e),{addSuffix:!0}):null}function D12(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=VNn(e,t,new Date);return yDn(n)?n:null}const B12=Object.freeze(Object.defineProperty({__proto__:null,fDate:nBn,fDateTime:E12,fTimestamp:k12,fToNow:S12,stringToDate:D12},Symbol.toStringTag,{value:"Module"}));function W12(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const I12=Object.freeze(Object.defineProperty({__proto__:null,getRoot:W12},Symbol.toStringTag,{value:"Module"}));function $12(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 x12(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const z12=Object.freeze(Object.defineProperty({__proto__:null,sort:$12,updatePosition:x12},Symbol.toStringTag,{value:"Module"})),rBn=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},H12=Object.freeze(Object.defineProperty({__proto__:null,applyMask:rBn,cnpjMask:e=>rBn(e.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:e=>rBn(e.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function A12(){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 R12=e=>function(n){return v.jsx(o.Suspense,{fallback:v.jsx(Rht,{}),children:v.jsx(e,{...n})})},rCt=({children:e})=>v.jsx(E.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),V12=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=nBn(n,"HH:mm");return a?v.jsxs(E.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",v.jsx(rCt,{children:"Hoje"})," às"," ",v.jsx(rCt,{children:r})]}):v.jsxs(E.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",v.jsx(rCt,{children:nBn(n)})," às"," ",v.jsx(rCt,{children:r})]})},F12=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=v.jsx(E.InputAdornment,{position:a,children:v.jsx(E.IconButton,{color:"inherit",onClick:()=>{var f;e((f=c.current)==null?void 0:f.value)},children:v.jsx(tt,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return v.jsx(E.TextField,{inputRef:c,InputProps:{onKeyDown:f=>{var s;f.key==="Enter"&&e((s=c.current)==null?void 0:s.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:f=>{if(n==="change"){e(f.target.value);return}f.target.value===""&&e(""),t&&t(f)},...u})},N12=({children:e})=>v.jsx(E.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(dn.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(E.Box,{component:dn.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 ${E.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(E.Box,{component:dn.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 ${E.alpha(t.palette.primary.dark,.24)}`}})]})}),T12=E.styled(E.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}}})),Z12=({active:e,completed:t})=>v.jsx(E.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(tt,{icon:"SIMPLE_CHECK",color:"primary.main"}):v.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),U12=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>v.jsx(E.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(T12,{}),sx:a,...r,children:e.map(u=>v.jsx(E.Step,{children:v.jsx(E.StepLabel,{StepIconComponent:Z12,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),G12=E.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>v.jsx(E.Tab,{disableRipple:!0,...r,label:v.jsxs(E.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(tt,{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 ${E.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}})),Y12=E.styled(e=>v.jsx(E.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}}),K12=({children:e,value:t,index:n,sx:a})=>v.jsx(E.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});function X12(e){return QO("MuiLink",e)}const Q12=OT("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),CZn={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},J12=e=>CZn[e]||e,q12=({theme:e,ownerState:t})=>{const n=J12(t.color),a=jT(e,`palette.${n}`,!1)||t.color,r=jT(e,`palette.${n}Channel`);return"vars"in e&&r?`rgba(${r} / 0.4)`:Y(a,.4)},ea2=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],ta2=e=>{const{classes:t,component:n,focusVisible:a,underline:r}=e,u={root:["root",`underline${$n(r)}`,n==="button"&&"button",a&&"focusVisible"]};return nle(u,X12,t)},na2=Ht(Ckn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${$n(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>ve({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&ve({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:q12({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Q12.focusVisible}`]:{outline:"auto"}})),bZn=O.forwardRef(function(t,n){const a=ST({props:t,name:"MuiLink"}),{className:r,color:u="primary",component:c="a",onBlur:l,onFocus:f,TypographyClasses:s,underline:d="always",variant:g="inherit",sx:_}=a,m=Ft(a,ea2),{isFocusVisibleRef:C,onBlur:h,onFocus:b,ref:p}=A$n(),[y,w]=O.useState(!1),L=$bt(n,p),j=S=>{h(S),C.current===!1&&w(!1),l&&l(S)},P=S=>{b(S),C.current===!0&&w(!0),f&&f(S)},k=ve({},a,{color:u,component:c,focusVisible:y,underline:d,variant:g}),D=ta2(k);return v.jsx(na2,ve({color:u,className:mr(D.root,r),classes:s,component:c,onBlur:j,onFocus:P,ref:L,ownerState:k,variant:g,sx:[...Object.keys(CZn).includes(u)?[]:[{color:u}],...Array.isArray(_)?_:[_]]},m))});process.env.NODE_ENV!=="production"&&(bZn.propTypes={children:M.node,classes:M.object,className:M.string,color:M.any,component:S$n,onBlur:M.func,onFocus:M.func,sx:M.oneOfType([M.arrayOf(M.oneOfType([M.func,M.object,M.bool])),M.func,M.object]),TypographyClasses:M.object,underline:M.oneOf(["always","hover","none"]),variant:M.oneOfType([M.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),M.string])});const ra2=bZn;function aa2(e){return Math.round(parseFloat(e)*16)}function ia2(e){const t=kr(),n=Cer(),a=t.breakpoints.up(n==="xl"?"lg":n),u=(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&t.typography[e][a]?t.typography[e][a]:t.typography[e],c=aa2(u.fontSize),l=Number(t.typography[e].lineHeight)*c,{fontWeight:f,letterSpacing:s}=t.typography[e];return{fontSize:c,lineHeight:l,fontWeight:f,letterSpacing:s}}const yZn=o.forwardRef(({asLink:e,variant:t="body1",line:n=2,persistent:a=!1,children:r,sx:u,...c},l)=>{const{lineHeight:f}=ia2(t),s={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",...a&&{height:f*n},...u};return e?v.jsx(ra2,{color:"inherit",ref:l,variant:t,sx:{...s},...c,children:r}):v.jsx(Ckn,{ref:l,variant:t,sx:{...s},...c,children:r})});yZn.displayName="TextMaxLine";const oa2=["pdf"],ua2=["txt"],ca2=["psd"],la2=["doc","docx"],fa2=["xls","xlsx"],sa2=["zip","rar","iso"],da2=["ai","esp"],ga2=["ppt","pptx"],_a2=["wav","aif","mp3","aac"],ma2=["jpg","jpeg","gif","bmp","png","svg"],va2=["m4v","avi","mpg","mp4","webm"],wr=e=>`/assets/icons/files/${e}.svg`;function pZn(e){let t;switch(e==null?void 0:e.includes(Dn(e))){case ua2.includes(Dn(e)):t="txt";break;case sa2.includes(Dn(e)):t="zip";break;case _a2.includes(Dn(e)):t="audio";break;case ma2.includes(Dn(e)):t="image";break;case va2.includes(Dn(e)):t="video";break;case la2.includes(Dn(e)):t="word";break;case fa2.includes(Dn(e)):t="excel";break;case ga2.includes(Dn(e)):t="powerpoint";break;case oa2.includes(Dn(e)):t="pdf";break;case ca2.includes(Dn(e)):t="photoshop";break;case da2.includes(Dn(e)):t="illustrator";break;default:t=Dn(e)}return t}function ha2(e){let t;switch(pZn(e)){case"folder":t=wr("ic_folder");break;case"txt":t=wr("ic_txt");break;case"zip":t=wr("ic_zip");break;case"audio":t=wr("ic_audio");break;case"video":t=wr("ic_video");break;case"word":t=wr("ic_word");break;case"excel":t=wr("ic_excel");break;case"powerpoint":t=wr("ic_power_point");break;case"pdf":t=wr("ic_pdf");break;case"photoshop":t=wr("ic_pts");break;case"illustrator":t=wr("ic_ai");break;case"image":t=wr("ic_img");break;default:t=wr("ic_file")}return t}function Dn(e=""){return e&&e.split(".").pop()||""}function Ca2(e){return e.split("/").pop()}function aBn(e){return typeof e=="string"?{key:e,preview:e,name:Ca2(e),type:Dn(e)}:{key:e.preview,name:e.name,size:e.size,path:e.path,type:e.type,preview:e.preview,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate}}const OZn=({onDownload:e})=>{const t=kr();return v.jsx(E.IconButton,{onClick:e,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:t.transitions.create("opacity"),"&:hover":{opacity:1,...bkn({opacity:.64,color:t.palette.grey[900]})}},children:v.jsx(tt,{icon:"ARROW_DOWN_CICLE",width:24})})},jZn=({file:e,tooltip:t,imageView:n,onDownload:a,sx:r,imgSx:u})=>{const{name:c="",path:l="",preview:f=""}=aBn(e),s=pZn(l||f),d=s==="image"&&n?v.jsx(E.Box,{component:"img",src:f,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...u}}):v.jsx(E.Box,{component:"img",src:ha2(s),sx:{width:32,height:32,flexShrink:0,...r}});return t?v.jsx(E.Tooltip,{title:c,children:v.jsxs(E.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[d,a&&v.jsx(OZn,{onDownload:a})]})}):v.jsxs(v.Fragment,{children:[d,a&&v.jsx(OZn,{onDownload:a})]})},ba2=({thumbnail:e,files:t,onRemove:n,sx:a})=>t!=null&&t.length?v.jsx(YIn,{initial:!1,children:t.map(r=>{const{key:u,name:c="",size:l=0}=aBn(r),f=typeof r=="string";return e?v.jsxs(E.Stack,{component:dn.div,...Ice().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:s=>`solid 1px ${s.palette.divider}`,...a},children:[v.jsx(jZn,{tooltip:!0,imageView:!0,file:r,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&v.jsx(E.IconButton,{size:"small",onClick:()=>n(r),sx:{top:4,right:4,p:"1px",position:"absolute",color:s=>Y(s.palette.common.white,.72),bgcolor:s=>Y(s.palette.grey[900],.48),"&:hover":{bgcolor:s=>Y(s.palette.grey[900],.72)}},children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON",width:16})})]},u):v.jsxs(E.Stack,{component:dn.div,...Ice().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:s=>`solid 1px ${s.palette.divider}`,...a},children:[v.jsx(jZn,{file:r}),v.jsxs(E.Stack,{flexGrow:1,sx:{minWidth:0},children:[v.jsx(E.Typography,{variant:"subtitle2",noWrap:!0,children:f?r:c}),v.jsx(E.Typography,{variant:"caption",sx:{color:"text.secondary"},children:f?"":UDn(l)})]}),n&&v.jsx(E.IconButton,{edge:"end",size:"small",onClick:()=>n(r),children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON"})})]},u)})}):null;function Bce(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{s(a.next(d))}catch(g){c(g)}}function f(d){try{s(a.throw(d))}catch(g){c(g)}}function s(d){d.done?u(d.value):r(d.value).then(l,f)}s((a=a.apply(e,t||[])).next())})}function Wce(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(s){return function(d){return f([s,d])}}function f(s){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(n=0)),n;)try{if(a=1,r&&(u=s[0]&2?r.return:s[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,s[1])).done)return u;switch(r=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,r=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){n.label=s[1];break}if(s[0]===6&&n.label<u[1]){n.label=u[1],u=s;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(s);break}u[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(d){s=[6,d],r=0}finally{a=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function wZn(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 MZn(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 ya2=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 Z_t(e,t){var n=pa2(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 pa2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var a=t.split(".").pop().toLowerCase(),r=ya2.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var Oa2=[".DS_Store","Thumbs.db"];function ja2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return aCt(e)&&wa2(e.dataTransfer)?[2,Ea2(e.dataTransfer,e.type)]:Ma2(e)?[2,La2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Pa2(e)]:[2,[]]})})}function wa2(e){return aCt(e)}function Ma2(e){return aCt(e)&&aCt(e.target)}function aCt(e){return typeof e=="object"&&e!==null}function La2(e){return iBn(e.target.files).map(function(t){return Z_t(t)})}function Pa2(e){return Bce(this,void 0,void 0,function(){var t;return Wce(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 Z_t(a)})]}})})}function Ea2(e,t){return Bce(this,void 0,void 0,function(){var n,a;return Wce(this,function(r){switch(r.label){case 0:return e.items?(n=iBn(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ka2))]):[3,2];case 1:return a=r.sent(),[2,LZn(PZn(a))];case 2:return[2,LZn(iBn(e.files).map(function(u){return Z_t(u)}))]}})})}function LZn(e){return e.filter(function(t){return Oa2.indexOf(t.name)===-1})}function iBn(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var a=e[n];t.push(a)}return t}function ka2(e){if(typeof e.webkitGetAsEntry!="function")return EZn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?kZn(t):EZn(e)}function PZn(e){return e.reduce(function(t,n){return MZn(MZn([],wZn(t),!1),wZn(Array.isArray(n)?PZn(n):[n]),!1)},[])}function EZn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Z_t(t);return Promise.resolve(n)}function Sa2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return[2,e.isDirectory?kZn(e):Da2(e)]})})}function kZn(e){var t=e.createReader();return new Promise(function(n,a){var r=[];function u(){var c=this;t.readEntries(function(l){return Bce(c,void 0,void 0,function(){var f,s,d;return Wce(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 f=g.sent(),n(f),[3,4];case 3:return s=g.sent(),a(s),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(Sa2)),r.push(d),u(),g.label=6;case 6:return[2]}})})},function(l){a(l)})}u()})}function Da2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return[2,new Promise(function(n,a){e.file(function(r){var u=Z_t(r,e.fullPath);n(u)},function(r){a(r)})})]})})}var Ba2=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 SZn(e){return $a2(e)||Ia2(e)||IZn(e)||Wa2()}function Wa2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35502
+ `),u=!1),Object.assign(Object.assign({},e),{allowNegative:u})}function Fr2(e){e=Vr2(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,a=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=zO);var u=e.onBlur;u===void 0&&(u=zO);var c=e.thousandSeparator,l=e.decimalScale,f=e.fixedDecimalScale,s=e.prefix;s===void 0&&(s="");var d=e.defaultValue,g=e.value,_=e.valueIsNumericString,m=e.onValueChange,C=YTn(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),h=Xht(e),b=h.decimalSeparator,p=h.allowedDecimalSeparators,y=function($){return aZn($,e)},w=function($,F){return Ar2($,F,e)},L=Dce(g)?d:g,j=_??Hr2(L,s,t);Dce(g)?Dce(d)||(j=j||typeof d=="number"):j=j||typeof g=="number";var P=function($){return KTn($)?$:(typeof $=="number"&&($=qTn($)),j&&typeof l=="number"?eZn($,l,!!f):$)},k=rZn(P(g),P(d),!!j,y,w,m),D=k[0],S=D.numAsString,B=D.formattedValue,z=k[1],V=function($){var F=$.target,ne=$.key,re=F.selectionStart,H=F.selectionEnd,R=F.value;if(R===void 0&&(R=""),re!==H){r($);return}ne==="Backspace"&&R[0]==="-"&&re===s.length+1&&n&&JN(F,1),l&&f&&(ne==="Backspace"&&R[re-1]===b?(JN(F,re-1),$.preventDefault()):ne==="Delete"&&R[re]===b&&$.preventDefault()),p!=null&&p.includes(ne)&&R[re]===b&&JN(F,re+1);var G=c===!0?",":c;ne==="Backspace"&&R[re-1]===G&&JN(F,re-1),ne==="Delete"&&R[re]===G&&JN(F,re+1),r($)},I=function($){var F=S;if(F.match(/\d/g)||(F=""),a||(F=Lr2(F)),f&&l&&(F=eZn(F,l,f)),F!==S){var ne=aZn(F,e);z({formattedValue:ne,value:F,floatValue:parseFloat(F)},{event:$,source:R_t.event})}u($)},x=function($){return $===b?!0:V_t($)},N=function($){var F=$.currentValue,ne=$.lastValue,re=$.formattedValue,H=$.currentValueIndex,R=$.formattedValueIndex,G=F[H],ue=re[R],q=tZn(ne,F),de=q.to;return H>=de.start&&H<de.end&&p&&p.includes(G)&&ue===b?!0:G===ue};return Object.assign(Object.assign({},C),{value:B,valueIsNumericString:!1,isValidInputCharacter:x,isCharacterSame:N,onValueChange:z,format:y,removeFormatting:w,getCaretBoundary:function($){return Rr2($,e)},onKeyDown:V,onBlur:I})}function Nr2(e){var t=Fr2(e);return o.createElement($r2,Object.assign({},t))}const Qht=o.forwardRef(({decimalScale:e=0,fixedDecimalScale:t=!0,prefix:n,allowNegative:a,minValue:r,maxValue:u=1/0,maxLength:c,value:l,inputProps:f,InputProps:s,size:d,disabled:g,name:_,helperText:m,error:C,fullWidth:h,label:b,required:p,onChange:y,tabIndex:w},L)=>{const j=o.useRef(null),P=k=>{y&&(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{const{floatValue:D}=k,S=D||0;if(r!==void 0&&r>S){y({target:{name:_,value:r}});return}if(D!==void 0&&u<S){y({target:{name:_,value:u}});return}y({target:{name:_,value:D}})},600))};return o.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]),v.jsx(Nr2,{getInputRef:L,value:l,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:e,fixedDecimalScale:t,autoComplete:"off",allowNegative:a,maxLength:c,onValueChange:P,customInput:E.TextField,InputProps:{...s},inputProps:{...f,tabIndex:w},disabled:g,size:d,helperText:m,error:C,fullWidth:h,label:b,required:p})});Qht.displayName="NumberInput";const XDn=o.forwardRef(({name:e,increment:t=1,updadteForMultiple:n,allowNegative:a=!1,value:r=0,onChange:u,minValue:c,maxValue:l,decimalScale:f,disabled:s,tabIndex:d,...g},_)=>{const m=UTn(r,t,f),C=()=>{if(!a&&r-t<0)return;const p=r-t,y=Math.floor(r/t)*t,w=!m&&n?y:p;c!==void 0&&p<c?u(c):u(GDn(w))},h=()=>{const p=Number(r)+t,y=Math.ceil(r/t)*t,L=GDn(!m&&n?y:p);l!==void 0&&p>=l?u(l):u(c!==void 0&&L<=c?c:L)},b=p=>{const y=Number(p.target.value),w=Math.ceil(y/t)*t,L=n?w:y;if(c!==void 0&&y<=c){u(c);return}if(l!==void 0&&y>=l){u(l);return}u(L)};return v.jsx(Qht,{ref:_,name:e,value:r,minValue:c,maxValue:l,allowNegative:a,decimalScale:f,InputProps:{startAdornment:v.jsx(E.InputAdornment,{position:"start",children:v.jsx(E.IconButton,{size:"medium",disabled:s||(a?!1:!r),onClick:C,children:v.jsx(tt,{icon:"MINUS_SIGN",width:14,height:14,color:"primary.main"})})}),endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{size:"medium",onClick:h,disabled:s,children:v.jsx(tt,{icon:"SIMPLE_ADD",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:d},onChange:b,disabled:s,...g})});XDn.displayName="Incrementer";const Tr2=Ht(E.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 ${Y(e.palette.grey[500],.32)}`},...u&&{color:n?e.palette.text.primary:e.palette.common.white,backgroundColor:Y(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:Y(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}}),iZn=o.forwardRef(({children:e,color:t="default",variant:n="soft",startIcon:a,endIcon:r,sx:u,...c},l)=>{const f=kr(),s={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return v.jsxs(Tr2,{ref:l,component:"span",ownerState:{color:t,variant:n},sx:{...a&&{pl:.75},...r&&{pr:.75},...u},theme:f,...c,children:[a&&v.jsxs(E.Box,{sx:{mr:.75,...s},children:[" ",a," "]}),e,r&&v.jsxs(E.Box,{sx:{ml:.75,...s},children:[" ",r," "]})]})});iZn.displayName="Label";const Zr2=E.styled(E.Box)({padding:"0 40px",width:"100%",minHeight:"100%",flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center"}),Ur2=()=>v.jsx(Zr2,{children:v.jsx(E.LinearProgress,{color:"inherit",sx:{width:1,maxWidth:360}})});function HO(e){return typeof e=="string"||e instanceof String}function oZn(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function uZn(e,t){return Array.isArray(t)?uZn(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 Me={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gr2(e){switch(e){case Me.LEFT:return Me.FORCE_LEFT;case Me.RIGHT:return Me.FORCE_RIGHT;default:return e}}function QDn(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Jht(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(!Jht(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,f=e instanceof RegExp;if(l&&f)return t.toString()==e.toString();if(l!=f)return!1;const s=Object.keys(t);for(r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;for(r=0;r<s.length;r++)if(!Jht(e[s[r]],t[s[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class Yr2{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?Me.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Me.RIGHT:Me.LEFT}}function De(e,t){return new De.InputMask(e,t)}function cZn(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?De.MaskedRegExp:HO(e)?De.MaskedPattern:e===Date?De.MaskedDate:e===Number?De.MaskedNumber:Array.isArray(e)||e===Array?De.MaskedDynamic:De.Masked&&e.prototype instanceof De.Masked?e:De.Masked&&e instanceof De.Masked?e.constructor:e instanceof Function?De.MaskedFunction:(console.warn("Mask not found for mask",e),De.Masked)}function qht(e){if(!e)throw new Error("Options in not defined");if(De.Masked){if(e.prototype instanceof De.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof De.Masked?{mask:e}:oZn(e)&&e.mask instanceof De.Masked?e:{};if(t){const a=t.mask;return{...uZn(t,(r,u)=>!u.startsWith("_")),mask:t.constructor,_mask:a,...n}}}return oZn(e)?{...e}:{mask:e}}function qN(e){if(De.Masked&&e instanceof De.Masked)return e;const t=qht(e),n=cZn(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)}De.createMask=qN;class JDn{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}}De.MaskElement=JDn;class eT extends JDn{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(eT.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)}}eT.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},De.HTMLMaskElement=eT;class Kr2 extends eT{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}}De.HTMLMaskElement=eT;class lZn extends eT{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}}De.HTMLContenteditableMaskElement=lZn;class Xr2{constructor(t,n){this.el=t instanceof JDn?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new lZn(t):new Kr2(t),this.masked=qN(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 De.Masked)&&this.masked.constructor===cZn(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof De.Masked?t:qN({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=!Jht(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,Me.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 Yr2({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:Me.NONE;let c=this.masked.nearestInputPos(n.startChangePos+r,u);u!==Me.NONE&&(c=this.masked.nearestInputPos(c,Me.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}}De.InputMask=Xr2;class dt{static normalize(t){return Array.isArray(t)?t:[t,new dt]}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}}De.ChangeDetails=dt;class w8{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 Or{constructor(t){this._value="",this._update({...Or.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 w8(this.extractInput(t,n),t)}appendTail(t){return HO(t)&&(t=new w8(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new dt({inserted:t,rawInserted:t})):new dt}_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 f=this.state;this.overwrite===!0&&(c=a.state,a.unshift(this.displayValue.length-u.tailShift));let s=this.appendTail(a);l=s.rawInserted===a.toString(),!(l&&s.inserted)&&this.overwrite==="shift"&&(this.state=f,c=a.state,a.shift(),s=this.appendTail(a),l=s.rawInserted===a.toString()),l&&s.inserted&&(this.state=f)}l||(u=new dt,this.state=r,a&&c&&(a.state=c))}return u}_appendPlaceholder(){return new dt}_appendEager(){return new dt}append(t,n,a){if(!HO(t))throw new Error("value should be string");const r=HO(a)?new w8(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 dt}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={}),dt.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),dt.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=Me.NONE),u===void 0&&(u={input:!0});const c=t+n,l=this.extractTail(c),f=this.eager===!0||this.eager==="remove";let s;f&&(r=Gr2(r),s=this.extractInput(0,c,{raw:!0}));let d=t;const g=new dt;if(r!==Me.NONE&&(d=this.nearestInputPos(t,n>1&&t!==0&&!f?Me.NONE:r),g.tailShift=d-t),g.aggregate(this.remove(d)),f&&r!==Me.NONE&&s===this.rawInputValue)if(r===Me.FORCE_LEFT){let _;for(;s===this.rawInputValue&&(_=this.displayValue.length);)g.aggregate(new dt({tailShift:-1})).aggregate(this.remove(_-1))}else r===Me.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||Or.EMPTY_VALUES.includes(t)&&Or.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}Or.DEFAULTS={skipInvalid:!0},Or.EMPTY_VALUES=[void 0,null,""],De.Masked=Or;class tT{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=HO(t)?new w8(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 w8)a?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof tT){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 De.MaskedPattern))return new w8(this.toString()).appendTo(t);const n=new dt;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 tT||t._stops.indexOf(c)>=0){const f=t._appendPlaceholder(c);n.aggregate(f)}l=r instanceof tT&&t._blocks[c]}if(l){const f=l.appendTail(r);f.skip=!1,n.aggregate(f),t._value+=f.inserted;const s=r.toString().slice(f.rawInserted.length);s&&n.aggregate(t.append(s,{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 tT:new w8;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 Qr2{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,Me.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Me.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Me.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Me.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,Me.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Me.NONE),!0})}}class fZn{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 dt}nearestInputPos(t,n){n===void 0&&(n=Me.NONE);const a=0,r=this._value.length;switch(n){case Me.LEFT:case Me.FORCE_LEFT:return a;case Me.NONE:case Me.RIGHT:case Me.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 dt;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 dt;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new w8("")}appendTail(t){return HO(t)&&(t=new w8(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 eCt{constructor(t){const{parent:n,isOptional:a,placeholderChar:r,displayChar:u,lazy:c,eager:l,...f}=t;this.masked=qN(f),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 dt}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 dt;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 dt;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new dt}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=Me.NONE);const a=0,r=this.value.length,u=Math.min(Math.max(t,a),r);switch(n){case Me.LEFT:case Me.FORCE_LEFT:return this.isComplete?u:a;case Me.RIGHT:case Me.FORCE_RIGHT:return this.isComplete?u:r;case Me.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)}}}eCt.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 Jr2 extends Or{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=a=>a.search(n)>=0),super._update(t)}}De.MaskedRegExp=Jr2;class jr extends Or{constructor(t){super({...jr.DEFAULTS,...t,definitions:Object.assign({},eCt.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 s=n.slice(u),d=Object.keys(this.blocks).filter(_=>s.indexOf(_)===0);d.sort((_,m)=>m.length-_.length);const g=d[0];if(g){const{expose:_,...m}=qht(this.blocks[g]),C=qN({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===jr.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(c==="{"||c==="}"){a=!a;continue}if(c==="["||c==="]"){r=!r;continue}if(c===jr.ESCAPE_CHAR){if(++u,c=n[u],!c)break;l=!1}const f=l?new eCt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...qht(t[c]),parent:this}):new fZn({char:c,eager:this.eager,isUnmasking:a});this._blocks.push(f)}}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 dt;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 dt;if(!a)return r;for(let c=a.index;;++c){var u;const l=this._blocks[c];if(!l)break;const f=l._appendChar(t,{...n,_beforeTailState:(u=n._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]}),s=f.skip;if(r.aggregate(f),s||f.rawInserted)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const a=new tT;return t===n||this._forEachBlocksInRange(t,n,(r,u,c,l)=>{const f=r.extractTail(c,l);f.stop=this._findStopBefore(u),f.from=this._blockStartPos(u),f instanceof tT&&(f.blockIndex=u),a.extend(f)}),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,f)=>{r+=u.extractInput(l,f,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 dt;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 f=c._appendPlaceholder((l=c._blocks)==null?void 0:l.length);this._value+=f.inserted,n.aggregate(f)}}),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,f=u&&c?u.offset:this._blocks[r.index].displayValue.length;if(a(this._blocks[r.index],r.index,l,f),u&&!c){for(let s=r.index+1;s<u.index;++s)a(this._blocks[s],s,0,this._blocks[s].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=Me.NONE),!this._blocks.length)return 0;const a=new Qr2(this,t);if(n===Me.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(n===Me.LEFT||n===Me.FORCE_LEFT){if(n===Me.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===t)return t;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),n===Me.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===Me.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return n===Me.RIGHT||n===Me.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:n===Me.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(t,Me.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]):[]}}jr.DEFAULTS={lazy:!0,placeholderChar:"_"},jr.STOP_CHAR="`",jr.ESCAPE_CHAR="\\",jr.InputDefinition=eCt,jr.FixedDefinition=fZn,De.MaskedPattern=jr;class tCt extends jr{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"),f=String(this.to).padStart(this.maxLength,"0");let s=0;for(;s<f.length&&f[s]===l[s];)++s;c.mask=f.slice(0,s).replace(/0/g,"\\0")+"0".repeat(this.maxLength-s),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,f]=this.boundaries(c);return Number(f)<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)}}De.MaskedRange=tCt;class nT extends jr{constructor(t){const{mask:n,pattern:a,...r}={...nT.DEFAULTS,...t};super({...r,mask:HO(n)?n:a})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:a,blocks:r,...u}={...nT.DEFAULTS,...t},c=Object.assign({},nT.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 f=c[l];!("autofix"in f)&&"autofix"in t&&(f.autofix=t.autofix)}),super._update({...u,mask:HO(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)}}nT.GET_DEFAULT_BLOCKS=()=>({d:{mask:tCt,from:1,to:31,maxLength:2},m:{mask:tCt,from:1,to:12,maxLength:2},Y:{mask:tCt,from:1900,to:9999}}),nT.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)}},De.MaskedDate=nT;class F_t extends Or{constructor(t){super({...F_t.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}=qht(n),u=qN({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),f=this.currentMask,s=new dt,d=f==null?void 0:f.state;if(this.currentMask=this.doDispatch(t,{...n},a),this.currentMask)if(this.currentMask!==f){if(this.currentMask.reset(),c){const g=this.currentMask.append(c,{raw:!0});s.tailShift=g.inserted.length-r.length}l&&(s.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else d&&(this.currentMask.state=d);return s}_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 dt;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 dt;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 Jht(n,u)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}F_t.DEFAULTS=void 0,F_t.DEFAULTS={dispatch:(e,t,n,a)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,u=t.compiledMasks.map((c,l)=>{const f=t.currentMask===c,s=f?c.displayValue.length:c.nearestInputPos(c.displayValue.length,Me.FORCE_LEFT);return c.rawInputValue!==r?(c.reset(),c.append(r,{raw:!0})):f||c.remove(s),c.append(e,t.currentMaskFlags(n)),c.appendTail(a),{index:l,weight:c.rawInputValue.length,totalInputPositions:c.totalInputPositions(0,Math.max(s,c.nearestInputPos(c.displayValue.length,Me.FORCE_LEFT)))}});return u.sort((c,l)=>l.weight-c.weight||l.totalInputPositions-c.totalInputPositions),t.compiledMasks[u[0].index]}},De.MaskedDynamic=F_t;class qr2 extends jr{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)}}De.MaskedEnum=qr2;class e12 extends Or{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}De.MaskedFunction=e12;class O1 extends Or{constructor(t){super({...O1.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",a=(this.scale?"("+QDn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(QDn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(QDn(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 dt({tailShift:(c-u)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case Me.NONE:case Me.LEFT:case Me.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===Me.FORCE_LEFT)return a}break}case Me.RIGHT:case Me.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===O1.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,O1.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(O1.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)||O1.EMPTY_VALUES.includes(t)&&O1.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}O1.UNMASKED_RADIX=".",O1.EMPTY_VALUES=[...Or.EMPTY_VALUES,0],O1.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O1.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})},De.MaskedNumber=O1;const qDn={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function sZn(e,t,n){t===void 0&&(t=qDn.MASKED),n===void 0&&(n=qDn.MASKED);const a=qN(e);return r=>a.runIsolated(u=>(u[t]=r,u[n]))}function t12(e,t,n,a){return sZn(t,n,a)(e)}De.PIPE_TYPE=qDn,De.createPipe=sZn,De.pipe=t12;try{globalThis.IMask=De}catch{}const dZn={mask:M.oneOfType([M.array,M.func,M.string,M.instanceOf(RegExp),M.oneOf([Date,Number,De.Masked]),M.instanceOf(De.Masked)]),value:M.any,unmask:M.oneOfType([M.bool,M.oneOf(["typed"])]),prepare:M.func,prepareChar:M.func,validate:M.func,commit:M.func,overwrite:M.oneOfType([M.bool,M.oneOf(["shift"])]),eager:M.oneOfType([M.bool,M.oneOf(["append","remove"])]),skipInvalid:M.bool,onAccept:M.func,onComplete:M.func,placeholderChar:M.string,displayChar:M.string,lazy:M.bool,definitions:M.object,blocks:M.object,enum:M.arrayOf(M.string),maxLength:M.number,from:M.number,to:M.number,pattern:M.string,format:M.func,parse:M.func,autofix:M.oneOfType([M.bool,M.oneOf(["pad"])]),radix:M.string,thousandsSeparator:M.string,mapToRadix:M.arrayOf(M.string),scale:M.number,normalizeZeros:M.bool,padFractionalZeros:M.bool,min:M.oneOfType([M.number,M.instanceOf(Date)]),max:M.oneOfType([M.number,M.instanceOf(Date)]),dispatch:M.func,inputRef:M.oneOfType([M.func,M.shape({current:M.object})])},gZn=Object.keys(dZn).filter(e=>e!=="value"),n12=["value","unmask","onAccept","onComplete","inputRef"],r12=gZn.filter(e=>n12.indexOf(e)<0);function _Zn(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=De(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=>r12.indexOf(l)<0).forEach(l=>{delete c[l]}),c}_extractNonMaskProps(u){const{...c}=u;return gZn.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=dZn,o.forwardRef((r,u)=>o.createElement(n,{...r,ref:u}))}const a12=_Zn(e=>{let{inputRef:t,...n}=e;return o.createElement("input",{...n,ref:t})}),i12=(e,t)=>o.createElement(a12,{...e,ref:t});o.forwardRef(i12);const o12=_Zn(e=>{const{inputRef:t,"data-value":n,defaultValue:a,tabIndex:r,...u}=e;return v.jsx(E.TextField,{inputRef:t,fullWidth:!0,...u,inputProps:{...u.inputProps,tabIndex:r},value:n})}),eBn=o.forwardRef(({onChange:e,name:t,...n},a)=>{const[r,u]=o.useState("");return v.jsx(o12,{inputRef:a,name:t,"data-value":r,...n,onAccept:(c,l)=>{u(c),e({target:{name:t,value:l._unmaskedValue}})}})});eBn.displayName="MaskedInput";function u12(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 c12=Ht("span")(({arrow:e,theme:t})=>{const r=`solid 1px ${Y(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},f={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"&&{...f,top:20},...e==="right-center"&&{...f,top:0,bottom:0,margin:"auto"},...e==="right-bottom"&&{...f,bottom:20}}}),l12=({open:e,children:t,arrow:n="top-right",disabledArrow:a,sx:r,...u})=>{const{style:c,anchorOrigin:l,transformOrigin:f}=u12(n);return v.jsxs(E.Popover,{open:!!e,anchorEl:e,anchorOrigin:l,transformOrigin:f,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(c12,{arrow:n}),t]})},f12=E.styled(E.Stack)(({theme:e})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[300]}`,button:{marginRight:24}})),s12=E.styled(E.DialogContent)({padding:"24px !important"}),d12=E.styled(E.DialogActions)(({theme:e})=>({borderTop:`1px solid ${e.palette.grey[300]}`,backgroundColor:e.palette.grey[50]})),g12=({children:e,actionsProps:t})=>v.jsx(d12,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...t,children:e}),mZn=({actions:e,actionsProps:t,children:n,dialogContentProps:a,dialogTitle:r,dialogTitleProps:u,onClose:c,id:l,...f})=>{const s=l||"modal-actions";return v.jsxs(E.Dialog,{id:l,scroll:"body",...f,onClose:c,children:[v.jsxs(f12,{children:[r&&v.jsx(E.DialogTitle,{variant:"subtitle1",...u,children:r}),v.jsx(E.IconButton,{onClick:c,children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON"})})]}),v.jsx(s12,{...a,children:n}),e&&v.jsx(g12,{actionsProps:{...t,id:s},children:e})]})},vZn=({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?hCt.createPortal(e,document.getElementById(t)||document.body):null},_12=({children:e,id:t="modal-actions"})=>v.jsx(vZn,{container:t,children:e}),m12=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))},v12=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))},nCt=(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),f=!n||/\d/.test(e);return{isLengthValid:u,hasUpperCaseChar:c,hasSpecialCharacter:l,hasNumberChar:f}},h12=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:v12,cpfIsValid:m12,validatePassword:nCt},Symbol.toStringTag,{value:"Module"})),C12=E.styled(E.Stack)(({theme:e})=>({width:"100%",border:`solid 1px ${E.alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),b12=E.styled(E.Stack)(()=>({gap:4})),N_t=E.styled(E.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}})),T_t=({passed:e})=>e?v.jsx(tt,{icon:"SAVE_MARK",color:"success.main"}):v.jsx(tt,{icon:"WARNING_TRIANGULE",color:"warning.main"}),y12=({password:e,passwordSize:t,numberChar:n=!1,specialCharacter:a=!1,upperCaseChar:r=!1,match:u})=>{const{hasSpecialCharacter:c,hasUpperCaseChar:l,isLengthValid:f,hasNumberChar:s}=nCt(e,t,n,a,r);return v.jsxs(C12,{children:[v.jsx(E.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),v.jsxs(b12,{children:[v.jsxs(N_t,{children:[v.jsx(T_t,{passed:f}),v.jsxs(E.Typography,{component:"div",children:[v.jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),r&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:l}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos uma ",v.jsx("strong",{children:"letra maiúscula"})]})]}),n&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:s}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos ",v.jsx("strong",{children:"um número"})]})]}),a&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:c}),v.jsxs(E.Typography,{component:"div",children:["Pelo menos um ",v.jsx("strong",{children:"caracter especial"})," ",v.jsx("span",{children:"(#,@,!,?)"})]})]}),u&&v.jsxs(N_t,{children:[v.jsx(T_t,{passed:u.passwordMatch}),v.jsx(E.Typography,{component:"div",children:"Senha e confirmação de senha devem ser iguais"})]})]})]})},p12=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 O12(e){return MDn({},e)}var hZn=1440,j12=2520,tBn=43200,w12=86400;function M12(e,t,n){var a,r;ee(2,arguments);var u=di(),c=(a=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:u.locale)!==null&&a!==void 0?a:Bht;if(!c.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=hce(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var f=MDn(O12(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:l}),s,d;l>0?(s=te(t),d=te(e)):(s=te(e),d=te(t));var g=bNn(d,s),_=(Cce(d)-Cce(s))/1e3,m=Math.round((g-_)/60),C;if(m<2)return n!=null&&n.includeSeconds?g<5?c.formatDistance("lessThanXSeconds",5,f):g<10?c.formatDistance("lessThanXSeconds",10,f):g<20?c.formatDistance("lessThanXSeconds",20,f):g<40?c.formatDistance("halfAMinute",0,f):g<60?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",1,f):m===0?c.formatDistance("lessThanXMinutes",1,f):c.formatDistance("xMinutes",m,f);if(m<45)return c.formatDistance("xMinutes",m,f);if(m<90)return c.formatDistance("aboutXHours",1,f);if(m<hZn){var h=Math.round(m/60);return c.formatDistance("aboutXHours",h,f)}else{if(m<j12)return c.formatDistance("xDays",1,f);if(m<tBn){var b=Math.round(m/hZn);return c.formatDistance("xDays",b,f)}else if(m<w12)return C=Math.round(m/tBn),c.formatDistance("aboutXMonths",C,f)}if(C=hDn(d,s),C<12){var p=Math.round(m/tBn);return c.formatDistance("xMonths",p,f)}else{var y=C%12,w=Math.floor(C/12);return y<3?c.formatDistance("aboutXYears",w,f):y<9?c.formatDistance("overXYears",w,f):c.formatDistance("almostXYears",w+1,f)}}function L12(e,t){return ee(1,arguments),M12(e,Date.now(),t)}function P12(e){ee(1,arguments);var t=te(e),n=t.getTime();return n}function nBn(e,t){const n=t||"dd/MM/yyyy";return e?jDn(new Date(e),n):null}function E12(e,t){const n=t||"dd/MM/yyyy HH:mm:ss";return e?jDn(new Date(e),n):null}function k12(e){return e?P12(new Date(e)):null}function S12(e){return e?L12(new Date(e),{addSuffix:!0}):null}function D12(e,t="dd/MM/yyyy hh:mm:ss"){if(!e)return null;const n=VNn(e,t,new Date);return yDn(n)?n:null}const B12=Object.freeze(Object.defineProperty({__proto__:null,fDate:nBn,fDateTime:E12,fTimestamp:k12,fToNow:S12,stringToDate:D12},Symbol.toStringTag,{value:"Module"}));function W12(e){const t=e.match(/\/([^/]+)/);return t?t[0]:e}const I12=Object.freeze(Object.defineProperty({__proto__:null,getRoot:W12},Symbol.toStringTag,{value:"Module"}));function $12(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 x12(e,t,n){const a=[...n],r=a.splice(e,1)[0];return a.splice(t,0,r),a}const z12=Object.freeze(Object.defineProperty({__proto__:null,sort:$12,updatePosition:x12},Symbol.toStringTag,{value:"Module"})),rBn=(e="",t)=>{let n="",a=0;return[...t].forEach(r=>{n+=r==="#"?e[a++]||"_":r}),n},H12=Object.freeze(Object.defineProperty({__proto__:null,applyMask:rBn,cnpjMask:e=>rBn(e.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:e=>rBn(e.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function A12(){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 R12=e=>function(n){return v.jsx(o.Suspense,{fallback:v.jsx(Rht,{}),children:v.jsx(e,{...n})})},rCt=({children:e})=>v.jsx(E.Typography,{variant:"body2",component:"span",fontWeight:600,color:"text.primary",children:e}),V12=({updatedAt:e})=>{const t=new Date,n=new Date(e),a=n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear(),r=nBn(n,"HH:mm");return a?v.jsxs(E.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas ",v.jsx(rCt,{children:"Hoje"})," às"," ",v.jsx(rCt,{children:r})]}):v.jsxs(E.Typography,{variant:"body2",color:"text.disabled",children:["Alterações salvas em"," ",v.jsx(rCt,{children:nBn(n)})," às"," ",v.jsx(rCt,{children:r})]})},F12=({onSearch:e,onChange:t,trigger:n="click",iconPosition:a="end",tabIndex:r,...u})=>{const c=o.useRef(null),l=v.jsx(E.InputAdornment,{position:a,children:v.jsx(E.IconButton,{color:"inherit",onClick:()=>{var f;e((f=c.current)==null?void 0:f.value)},children:v.jsx(tt,{icon:"SEARCH_MAGNIFYING_GLASS",width:20,height:20})})});return v.jsx(E.TextField,{inputRef:c,InputProps:{onKeyDown:f=>{var s;f.key==="Enter"&&e((s=c.current)==null?void 0:s.value)},...a==="start"?{startAdornment:l}:{endAdornment:l}},inputProps:{tabIndex:r,...u.inputProps},onChange:f=>{if(n==="change"){e(f.target.value);return}f.target.value===""&&e(""),t&&t(f)},...u})},N12=({children:e})=>v.jsx(E.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(dn.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(E.Box,{component:dn.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 ${E.alpha(t.palette.primary.dark,.24)}`}}),v.jsx(E.Box,{component:dn.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 ${E.alpha(t.palette.primary.dark,.24)}`}})]})}),T12=E.styled(E.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}}})),Z12=({active:e,completed:t})=>v.jsx(E.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...e&&{color:"primary.main"}},children:t?v.jsx(tt,{icon:"SIMPLE_CHECK",color:"primary.main"}):v.jsx(E.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),U12=({steps:e,activeStep:t,showLabels:n=!0,sx:a,...r})=>v.jsx(E.Stepper,{alternativeLabel:!0,activeStep:t,connector:v.jsx(T12,{}),sx:a,...r,children:e.map(u=>v.jsx(E.Step,{children:v.jsx(E.StepLabel,{StepIconComponent:Z12,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&u})},u))}),G12=E.styled(({label:e,onClose:t,icon:n,hasChanges:a,...r})=>v.jsx(E.Tab,{disableRipple:!0,...r,label:v.jsxs(E.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(tt,{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 ${E.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}})),Y12=E.styled(e=>v.jsx(E.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}}),K12=({children:e,value:t,index:n,sx:a})=>v.jsx(E.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});function X12(e){return QO("MuiLink",e)}const Q12=OT("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),CZn={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},J12=e=>CZn[e]||e,q12=({theme:e,ownerState:t})=>{const n=J12(t.color),a=jT(e,`palette.${n}`,!1)||t.color,r=jT(e,`palette.${n}Channel`);return"vars"in e&&r?`rgba(${r} / 0.4)`:Y(a,.4)},ea2=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],ta2=e=>{const{classes:t,component:n,focusVisible:a,underline:r}=e,u={root:["root",`underline${$n(r)}`,n==="button"&&"button",a&&"focusVisible"]};return nle(u,X12,t)},na2=Ht(Ckn,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${$n(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>ve({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&ve({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:q12({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Q12.focusVisible}`]:{outline:"auto"}})),bZn=O.forwardRef(function(t,n){const a=ST({props:t,name:"MuiLink"}),{className:r,color:u="primary",component:c="a",onBlur:l,onFocus:f,TypographyClasses:s,underline:d="always",variant:g="inherit",sx:_}=a,m=Ft(a,ea2),{isFocusVisibleRef:C,onBlur:h,onFocus:b,ref:p}=A$n(),[y,w]=O.useState(!1),L=$bt(n,p),j=S=>{h(S),C.current===!1&&w(!1),l&&l(S)},P=S=>{b(S),C.current===!0&&w(!0),f&&f(S)},k=ve({},a,{color:u,component:c,focusVisible:y,underline:d,variant:g}),D=ta2(k);return v.jsx(na2,ve({color:u,className:mr(D.root,r),classes:s,component:c,onBlur:j,onFocus:P,ref:L,ownerState:k,variant:g,sx:[...Object.keys(CZn).includes(u)?[]:[{color:u}],...Array.isArray(_)?_:[_]]},m))});process.env.NODE_ENV!=="production"&&(bZn.propTypes={children:M.node,classes:M.object,className:M.string,color:M.any,component:S$n,onBlur:M.func,onFocus:M.func,sx:M.oneOfType([M.arrayOf(M.oneOfType([M.func,M.object,M.bool])),M.func,M.object]),TypographyClasses:M.object,underline:M.oneOf(["always","hover","none"]),variant:M.oneOfType([M.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),M.string])});const ra2=bZn;function aa2(e){return Math.round(parseFloat(e)*16)}function ia2(e){const t=kr(),n=Cer(),a=t.breakpoints.up(n==="xl"?"lg":n),u=(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&t.typography[e][a]?t.typography[e][a]:t.typography[e],c=aa2(u.fontSize),l=Number(t.typography[e].lineHeight)*c,{fontWeight:f,letterSpacing:s}=t.typography[e];return{fontSize:c,lineHeight:l,fontWeight:f,letterSpacing:s}}const yZn=o.forwardRef(({asLink:e,variant:t="body1",line:n=2,persistent:a=!1,children:r,sx:u,...c},l)=>{const{lineHeight:f}=ia2(t),s={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",...a&&{height:f*n},...u};return e?v.jsx(ra2,{color:"inherit",ref:l,variant:t,sx:{...s},...c,children:r}):v.jsx(Ckn,{ref:l,variant:t,sx:{...s},...c,children:r})});yZn.displayName="TextMaxLine";const oa2=["pdf"],ua2=["txt"],ca2=["psd"],la2=["doc","docx"],fa2=["xls","xlsx"],sa2=["zip","rar","iso"],da2=["ai","esp"],ga2=["ppt","pptx"],_a2=["wav","aif","mp3","aac"],ma2=["jpg","jpeg","gif","bmp","png","svg"],va2=["m4v","avi","mpg","mp4","webm"],wr=e=>`/assets/icons/files/${e}.svg`;function pZn(e){let t;switch(e==null?void 0:e.includes(Dn(e))){case ua2.includes(Dn(e)):t="txt";break;case sa2.includes(Dn(e)):t="zip";break;case _a2.includes(Dn(e)):t="audio";break;case ma2.includes(Dn(e)):t="image";break;case va2.includes(Dn(e)):t="video";break;case la2.includes(Dn(e)):t="word";break;case fa2.includes(Dn(e)):t="excel";break;case ga2.includes(Dn(e)):t="powerpoint";break;case oa2.includes(Dn(e)):t="pdf";break;case ca2.includes(Dn(e)):t="photoshop";break;case da2.includes(Dn(e)):t="illustrator";break;default:t=Dn(e)}return t}function ha2(e){let t;switch(pZn(e)){case"folder":t=wr("ic_folder");break;case"txt":t=wr("ic_txt");break;case"zip":t=wr("ic_zip");break;case"audio":t=wr("ic_audio");break;case"video":t=wr("ic_video");break;case"word":t=wr("ic_word");break;case"excel":t=wr("ic_excel");break;case"powerpoint":t=wr("ic_power_point");break;case"pdf":t=wr("ic_pdf");break;case"photoshop":t=wr("ic_pts");break;case"illustrator":t=wr("ic_ai");break;case"image":t=wr("ic_img");break;default:t=wr("ic_file")}return t}function Dn(e=""){return e&&e.split(".").pop()||""}function Ca2(e){return e.split("/").pop()}function aBn(e){return typeof e=="string"?{key:e,preview:e,name:Ca2(e),type:Dn(e)}:{key:e.preview,name:e.name,size:e.size,path:e.path,type:e.type,preview:e.preview,lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate}}const OZn=({onDownload:e})=>{const t=kr();return v.jsx(E.IconButton,{onClick:e,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:t.transitions.create("opacity"),"&:hover":{opacity:1,...bkn({opacity:.64,color:t.palette.grey[900]})}},children:v.jsx(tt,{icon:"ARROW_DOWN_CICLE",width:24})})},jZn=({file:e,tooltip:t,imageView:n,onDownload:a,sx:r,imgSx:u})=>{const{name:c="",path:l="",preview:f=""}=aBn(e),s=pZn(l||f),d=s==="image"&&n?v.jsx(E.Box,{component:"img",src:f,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...u}}):v.jsx(E.Box,{component:"img",src:ha2(s),sx:{width:32,height:32,flexShrink:0,...r}});return t?v.jsx(E.Tooltip,{title:c,children:v.jsxs(E.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[d,a&&v.jsx(OZn,{onDownload:a})]})}):v.jsxs(v.Fragment,{children:[d,a&&v.jsx(OZn,{onDownload:a})]})},ba2=({thumbnail:e,files:t,onRemove:n,sx:a})=>t!=null&&t.length?v.jsx(YIn,{initial:!1,children:t.map(r=>{const{key:u,name:c="",size:l=0}=aBn(r),f=typeof r=="string";return e?v.jsxs(E.Stack,{component:dn.div,...Ice().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:s=>`solid 1px ${s.palette.divider}`,...a},children:[v.jsx(jZn,{tooltip:!0,imageView:!0,file:r,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&v.jsx(E.IconButton,{size:"small",onClick:()=>n(r),sx:{top:4,right:4,p:"1px",position:"absolute",color:s=>Y(s.palette.common.white,.72),bgcolor:s=>Y(s.palette.grey[900],.48),"&:hover":{bgcolor:s=>Y(s.palette.grey[900],.72)}},children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON",width:16})})]},u):v.jsxs(E.Stack,{component:dn.div,...Ice().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:s=>`solid 1px ${s.palette.divider}`,...a},children:[v.jsx(jZn,{file:r}),v.jsxs(E.Stack,{flexGrow:1,sx:{minWidth:0},children:[v.jsx(E.Typography,{variant:"subtitle2",noWrap:!0,children:f?r:c}),v.jsx(E.Typography,{variant:"caption",sx:{color:"text.secondary"},children:f?"":UDn(l)})]}),n&&v.jsx(E.IconButton,{edge:"end",size:"small",onClick:()=>n(r),children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON"})})]},u)})}):null;function Bce(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{s(a.next(d))}catch(g){c(g)}}function f(d){try{s(a.throw(d))}catch(g){c(g)}}function s(d){d.done?u(d.value):r(d.value).then(l,f)}s((a=a.apply(e,t||[])).next())})}function Wce(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(s){return function(d){return f([s,d])}}function f(s){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(n=0)),n;)try{if(a=1,r&&(u=s[0]&2?r.return:s[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,s[1])).done)return u;switch(r=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,r=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){n.label=s[1];break}if(s[0]===6&&n.label<u[1]){n.label=u[1],u=s;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(s);break}u[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(d){s=[6,d],r=0}finally{a=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function wZn(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 MZn(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 ya2=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 Z_t(e,t){var n=pa2(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 pa2(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var a=t.split(".").pop().toLowerCase(),r=ya2.get(a);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var Oa2=[".DS_Store","Thumbs.db"];function ja2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return aCt(e)&&wa2(e.dataTransfer)?[2,Ea2(e.dataTransfer,e.type)]:Ma2(e)?[2,La2(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Pa2(e)]:[2,[]]})})}function wa2(e){return aCt(e)}function Ma2(e){return aCt(e)&&aCt(e.target)}function aCt(e){return typeof e=="object"&&e!==null}function La2(e){return iBn(e.target.files).map(function(t){return Z_t(t)})}function Pa2(e){return Bce(this,void 0,void 0,function(){var t;return Wce(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 Z_t(a)})]}})})}function Ea2(e,t){return Bce(this,void 0,void 0,function(){var n,a;return Wce(this,function(r){switch(r.label){case 0:return e.items?(n=iBn(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ka2))]):[3,2];case 1:return a=r.sent(),[2,LZn(PZn(a))];case 2:return[2,LZn(iBn(e.files).map(function(u){return Z_t(u)}))]}})})}function LZn(e){return e.filter(function(t){return Oa2.indexOf(t.name)===-1})}function iBn(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var a=e[n];t.push(a)}return t}function ka2(e){if(typeof e.webkitGetAsEntry!="function")return EZn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?kZn(t):EZn(e)}function PZn(e){return e.reduce(function(t,n){return MZn(MZn([],wZn(t),!1),wZn(Array.isArray(n)?PZn(n):[n]),!1)},[])}function EZn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Z_t(t);return Promise.resolve(n)}function Sa2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return[2,e.isDirectory?kZn(e):Da2(e)]})})}function kZn(e){var t=e.createReader();return new Promise(function(n,a){var r=[];function u(){var c=this;t.readEntries(function(l){return Bce(c,void 0,void 0,function(){var f,s,d;return Wce(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 f=g.sent(),n(f),[3,4];case 3:return s=g.sent(),a(s),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(Sa2)),r.push(d),u(),g.label=6;case 6:return[2]}})})},function(l){a(l)})}u()})}function Da2(e){return Bce(this,void 0,void 0,function(){return Wce(this,function(t){return[2,new Promise(function(n,a){e.file(function(r){var u=Z_t(r,e.fullPath);n(u)},function(r){a(r)})})]})})}var Ba2=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 SZn(e){return $a2(e)||Ia2(e)||IZn(e)||Wa2()}function Wa2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35503
35503
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ia2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $a2(e){if(Array.isArray(e))return oBn(e)}function DZn(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 BZn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DZn(Object(n),!0).forEach(function(a){WZn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DZn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function WZn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U_t(e,t){return Ha2(e)||za2(e,t)||IZn(e,t)||xa2()}function xa2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35504
35504
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IZn(e,t){if(e){if(typeof e=="string")return oBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oBn(e,t)}}function oBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function za2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function Ha2(e){if(Array.isArray(e))return e}var Aa2="file-invalid-type",Ra2="file-too-large",Va2="file-too-small",Fa2="too-many-files",Na2=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Aa2,message:"File type must be ".concat(n)}},$Zn=function(t){return{code:Ra2,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},xZn=function(t){return{code:Va2,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ta2={code:Fa2,message:"Too many files"};function zZn(e,t){var n=e.type==="application/x-moz-file"||Ba2(e,t);return[n,n?null:Na2(t)]}function HZn(e,t,n){if(rT(e.size))if(rT(t)&&rT(n)){if(e.size>n)return[!1,$Zn(n)];if(e.size<t)return[!1,xZn(t)]}else{if(rT(t)&&e.size<t)return[!1,xZn(t)];if(rT(n)&&e.size>n)return[!1,$Zn(n)]}return[!0,null]}function rT(e){return e!=null}function Za2(e){var t=e.files,n=e.accept,a=e.minSize,r=e.maxSize,u=e.multiple,c=e.maxFiles,l=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(f){var s=zZn(f,n),d=U_t(s,1),g=d[0],_=HZn(f,a,r),m=U_t(_,1),C=m[0],h=l?l(f):null;return g&&C&&!h})}function iCt(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oCt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function AZn(e){e.preventDefault()}function Ua2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Ga2(e){return e.indexOf("Edge/")!==-1}function Ya2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ua2(e)||Ga2(e)}function Oc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){for(var r=arguments.length,u=new Array(r>1?r-1:0),c=1;c<r;c++)u[c-1]=arguments[c];return t.some(function(l){return!iCt(a)&&l&&l.apply(void 0,[a].concat(u)),iCt(a)})}}function Ka2(){return"showOpenFilePicker"in window}function Xa2(e){if(rT(e)){var t=Object.entries(e).filter(function(n){var a=U_t(n,2),r=a[0],u=a[1],c=!0;return RZn(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(u)||!u.every(VZn))&&(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,a){var r=U_t(a,2),u=r[0],c=r[1];return BZn(BZn({},n),{},WZn({},u,c))},{});return[{description:"Files",accept:t}]}return e}function Qa2(e){if(rT(e))return Object.entries(e).reduce(function(t,n){var a=U_t(n,2),r=a[0],u=a[1];return[].concat(SZn(t),[r],SZn(u))},[]).filter(function(t){return RZn(t)||VZn(t)}).join(",")}function Ja2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function qa2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function RZn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function VZn(e){return/^.*\.[\w]+$/.test(e)}var ei2=["children"],ti2=["open"],ni2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ri2=["refKey","onChange","onClick"];function ai2(e){return ui2(e)||oi2(e)||FZn(e)||ii2()}function ii2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35505
35505
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oi2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ui2(e){if(Array.isArray(e))return cBn(e)}function uBn(e,t){return fi2(e)||li2(e,t)||FZn(e,t)||ci2()}function ci2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
35506
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FZn(e,t){if(e){if(typeof e=="string")return cBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cBn(e,t)}}function cBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function li2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function fi2(e){if(Array.isArray(e))return e}function NZn(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 wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NZn(Object(n),!0).forEach(function(a){lBn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NZn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lBn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uCt(e,t){if(e==null)return{};var n=si2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function si2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var fBn=o.forwardRef(function(e,t){var n=e.children,a=uCt(e,ei2),r=cCt(a),u=r.open,c=uCt(r,ti2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(wt(wt({},c),{},{open:u})))});fBn.displayName="Dropzone";var TZn={disabled:!1,getFilesFromEvent:ja2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};fBn.defaultProps=TZn,fBn.propTypes={children:M.func,accept:M.objectOf(M.arrayOf(M.string)),multiple:M.bool,preventDropOnDocument:M.bool,noClick:M.bool,noKeyboard:M.bool,noDrag:M.bool,noDragEventsBubbling:M.bool,minSize:M.number,maxSize:M.number,maxFiles:M.number,disabled:M.bool,getFilesFromEvent:M.func,onFileDialogCancel:M.func,onFileDialogOpen:M.func,useFsAccessApi:M.bool,autoFocus:M.bool,onDragEnter:M.func,onDragLeave:M.func,onDragOver:M.func,onDrop:M.func,onDropAccepted:M.func,onDropRejected:M.func,onError:M.func,validator:M.func};var sBn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=wt(wt({},TZn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,L=t.noClick,j=t.noKeyboard,P=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,B=o.useMemo(function(){return Qa2(n)},[n]),z=o.useMemo(function(){return Xa2(n)},[n]),V=o.useMemo(function(){return typeof b=="function"?b:ZZn},[b]),I=o.useMemo(function(){return typeof h=="function"?h:ZZn},[h]),x=o.useRef(null),N=o.useRef(null),$=o.useReducer(di2,sBn),F=uBn($,2),ne=F[0],re=F[1],H=ne.isFocused,R=ne.isFileDialogActive,G=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&Ka2()),ue=function(){!G.current&&R&&setTimeout(function(){if(N.current){var he=N.current.files;he.length||(re({type:"closeDialog"}),I())}},300)};o.useEffect(function(){return window.addEventListener("focus",ue,!1),function(){window.removeEventListener("focus",ue,!1)}},[N,R,I,G]);var q=o.useRef([]),de=function(he){x.current&&x.current.contains(he.target)||(he.preventDefault(),q.current=[])};o.useEffect(function(){return w&&(document.addEventListener("dragover",AZn,!1),document.addEventListener("drop",de,!1)),function(){w&&(document.removeEventListener("dragover",AZn),document.removeEventListener("drop",de))}},[x,w]),o.useEffect(function(){return!a&&y&&x.current&&x.current.focus(),function(){}},[x,y,a]);var ce=o.useCallback(function(K){D?D(K):console.error(K)},[D]),Ce=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K),q.current=[].concat(ai2(q.current),[K.target]),oCt(K)&&Promise.resolve(r(K)).then(function(he){if(!(iCt(K)&&!k)){var rt=he.length,ze=rt>0&&Za2({files:he,accept:B,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Mt=rt>0&&!ze;re({isDragAccept:ze,isDragReject:Mt,isDragActive:!0,type:"setDraggedFiles"}),s&&s(K)}}).catch(function(he){return ce(he)})},[r,s,ce,k,B,c,u,l,f,S]),le=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K);var he=oCt(K);if(he&&K.dataTransfer)try{K.dataTransfer.dropEffect="copy"}catch{}return he&&g&&g(K),!1},[g,k]),X=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K);var he=q.current.filter(function(ze){return x.current&&x.current.contains(ze)}),rt=he.indexOf(K.target);rt!==-1&&he.splice(rt,1),q.current=he,!(he.length>0)&&(re({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oCt(K)&&d&&d(K))},[x,d,k]),ge=o.useCallback(function(K,he){var rt=[],ze=[];K.forEach(function(Mt){var je=zZn(Mt,B),Yt=uBn(je,2),fn=Yt[0],jc=Yt[1],AO=HZn(Mt,c,u),RO=uBn(AO,2),aT=RO[0],iT=RO[1],oT=S?S(Mt):null;if(fn&&aT&&!oT)rt.push(Mt);else{var uT=[jc,iT];oT&&(uT=uT.concat(oT)),ze.push({file:Mt,errors:uT.filter(function(cT){return cT})})}}),(!l&&rt.length>1||l&&f>=1&&rt.length>f)&&(rt.forEach(function(Mt){ze.push({file:Mt,errors:[Ta2]})}),rt.splice(0)),re({acceptedFiles:rt,fileRejections:ze,type:"setFiles"}),_&&_(rt,ze,he),ze.length>0&&C&&C(ze,he),rt.length>0&&m&&m(rt,he)},[re,l,B,c,u,f,_,m,C,S]),Be=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K),q.current=[],oCt(K)&&Promise.resolve(r(K)).then(function(he){iCt(K)&&!k||ge(he,K)}).catch(function(he){return ce(he)}),re({type:"reset"})},[r,ge,ce,k]),T=o.useCallback(function(){if(G.current){re({type:"openDialog"}),V();var K={multiple:l,types:z};window.showOpenFilePicker(K).then(function(he){return r(he)}).then(function(he){ge(he,null),re({type:"closeDialog"})}).catch(function(he){Ja2(he)?(I(he),re({type:"closeDialog"})):qa2(he)?(G.current=!1,N.current?(N.current.value=null,N.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}N.current&&(re({type:"openDialog"}),V(),N.current.value=null,N.current.click())},[re,V,I,p,ge,ce,z,l]),Qe=o.useCallback(function(K){!x.current||!x.current.isEqualNode(K.target)||(K.key===" "||K.key==="Enter"||K.keyCode===32||K.keyCode===13)&&(K.preventDefault(),T())},[x,T]),fe=o.useCallback(function(){re({type:"focus"})},[]),Q=o.useCallback(function(){re({type:"blur"})},[]),_e=o.useCallback(function(){L||(Ya2()?setTimeout(T,0):T())},[L,T]),Oe=function(he){return a?null:he},U=function(he){return j?null:Oe(he)},pe=function(he){return P?null:Oe(he)},Le=function(he){k&&he.stopPropagation()},$e=o.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=K.refKey,rt=he===void 0?"ref":he,ze=K.role,Mt=K.onKeyDown,je=K.onFocus,Yt=K.onBlur,fn=K.onClick,jc=K.onDragEnter,AO=K.onDragOver,RO=K.onDragLeave,aT=K.onDrop,iT=uCt(K,ni2);return wt(wt(lBn({onKeyDown:U(Oc(Mt,Qe)),onFocus:U(Oc(je,fe)),onBlur:U(Oc(Yt,Q)),onClick:Oe(Oc(fn,_e)),onDragEnter:pe(Oc(jc,Ce)),onDragOver:pe(Oc(AO,le)),onDragLeave:pe(Oc(RO,X)),onDrop:pe(Oc(aT,Be)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},rt,x),!a&&!j?{tabIndex:0}:{}),iT)}},[x,Qe,fe,Q,_e,Ce,le,X,Be,j,P,a]),xe=o.useCallback(function(K){K.stopPropagation()},[]),Vt=o.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=K.refKey,rt=he===void 0?"ref":he,ze=K.onChange,Mt=K.onClick,je=uCt(K,ri2),Yt=lBn({accept:B,multiple:l,type:"file",style:{display:"none"},onChange:Oe(Oc(ze,Be)),onClick:Oe(Oc(Mt,xe)),tabIndex:-1},rt,N);return wt(wt({},Yt),je)}},[N,n,l,Be,a]);return wt(wt({},ne),{},{isFocused:H&&!a,getRootProps:$e,getInputProps:Vt,rootRef:x,inputRef:N,open:Oe(T)})}function di2(e,t){switch(t.type){case"focus":return wt(wt({},e),{},{isFocused:!0});case"blur":return wt(wt({},e),{},{isFocused:!1});case"openDialog":return wt(wt({},sBn),{},{isFileDialogActive:!0});case"closeDialog":return wt(wt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return wt(wt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return wt(wt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return wt({},sBn);default:return e}}function ZZn(){}const UZn=({fileRejections:e})=>e.length?v.jsx(E.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>Y(t.palette.error.main,.08),borderColor:t=>Y(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=aBn(t);return v.jsxs(E.Box,{sx:{my:1},children:[v.jsxs(E.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?UDn(r):""]}),n.map(u=>v.jsxs(E.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,gi2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return v.jsx(E.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:v.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},_i2=Ht("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${Y(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),mi2=({header:e,description:t,sx:n,...a})=>v.jsxs(E.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[v.jsx(En2,{sx:{width:220}}),v.jsxs("div",{children:[v.jsx(E.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),v.jsx(E.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||v.jsxs(v.Fragment,{children:["Solte os arquivos aqui ou clique",v.jsx(E.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),GZn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,sx:d,dropZoneProps:g,placeholderProps:_,placeholderAlt:m,image:C,tabIndex:h,...b})=>{const{getRootProps:p,getInputProps:y,isDragActive:w,isDragReject:L,fileRejections:j}=cCt({multiple:n,disabled:t,...b}),P=!!u&&!n||C,k=l&&n&&l.length>0,D=L||!!a;return v.jsxs(E.Box,{sx:{width:1,position:"relative",...d},children:[v.jsxs(_i2,{...p(),sx:{...w&&{opacity:.72},...D&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...g},children:[v.jsx("input",{...y(),id:e,tabIndex:h}),m?v.jsx(E.Stack,{sx:{...P&&{opacity:0}},children:m}):v.jsx(mi2,{sx:{...P&&{opacity:0}},header:_==null?void 0:_.title,description:_==null?void 0:_.description}),P&&v.jsx(gi2,{file:u||C||""})]}),r&&v.jsx(E.FormHelperText,{error:!!a,sx:S=>({mx:"14px",color:t?S.palette.grey[500]:void 0}),children:r}),v.jsx(UZn,{fileRejections:j}),P&&c&&v.jsx(E.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:S=>Y(S.palette.common.white,.8),bgcolor:S=>Y(S.palette.grey[900],.72),"&:hover":{bgcolor:S=>Y(S.palette.grey[900],.48)}},children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON",width:18})}),k&&v.jsx(v.Fragment,{children:v.jsx(E.Box,{sx:{my:3},children:v.jsx(ba2,{files:l,thumbnail:f,onRemove:s})})})]})},vi2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return v.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},hi2=Ht("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Y(e.palette.grey[500],.32)}`})),Ci2=Ht("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),YZn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:d,isDragReject:g,fileRejections:_}=cCt({multiple:!1,disabled:a,...l}),m=!!t||n,C=g||!!e;return v.jsxs(v.Fragment,{children:[v.jsxs(hi2,{...f(),sx:{...d&&{opacity:.72},...C&&{borderColor:"error.light",...m&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...m&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[v.jsx("input",{...s(),tabIndex:c}),m&&v.jsx(vi2,{file:t||n||""}),v.jsxs(Ci2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...m&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>Y(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[v.jsx(tt,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),v.jsx(E.Typography,{variant:"caption",children:t?"Update photo":"Upload photo"})]})]}),r&&r,v.jsx(UZn,{fileRejections:_})]})},bi2=Ht("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:Y(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),yi2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=cCt({disabled:n,...u}),d=s||t;return v.jsxs(bi2,{...c(),sx:{...f&&{opacity:.72},...d&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[v.jsx("input",{...l(),tabIndex:r}),e||v.jsx(tt,{icon:"CLOUD_UPLOAD",width:28})]})},pi2=e=>new Promise((t,n)=>{const a=new Image;a.addEventListener("load",()=>t(a)),a.addEventListener("error",r=>n(r)),a.setAttribute("crossOrigin","anonymous"),a.src=e});function KZn(e){return e*Math.PI/180}function Oi2(e,t,n){const a=KZn(n);return{width:Math.abs(Math.cos(a)*e)+Math.abs(Math.sin(a)*t),height:Math.abs(Math.sin(a)*e)+Math.abs(Math.cos(a)*t)}}async function ji2(e,t,n=0,a={horizontal:!1,vertical:!1}){const r=await pi2(e),u=document.createElement("canvas"),c=u.getContext("2d");if(!c)return null;const l=KZn(n),{width:f,height:s}=Oi2(r.width,r.height,n);u.width=f,u.height=s,c.translate(f/2,s/2),c.rotate(l),c.scale(a.horizontal?-1:1,a.vertical?-1:1),c.translate(-r.width/2,-r.height/2),c.drawImage(r,0,0);const d=c.getImageData(t.x,t.y,t.width,t.height);return u.width=t.width,u.height=t.height,c.putImageData(d,0,0),new Promise((g,_)=>{u.toBlob(m=>{g(m)},"image/png")})}const XZn=({onFileCropped:e,onImageUploaded:t,onCancel:n,image:a})=>{const r=o.useId(),[u,c,l]=CSn(),[f,s]=o.useState({x:0,y:0}),[d,g]=o.useState(1),_=o.useRef();return{id:r,crop:f,setCrop:s,zoom:d,setZoom:g,fileRef:_,onCropComplete:async(p,y)=>{try{const w=await ji2(a,y,0);_.current=new File([w],"image.png",{type:w.type})}catch{e(void 0)}},saveChanges:()=>{e(_.current),c()},cancelChanges:()=>{n&&n(),l(!1)},handleRemove:()=>{e(void 0),t(void 0),s({x:0,y:0}),g(1),l(!1)},cropModalOpen:u,toggleCropModalOpen:c,setCropModalOpen:l}},QZn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,imgSrc:c,aspect:l,size:{height:f,width:s},crop:d,zoom:g,onCropComplete:_,onCropChange:m,onZoomChange:C})=>v.jsx(mZn,{open:t,onClose:n,dialogTitle:a,actions:v.jsxs(v.Fragment,{children:[v.jsx(E.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),v.jsx(E.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),children:v.jsxs(E.Stack,{gap:2,children:[v.jsx(ZTn,{image:{width:s,height:f,aspect:l,imgSrc:c},crop:d,zoom:g,onCropComplete:_,onCropChange:m,onZoomChange:C}),v.jsxs(E.Stack,{gap:1.5,children:[v.jsxs(E.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",mr:"auto",children:[v.jsx(E.Typography,{variant:"body1",children:"Zoom"}),v.jsx(E.Slider,{value:g,onChange:(h,b)=>C(Array.isArray(b)?b[0]:b),min:1,max:5,size:"medium",step:.5})]}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(E.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:u,children:"Remover"}),v.jsx(E.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:v.jsx(tt,{icon:"SEARCH_IMAGE",color:$Dn.main}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})}),wi2=E.styled(E.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Mi2=E.styled(E.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:E.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),Li2=E.styled(E.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),JZn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,size:r,label:u,image:c="",uploading:l,file:f,tabIndex:s,...d})=>{const{id:g,crop:_,cropModalOpen:m,zoom:C,cancelChanges:h,handleRemove:b,onCropComplete:p,saveChanges:y,setCrop:w,setCropModalOpen:L,setZoom:j,toggleCropModalOpen:P}=XZn({image:c,onFileCropped:e,onImageUploaded:t,onCancel:n});return v.jsxs(v.Fragment,{children:[v.jsxs(wi2,{children:[l&&v.jsx(Rht,{}),v.jsx(GZn,{...d,id:g,file:f,onDrop:k=>{if(k.length>0){L(!0),j(1),w({x:0,y:0});const D=new FileReader;D.addEventListener("load",()=>{var B;const S=((B=D.result)==null?void 0:B.toString())||"";t(S),e(void 0)}),D.readAsDataURL(k[0])}},image:c,tabIndex:s}),(f||c)&&v.jsxs(Mi2,{className:"actions",children:[v.jsx(E.Button,{color:"inherit",startIcon:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:b,children:"Remover"}),v.jsx(E.Button,{color:"inherit",startIcon:v.jsx(tt,{icon:"SEARCH_IMAGE",color:$Dn.main}),onClick:P,children:"Editar"})]})]}),v.jsx(QZn,{id:g,open:m,onClose:h,label:u,aspect:a,crop:_,zoom:C,onCropComplete:p,onCropChange:w,onZoomChange:j,imgSrc:c,onRemove:b,onSave:y,size:r})]})},Pi2=E.styled(E.Stack)(({theme:e})=>({padding:24,backgroundColor:"white",borderRadius:16,border:`1px solid ${e.palette.grey[300]}`})),Ei2=({children:e,...t})=>v.jsx(Pi2,{gap:3,...t,children:e}),nn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>v.jsx(E.TextField,{...f,onChange:d=>{f.onChange(d),a&&a(d)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},qZn=({name:e,helperText:t,onChange:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,render:({field:c,fieldState:{error:l}})=>v.jsxs("div",{children:[v.jsx(E.FormControlLabel,{control:v.jsx(E.Switch,{...c,checked:c.value,onChange:(f,s)=>{c.onChange(f),n&&n(f,s)},inputProps:{tabIndex:a}}),...r}),(!!l||t)&&v.jsx(E.FormHelperText,{error:!!l,sx:f=>({mx:"14px",color:r.disabled?f.palette.grey[500]:void 0}),children:l?l==null?void 0:l.message:t})]})})},ki2=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BINÁRIO",value:"BYTEA"}],Si2=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}],Di2=E.styled(E.Stack)(({theme:e})=>({border:`1px solid ${E.alpha(e.palette.primary.main,.3)}`,backgroundColor:E.alpha(e.palette.primary.main,.05),flexDirection:"row",alignItems:"center",padding:10,gap:10,borderRadius:8,marginBottom:8,svg:{color:e.palette.primary.main}})),Bi2=E.styled(E.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}})),Wi2=E.styled(E.IconButton)(()=>({height:"38px",alignSelf:"center"})),Ii2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Ie.useFormContext(),{fields:r,append:u,remove:c}=Ie.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return v.jsxs(v.Fragment,{children:[n&&v.jsxs(Di2,{children:[v.jsx(tt,{icon:"INFO_CIRCLE"}),v.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais acessando a documentação do Webhook"})]}),t&&v.jsx(nn,{name:"name",label:"Nome do webhook"}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),v.jsx(nn,{name:"filter",label:"Filtro"})]}),t&&e&&v.jsxs(v.Fragment,{children:[v.jsx(nn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),v.jsx(nn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(Bi2,{onClick:()=>navigator.clipboard.writeText(e.resourceID),children:v.jsx(tt,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),v.jsx(nn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsxs(E.Stack,{width:"35%",gap:2,children:[v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Tipo de conteúdo:"}),v.jsx(dBn,{name:"content_type",options:ki2,row:!0,decorated:!0})]}),v.jsxs(E.Stack,{gap:2,children:[v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Métodos Http:"}),v.jsx(dBn,{name:"http_method",options:Si2,row:!0,decorated:!0})]})]}),v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Status:"}),v.jsx(qZn,{name:"active",label:"Ativo"}),v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Cabeçalho:"}),r==null?void 0:r.map((f,s)=>v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{name:`headers.${s}.name`,label:"Chave",rules:{required:{value:!0,message:"Chave é obrigatório"}}}),v.jsx(nn,{name:`headers.${s}.value`,label:"Valor",rules:{required:{value:!0,message:"Valor é obrigatório"}}}),v.jsx(Wi2,{onClick:()=>c(s),color:"error",children:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),v.jsx(oRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),v.jsx(E.Divider,{})]})},eUn=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>v.jsx(Qkn,{...c,...r,onChange:f=>{a&&a(f),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},tUn=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{name:u,onChange:c,value:l,ref:f},fieldState:{error:s}})=>v.jsx(eBn,{ref:f,...a,name:u,value:l,error:!!s,helperText:(s==null?void 0:s.message)||t,onChange:({target:{value:d}})=>c(d)})})},$i2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,d=`${e}.state`,g=`${e}.city`,_=m=>{m.key==="Enter"&&m.preventDefault()};return v.jsxs(E.Stack,{gap:1.5,...t,children:[v.jsxs(E.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[v.jsx(tUn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.CircularProgress,{size:24})})},rules:a,onKeyDown:_,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),v.jsxs(E.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[v.jsx(nn,{name:c,label:"Logradouro",onKeyDown:_,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),v.jsx(nn,{name:l,label:"Número",onKeyDown:_,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),v.jsxs(E.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[v.jsx(nn,{name:f,label:"Bairro",onKeyDown:_,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),v.jsx(nn,{name:s,label:"Complemento",onKeyDown:_,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),v.jsxs(E.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[v.jsx(eUn,{name:d,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),v.jsx(nn,{name:g,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},xi2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>v.jsxs("div",{children:[v.jsx(E.FormControlLabel,{control:v.jsx(E.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&v.jsx(E.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},zi2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Ie.useFormContext(),d=(g,_)=>g.includes(_)?g.filter(m=>m!==_):[...g,_];return v.jsx(Ie.Controller,{name:t,control:s,rules:n,render:({field:{value:g=[],..._},fieldState:{error:m}})=>v.jsxs(E.FormControl,{component:"fieldset",children:[a&&v.jsx(E.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),v.jsx(E.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>v.jsx(E.FormControlLabel,{control:v.jsx(E.Checkbox,{checked:g.includes(C.value),onChange:()=>_.onChange(d(g,C.value))}),label:C.label,...f},C.value))}),(!!m||c)&&v.jsx(E.FormHelperText,{error:!!m,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:m?m==null?void 0:m.message:c})]})})},Hi2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Ie.useFormContext(),s=_=>{const m=_.clipboardData.getData("text").split("");t.map((C,h)=>l(C,m[h])),_.preventDefault()},d=(_,m)=>{const{maxLength:C,value:h,name:b}=_.target,p=b.replace(e,""),y=Number(p),w=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(_.target.value=h[0]),h.length>=C&&y<6&&w!==null&&w.focus(),m(_)};hSn("paste",s,u);const g=t.some(_=>f[_]);return v.jsxs(E.Stack,{children:[v.jsx(E.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((_,m)=>v.jsx(Ie.Controller,{name:`${e}${m+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>v.jsx(E.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:m===0,placeholder:"-",onChange:b=>{d(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},_))}),g&&v.jsx(E.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Ai2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>v.jsx(_Nn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Ri2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Vi2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:d},fieldState:{error:g}})=>v.jsx(lT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:_=>d({startDate:_[0],endDate:_[1]}),onError:_=>{f(e,{message:_[0]||_[1]||void 0})},...c,slotProps:{textField:({position:_})=>{var m;return{...(m=c.slotProps)==null?void 0:m.textField,required:u,error:!!g,helperText:(g==null?void 0:g.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:_==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Fi2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Ni2=({id:e,children:t,onSubmit:n,methods:a,...r})=>v.jsx(Ie.FormProvider,{...a,children:v.jsx(E.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Ti2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>v.jsx(XDn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Zi2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>v.jsx(Qht,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},Ui2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,...l})=>{const{watch:f}=Ie.useFormContext(),s=f(e),[d,g]=o.useState(!1),{hasNumberChar:_,hasSpecialCharacter:m,hasUpperCaseChar:C,isLengthValid:h}=nCt(s,a,c,r,u);return v.jsx(nn,{...l,name:e,type:d?"text":"password",InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{onClick:()=>g(!d),edge:"end","aria-label":"Mostrar/Ocultar senha",children:v.jsx(tt,{icon:d?"VIEW_OFF":"VIEW_ON"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:b=>{const p=nCt(b,a,c,r,u);return!p.hasNumberChar||!p.hasSpecialCharacter||!p.hasUpperCaseChar||!p.isLengthValid?"Senha inválida":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:!m||!C||!h||!_?"none":void 0}}})},dBn=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:d,disabled:g,..._})=>{const{control:m}=Ie.useFormContext(),C=a?`${e}-${a}`:"";return v.jsx(Ie.Controller,{name:e,control:m,rules:t,render:({field:h,fieldState:{error:b}})=>v.jsxs(E.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&v.jsx(E.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:d,children:a}),v.jsx(E.RadioGroup,{..._,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>v.jsx(E.FormControlLabel,{value:p.value,control:v.jsx(E.Radio,{inputProps:{tabIndex:s},disabled:g,checked:p.value===h.value}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${E.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:E.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&v.jsx(E.FormHelperText,{error:!!b,sx:p=>({color:g?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},Gi2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yi2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,size:r,label:u,image:c="",uploading:l,file:f,tabIndex:s,...d})=>{const{id:g,crop:_,cropModalOpen:m,zoom:C,cancelChanges:h,handleRemove:b,onCropComplete:p,saveChanges:y,setCrop:w,setCropModalOpen:L,setZoom:j}=XZn({image:c,onFileCropped:e,onImageUploaded:t,onCancel:n});return v.jsxs(v.Fragment,{children:[v.jsxs(E.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[l&&v.jsx(Li2,{}),v.jsx(YZn,{...d,id:g,file:f,onDrop:P=>{if(P.length>0){L(!0),j(1),w({x:0,y:0});const k=new FileReader;k.addEventListener("load",()=>{var S;const D=((S=k.result)==null?void 0:S.toString())||"";t(D),e(void 0)}),k.readAsDataURL(P[0])}},image:c,tabIndex:s})]}),v.jsx(QZn,{id:g,open:m,onClose:h,label:u,aspect:a,crop:_,zoom:C,onCropComplete:p,onCropChange:w,onZoomChange:j,imgSrc:c,onRemove:b,onSave:y,size:r})]})};function nUn(e,t){const{watch:n,setValue:a}=Ie.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async _=>{if(!_){a(e,void 0),u(void 0);return}a(e,_),u(Object.assign(_,{preview:URL.createObjectURL(_)}))},uploadFiles:async _=>{a(e,[...c,..._.map(m=>Object.assign(m,{preview:URL.createObjectURL(m)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:_=>{const m=c.filter(C=>C!==_);a(e,m)},file:r,setFileValue:u}}const Ki2=({name:e,rules:t,helperText:n,aspect:a,label:r,size:u,image:c,onFileCropped:l,onImageUploaded:f,onCancel:s,...d})=>{const{control:g}=Ie.useFormContext(),{uploadFile:_,file:m,setFileValue:C}=nUn(e);return v.jsx(Ie.Controller,{name:e,control:g,rules:t,render:({field:{value:h},fieldState:{error:b}})=>v.jsx(Yi2,{accept:{"image/*":[]},file:h?m:void 0,onFileCropped:p=>{_(p),l&&l(p)},onImageUploaded:f,onCancel:()=>{C(void 0),s&&s()},error:!!b,disableMultiple:!0,helperText:(!!b||n)&&v.jsx(E.FormHelperText,{error:!!b,sx:{px:2},children:b?b==null?void 0:b.message:n}),aspect:a,label:r,size:u,image:c,...d})})},Xi2=({name:e,rules:t,helperText:n,aspect:a,label:r,size:u,image:c,onFileCropped:l,onImageUploaded:f,onCancel:s,...d})=>{const{control:g}=Ie.useFormContext(),{uploadFile:_,file:m,setFileValue:C}=nUn(e);return v.jsx(Ie.Controller,{name:e,control:g,rules:t,render:({field:{value:h},fieldState:{error:b}})=>v.jsx(JZn,{accept:{"image/*":[]},file:h?m:void 0,onFileCropped:p=>{_(p),l&&l(p)},onImageUploaded:f,onCancel:()=>{C(void 0),s&&s()},error:!!b,disableMultiple:!0,helperText:(!!b||n)&&v.jsx(E.FormHelperText,{error:!!b,sx:{px:2},children:b?b==null?void 0:b.message:n}),aspect:a,label:r,size:u,image:c,...d})})},Qi2=Object.freeze(Object.defineProperty({__proto__:null,default:EXn},Symbol.toStringTag,{value:"Module"}));A.ActionButton=oRn,A.Address=$i2,A.Autocomplete=Qkn,A.AutocompleteField=eUn,A.BuilderLayout=$So,A.BuilderSidebar=uzo,A.Carousel=CLo,A.CarouselArrowIndex=fEo,A.CarouselArrows=JPo,A.CarouselDots=OLo,A.Checkbox=xi2,A.Codes=Hi2,A.ColorPickerField=Ai2,A.ColorPickerInput=_Nn,A.Common=bn2,A.CommonSSR=pn2,A.Confirm=On2,A.CustomAvatar=_Tn,A.CustomAvatarGroup=mTn,A.DataGrid=Sn2,A.DatePicker=Ri2,A.DateRangePicker=Vi2,A.DateTimePicker=Fi2,A.Delayed=Dn2,A.DialogAnimate=eQn,A.Drawer=Fn2,A.EmptyContent=AHn,A.EmptyView=hTn,A.FabButtonAnimate=t$n,A.Field=nn,A.FixedProgressBar=Rht,A.Form=Ni2,A.HelpButton=bRn,A.Icon=tt,A.IconButtonAnimate=n$n,A.Iconify=vr,A.ImageCrop=ZTn,A.Incrementer=XDn,A.IncrementerField=Ti2,A.Label=iZn,A.Lightbox=dSo,A.LoadingScreen=Ur2,A.MaskedInput=eBn,A.MaskedInputField=tUn,A.MaterialDesignContent=Axn,A.MenuPopover=l12,A.Modal=mZn,A.ModalActions=_12,A.MotionContainer=yer,A.MotionLazyContainer=Kbt,A.MotionViewport=ber,A.MultiCheckbox=zi2,A.NumberInput=Qht,A.NumberInputField=Zi2,A.PasswordField=Ui2,A.PasswordRules=y12,A.Portal=vZn,A.RadioGroupField=dBn,A.SavedChanges=V12,A.Scrollbar=kTn,A.SearchInput=F12,A.SnackbarContent=ryt,A.SnackbarProvider=Fxn,A.SplashScreen=N12,A.Steps=U12,A.StyledTab=G12,A.StyledTabs=Y12,A.Switch=qZn,A.TRANSITION=OBn,A.TabPanel=K12,A.TableEmptyRows=hEo,A.TableHeadCustom=bEo,A.TableNoData=mEo,A.TablePaginationCustom=pEo,A.TableSelectedAction=yEo,A.TableSkeleton=vEo,A.TextAnimate=tQn,A.TextMaxLine=yZn,A.ThemeProvider=gTn,A.TimePicker=Gi2,A.Transition=nvt,A.Upload=GZn,A.UploadAvatar=YZn,A.UploadAvatarWithCropField=Ki2,A.UploadBox=yi2,A.UploadWithCrop=JZn,A.UploadWithCropField=Xi2,A.Webhook=Ii2,A.WhiteBox=Ei2,A.color=qe2,A.cssStyles=cEo,A.emptyRows=sEo,A.file=p12,A.formatNumber=yr2,A.formatTime=B12,A.getComparator=dEo,A.loadable=R12,A.mask=H12,A.number=_r2,A.routes=I12,A.sort=z12,A.useActiveElement=xSo,A.useCarousel=bLo,A.useCopyToClipboard=zSo,A.useDatagrid=HSo,A.useDeepCompareEffect=Qxo,A.useEventListener=hSn,A.useIsMounting=qxo,A.useLightBox=mSo,A.useOffSetTop=rzo,A.useOnClickOutside=nzo,A.usePagination=tzo,A.useResponsive=mxn,A.useSnackbar=Jer,A.useTable=gEo,A.useTabs=ezo,A.useToggle=CSn,A.uuidv4=A12,A.validators=h12,A.varBgColor=_Un,A.varBgKenburns=mUn,A.varBgPan=vUn,A.varBounce=sUn,A.varContainer=K_t,A.varFade=Ice,A.varFlip=cUn,A.varHover=gUn,A.varPath=iUn,A.varRotate=dUn,A.varScale=fUn,A.varSlide=lUn,A.varTranEnter=We,A.varTranExit=Fe,A.varTranHover=oUn,A.varZoom=uUn,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
35506
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FZn(e,t){if(e){if(typeof e=="string")return cBn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cBn(e,t)}}function cBn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function li2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,u=!1,c,l;try{for(n=n.call(e);!(r=(c=n.next()).done)&&(a.push(c.value),!(t&&a.length===t));r=!0);}catch(f){u=!0,l=f}finally{try{!r&&n.return!=null&&n.return()}finally{if(u)throw l}}return a}}function fi2(e){if(Array.isArray(e))return e}function NZn(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 wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NZn(Object(n),!0).forEach(function(a){lBn(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NZn(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lBn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uCt(e,t){if(e==null)return{};var n=si2(e,t),a,r;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)a=u[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function si2(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var fBn=o.forwardRef(function(e,t){var n=e.children,a=uCt(e,ei2),r=cCt(a),u=r.open,c=uCt(r,ti2);return o.useImperativeHandle(t,function(){return{open:u}},[u]),o.createElement(o.Fragment,null,n(wt(wt({},c),{},{open:u})))});fBn.displayName="Dropzone";var TZn={disabled:!1,getFilesFromEvent:ja2,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};fBn.defaultProps=TZn,fBn.propTypes={children:M.func,accept:M.objectOf(M.arrayOf(M.string)),multiple:M.bool,preventDropOnDocument:M.bool,noClick:M.bool,noKeyboard:M.bool,noDrag:M.bool,noDragEventsBubbling:M.bool,minSize:M.number,maxSize:M.number,maxFiles:M.number,disabled:M.bool,getFilesFromEvent:M.func,onFileDialogCancel:M.func,onFileDialogOpen:M.func,useFsAccessApi:M.bool,autoFocus:M.bool,onDragEnter:M.func,onDragLeave:M.func,onDragOver:M.func,onDrop:M.func,onDropAccepted:M.func,onDropRejected:M.func,onError:M.func,validator:M.func};var sBn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cCt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=wt(wt({},TZn),e),n=t.accept,a=t.disabled,r=t.getFilesFromEvent,u=t.maxSize,c=t.minSize,l=t.multiple,f=t.maxFiles,s=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,C=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,p=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,L=t.noClick,j=t.noKeyboard,P=t.noDrag,k=t.noDragEventsBubbling,D=t.onError,S=t.validator,B=o.useMemo(function(){return Qa2(n)},[n]),z=o.useMemo(function(){return Xa2(n)},[n]),V=o.useMemo(function(){return typeof b=="function"?b:ZZn},[b]),I=o.useMemo(function(){return typeof h=="function"?h:ZZn},[h]),x=o.useRef(null),N=o.useRef(null),$=o.useReducer(di2,sBn),F=uBn($,2),ne=F[0],re=F[1],H=ne.isFocused,R=ne.isFileDialogActive,G=o.useRef(typeof window<"u"&&window.isSecureContext&&p&&Ka2()),ue=function(){!G.current&&R&&setTimeout(function(){if(N.current){var he=N.current.files;he.length||(re({type:"closeDialog"}),I())}},300)};o.useEffect(function(){return window.addEventListener("focus",ue,!1),function(){window.removeEventListener("focus",ue,!1)}},[N,R,I,G]);var q=o.useRef([]),de=function(he){x.current&&x.current.contains(he.target)||(he.preventDefault(),q.current=[])};o.useEffect(function(){return w&&(document.addEventListener("dragover",AZn,!1),document.addEventListener("drop",de,!1)),function(){w&&(document.removeEventListener("dragover",AZn),document.removeEventListener("drop",de))}},[x,w]),o.useEffect(function(){return!a&&y&&x.current&&x.current.focus(),function(){}},[x,y,a]);var ce=o.useCallback(function(K){D?D(K):console.error(K)},[D]),Ce=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K),q.current=[].concat(ai2(q.current),[K.target]),oCt(K)&&Promise.resolve(r(K)).then(function(he){if(!(iCt(K)&&!k)){var rt=he.length,ze=rt>0&&Za2({files:he,accept:B,minSize:c,maxSize:u,multiple:l,maxFiles:f,validator:S}),Mt=rt>0&&!ze;re({isDragAccept:ze,isDragReject:Mt,isDragActive:!0,type:"setDraggedFiles"}),s&&s(K)}}).catch(function(he){return ce(he)})},[r,s,ce,k,B,c,u,l,f,S]),le=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K);var he=oCt(K);if(he&&K.dataTransfer)try{K.dataTransfer.dropEffect="copy"}catch{}return he&&g&&g(K),!1},[g,k]),X=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K);var he=q.current.filter(function(ze){return x.current&&x.current.contains(ze)}),rt=he.indexOf(K.target);rt!==-1&&he.splice(rt,1),q.current=he,!(he.length>0)&&(re({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oCt(K)&&d&&d(K))},[x,d,k]),ge=o.useCallback(function(K,he){var rt=[],ze=[];K.forEach(function(Mt){var je=zZn(Mt,B),Yt=uBn(je,2),fn=Yt[0],jc=Yt[1],AO=HZn(Mt,c,u),RO=uBn(AO,2),aT=RO[0],iT=RO[1],oT=S?S(Mt):null;if(fn&&aT&&!oT)rt.push(Mt);else{var uT=[jc,iT];oT&&(uT=uT.concat(oT)),ze.push({file:Mt,errors:uT.filter(function(cT){return cT})})}}),(!l&&rt.length>1||l&&f>=1&&rt.length>f)&&(rt.forEach(function(Mt){ze.push({file:Mt,errors:[Ta2]})}),rt.splice(0)),re({acceptedFiles:rt,fileRejections:ze,type:"setFiles"}),_&&_(rt,ze,he),ze.length>0&&C&&C(ze,he),rt.length>0&&m&&m(rt,he)},[re,l,B,c,u,f,_,m,C,S]),Be=o.useCallback(function(K){K.preventDefault(),K.persist(),Le(K),q.current=[],oCt(K)&&Promise.resolve(r(K)).then(function(he){iCt(K)&&!k||ge(he,K)}).catch(function(he){return ce(he)}),re({type:"reset"})},[r,ge,ce,k]),T=o.useCallback(function(){if(G.current){re({type:"openDialog"}),V();var K={multiple:l,types:z};window.showOpenFilePicker(K).then(function(he){return r(he)}).then(function(he){ge(he,null),re({type:"closeDialog"})}).catch(function(he){Ja2(he)?(I(he),re({type:"closeDialog"})):qa2(he)?(G.current=!1,N.current?(N.current.value=null,N.current.click()):ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ce(he)});return}N.current&&(re({type:"openDialog"}),V(),N.current.value=null,N.current.click())},[re,V,I,p,ge,ce,z,l]),Qe=o.useCallback(function(K){!x.current||!x.current.isEqualNode(K.target)||(K.key===" "||K.key==="Enter"||K.keyCode===32||K.keyCode===13)&&(K.preventDefault(),T())},[x,T]),fe=o.useCallback(function(){re({type:"focus"})},[]),Q=o.useCallback(function(){re({type:"blur"})},[]),_e=o.useCallback(function(){L||(Ya2()?setTimeout(T,0):T())},[L,T]),Oe=function(he){return a?null:he},U=function(he){return j?null:Oe(he)},pe=function(he){return P?null:Oe(he)},Le=function(he){k&&he.stopPropagation()},$e=o.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=K.refKey,rt=he===void 0?"ref":he,ze=K.role,Mt=K.onKeyDown,je=K.onFocus,Yt=K.onBlur,fn=K.onClick,jc=K.onDragEnter,AO=K.onDragOver,RO=K.onDragLeave,aT=K.onDrop,iT=uCt(K,ni2);return wt(wt(lBn({onKeyDown:U(Oc(Mt,Qe)),onFocus:U(Oc(je,fe)),onBlur:U(Oc(Yt,Q)),onClick:Oe(Oc(fn,_e)),onDragEnter:pe(Oc(jc,Ce)),onDragOver:pe(Oc(AO,le)),onDragLeave:pe(Oc(RO,X)),onDrop:pe(Oc(aT,Be)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},rt,x),!a&&!j?{tabIndex:0}:{}),iT)}},[x,Qe,fe,Q,_e,Ce,le,X,Be,j,P,a]),xe=o.useCallback(function(K){K.stopPropagation()},[]),Vt=o.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},he=K.refKey,rt=he===void 0?"ref":he,ze=K.onChange,Mt=K.onClick,je=uCt(K,ri2),Yt=lBn({accept:B,multiple:l,type:"file",style:{display:"none"},onChange:Oe(Oc(ze,Be)),onClick:Oe(Oc(Mt,xe)),tabIndex:-1},rt,N);return wt(wt({},Yt),je)}},[N,n,l,Be,a]);return wt(wt({},ne),{},{isFocused:H&&!a,getRootProps:$e,getInputProps:Vt,rootRef:x,inputRef:N,open:Oe(T)})}function di2(e,t){switch(t.type){case"focus":return wt(wt({},e),{},{isFocused:!0});case"blur":return wt(wt({},e),{},{isFocused:!1});case"openDialog":return wt(wt({},sBn),{},{isFileDialogActive:!0});case"closeDialog":return wt(wt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return wt(wt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return wt(wt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return wt({},sBn);default:return e}}function ZZn(){}const UZn=({fileRejections:e})=>e.length?v.jsx(E.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:t=>Y(t.palette.error.main,.08),borderColor:t=>Y(t.palette.error.main,.24)},children:e.map(({file:t,errors:n})=>{const{path:a,size:r}=aBn(t);return v.jsxs(E.Box,{sx:{my:1},children:[v.jsxs(E.Typography,{variant:"subtitle2",noWrap:!0,children:[a," - ",r?UDn(r):""]}),n.map(u=>v.jsxs(E.Box,{component:"span",sx:{typography:"caption"},children:["- ",u.message]},u.code))]},a)})}):null,gi2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return v.jsx(E.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:v.jsx("img",{alt:"file preview",src:t,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},_i2=Ht("div")(({theme:e})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${Y(e.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),mi2=({header:e,description:t,sx:n,...a})=>v.jsxs(E.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...a,children:[v.jsx(En2,{sx:{width:220}}),v.jsxs("div",{children:[v.jsx(E.Typography,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),v.jsx(E.Typography,{variant:"body2",sx:{color:"text.secondary"},children:t||v.jsxs(v.Fragment,{children:["Solte os arquivos aqui ou clique",v.jsx(E.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),GZn=({id:e,disabled:t,multiple:n=!1,error:a,helperText:r,file:u,onDelete:c,files:l,thumbnail:f,onRemove:s,sx:d,dropZoneProps:g,placeholderProps:_,placeholderAlt:m,image:C,tabIndex:h,...b})=>{const{getRootProps:p,getInputProps:y,isDragActive:w,isDragReject:L,fileRejections:j}=cCt({multiple:n,disabled:t,...b}),P=!!u&&!n||C,k=l&&n&&l.length>0,D=L||!!a;return v.jsxs(E.Box,{sx:{width:1,position:"relative",...d},children:[v.jsxs(_i2,{...p(),sx:{...w&&{opacity:.72},...D&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...t&&{opacity:.48,pointerEvents:"none"},...g},children:[v.jsx("input",{...y(),id:e,tabIndex:h}),m?v.jsx(E.Stack,{sx:{...P&&{opacity:0}},children:m}):v.jsx(mi2,{sx:{...P&&{opacity:0}},header:_==null?void 0:_.title,description:_==null?void 0:_.description}),P&&v.jsx(gi2,{file:u||C||""})]}),r&&v.jsx(E.FormHelperText,{error:!!a,sx:S=>({mx:"14px",color:t?S.palette.grey[500]:void 0}),children:r}),v.jsx(UZn,{fileRejections:j}),P&&c&&v.jsx(E.IconButton,{size:"small",onClick:c,sx:{top:16,right:16,zIndex:9,position:"absolute",color:S=>Y(S.palette.common.white,.8),bgcolor:S=>Y(S.palette.grey[900],.72),"&:hover":{bgcolor:S=>Y(S.palette.grey[900],.48)}},children:v.jsx(tt,{icon:"CLOSE_MARK_BUTTON",width:18})}),k&&v.jsx(v.Fragment,{children:v.jsx(E.Box,{sx:{my:3},children:v.jsx(ba2,{files:l,thumbnail:f,onRemove:s})})})]})},vi2=({file:e})=>{if(!e)return null;const t=typeof e=="string"?e:e.preview;return v.jsx("img",{alt:"avatar",src:t,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},hi2=Ht("div")(({theme:e})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Y(e.palette.grey[500],.32)}`})),Ci2=Ht("div")(({theme:e})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:e.palette.text.disabled,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter})})),YZn=({error:e,file:t,image:n,disabled:a,helperText:r,sx:u,tabIndex:c,...l})=>{const{getRootProps:f,getInputProps:s,isDragActive:d,isDragReject:g,fileRejections:_}=cCt({multiple:!1,disabled:a,...l}),m=!!t||n,C=g||!!e;return v.jsxs(v.Fragment,{children:[v.jsxs(hi2,{...f(),sx:{...d&&{opacity:.72},...C&&{borderColor:"error.light",...m&&{bgcolor:"error.lighter"}},...a&&{opacity:.48,pointerEvents:"none"},...m&&{"&:hover":{"& .placeholder":{opacity:1}}},...u},children:[v.jsx("input",{...s(),tabIndex:c}),m&&v.jsx(vi2,{file:t||n||""}),v.jsxs(Ci2,{className:"placeholder",sx:{"&:hover":{opacity:.72},...m&&{zIndex:9,opacity:0,color:"common.white",bgcolor:h=>Y(h.palette.grey[900],.64)},...C&&{color:"error.main",bgcolor:"error.lighter"}},children:[v.jsx(tt,{icon:"ADD_IMAGE",width:24,sx:{mb:1}}),v.jsx(E.Typography,{variant:"caption",children:t?"Update photo":"Upload photo"})]})]}),r&&r,v.jsx(UZn,{fileRejections:_})]})},bi2=Ht("div")(({theme:e})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:e.spacing(.5),color:e.palette.text.disabled,borderRadius:e.shape.borderRadius,border:`dashed 1px ${e.palette.divider}`,backgroundColor:Y(e.palette.grey[500],.08),"&:hover":{opacity:.72}})),yi2=({placeholderAlt:e,error:t,disabled:n,sx:a,tabIndex:r,...u})=>{const{getRootProps:c,getInputProps:l,isDragActive:f,isDragReject:s}=cCt({disabled:n,...u}),d=s||t;return v.jsxs(bi2,{...c(),sx:{...f&&{opacity:.72},...d&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...a},children:[v.jsx("input",{...l(),tabIndex:r}),e||v.jsx(tt,{icon:"CLOUD_UPLOAD",width:28})]})},pi2=e=>new Promise((t,n)=>{const a=new Image;a.addEventListener("load",()=>t(a)),a.addEventListener("error",r=>n(r)),a.setAttribute("crossOrigin","anonymous"),a.src=e});function KZn(e){return e*Math.PI/180}function Oi2(e,t,n){const a=KZn(n);return{width:Math.abs(Math.cos(a)*e)+Math.abs(Math.sin(a)*t),height:Math.abs(Math.sin(a)*e)+Math.abs(Math.cos(a)*t)}}async function ji2(e,t,n=0,a={horizontal:!1,vertical:!1}){const r=await pi2(e),u=document.createElement("canvas"),c=u.getContext("2d");if(!c)return null;const l=KZn(n),{width:f,height:s}=Oi2(r.width,r.height,n);u.width=f,u.height=s,c.translate(f/2,s/2),c.rotate(l),c.scale(a.horizontal?-1:1,a.vertical?-1:1),c.translate(-r.width/2,-r.height/2),c.drawImage(r,0,0);const d=c.getImageData(t.x,t.y,t.width,t.height);return u.width=t.width,u.height=t.height,c.putImageData(d,0,0),new Promise((g,_)=>{u.toBlob(m=>{g(m)},"image/png")})}const XZn=({onFileCropped:e,onImageUploaded:t,onCancel:n,image:a})=>{const r=o.useId(),[u,c,l]=CSn(),[f,s]=o.useState({x:0,y:0}),[d,g]=o.useState(1),_=o.useRef();return{id:r,crop:f,setCrop:s,zoom:d,setZoom:g,fileRef:_,onCropComplete:async(p,y)=>{try{const w=await ji2(a,y,0);_.current=new File([w],"image.png",{type:w.type})}catch{e(void 0)}},saveChanges:()=>{e(_.current),c()},cancelChanges:()=>{n&&n(),l(!1)},handleRemove:()=>{e(void 0),t(void 0),s({x:0,y:0}),g(1),l(!1)},cropModalOpen:u,toggleCropModalOpen:c,setCropModalOpen:l}},QZn=({id:e,open:t,onClose:n,label:a,onSave:r,onRemove:u,imgSrc:c,aspect:l,size:{height:f,width:s},crop:d,zoom:g,onCropComplete:_,onCropChange:m,onZoomChange:C})=>v.jsx(mZn,{open:t,onClose:n,dialogTitle:a,actions:v.jsxs(v.Fragment,{children:[v.jsx(E.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),v.jsx(E.Button,{variant:"contained",size:"medium",onClick:r,children:"Salvar"})]}),children:v.jsxs(E.Stack,{gap:2,children:[v.jsx(ZTn,{image:{width:s,height:f,aspect:l,imgSrc:c},crop:d,zoom:g,onCropComplete:_,onCropChange:m,onZoomChange:C}),v.jsxs(E.Stack,{gap:1.5,children:[v.jsxs(E.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",mr:"auto",children:[v.jsx(E.Typography,{variant:"body1",children:"Zoom"}),v.jsx(E.Slider,{value:g,onChange:(h,b)=>C(Array.isArray(b)?b[0]:b),min:1,max:5,size:"medium",step:.5})]}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(E.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:u,children:"Remover"}),v.jsx(E.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:v.jsx(tt,{icon:"SEARCH_IMAGE",color:$Dn.main}),component:"label",htmlFor:e,children:"Alterar"})]})]})]})}),wi2=E.styled(E.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Mi2=E.styled(E.Stack)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:E.alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),Li2=E.styled(E.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),JZn=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,size:r,label:u,image:c="",uploading:l,file:f,tabIndex:s,...d})=>{const{id:g,crop:_,cropModalOpen:m,zoom:C,cancelChanges:h,handleRemove:b,onCropComplete:p,saveChanges:y,setCrop:w,setCropModalOpen:L,setZoom:j,toggleCropModalOpen:P}=XZn({image:c,onFileCropped:e,onImageUploaded:t,onCancel:n});return v.jsxs(v.Fragment,{children:[v.jsxs(wi2,{children:[l&&v.jsx(Rht,{}),v.jsx(GZn,{...d,id:g,file:f,onDrop:k=>{if(k.length>0){L(!0),j(1),w({x:0,y:0});const D=new FileReader;D.addEventListener("load",()=>{var B;const S=((B=D.result)==null?void 0:B.toString())||"";t(S),e(void 0)}),D.readAsDataURL(k[0])}},image:c,tabIndex:s}),(f||c)&&v.jsxs(Mi2,{className:"actions",children:[v.jsx(E.Button,{color:"inherit",startIcon:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02",color:"error.main"}),onClick:b,children:"Remover"}),v.jsx(E.Button,{color:"inherit",startIcon:v.jsx(tt,{icon:"SEARCH_IMAGE",color:$Dn.main}),onClick:P,children:"Editar"})]})]}),v.jsx(QZn,{id:g,open:m,onClose:h,label:u,aspect:a,crop:_,zoom:C,onCropComplete:p,onCropChange:w,onZoomChange:j,imgSrc:c,onRemove:b,onSave:y,size:r})]})},Pi2=E.styled(E.Stack)(({theme:e})=>({padding:24,backgroundColor:"white",borderRadius:16,border:`1px solid ${e.palette.grey[300]}`})),Ei2=({children:e,...t})=>v.jsx(Pi2,{gap:3,...t,children:e}),nn=({name:e,helperText:t,rules:n,onChange:a,tabIndex:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:n,render:({field:{ref:l,...f},fieldState:{error:s}})=>v.jsx(E.TextField,{...f,onChange:d=>{f.onChange(d),a&&a(d)},inputRef:l,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||t,...u,inputProps:{...u.inputProps,tabIndex:r}})})},qZn=({name:e,helperText:t,onChange:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,render:({field:c,fieldState:{error:l}})=>v.jsxs("div",{children:[v.jsx(E.FormControlLabel,{control:v.jsx(E.Switch,{...c,checked:c.value,onChange:(f,s)=>{c.onChange(f),n&&n(f,s)},inputProps:{tabIndex:a}}),...r}),(!!l||t)&&v.jsx(E.FormHelperText,{error:!!l,sx:f=>({mx:"14px",color:r.disabled?f.palette.grey[500]:void 0}),children:l?l==null?void 0:l.message:t})]})})},ki2=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BINÁRIO",value:"BYTEA"}],Si2=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}],Di2=E.styled(E.Stack)(({theme:e})=>({border:`1px solid ${E.alpha(e.palette.primary.main,.3)}`,backgroundColor:E.alpha(e.palette.primary.main,.05),flexDirection:"row",alignItems:"center",padding:10,gap:10,borderRadius:8,marginBottom:8,svg:{color:e.palette.primary.main}})),Bi2=E.styled(E.IconButton)(({theme:e})=>({svg:{color:`${e.palette.primary.main} !important`}})),Wi2=E.styled(E.IconButton)(()=>({height:"38px",alignSelf:"center"})),Ii2=({webhookData:e,isEditing:t=!1,haveTip:n=!1})=>{const{control:a}=Ie.useFormContext(),{fields:r,append:u,remove:c}=Ie.useFieldArray({name:"headers",control:a}),l=()=>{u({value:"",name:""})};return v.jsxs(v.Fragment,{children:[n&&v.jsxs(Di2,{children:[v.jsx(tt,{icon:"INFO_CIRCLE"}),v.jsx(E.Typography,{variant:"caption",color:"text.secondary",children:"Webhooks permitem que serviços externos sejam notificados quando determinados eventos acontecem. Saiba mais acessando a documentação do Webhook"})]}),t&&v.jsx(nn,{name:"name",label:"Nome do webhook"}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url é obrigatório"}}}),v.jsx(nn,{name:"filter",label:"Filtro"})]}),t&&e&&v.jsxs(v.Fragment,{children:[v.jsx(nn,{variant:"filled",name:"solution",label:"Solução",disabled:!0}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),v.jsx(nn,{variant:"filled",name:"resourceID",label:"ID origem",disabled:!0,InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(Bi2,{onClick:()=>navigator.clipboard.writeText(e.resourceID),children:v.jsx(tt,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),v.jsx(nn,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsxs(E.Stack,{width:"35%",gap:2,children:[v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Tipo de conteúdo:"}),v.jsx(dBn,{name:"content_type",options:ki2,row:!0,decorated:!0})]}),v.jsxs(E.Stack,{gap:2,children:[v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Métodos Http:"}),v.jsx(dBn,{name:"http_method",options:Si2,row:!0,decorated:!0})]})]}),v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Status:"}),v.jsx(qZn,{name:"active",label:"Ativo"}),v.jsx(E.Typography,{color:"text.secondary",variant:"overline",children:"Cabeçalho:"}),r==null?void 0:r.map((f,s)=>v.jsxs(E.Stack,{direction:"row",gap:2,children:[v.jsx(nn,{name:`headers.${s}.name`,label:"Chave",rules:{required:{value:!0,message:"Chave é obrigatório"}}}),v.jsx(nn,{name:`headers.${s}.value`,label:"Valor",rules:{required:{value:!0,message:"Valor é obrigatório"}}}),v.jsx(Wi2,{onClick:()=>c(s),color:"error",children:v.jsx(tt,{icon:"DELETE_MARK_BUTTON_02"})})]},f.id)),v.jsx(oRn,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>l(),children:"Adicionar novo cabeçalho"}),v.jsx(E.Divider,{})]})},eUn=({name:e,helperText:t,rules:n,onSelectOption:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>v.jsx(Qkn,{...c,...r,onChange:f=>{a&&a(f),c.onChange(f)},error:!!l,helperText:(l==null?void 0:l.message)||t})})},tUn=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{name:u,onChange:c,value:l,ref:f},fieldState:{error:s}})=>v.jsx(eBn,{ref:f,...a,name:u,value:l,error:!!s,helperText:(s==null?void 0:s.message)||t,onChange:({target:{value:d}})=>c(d)})})},$i2=({name:e,containerProps:t,required:n,rules:a,tabIndex:r})=>{const u=`${e}.zipCode`,c=`${e}.publicPlace`,l=`${e}.number`,f=`${e}.district`,s=`${e}.complement`,d=`${e}.state`,g=`${e}.city`,_=m=>{m.key==="Enter"&&m.preventDefault()};return v.jsxs(E.Stack,{gap:1.5,...t,children:[v.jsxs(E.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[v.jsx(tUn,{name:u,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.CircularProgress,{size:24})})},rules:a,onKeyDown:_,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:r}),v.jsxs(E.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[v.jsx(nn,{name:c,label:"Logradouro",onKeyDown:_,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:r}),v.jsx(nn,{name:l,label:"Número",onKeyDown:_,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:r})]})]}),v.jsxs(E.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[v.jsx(nn,{name:f,label:"Bairro",onKeyDown:_,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:r}),v.jsx(nn,{name:s,label:"Complemento",onKeyDown:_,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:r})]}),v.jsxs(E.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[v.jsx(eUn,{name:d,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:r}),v.jsx(nn,{name:g,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:r})]})]})},xi2=({name:e,rules:t,helperText:n,tabIndex:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:t,render:({field:c,fieldState:{error:l}})=>v.jsxs("div",{children:[v.jsx(E.FormControlLabel,{control:v.jsx(E.Checkbox,{...c,checked:c.value,tabIndex:a}),...r}),(!!l||n)&&v.jsx(E.FormHelperText,{error:!!l,children:l?l==null?void 0:l.message:n})]})})},zi2=({row:e,name:t,rules:n,label:a,options:r,spacing:u,helperText:c,required:l,...f})=>{const{control:s}=Ie.useFormContext(),d=(g,_)=>g.includes(_)?g.filter(m=>m!==_):[...g,_];return v.jsx(Ie.Controller,{name:t,control:s,rules:n,render:({field:{value:g=[],..._},fieldState:{error:m}})=>v.jsxs(E.FormControl,{component:"fieldset",children:[a&&v.jsx(E.FormLabel,{component:"legend",sx:{typography:"body2"},required:l,children:a}),v.jsx(E.FormGroup,{sx:{...e&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:u||0},...e&&{mr:0,"&:not(:last-of-type)":{mr:u||2}}}},children:r.map(C=>v.jsx(E.FormControlLabel,{control:v.jsx(E.Checkbox,{checked:g.includes(C.value),onChange:()=>_.onChange(d(g,C.value))}),label:C.label,...f},C.value))}),(!!m||c)&&v.jsx(E.FormHelperText,{error:!!m,sx:C=>({color:f.disabled?C.palette.grey[500]:void 0}),children:m?m==null?void 0:m.message:c})]})})},Hi2=({keyName:e,inputs:t=[],rules:n,tabIndex:a,...r})=>{const u=o.useRef(null),{control:c,setValue:l,formState:{errors:f}}=Ie.useFormContext(),s=_=>{const m=_.clipboardData.getData("text").split("");t.map((C,h)=>l(C,m[h])),_.preventDefault()},d=(_,m)=>{const{maxLength:C,value:h,name:b}=_.target,p=b.replace(e,""),y=Number(p),w=document.querySelector(`input[name=${e}${y+1}]`);h.length>C&&(_.target.value=h[0]),h.length>=C&&y<6&&w!==null&&w.focus(),m(_)};hSn("paste",s,u);const g=t.some(_=>f[_]);return v.jsxs(E.Stack,{children:[v.jsx(E.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:u,children:t.map((_,m)=>v.jsx(Ie.Controller,{name:`${e}${m+1}`,control:c,rules:n,render:({field:C,fieldState:{error:h}})=>v.jsx(E.TextField,{...r,...C,autoComplete:"none",error:!!h,autoFocus:m===0,placeholder:"-",onChange:b=>{d(b,C.onChange)},onFocus:b=>b.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:a}})},_))}),g&&v.jsx(E.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Ai2=({name:e,rules:t,helperText:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:{...t,validate:{...t==null?void 0:t.validate,validation:u=>{const c="#"+u.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(c)?!0:"Cor inválida"}}},render:({field:{ref:u,onChange:c,...l},fieldState:{error:f}})=>v.jsx(_Nn,{...l,onChangeColor:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||n,...a})})},Ri2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.DatePicker,{inputRef:l,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Vi2=({name:e,label:t,rules:n,tabIndex:a,helperText:r,required:u,...c})=>{const{control:l,setError:f}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:l,rules:n,render:({field:{value:s,onChange:d},fieldState:{error:g}})=>v.jsx(lT.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...c.localeText},value:[(s==null?void 0:s.startDate)||null,(s==null?void 0:s.endDate)||null],onChange:_=>d({startDate:_[0],endDate:_[1]}),onError:_=>{f(e,{message:_[0]||_[1]||void 0})},...c,slotProps:{textField:({position:_})=>{var m;return{...(m=c.slotProps)==null?void 0:m.textField,required:u,error:!!g,helperText:(g==null?void 0:g.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:_==="start"?`${t} (Dt. Início)`:`${t} (Dt. Fim)`,inputProps:{tabIndex:a}}}},sx:{width:1}})})},Fi2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:l,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,required:r,error:!!s,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Ni2=({id:e,children:t,onSubmit:n,methods:a,...r})=>v.jsx(Ie.FormProvider,{...a,children:v.jsx(E.Stack,{component:"form",id:e,onSubmit:n,flex:1,width:1,noValidate:!0,...r,children:t})}),Ti2=({name:e,helperText:t,rules:n,...a})=>{const{control:r}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:r,rules:n,render:({field:{ref:u,value:c,...l},fieldState:{error:f}})=>v.jsx(XDn,{value:c,inputRef:u,fullWidth:!0,error:!!f,helperText:(f==null?void 0:f.message)||t,...a,...l,name:e})})},Zi2=({name:e,helperText:t,rules:n,onChange:a,...r})=>{const{control:u}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:u,rules:n,render:({field:c,fieldState:{error:l}})=>v.jsx(Qht,{...c,onChange:f=>{c.onChange(f),a&&a(f)},fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||t,...r})})},Ui2=({name:e,sx:t,rules:n,passwordSize:a,specialCharacter:r,upperCaseChar:u,numberChar:c,showErrorMessage:l,match:f,...s})=>{const{watch:d}=Ie.useFormContext(),g=d(e),[_,m]=o.useState(!1),{hasNumberChar:C,hasSpecialCharacter:h,hasUpperCaseChar:b,isLengthValid:p}=nCt(g,a,c,r,u);return v.jsx(nn,{...s,name:e,type:_?"text":"password",InputProps:{endAdornment:v.jsx(E.InputAdornment,{position:"end",children:v.jsx(E.IconButton,{onClick:()=>m(!_),edge:"end","aria-label":"Mostrar/Ocultar senha",children:v.jsx(tt,{icon:_?"VIEW_OFF":"VIEW_ON"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:y=>{const w=nCt(y,a,c,r,u);return!w.hasNumberChar||!w.hasSpecialCharacter||!w.hasUpperCaseChar||!w.isLengthValid?"Senha inválida":f&&f.fieldPassword&&d(f.fieldPassword)!==y?"As senhas devem ser iguais":!0}}},sx:{...t,"& .MuiFormHelperText-root":{display:(!h||!b||!p||!C)&&!l?"none":void 0}}})},dBn=({name:e,rules:t,row:n,label:a,options:r,spacing:u,helperText:c,decorated:l,onChange:f,tabIndex:s,required:d,disabled:g,..._})=>{const{control:m}=Ie.useFormContext(),C=a?`${e}-${a}`:"";return v.jsx(Ie.Controller,{name:e,control:m,rules:t,render:({field:h,fieldState:{error:b}})=>v.jsxs(E.FormControl,{component:"fieldset",sx:{...l&&{paddingLeft:1.5}},children:[a&&v.jsx(E.FormLabel,{component:"legend",id:C,sx:{typography:"body2"},required:d,children:a}),v.jsx(E.RadioGroup,{..._,...h,onChange:(p,y)=>{h.onChange(p),f&&f(p,y)},"aria-labelledby":C,row:n,children:r.map(p=>v.jsx(E.FormControlLabel,{value:p.value,control:v.jsx(E.Radio,{inputProps:{tabIndex:s},disabled:g,checked:p.value===h.value}),label:p.label,sx:({palette:y})=>({"&:not(:last-of-type)":{mb:u||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:u||2}},...l&&{border:`1px solid ${E.alpha(y.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(u||0)/2||1,...h.value===p.value&&{borderColor:"primary.main",backgroundColor:E.alpha(y.primary.main,.05)}}})},p.value))}),(!!b||c)&&v.jsx(E.FormHelperText,{error:!!b,sx:p=>({color:g?p.palette.grey[500]:void 0}),children:b?b==null?void 0:b.message:c})]})})},Gi2=({name:e,rules:t,tabIndex:n,helperText:a,required:r,...u})=>{const{control:c}=Ie.useFormContext();return v.jsx(Ie.Controller,{name:e,control:c,rules:t,render:({field:{ref:l,...f},fieldState:{error:s}})=>{var d;return v.jsx(lT.TimePicker,{ampm:!1,format:"HH:mm",inputRef:l,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...u.localeText},...f,...u,value:f.value?new Date(f.value):null,slotProps:{textField:{...(d=u.slotProps)==null?void 0:d.textField,error:!!s,required:r,helperText:(s==null?void 0:s.message)||a,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Yi2=({onFileCropped:e,onImageUploaded:t,onCancel:n,aspect:a,size:r,label:u,image:c="",uploading:l,file:f,tabIndex:s,...d})=>{const{id:g,crop:_,cropModalOpen:m,zoom:C,cancelChanges:h,handleRemove:b,onCropComplete:p,saveChanges:y,setCrop:w,setCropModalOpen:L,setZoom:j}=XZn({image:c,onFileCropped:e,onImageUploaded:t,onCancel:n});return v.jsxs(v.Fragment,{children:[v.jsxs(E.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[l&&v.jsx(Li2,{}),v.jsx(YZn,{...d,id:g,file:f,onDrop:P=>{if(P.length>0){L(!0),j(1),w({x:0,y:0});const k=new FileReader;k.addEventListener("load",()=>{var S;const D=((S=k.result)==null?void 0:S.toString())||"";t(D),e(void 0)}),k.readAsDataURL(P[0])}},image:c,tabIndex:s})]}),v.jsx(QZn,{id:g,open:m,onClose:h,label:u,aspect:a,crop:_,zoom:C,onCropComplete:p,onCropChange:w,onZoomChange:j,imgSrc:c,onRemove:b,onSave:y,size:r})]})};function nUn(e,t){const{watch:n,setValue:a}=Ie.useFormContext(),[r,u]=o.useState(t),c=n(e)||[];return{uploadFile:async _=>{if(!_){a(e,void 0),u(void 0);return}a(e,_),u(Object.assign(_,{preview:URL.createObjectURL(_)}))},uploadFiles:async _=>{a(e,[...c,..._.map(m=>Object.assign(m,{preview:URL.createObjectURL(m)}))])},handleDeleteFile:()=>{a(e,void 0),u(void 0)},handleRemoveAll:()=>{a(e,void 0)},handleRemove:_=>{const m=c.filter(C=>C!==_);a(e,m)},file:r,setFileValue:u}}const Ki2=({name:e,rules:t,helperText:n,aspect:a,label:r,size:u,image:c,onFileCropped:l,onImageUploaded:f,onCancel:s,...d})=>{const{control:g}=Ie.useFormContext(),{uploadFile:_,file:m,setFileValue:C}=nUn(e);return v.jsx(Ie.Controller,{name:e,control:g,rules:t,render:({field:{value:h},fieldState:{error:b}})=>v.jsx(Yi2,{accept:{"image/*":[]},file:h?m:void 0,onFileCropped:p=>{_(p),l&&l(p)},onImageUploaded:f,onCancel:()=>{C(void 0),s&&s()},error:!!b,disableMultiple:!0,helperText:(!!b||n)&&v.jsx(E.FormHelperText,{error:!!b,sx:{px:2},children:b?b==null?void 0:b.message:n}),aspect:a,label:r,size:u,image:c,...d})})},Xi2=({name:e,rules:t,helperText:n,aspect:a,label:r,size:u,image:c,onFileCropped:l,onImageUploaded:f,onCancel:s,...d})=>{const{control:g}=Ie.useFormContext(),{uploadFile:_,file:m,setFileValue:C}=nUn(e);return v.jsx(Ie.Controller,{name:e,control:g,rules:t,render:({field:{value:h},fieldState:{error:b}})=>v.jsx(JZn,{accept:{"image/*":[]},file:h?m:void 0,onFileCropped:p=>{_(p),l&&l(p)},onImageUploaded:f,onCancel:()=>{C(void 0),s&&s()},error:!!b,disableMultiple:!0,helperText:(!!b||n)&&v.jsx(E.FormHelperText,{error:!!b,sx:{px:2},children:b?b==null?void 0:b.message:n}),aspect:a,label:r,size:u,image:c,...d})})},Qi2=Object.freeze(Object.defineProperty({__proto__:null,default:EXn},Symbol.toStringTag,{value:"Module"}));A.ActionButton=oRn,A.Address=$i2,A.Autocomplete=Qkn,A.AutocompleteField=eUn,A.BuilderLayout=$So,A.BuilderSidebar=uzo,A.Carousel=CLo,A.CarouselArrowIndex=fEo,A.CarouselArrows=JPo,A.CarouselDots=OLo,A.Checkbox=xi2,A.Codes=Hi2,A.ColorPickerField=Ai2,A.ColorPickerInput=_Nn,A.Common=bn2,A.CommonSSR=pn2,A.Confirm=On2,A.CustomAvatar=_Tn,A.CustomAvatarGroup=mTn,A.DataGrid=Sn2,A.DatePicker=Ri2,A.DateRangePicker=Vi2,A.DateTimePicker=Fi2,A.Delayed=Dn2,A.DialogAnimate=eQn,A.Drawer=Fn2,A.EmptyContent=AHn,A.EmptyView=hTn,A.FabButtonAnimate=t$n,A.Field=nn,A.FixedProgressBar=Rht,A.Form=Ni2,A.HelpButton=bRn,A.Icon=tt,A.IconButtonAnimate=n$n,A.Iconify=vr,A.ImageCrop=ZTn,A.Incrementer=XDn,A.IncrementerField=Ti2,A.Label=iZn,A.Lightbox=dSo,A.LoadingScreen=Ur2,A.MaskedInput=eBn,A.MaskedInputField=tUn,A.MaterialDesignContent=Axn,A.MenuPopover=l12,A.Modal=mZn,A.ModalActions=_12,A.MotionContainer=yer,A.MotionLazyContainer=Kbt,A.MotionViewport=ber,A.MultiCheckbox=zi2,A.NumberInput=Qht,A.NumberInputField=Zi2,A.PasswordField=Ui2,A.PasswordRules=y12,A.Portal=vZn,A.RadioGroupField=dBn,A.SavedChanges=V12,A.Scrollbar=kTn,A.SearchInput=F12,A.SnackbarContent=ryt,A.SnackbarProvider=Fxn,A.SplashScreen=N12,A.Steps=U12,A.StyledTab=G12,A.StyledTabs=Y12,A.Switch=qZn,A.TRANSITION=OBn,A.TabPanel=K12,A.TableEmptyRows=hEo,A.TableHeadCustom=bEo,A.TableNoData=mEo,A.TablePaginationCustom=pEo,A.TableSelectedAction=yEo,A.TableSkeleton=vEo,A.TextAnimate=tQn,A.TextMaxLine=yZn,A.ThemeProvider=gTn,A.TimePicker=Gi2,A.Transition=nvt,A.Upload=GZn,A.UploadAvatar=YZn,A.UploadAvatarWithCropField=Ki2,A.UploadBox=yi2,A.UploadWithCrop=JZn,A.UploadWithCropField=Xi2,A.Webhook=Ii2,A.WhiteBox=Ei2,A.color=qe2,A.cssStyles=cEo,A.emptyRows=sEo,A.file=p12,A.formatNumber=yr2,A.formatTime=B12,A.getComparator=dEo,A.loadable=R12,A.mask=H12,A.number=_r2,A.routes=I12,A.sort=z12,A.useActiveElement=xSo,A.useCarousel=bLo,A.useCopyToClipboard=zSo,A.useDatagrid=HSo,A.useDeepCompareEffect=Qxo,A.useEventListener=hSn,A.useIsMounting=qxo,A.useLightBox=mSo,A.useOffSetTop=rzo,A.useOnClickOutside=nzo,A.usePagination=tzo,A.useResponsive=mxn,A.useSnackbar=Jer,A.useTable=gEo,A.useTabs=ezo,A.useToggle=CSn,A.uuidv4=A12,A.validators=h12,A.varBgColor=_Un,A.varBgKenburns=mUn,A.varBgPan=vUn,A.varBounce=sUn,A.varContainer=K_t,A.varFade=Ice,A.varFlip=cUn,A.varHover=gUn,A.varPath=iUn,A.varRotate=dUn,A.varScale=fUn,A.varSlide=lUn,A.varTranEnter=We,A.varTranExit=Fe,A.varTranHover=oUn,A.varZoom=uUn,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
3
  "private": false,
4
- "version": "1.2.11",
4
+ "version": "1.2.13",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",