@data-c/ui 0.0.160 → 0.0.164
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/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var Ys=Object.create;var nn=Object.defineProperty,Gs=Object.defineProperties,Ks=Object.getOwnPropertyDescriptor,Hs=Object.getOwnPropertyDescriptors,Zs=Object.getOwnPropertyNames,zt=Object.getOwnPropertySymbols,Xs=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable;var Po=(t,e,r)=>e in t?nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,y=(t,e)=>{for(var r in e||(e={}))on.call(e,r)&&Po(t,r,e[r]);if(zt)for(var r of zt(e))Eo.call(e,r)&&Po(t,r,e[r]);return t},$=(t,e)=>Gs(t,Hs(e));var X=(t,e)=>{var r={};for(var n in t)on.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&zt)for(var n of zt(t))e.indexOf(n)<0&&Eo.call(t,n)&&(r[n]=t[n]);return r};var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Js=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Zs(e))!on.call(t,o)&&o!==r&&nn(t,o,{get:()=>e[o],enumerable:!(n=Ks(e,o))||n.enumerable});return t};var We=(t,e,r)=>(r=t!=null?Ys(Xs(t)):{},Js(e||!t||!t.__esModule?nn(r,"default",{value:t,enumerable:!0}):r,t));var ue=(t,e,r)=>new Promise((n,o)=>{var i=a=>{try{l(r.next(a))}catch(u){o(u)}},s=a=>{try{l(r.throw(a))}catch(u){o(u)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(i,s);l((r=r.apply(t,e)).next())});var Xo=le(q=>{"use strict";var oe=typeof Symbol=="function"&&Symbol.for,Pn=oe?Symbol.for("react.element"):60103,En=oe?Symbol.for("react.portal"):60106,Kt=oe?Symbol.for("react.fragment"):60107,Ht=oe?Symbol.for("react.strict_mode"):60108,Zt=oe?Symbol.for("react.profiler"):60114,Xt=oe?Symbol.for("react.provider"):60109,Jt=oe?Symbol.for("react.context"):60110,wn=oe?Symbol.for("react.async_mode"):60111,Qt=oe?Symbol.for("react.concurrent_mode"):60111,er=oe?Symbol.for("react.forward_ref"):60112,tr=oe?Symbol.for("react.suspense"):60113,Ul=oe?Symbol.for("react.suspense_list"):60120,rr=oe?Symbol.for("react.memo"):60115,nr=oe?Symbol.for("react.lazy"):60116,ql=oe?Symbol.for("react.block"):60121,Wl=oe?Symbol.for("react.fundamental"):60117,Yl=oe?Symbol.for("react.responder"):60118,Gl=oe?Symbol.for("react.scope"):60119;function he(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Pn:switch(t=t.type,t){case wn:case Qt:case Kt:case Zt:case Ht:case tr:return t;default:switch(t=t&&t.$$typeof,t){case Jt:case er:case nr:case rr:case Xt:return t;default:return e}}case En:return e}}}function Zo(t){return he(t)===Qt}q.AsyncMode=wn;q.ConcurrentMode=Qt;q.ContextConsumer=Jt;q.ContextProvider=Xt;q.Element=Pn;q.ForwardRef=er;q.Fragment=Kt;q.Lazy=nr;q.Memo=rr;q.Portal=En;q.Profiler=Zt;q.StrictMode=Ht;q.Suspense=tr;q.isAsyncMode=function(t){return Zo(t)||he(t)===wn};q.isConcurrentMode=Zo;q.isContextConsumer=function(t){return he(t)===Jt};q.isContextProvider=function(t){return he(t)===Xt};q.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Pn};q.isForwardRef=function(t){return he(t)===er};q.isFragment=function(t){return he(t)===Kt};q.isLazy=function(t){return he(t)===nr};q.isMemo=function(t){return he(t)===rr};q.isPortal=function(t){return he(t)===En};q.isProfiler=function(t){return he(t)===Zt};q.isStrictMode=function(t){return he(t)===Ht};q.isSuspense=function(t){return he(t)===tr};q.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Kt||t===Qt||t===Zt||t===Ht||t===tr||t===Ul||typeof t=="object"&&t!==null&&(t.$$typeof===nr||t.$$typeof===rr||t.$$typeof===Xt||t.$$typeof===Jt||t.$$typeof===er||t.$$typeof===Wl||t.$$typeof===Yl||t.$$typeof===Gl||t.$$typeof===ql)};q.typeOf=he});var Jo=le(W=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,a=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,x=t?Symbol.for("react.block"):60121,E=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function K(C){return typeof C=="string"||typeof C=="function"||C===n||C===u||C===i||C===o||C===c||C===f||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===d||C.$$typeof===s||C.$$typeof===l||C.$$typeof===p||C.$$typeof===E||C.$$typeof===k||C.$$typeof===_||C.$$typeof===x)}function v(C){if(typeof C=="object"&&C!==null){var St=C.$$typeof;switch(St){case e:var S=C.type;switch(S){case a:case u:case n:case i:case o:case c:return S;default:var ot=S&&S.$$typeof;switch(ot){case l:case p:case g:case d:case s:return ot;default:return St}}case r:return St}}}var A=a,H=u,j=l,U=s,V=e,T=p,b=n,O=g,m=d,h=r,P=i,w=o,F=c,R=!1;function M(C){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(C)||v(C)===a}function D(C){return v(C)===u}function B(C){return v(C)===l}function N(C){return v(C)===s}function I(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function ae(C){return v(C)===p}function re(C){return v(C)===n}function ke(C){return v(C)===g}function Jr(C){return v(C)===d}function Qr(C){return v(C)===r}function en(C){return v(C)===i}function tn(C){return v(C)===o}function rn(C){return v(C)===c}W.AsyncMode=A,W.ConcurrentMode=H,W.ContextConsumer=j,W.ContextProvider=U,W.Element=V,W.ForwardRef=T,W.Fragment=b,W.Lazy=O,W.Memo=m,W.Portal=h,W.Profiler=P,W.StrictMode=w,W.Suspense=F,W.isAsyncMode=M,W.isConcurrentMode=D,W.isContextConsumer=B,W.isContextProvider=N,W.isElement=I,W.isForwardRef=ae,W.isFragment=re,W.isLazy=ke,W.isMemo=Jr,W.isPortal=Qr,W.isProfiler=en,W.isStrictMode=tn,W.isSuspense=rn,W.isValidElementType=K,W.typeOf=v}()});var Fn=le((Yh,_n)=>{"use strict";process.env.NODE_ENV==="production"?_n.exports=Xo():_n.exports=Jo()});var ti=le((Gh,ei)=>{"use strict";var Qo=Object.getOwnPropertySymbols,Kl=Object.prototype.hasOwnProperty,Hl=Object.prototype.propertyIsEnumerable;function Zl(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Xl(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(i){return e[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}ei.exports=Xl()?Object.assign:function(t,e){for(var r,n=Zl(t),o,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var s in r)Kl.call(r,s)&&(n[s]=r[s]);if(Qo){o=Qo(r);for(var l=0;l<o.length;l++)Hl.call(r,o[l])&&(n[o[l]]=r[o[l]])}}return n}});var or=le((Kh,ri)=>{"use strict";var Jl="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ri.exports=Jl});var kn=le((Hh,ni)=>{ni.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var li=le((Zh,ai)=>{"use strict";var On=function(){};process.env.NODE_ENV!=="production"&&(oi=or(),ir={},ii=kn(),On=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var oi,ir,ii;function si(t,e,r,n,o){if(process.env.NODE_ENV!=="production"){for(var i in t)if(ii(t,i)){var s;try{if(typeof t[i]!="function"){var l=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=t[i](e,i,n,r,null,oi)}catch(u){s=u}if(s&&!(s instanceof Error)&&On((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in ir)){ir[s.message]=!0;var a=o?o():"";On("Failed "+r+" type: "+s.message+(a!=null?a:""))}}}}si.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(ir={})};ai.exports=si});var fi=le((Xh,ci)=>{"use strict";var Ql=Fn(),eu=ti(),lt=or(),An=kn(),ui=li(),ut=function(){};process.env.NODE_ENV!=="production"&&(ut=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function sr(){return null}ci.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function o(m){var h=m&&(r&&m[r]||m[n]);if(typeof h=="function")return h}var i="<<anonymous>>",s={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:c(),arrayOf:f,element:d(),elementType:g(),instanceOf:x,node:K(),objectOf:k,oneOf:E,oneOfType:_,shape:A,exact:H};function l(m,h){return m===h?m!==0||1/m===1/h:m!==m&&h!==h}function a(m,h){this.message=m,this.data=h&&typeof h=="object"?h:{},this.stack=""}a.prototype=Error.prototype;function u(m){if(process.env.NODE_ENV!=="production")var h={},P=0;function w(R,M,D,B,N,I,ae){if(B=B||i,I=I||D,ae!==lt){if(e){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var ke=B+":"+D;!h[ke]&&P<3&&(ut("You are manually calling a React.PropTypes validation function for the `"+I+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),h[ke]=!0,P++)}}return M[D]==null?R?M[D]===null?new a("The "+N+" `"+I+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new a("The "+N+" `"+I+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:m(M,D,B,N,I)}var F=w.bind(null,!1);return F.isRequired=w.bind(null,!0),F}function p(m){function h(P,w,F,R,M,D){var B=P[w],N=V(B);if(N!==m){var I=T(B);return new a("Invalid "+R+" `"+M+"` of type "+("`"+I+"` supplied to `"+F+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return u(h)}function c(){return u(sr)}function f(m){function h(P,w,F,R,M){if(typeof m!="function")return new a("Property `"+M+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var D=P[w];if(!Array.isArray(D)){var B=V(D);return new a("Invalid "+R+" `"+M+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an array."))}for(var N=0;N<D.length;N++){var I=m(D,N,F,R,M+"["+N+"]",lt);if(I instanceof Error)return I}return null}return u(h)}function d(){function m(h,P,w,F,R){var M=h[P];if(!t(M)){var D=V(M);return new a("Invalid "+F+" `"+R+"` of type "+("`"+D+"` supplied to `"+w+"`, expected a single ReactElement."))}return null}return u(m)}function g(){function m(h,P,w,F,R){var M=h[P];if(!Ql.isValidElementType(M)){var D=V(M);return new a("Invalid "+F+" `"+R+"` of type "+("`"+D+"` supplied to `"+w+"`, expected a single ReactElement type."))}return null}return u(m)}function x(m){function h(P,w,F,R,M){if(!(P[w]instanceof m)){var D=m.name||i,B=O(P[w]);return new a("Invalid "+R+" `"+M+"` of type "+("`"+B+"` supplied to `"+F+"`, expected ")+("instance of `"+D+"`."))}return null}return u(h)}function E(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?ut("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ut("Invalid argument supplied to oneOf, expected an array.")),sr;function h(P,w,F,R,M){for(var D=P[w],B=0;B<m.length;B++)if(l(D,m[B]))return null;var N=JSON.stringify(m,function(ae,re){var ke=T(re);return ke==="symbol"?String(re):re});return new a("Invalid "+R+" `"+M+"` of value `"+String(D)+"` "+("supplied to `"+F+"`, expected one of "+N+"."))}return u(h)}function k(m){function h(P,w,F,R,M){if(typeof m!="function")return new a("Property `"+M+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var D=P[w],B=V(D);if(B!=="object")return new a("Invalid "+R+" `"+M+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an object."));for(var N in D)if(An(D,N)){var I=m(D,N,F,R,M+"."+N,lt);if(I instanceof Error)return I}return null}return u(h)}function _(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&ut("Invalid argument supplied to oneOfType, expected an instance of array."),sr;for(var h=0;h<m.length;h++){var P=m[h];if(typeof P!="function")return ut("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(P)+" at index "+h+"."),sr}function w(F,R,M,D,B){for(var N=[],I=0;I<m.length;I++){var ae=m[I],re=ae(F,R,M,D,B,lt);if(re==null)return null;re.data&&An(re.data,"expectedType")&&N.push(re.data.expectedType)}var ke=N.length>0?", expected one of type ["+N.join(", ")+"]":"";return new a("Invalid "+D+" `"+B+"` supplied to "+("`"+M+"`"+ke+"."))}return u(w)}function K(){function m(h,P,w,F,R){return j(h[P])?null:new a("Invalid "+F+" `"+R+"` supplied to "+("`"+w+"`, expected a ReactNode."))}return u(m)}function v(m,h,P,w,F){return new a((m||"React class")+": "+h+" type `"+P+"."+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function A(m){function h(P,w,F,R,M){var D=P[w],B=V(D);if(B!=="object")return new a("Invalid "+R+" `"+M+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));for(var N in m){var I=m[N];if(typeof I!="function")return v(F,R,M,N,T(I));var ae=I(D,N,F,R,M+"."+N,lt);if(ae)return ae}return null}return u(h)}function H(m){function h(P,w,F,R,M){var D=P[w],B=V(D);if(B!=="object")return new a("Invalid "+R+" `"+M+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));var N=eu({},P[w],m);for(var I in N){var ae=m[I];if(An(m,I)&&typeof ae!="function")return v(F,R,M,I,T(ae));if(!ae)return new a("Invalid "+R+" `"+M+"` key `"+I+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(P[w],null," ")+`
|
|
2
|
-
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var re=ae(D,I,F,R,M+"."+I,lt);if(re)return re}return null}return u(h)}function j(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(j);if(m===null||t(m))return!0;var h=o(m);if(h){var P=h.call(m),w;if(h!==m.entries){for(;!(w=P.next()).done;)if(!j(w.value))return!1}else for(;!(w=P.next()).done;){var F=w.value;if(F&&!j(F[1]))return!1}}else return!1;return!0;default:return!1}}function U(m,h){return m==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function V(m){var h=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":U(h,m)?"symbol":h}function T(m){if(typeof m=="undefined"||m===null)return""+m;var h=V(m);if(h==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return h}function b(m){var h=T(m);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function O(m){return!m.constructor||!m.constructor.name?i:m.constructor.name}return s.checkPropTypes=ui,s.resetWarningCache=ui.resetWarningCache,s.PropTypes=s,s}});var hi=le((Jh,mi)=>{"use strict";var tu=or();function pi(){}function di(){}di.resetWarningCache=pi;mi.exports=function(){function t(n,o,i,s,l,a){if(a!==tu){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:di,resetWarningCache:pi};return r.PropTypes=r,r}});var ar=le((Qh,Mn)=>{process.env.NODE_ENV!=="production"?(gi=Fn(),yi=!0,Mn.exports=fi()(gi.isElement,yi)):Mn.exports=hi()();var gi,yi});var Ci=le(Y=>{"use strict";var Rn=Symbol.for("react.element"),$n=Symbol.for("react.portal"),lr=Symbol.for("react.fragment"),ur=Symbol.for("react.strict_mode"),cr=Symbol.for("react.profiler"),fr=Symbol.for("react.provider"),pr=Symbol.for("react.context"),nu=Symbol.for("react.server_context"),dr=Symbol.for("react.forward_ref"),mr=Symbol.for("react.suspense"),hr=Symbol.for("react.suspense_list"),gr=Symbol.for("react.memo"),yr=Symbol.for("react.lazy"),ou=Symbol.for("react.offscreen"),Ti;Ti=Symbol.for("react.module.reference");function ve(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Rn:switch(t=t.type,t){case lr:case cr:case ur:case mr:case hr:return t;default:switch(t=t&&t.$$typeof,t){case nu:case pr:case dr:case yr:case gr:case fr:return t;default:return e}}case $n:return e}}}Y.ContextConsumer=pr;Y.ContextProvider=fr;Y.Element=Rn;Y.ForwardRef=dr;Y.Fragment=lr;Y.Lazy=yr;Y.Memo=gr;Y.Portal=$n;Y.Profiler=cr;Y.StrictMode=ur;Y.Suspense=mr;Y.SuspenseList=hr;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(t){return ve(t)===pr};Y.isContextProvider=function(t){return ve(t)===fr};Y.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Rn};Y.isForwardRef=function(t){return ve(t)===dr};Y.isFragment=function(t){return ve(t)===lr};Y.isLazy=function(t){return ve(t)===yr};Y.isMemo=function(t){return ve(t)===gr};Y.isPortal=function(t){return ve(t)===$n};Y.isProfiler=function(t){return ve(t)===cr};Y.isStrictMode=function(t){return ve(t)===ur};Y.isSuspense=function(t){return ve(t)===mr};Y.isSuspenseList=function(t){return ve(t)===hr};Y.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===lr||t===cr||t===ur||t===mr||t===hr||t===ou||typeof t=="object"&&t!==null&&(t.$$typeof===yr||t.$$typeof===gr||t.$$typeof===fr||t.$$typeof===pr||t.$$typeof===dr||t.$$typeof===Ti||t.getModuleId!==void 0)};Y.typeOf=ve});var Si=le(G=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),g=!1,x=!1,E=!1,k=!1,_=!1,K;K=Symbol.for("react.module.reference");function v(S){return!!(typeof S=="string"||typeof S=="function"||S===r||S===o||_||S===n||S===u||S===p||k||S===d||g||x||E||typeof S=="object"&&S!==null&&(S.$$typeof===f||S.$$typeof===c||S.$$typeof===i||S.$$typeof===s||S.$$typeof===a||S.$$typeof===K||S.getModuleId!==void 0))}function A(S){if(typeof S=="object"&&S!==null){var ot=S.$$typeof;switch(ot){case t:var Nt=S.type;switch(Nt){case r:case o:case n:case u:case p:return Nt;default:var So=Nt&&Nt.$$typeof;switch(So){case l:case s:case a:case f:case c:case i:return So;default:return ot}}case e:return ot}}}var H=s,j=i,U=t,V=a,T=r,b=f,O=c,m=e,h=o,P=n,w=u,F=p,R=!1,M=!1;function D(S){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(S){return M||(M=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function N(S){return A(S)===s}function I(S){return A(S)===i}function ae(S){return typeof S=="object"&&S!==null&&S.$$typeof===t}function re(S){return A(S)===a}function ke(S){return A(S)===r}function Jr(S){return A(S)===f}function Qr(S){return A(S)===c}function en(S){return A(S)===e}function tn(S){return A(S)===o}function rn(S){return A(S)===n}function C(S){return A(S)===u}function St(S){return A(S)===p}G.ContextConsumer=H,G.ContextProvider=j,G.Element=U,G.ForwardRef=V,G.Fragment=T,G.Lazy=b,G.Memo=O,G.Portal=m,G.Profiler=h,G.StrictMode=P,G.Suspense=w,G.SuspenseList=F,G.isAsyncMode=D,G.isConcurrentMode=B,G.isContextConsumer=N,G.isContextProvider=I,G.isElement=ae,G.isForwardRef=re,G.isFragment=ke,G.isLazy=Jr,G.isMemo=Qr,G.isPortal=en,G.isProfiler=tn,G.isStrictMode=rn,G.isSuspense=C,G.isSuspenseList=St,G.isValidElementType=v,G.typeOf=A}()});var Pi=le((fg,Bn)=>{"use strict";process.env.NODE_ENV==="production"?Bn.exports=Ci():Bn.exports=Si()});var ls=le((yv,as)=>{"use strict";function Je(t){this._maxSize=t,this.clear()}Je.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Je.prototype.get=function(t){return this._values[t]};Je.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var hf=/[^.^\]^[]+|(?=\[\]|\.\.)/g,ss=/^\d+$/,gf=/^\d/,yf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,xf=/^\s*(['"]?)(.*?)(\1)\s*$/,io=512,ns=new Je(io),os=new Je(io),is=new Je(io);as.exports={Cache:Je,split:oo,normalizePath:no,setter:function(t){var e=no(t);return os.get(t)||os.set(t,function(n,o){for(var i=0,s=e.length,l=n;i<s-1;){var a=e[i];if(a==="__proto__"||a==="constructor"||a==="prototype")return n;l=l[e[i++]]}l[e[i]]=o})},getter:function(t,e){var r=no(t);return is.get(t)||is.set(t,function(o){for(var i=0,s=r.length;i<s;)if(o!=null||!e)o=o[r[i++]];else return;return o})},join:function(t){return t.reduce(function(e,r){return e+(so(r)||ss.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){bf(Array.isArray(t)?t:oo(t),e,r)}};function no(t){return ns.get(t)||ns.set(t,oo(t).map(function(e){return e.replace(xf,"$2")}))}function oo(t){return t.match(hf)||[""]}function bf(t,e,r){var n=t.length,o,i,s,l;for(i=0;i<n;i++)o=t[i],o&&(Cf(o)&&(o='"'+o+'"'),l=so(o),s=!l&&/^\d+$/.test(o),e.call(r,o,l,s,i,t))}function so(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function vf(t){return t.match(gf)&&!t.match(ss)}function Tf(t){return yf.test(t)}function Cf(t){return!so(t)&&(vf(t)||Tf(t))}});var fs=le((xv,cs)=>{var Sf=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,$r=t=>t.match(Sf)||[],Br=t=>t[0].toUpperCase()+t.slice(1),ao=(t,e)=>$r(t).join(e).toLowerCase(),us=t=>$r(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Pf=t=>Br(us(t)),Ef=t=>ao(t,"_"),wf=t=>ao(t,"-"),_f=t=>Br(ao(t," ")),Ff=t=>$r(t).map(Br).join(" ");cs.exports={words:$r,upperFirst:Br,camelCase:us,pascalCase:Pf,snakeCase:Ef,kebabCase:wf,sentenceCase:_f,titleCase:Ff}});var ds=le((bv,lo)=>{lo.exports=function(t){return ps(kf(t),t)};lo.exports.array=ps;function ps(t,e){var r=t.length,n=new Array(r),o={},i=r,s=Of(e),l=Af(t);for(e.forEach(function(u){if(!l.has(u[0])||!l.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||a(t[i],i,new Set);return n;function a(u,p,c){if(c.has(u)){var f;try{f=", node was:"+JSON.stringify(u)}catch(x){f=""}throw new Error("Cyclic dependency"+f)}if(!l.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[p]){o[p]=!0;var d=s.get(u)||new Set;if(d=Array.from(d),p=d.length){c.add(u);do{var g=d[--p];a(g,l.get(g),c)}while(p);c.delete(u)}n[--r]=u}}}function kf(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var o=t[r];e.add(o[0]),e.add(o[1])}return Array.from(e)}function Of(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var o=t[r];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}function Af(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var ta=t=>{let o=t,{isLoading:e,children:r}=o,n=X(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,$(y({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ne= exports.Button =ta;function Le(t){return _jsxruntime.jsx.call(void 0, _material.Stack,y({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function _o(t){let n=t,{label:e}=n,r=X(n,["label"]);return _jsxruntime.jsx.call(void 0, _material.FormControl,{component:"fieldset",children:_jsxruntime.jsx.call(void 0, _material.FormControlLabel,{label:e,control:_jsxruntime.jsx.call(void 0, _material.Checkbox,y({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var an="#59C3E0",ua={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:an,dark:"#2C96B3"},background:{default:"#F2F2F2",paper:"#FEFEFE"},error:{main:"#F44336",dark:"#BE0D00",light:"#FF6C5F"},warning:{main:"#FFCD38",dark:"#C29000",light:"#FFED58"},success:{main:"#4CAF50",dark:"#187B1C",light:"#7DE081"},grey:{800:"#202024",700:"#262626",600:"#333333",500:"#808080",400:"#BBBBBA",300:"#E0E0E0",200:"#F2F2F2",100:"#FAFAFA"}},typography:{h1:{fontSize:"2rem",fontFamily:"Poppins"},h2:{fontSize:"1.75rem"},h3:{fontSize:"1.5rem"},h4:{fontSize:"1.25rem"},h5:{fontSize:"1rem"},h6:{fontSize:"0.875rem"},button:{fontSize:"0.875rem",fontWeight:"bold",textTransform:"none"},body1:{fontSize:"1rem",color:"#262626"},body2:{fontSize:"0.875rem",color:"#808080"},fontFamily:["sans-serif","Roboto","Poppins"].join(",")},components:{MuiContainer:{defaultProps:{maxWidth:!1},styleOverrides:{root:{paddingTop:"16px",paddingBottom:"16px"}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{textTransform:"none",fontWeight:"bold"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiFormControl:{defaultProps:{size:"small"}},MuiCheckbox:{defaultProps:{size:"small"}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0},styleOverrides:{root:{"& label":{color:"#808080"}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"0.875rem"}}},MuiSvgIcon:{defaultProps:{fontSize:"small",color:"inherit"}},MuiIconButton:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiPopover:{styleOverrides:{paper:{borderRadius:"12px"}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:an},"& .MuiTypography-root":{color:an}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiTableCell:{styleOverrides:{root:{padding:0,"&.selected":{backgroundColor:"#199"}},head:{backgroundColor:"#FAFAFA",border:"1px solid #D0D0D0",color:"#808080","& span":{color:"#808080"},"& div":{marginLeft:"4px"}},body:{backgroundColor:"#ffffff00",border:"1px solid #D0D0D0",borderTop:"none",borderBottom:"none","& > div":{fontSize:"9pt",paddingLeft:"6px",paddingRight:"6px",paddingTop:"2px",paddingBottom:"2px"}}}},MuiTableRow:{styleOverrides:{root:{backgroundColor:"#FFFFFF",height:"30px","&.MuiTableRow-hover":{"&:hover":{backgroundColor:"#ffffde"}}},head:{borderRadius:"4px","& div":{fontWeight:"600",fontSize:"13px",padding:"2px"}}}},MUIDataTableHeadCell:{styleOverrides:{toolButton:{height:"48px"}}},MUIDataTableBodyRow:{styleOverrides:{root:{"&:hover":{backgroundColor:"#333"},"&:nth-of-type(even)":{backgroundColor:"#F5F5F5"},"&:last-child":{borderBottom:"1px solid #D0D0D0"}}}},MuiTableHead:{styleOverrides:{root:{height:"48px"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},ca=_styles.createTheme.call(void 0, ua),fa=_styles.responsiveFontSizes.call(void 0, ca),z= exports.theme =fa;var da={"primary-light":z.palette.primary.light,primary:z.palette.primary.main,"primary-dark":z.palette.primary.dark,"text-secondary":z.palette.text.secondary,"text-primary":z.palette.text.primary,"background-paper":z.palette.background.paper,background:z.palette.background.default,"error-light":z.palette.error.light,error:z.palette.error.main,"erro-drark":z.palette.error.dark,"warning-light":z.palette.warning.light,warning:z.palette.warning.main,"warning-dark":z.palette.warning.dark,"success-light":z.palette.success.light,success:z.palette.success.main,"success-dark":z.palette.success.dark,"grey-100":z.palette.grey[100],"grey-200":z.palette.grey[200],"grey-300":z.palette.grey[300],"grey-400":z.palette.grey[400],"grey-500":z.palette.grey[500],"grey-600":z.palette.grey[600],"grey-700":z.palette.grey[700],"grey-800":z.palette.grey[800]};function ko(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(da).map(([t,e])=>_jsxruntime.jsx.call(void 0, _material.Box,{sx:{backgroundColor:e,padding:"2rem"},children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",fontFamily:z.typography.fontFamily,color:_polished.getContrast.call(void 0, e,"#FFF")<3.5?"#000":"#FFF"},children:[_jsxruntime.jsx.call(void 0, "strong",{children:t}),_jsxruntime.jsx.call(void 0, "span",{children:e})]})},t))})}var _hooks = require('@data-c/hooks');var _react = require('react'); var Ri = _interopRequireWildcard(_react); var dt = _interopRequireWildcard(_react);function Ao(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var ln=null;function un(t){let s=t,{value:e,onChange:r}=s,n=X(s,["value","onChange"]);ln=null;let o=_react.useCallback.call(void 0, l=>{let a=l.target.value||"0.00";_hooks.isValidNumber.call(void 0, a)&&(ln==="Backspace"?a=(Ao(a)/10).toFixed(2):a=(Ao(a)*10).toFixed(2),r&&(l.target.value=a,r(l,a)))},[]),i=_react.useCallback.call(void 0, l=>{l.target.selectionStart===l.target.selectionEnd&&(l.target.selectionStart=l.target.value.length,l.target.selectionEnd=l.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,y({onKeyDown:l=>{ln=l.key},onSelect:l=>{i(l)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}un.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var Mo={content:{cancel:"error",confirm:"primary"},info:{cancel:"error",confirm:"info"},success:{cancel:"error",confirm:"success"},warning:{cancel:"primary",confirm:"warning"},error:{cancel:"primary",confirm:"error"}};function je(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Le,{children:[o&&_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{o()},color:Mo[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{i&&i()},color:Mo[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var va={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};je.defaultProps=va;function we(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s,dialogActionsProps:l}=t,a=_material.useTheme.call(void 0, ),u=n==="none"?null:n||_jsxruntime.jsx.call(void 0, je,y({onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s},l)),p=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),c=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,$(y({},t),{children:[_jsxruntime.jsx.call(void 0, _material.DialogTitle,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{color:f=>{if(s!=="content")return f.palette[c||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[p&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:p}),e]})}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>o({},"escapeKeyDown"),sx:{mr:-1,color:a.palette.text.primary},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{color:"inherit"})})]})}),_jsxruntime.jsx.call(void 0, _material.DialogContent,{children:_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1,color:f=>f.palette.grey[500],fontFamily:f=>f.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:u})]}))}we.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function fn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:n}=_providers.useFormApi.call(void 0, ),{onDelete:o,hideCancelButton:i,type:s}=t;return _jsxruntime.jsx.call(void 0, je,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function pn(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:n,title:o,children:i,actions:s,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, we,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, fn,{type:n,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Ia={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};pn.defaultProps=Ia;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var Wa=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,l=_react.useMemo.call(void 0, ()=>Math.max(0,Math.ceil(e/r)),[e,r]);return _jsxruntime.jsx.call(void 0, _material.TableFooter,{children:_jsxruntime.jsx.call(void 0, _material.TableRow,{children:_jsxruntime.jsxs.call(void 0, _material.TableCell,{colSpan:1e3,sx:{display:"flex",justifyContent:"flex-end",padding:"12px 12px 12px 12px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"128px",fontSize:"8pt"},label:"Tamanho da p\xE1gina",size:"small",value:r,select:!0,onChange:a=>{i(a.target.value)},children:s.map(a=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:a,children:a},a))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(a,u)=>{o(u)},page:n,color:"primary"})]})})})},Io=Wa;var Qa={body:{noMatch:"Nenhum registro encontrado",toolTip:"Ordenar"},pagination:{next:"Pr\xF3ximo",previous:"Anterior",rowsPerPage:"Linhas por p\xE1g:",displayRows:"de"},toolbar:{search:"Procurar",downloadCsv:"Download CSV",print:"Imprimir",viewColumns:"Colunas",filterTable:"Procurar na Tabela"},filter:{all:"Todos",title:"Filtros",reset:"Limpar"},viewColumns:{title:"Visualizar Colunas",titleAria:"Mostrar/Ocultar Colunas da Tabela"},selectedRows:{text:"Linhas Selecionadas",delete:"Remover",deleteAria:"Remover Linhas Selecionadas"}},el=t=>({filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Qa,serverSide:!0,rowsPerPageOptions:[15,50,100],rowsPerPage:15,fixedHeader:!0,fixedSelectColumn:!1,tableBodyMaxHeight:t}),tl=t=>{let K=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:l,pagination:a,changePage:u,changePageSize:p,changeSort:c}=K,f=X(K,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),d=_material.useTheme.call(void 0, ),x=_material.useMediaQuery.call(void 0, d.breakpoints.up("xl"))?75:70,E=a?`${x}vh`:`calc(${x}vh + 65px)`,k=el(E),_=l||{};return _&&(u&&(_.onChangePage=u),p&&(_.onChangeRowsPerPage=p),c&&(_.onColumnSortChange=c),_.customFooter=(v,A,H,j,U,V)=>!a||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Io,{count:a.totalRecords,page:a.page,rowsPerPage:a.pageSize,rowsPerPageOptions:(_==null?void 0:_.rowsPerPageOptions)||(k==null?void 0:k.rowsPerPageOptions),changeRowsPerPage:_==null?void 0:_.onChangeRowsPerPage,changePage:_==null?void 0:_.onChangePage,textLabels:V})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),e&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:e})}),_jsxruntime.jsx.call(void 0, _muidatatables2.default,y({title:r,data:i,columns:s,options:y(y({},k),_)},f))]})},rl= exports.DataTable =tl;var cl=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=X(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,$(y({},e),{classes:{popper:t}}))})(({theme:t})=>({[`& .${_material.tooltipClasses.tooltip}`]:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:320,minWidth:180,fontSize:t.typography.pxToRem(12),border:"1px solid #dadde9"}})),fl={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},pl=t=>{let{title:e,type:r}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{mt:.5},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, _material.Icon,{color:r,fontSize:"small",children:r})," ",_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",sx:{ml:.5},children:fl[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},No=t=>{let i=t,{type:e,children:r,title:n}=i,o=X(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, cl,$(y({arrow:!0,title:_jsxruntime.jsx.call(void 0, pl,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};No.defaultProps={type:"info"};var st=No;var Gm=()=>({style:{width:"80px",textAlign:"center"}}),Km= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function mn(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:l,disabled:a,disabledUpdateButton:u,disabledDeleteButton:p,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:f,icon:d,iconButtonProps:g,tooltip:x,visible:E,disabled:k})=>E===null||!!E&&_jsxruntime.jsxs.call(void 0, _material.IconButton,$(y({onClick:()=>e(f,r),size:"small",disabled:k},g),{children:[x&&_jsxruntime.jsx.call(void 0, st,{type:x.type,title:x.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:d})}),!x&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:d})]}),f)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:a||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para transportar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"})})]}),o&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:()=>e("edit",r),disabled:a||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"info",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para editar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"})})]}),i&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("delete",r),color:"primary",disabled:a||p,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para excluir este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"})})]})]})}mn.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function Wt(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:n,deleteAllFilterValues:o}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(s||{}).length>0){let p=!1,c=Object.keys(s||{});for(let f=0;f<c.length;f++){let d=s[c[f]];if(Array.isArray(d)&&d.length>0){p=!0;break}else if(!Array.isArray(d)&&d){p=!0;break}}return p}return!1},[s]),a=_react.useCallback.call(void 0, u=>e?e(i[u].label,s[u]):`${i[u].label} - ${s&&s[u]}`,[e,i,s]);return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:1},children:l&&Object.keys(s||{}).map(u=>{let p=Array.isArray(r)&&r.includes(u),c;if(p||(c=()=>{n&&n(u)}),Array.isArray(s[u])&&s[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u);if(!Array.isArray(s[u])&&s[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u)})}),l&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mr:.5,ml:.5,display:"flex",alignContent:"center",alignItems:"center"},children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o&&o()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function Yt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=X(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,$(y({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:n},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:l=>l.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:l=>`solid 1px ${l.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:l=>l.spacing(2)},children:e}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:l=>l.spacing(1),pb:l=>l.spacing(1),pl:l=>l.spacing(2),pr:l=>l.spacing(2),borderTop:l=>`solid 1px ${l.palette.grey[300]}`},children:r})]})}))}Yt.defaultProps={anchor:"right"};var Ol=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function n(){e()}function o(){t(),e()}function i(){r&&(r(),e())}return _jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end","& > button:first-child":{mr:1}},children:[_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,onClick:i,color:"error",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{})," Redefinir Padr\xE3o"]}),_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,variant:"contained",onClick:o,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Al=t=>{let{title:e,children:r,onApplyFilters:n,drawerProps:o}=t,{isOpen:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),{closeFilter:l}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(s)},[s]),_jsxruntime.jsx.call(void 0, Yt,$(y({},o),{drawerTitle:e,open:i,children:r,onClose:()=>l(),actions:_jsxruntime.jsx.call(void 0, Ol,{})}))};function vn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:l,disableds:a,disableFilterControl:u,drawerProps:p}=t,{openFilter:c}=_providers.useFilterApi.call(void 0, ),f=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,$(y({variant:"contained",onClick:()=>{c()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[u&&f,!u&&_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",direction:"row",justifyContent:"flex-end",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, Wt,{renderLabel:l,disableds:a}),f]}),_jsxruntime.jsx.call(void 0, Al,$(y({},p),{onApplyFilters:s,title:o||"",children:i}))]})}vn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Ko(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function Tn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:n}=_providers.useFormApi.call(void 0, ),{onSubmitForm:o,hideCancelButton:i,confirmButtonLabel:s}=t;return _jsxruntime.jsx.call(void 0, je,{confirmLabel:s||"Salvar",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Sn(t){let{view:e,children:r,actions:n,onSubmitForm:o,triggerButton:i,dialogProps:s,triggerButtonLabel:l,confirmButtonLabel:a}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:p,openForm:c}=_providers.useFormApi.call(void 0, ),f=n||_jsxruntime.jsx.call(void 0, Tn,{hideCancelButton:e==="plain",confirmButtonLabel:a,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),d=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:()=>{c()},children:l||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[d,_jsxruntime.jsx.call(void 0, we,$(y({},s),{onClose:()=>{p()},open:!!u,children:r,actions:f}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,f]})}var zl={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};Sn.defaultProps=zl;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function Gt(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var _react2 = require('@emotion/react');function Dn(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...n)=>{let o=typeof t=="string"?`"${t}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
3
|
-
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var Us=Object.create;var tn=Object.defineProperty,qs=Object.defineProperties,Ws=Object.getOwnPropertyDescriptor,Ys=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertyNames,jt=Object.getOwnPropertySymbols,Ks=Object.getPrototypeOf,rn=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable;var So=(t,e,r)=>e in t?tn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,y=(t,e)=>{for(var r in e||(e={}))rn.call(e,r)&&So(t,r,e[r]);if(jt)for(var r of jt(e))Po.call(e,r)&&So(t,r,e[r]);return t},$=(t,e)=>qs(t,Ys(e));var X=(t,e)=>{var r={};for(var n in t)rn.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&jt)for(var n of jt(t))e.indexOf(n)<0&&Po.call(t,n)&&(r[n]=t[n]);return r};var le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Hs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Gs(e))!rn.call(t,o)&&o!==r&&tn(t,o,{get:()=>e[o],enumerable:!(n=Ws(e,o))||n.enumerable});return t};var We=(t,e,r)=>(r=t!=null?Us(Ks(t)):{},Hs(e||!t||!t.__esModule?tn(r,"default",{value:t,enumerable:!0}):r,t));var ue=(t,e,r)=>new Promise((n,o)=>{var i=a=>{try{l(r.next(a))}catch(u){o(u)}},s=a=>{try{l(r.throw(a))}catch(u){o(u)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(i,s);l((r=r.apply(t,e)).next())});var Zo=le(U=>{"use strict";var oe=typeof Symbol=="function"&&Symbol.for,Cn=oe?Symbol.for("react.element"):60103,Sn=oe?Symbol.for("react.portal"):60106,Yt=oe?Symbol.for("react.fragment"):60107,Gt=oe?Symbol.for("react.strict_mode"):60108,Kt=oe?Symbol.for("react.profiler"):60114,Ht=oe?Symbol.for("react.provider"):60109,Zt=oe?Symbol.for("react.context"):60110,Pn=oe?Symbol.for("react.async_mode"):60111,Xt=oe?Symbol.for("react.concurrent_mode"):60111,Jt=oe?Symbol.for("react.forward_ref"):60112,Qt=oe?Symbol.for("react.suspense"):60113,Nl=oe?Symbol.for("react.suspense_list"):60120,er=oe?Symbol.for("react.memo"):60115,tr=oe?Symbol.for("react.lazy"):60116,zl=oe?Symbol.for("react.block"):60121,Vl=oe?Symbol.for("react.fundamental"):60117,Ul=oe?Symbol.for("react.responder"):60118,ql=oe?Symbol.for("react.scope"):60119;function me(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Cn:switch(t=t.type,t){case Pn:case Xt:case Yt:case Kt:case Gt:case Qt:return t;default:switch(t=t&&t.$$typeof,t){case Zt:case Jt:case tr:case er:case Ht:return t;default:return e}}case Sn:return e}}}function Ho(t){return me(t)===Xt}U.AsyncMode=Pn;U.ConcurrentMode=Xt;U.ContextConsumer=Zt;U.ContextProvider=Ht;U.Element=Cn;U.ForwardRef=Jt;U.Fragment=Yt;U.Lazy=tr;U.Memo=er;U.Portal=Sn;U.Profiler=Kt;U.StrictMode=Gt;U.Suspense=Qt;U.isAsyncMode=function(t){return Ho(t)||me(t)===Pn};U.isConcurrentMode=Ho;U.isContextConsumer=function(t){return me(t)===Zt};U.isContextProvider=function(t){return me(t)===Ht};U.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Cn};U.isForwardRef=function(t){return me(t)===Jt};U.isFragment=function(t){return me(t)===Yt};U.isLazy=function(t){return me(t)===tr};U.isMemo=function(t){return me(t)===er};U.isPortal=function(t){return me(t)===Sn};U.isProfiler=function(t){return me(t)===Kt};U.isStrictMode=function(t){return me(t)===Gt};U.isSuspense=function(t){return me(t)===Qt};U.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Yt||t===Xt||t===Kt||t===Gt||t===Qt||t===Nl||typeof t=="object"&&t!==null&&(t.$$typeof===tr||t.$$typeof===er||t.$$typeof===Ht||t.$$typeof===Zt||t.$$typeof===Jt||t.$$typeof===Vl||t.$$typeof===Ul||t.$$typeof===ql||t.$$typeof===zl)};U.typeOf=me});var Xo=le(q=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,a=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,x=t?Symbol.for("react.block"):60121,C=t?Symbol.for("react.fundamental"):60117,O=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function H(v){return typeof v=="string"||typeof v=="function"||v===n||v===u||v===i||v===o||v===c||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===d||v.$$typeof===s||v.$$typeof===l||v.$$typeof===f||v.$$typeof===C||v.$$typeof===O||v.$$typeof===w||v.$$typeof===x)}function k(v){if(typeof v=="object"&&v!==null){var St=v.$$typeof;switch(St){case e:var T=v.type;switch(T){case a:case u:case n:case i:case o:case c:return T;default:var ot=T&&T.$$typeof;switch(ot){case l:case f:case g:case d:case s:return ot;default:return St}}case r:return St}}}var E=a,z=u,G=l,L=s,V=e,K=f,b=n,A=g,m=d,h=r,P=i,S=o,F=c,D=!1;function _(v){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(v)||k(v)===a}function M(v){return k(v)===u}function B(v){return k(v)===l}function j(v){return k(v)===s}function I(v){return typeof v=="object"&&v!==null&&v.$$typeof===e}function ae(v){return k(v)===f}function re(v){return k(v)===n}function Fe(v){return k(v)===g}function Zr(v){return k(v)===d}function Xr(v){return k(v)===r}function Jr(v){return k(v)===i}function Qr(v){return k(v)===o}function en(v){return k(v)===c}q.AsyncMode=E,q.ConcurrentMode=z,q.ContextConsumer=G,q.ContextProvider=L,q.Element=V,q.ForwardRef=K,q.Fragment=b,q.Lazy=A,q.Memo=m,q.Portal=h,q.Profiler=P,q.StrictMode=S,q.Suspense=F,q.isAsyncMode=_,q.isConcurrentMode=M,q.isContextConsumer=B,q.isContextProvider=j,q.isElement=I,q.isForwardRef=ae,q.isFragment=re,q.isLazy=Fe,q.isMemo=Zr,q.isPortal=Xr,q.isProfiler=Jr,q.isStrictMode=Qr,q.isSuspense=en,q.isValidElementType=H,q.typeOf=k}()});var wn=le((zh,En)=>{"use strict";process.env.NODE_ENV==="production"?En.exports=Zo():En.exports=Xo()});var ei=le((Vh,Qo)=>{"use strict";var Jo=Object.getOwnPropertySymbols,Wl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable;function Gl(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Kl(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(i){return e[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}Qo.exports=Kl()?Object.assign:function(t,e){for(var r,n=Gl(t),o,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var s in r)Wl.call(r,s)&&(n[s]=r[s]);if(Jo){o=Jo(r);for(var l=0;l<o.length;l++)Yl.call(r,o[l])&&(n[o[l]]=r[o[l]])}}return n}});var rr=le((Uh,ti)=>{"use strict";var Hl="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ti.exports=Hl});var Fn=le((qh,ri)=>{ri.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var ai=le((Wh,si)=>{"use strict";var On=function(){};process.env.NODE_ENV!=="production"&&(ni=rr(),nr={},oi=Fn(),On=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var ni,nr,oi;function ii(t,e,r,n,o){if(process.env.NODE_ENV!=="production"){for(var i in t)if(oi(t,i)){var s;try{if(typeof t[i]!="function"){var l=Error((n||"React class")+": "+r+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=t[i](e,i,n,r,null,ni)}catch(u){s=u}if(s&&!(s instanceof Error)&&On((n||"React class")+": type specification of "+r+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in nr)){nr[s.message]=!0;var a=o?o():"";On("Failed "+r+" type: "+s.message+(a!=null?a:""))}}}}ii.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(nr={})};si.exports=ii});var ci=le((Yh,ui)=>{"use strict";var Zl=wn(),Xl=ei(),lt=rr(),kn=Fn(),li=ai(),ut=function(){};process.env.NODE_ENV!=="production"&&(ut=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function or(){return null}ui.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function o(m){var h=m&&(r&&m[r]||m[n]);if(typeof h=="function")return h}var i="<<anonymous>>",s={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:c(),arrayOf:p,element:d(),elementType:g(),instanceOf:x,node:H(),objectOf:O,oneOf:C,oneOfType:w,shape:E,exact:z};function l(m,h){return m===h?m!==0||1/m===1/h:m!==m&&h!==h}function a(m,h){this.message=m,this.data=h&&typeof h=="object"?h:{},this.stack=""}a.prototype=Error.prototype;function u(m){if(process.env.NODE_ENV!=="production")var h={},P=0;function S(D,_,M,B,j,I,ae){if(B=B||i,I=I||M,ae!==lt){if(e){var re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Fe=B+":"+M;!h[Fe]&&P<3&&(ut("You are manually calling a React.PropTypes validation function for the `"+I+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),h[Fe]=!0,P++)}}return _[M]==null?D?_[M]===null?new a("The "+j+" `"+I+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new a("The "+j+" `"+I+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:m(_,M,B,j,I)}var F=S.bind(null,!1);return F.isRequired=S.bind(null,!0),F}function f(m){function h(P,S,F,D,_,M){var B=P[S],j=V(B);if(j!==m){var I=K(B);return new a("Invalid "+D+" `"+_+"` of type "+("`"+I+"` supplied to `"+F+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return u(h)}function c(){return u(or)}function p(m){function h(P,S,F,D,_){if(typeof m!="function")return new a("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var M=P[S];if(!Array.isArray(M)){var B=V(M);return new a("Invalid "+D+" `"+_+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an array."))}for(var j=0;j<M.length;j++){var I=m(M,j,F,D,_+"["+j+"]",lt);if(I instanceof Error)return I}return null}return u(h)}function d(){function m(h,P,S,F,D){var _=h[P];if(!t(_)){var M=V(_);return new a("Invalid "+F+" `"+D+"` of type "+("`"+M+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return u(m)}function g(){function m(h,P,S,F,D){var _=h[P];if(!Zl.isValidElementType(_)){var M=V(_);return new a("Invalid "+F+" `"+D+"` of type "+("`"+M+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return u(m)}function x(m){function h(P,S,F,D,_){if(!(P[S]instanceof m)){var M=m.name||i,B=A(P[S]);return new a("Invalid "+D+" `"+_+"` of type "+("`"+B+"` supplied to `"+F+"`, expected ")+("instance of `"+M+"`."))}return null}return u(h)}function C(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?ut("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ut("Invalid argument supplied to oneOf, expected an array.")),or;function h(P,S,F,D,_){for(var M=P[S],B=0;B<m.length;B++)if(l(M,m[B]))return null;var j=JSON.stringify(m,function(ae,re){var Fe=K(re);return Fe==="symbol"?String(re):re});return new a("Invalid "+D+" `"+_+"` of value `"+String(M)+"` "+("supplied to `"+F+"`, expected one of "+j+"."))}return u(h)}function O(m){function h(P,S,F,D,_){if(typeof m!="function")return new a("Property `"+_+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var M=P[S],B=V(M);if(B!=="object")return new a("Invalid "+D+" `"+_+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an object."));for(var j in M)if(kn(M,j)){var I=m(M,j,F,D,_+"."+j,lt);if(I instanceof Error)return I}return null}return u(h)}function w(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&ut("Invalid argument supplied to oneOfType, expected an instance of array."),or;for(var h=0;h<m.length;h++){var P=m[h];if(typeof P!="function")return ut("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(P)+" at index "+h+"."),or}function S(F,D,_,M,B){for(var j=[],I=0;I<m.length;I++){var ae=m[I],re=ae(F,D,_,M,B,lt);if(re==null)return null;re.data&&kn(re.data,"expectedType")&&j.push(re.data.expectedType)}var Fe=j.length>0?", expected one of type ["+j.join(", ")+"]":"";return new a("Invalid "+M+" `"+B+"` supplied to "+("`"+_+"`"+Fe+"."))}return u(S)}function H(){function m(h,P,S,F,D){return G(h[P])?null:new a("Invalid "+F+" `"+D+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return u(m)}function k(m,h,P,S,F){return new a((m||"React class")+": "+h+" type `"+P+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function E(m){function h(P,S,F,D,_){var M=P[S],B=V(M);if(B!=="object")return new a("Invalid "+D+" `"+_+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));for(var j in m){var I=m[j];if(typeof I!="function")return k(F,D,_,j,K(I));var ae=I(M,j,F,D,_+"."+j,lt);if(ae)return ae}return null}return u(h)}function z(m){function h(P,S,F,D,_){var M=P[S],B=V(M);if(B!=="object")return new a("Invalid "+D+" `"+_+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));var j=Xl({},P[S],m);for(var I in j){var ae=m[I];if(kn(m,I)&&typeof ae!="function")return k(F,D,_,I,K(ae));if(!ae)return new a("Invalid "+D+" `"+_+"` key `"+I+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(P[S],null," ")+`
|
|
2
|
+
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var re=ae(M,I,F,D,_+"."+I,lt);if(re)return re}return null}return u(h)}function G(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(G);if(m===null||t(m))return!0;var h=o(m);if(h){var P=h.call(m),S;if(h!==m.entries){for(;!(S=P.next()).done;)if(!G(S.value))return!1}else for(;!(S=P.next()).done;){var F=S.value;if(F&&!G(F[1]))return!1}}else return!1;return!0;default:return!1}}function L(m,h){return m==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function V(m){var h=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":L(h,m)?"symbol":h}function K(m){if(typeof m=="undefined"||m===null)return""+m;var h=V(m);if(h==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return h}function b(m){var h=K(m);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function A(m){return!m.constructor||!m.constructor.name?i:m.constructor.name}return s.checkPropTypes=li,s.resetWarningCache=li.resetWarningCache,s.PropTypes=s,s}});var mi=le((Gh,di)=>{"use strict";var Jl=rr();function fi(){}function pi(){}pi.resetWarningCache=fi;di.exports=function(){function t(n,o,i,s,l,a){if(a!==Jl){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:pi,resetWarningCache:fi};return r.PropTypes=r,r}});var ir=le((Kh,An)=>{process.env.NODE_ENV!=="production"?(hi=wn(),gi=!0,An.exports=ci()(hi.isElement,gi)):An.exports=mi()();var hi,gi});var Di=le(W=>{"use strict";var zn=Symbol.for("react.element"),Vn=Symbol.for("react.portal"),dr=Symbol.for("react.fragment"),mr=Symbol.for("react.strict_mode"),hr=Symbol.for("react.profiler"),gr=Symbol.for("react.provider"),yr=Symbol.for("react.context"),ic=Symbol.for("react.server_context"),xr=Symbol.for("react.forward_ref"),br=Symbol.for("react.suspense"),vr=Symbol.for("react.suspense_list"),Tr=Symbol.for("react.memo"),Cr=Symbol.for("react.lazy"),sc=Symbol.for("react.offscreen"),Mi;Mi=Symbol.for("react.module.reference");function ve(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case zn:switch(t=t.type,t){case dr:case hr:case mr:case br:case vr:return t;default:switch(t=t&&t.$$typeof,t){case ic:case yr:case xr:case Cr:case Tr:case gr:return t;default:return e}}case Vn:return e}}}W.ContextConsumer=yr;W.ContextProvider=gr;W.Element=zn;W.ForwardRef=xr;W.Fragment=dr;W.Lazy=Cr;W.Memo=Tr;W.Portal=Vn;W.Profiler=hr;W.StrictMode=mr;W.Suspense=br;W.SuspenseList=vr;W.isAsyncMode=function(){return!1};W.isConcurrentMode=function(){return!1};W.isContextConsumer=function(t){return ve(t)===yr};W.isContextProvider=function(t){return ve(t)===gr};W.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===zn};W.isForwardRef=function(t){return ve(t)===xr};W.isFragment=function(t){return ve(t)===dr};W.isLazy=function(t){return ve(t)===Cr};W.isMemo=function(t){return ve(t)===Tr};W.isPortal=function(t){return ve(t)===Vn};W.isProfiler=function(t){return ve(t)===hr};W.isStrictMode=function(t){return ve(t)===mr};W.isSuspense=function(t){return ve(t)===br};W.isSuspenseList=function(t){return ve(t)===vr};W.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===dr||t===hr||t===mr||t===br||t===vr||t===sc||typeof t=="object"&&t!==null&&(t.$$typeof===Cr||t.$$typeof===Tr||t.$$typeof===gr||t.$$typeof===yr||t.$$typeof===xr||t.$$typeof===Mi||t.getModuleId!==void 0)};W.typeOf=ve});var Ri=le(Y=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),g=!1,x=!1,C=!1,O=!1,w=!1,H;H=Symbol.for("react.module.reference");function k(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===o||w||T===n||T===u||T===f||O||T===d||g||x||C||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===c||T.$$typeof===i||T.$$typeof===s||T.$$typeof===a||T.$$typeof===H||T.getModuleId!==void 0))}function E(T){if(typeof T=="object"&&T!==null){var ot=T.$$typeof;switch(ot){case t:var Lt=T.type;switch(Lt){case r:case o:case n:case u:case f:return Lt;default:var Co=Lt&&Lt.$$typeof;switch(Co){case l:case s:case a:case p:case c:case i:return Co;default:return ot}}case e:return ot}}}var z=s,G=i,L=t,V=a,K=r,b=p,A=c,m=e,h=o,P=n,S=u,F=f,D=!1,_=!1;function M(T){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(T){return _||(_=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function j(T){return E(T)===s}function I(T){return E(T)===i}function ae(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function re(T){return E(T)===a}function Fe(T){return E(T)===r}function Zr(T){return E(T)===p}function Xr(T){return E(T)===c}function Jr(T){return E(T)===e}function Qr(T){return E(T)===o}function en(T){return E(T)===n}function v(T){return E(T)===u}function St(T){return E(T)===f}Y.ContextConsumer=z,Y.ContextProvider=G,Y.Element=L,Y.ForwardRef=V,Y.Fragment=K,Y.Lazy=b,Y.Memo=A,Y.Portal=m,Y.Profiler=h,Y.StrictMode=P,Y.Suspense=S,Y.SuspenseList=F,Y.isAsyncMode=M,Y.isConcurrentMode=B,Y.isContextConsumer=j,Y.isContextProvider=I,Y.isElement=ae,Y.isForwardRef=re,Y.isFragment=Fe,Y.isLazy=Zr,Y.isMemo=Xr,Y.isPortal=Jr,Y.isProfiler=Qr,Y.isStrictMode=en,Y.isSuspense=v,Y.isSuspenseList=St,Y.isValidElementType=k,Y.typeOf=E}()});var $i=le((rx,Un)=>{"use strict";process.env.NODE_ENV==="production"?Un.exports=Di():Un.exports=Ri()});var is=le((m0,os)=>{"use strict";function Je(t){this._maxSize=t,this.clear()}Je.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Je.prototype.get=function(t){return this._values[t]};Je.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var cf=/[^.^\]^[]+|(?=\[\]|\.\.)/g,ns=/^\d+$/,ff=/^\d/,pf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,df=/^\s*(['"]?)(.*?)(\1)\s*$/,oo=512,es=new Je(oo),ts=new Je(oo),rs=new Je(oo);os.exports={Cache:Je,split:no,normalizePath:ro,setter:function(t){var e=ro(t);return ts.get(t)||ts.set(t,function(n,o){for(var i=0,s=e.length,l=n;i<s-1;){var a=e[i];if(a==="__proto__"||a==="constructor"||a==="prototype")return n;l=l[e[i++]]}l[e[i]]=o})},getter:function(t,e){var r=ro(t);return rs.get(t)||rs.set(t,function(o){for(var i=0,s=r.length;i<s;)if(o!=null||!e)o=o[r[i++]];else return;return o})},join:function(t){return t.reduce(function(e,r){return e+(io(r)||ns.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){mf(Array.isArray(t)?t:no(t),e,r)}};function ro(t){return es.get(t)||es.set(t,no(t).map(function(e){return e.replace(df,"$2")}))}function no(t){return t.match(cf)||[""]}function mf(t,e,r){var n=t.length,o,i,s,l;for(i=0;i<n;i++)o=t[i],o&&(yf(o)&&(o='"'+o+'"'),l=io(o),s=!l&&/^\d+$/.test(o),e.call(r,o,l,s,i,t))}function io(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function hf(t){return t.match(ff)&&!t.match(ns)}function gf(t){return pf.test(t)}function yf(t){return!io(t)&&(hf(t)||gf(t))}});var ls=le((h0,as)=>{var xf=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Dr=t=>t.match(xf)||[],Rr=t=>t[0].toUpperCase()+t.slice(1),so=(t,e)=>Dr(t).join(e).toLowerCase(),ss=t=>Dr(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),bf=t=>Rr(ss(t)),vf=t=>so(t,"_"),Tf=t=>so(t,"-"),Cf=t=>Rr(so(t," ")),Sf=t=>Dr(t).map(Rr).join(" ");as.exports={words:Dr,upperFirst:Rr,camelCase:ss,pascalCase:bf,snakeCase:vf,kebabCase:Tf,sentenceCase:Cf,titleCase:Sf}});var cs=le((g0,ao)=>{ao.exports=function(t){return us(Pf(t),t)};ao.exports.array=us;function us(t,e){var r=t.length,n=new Array(r),o={},i=r,s=Ef(e),l=wf(t);for(e.forEach(function(u){if(!l.has(u[0])||!l.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||a(t[i],i,new Set);return n;function a(u,f,c){if(c.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch(x){p=""}throw new Error("Cyclic dependency"+p)}if(!l.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[f]){o[f]=!0;var d=s.get(u)||new Set;if(d=Array.from(d),f=d.length){c.add(u);do{var g=d[--f];a(g,l.get(g),c)}while(f);c.delete(u)}n[--r]=u}}}function Pf(t){for(var e=new Set,r=0,n=t.length;r<n;r++){var o=t[r];e.add(o[0]),e.add(o[1])}return Array.from(e)}function Ef(t){for(var e=new Map,r=0,n=t.length;r<n;r++){var o=t[r];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}function wf(t){for(var e=new Map,r=0,n=t.length;r<n;r++)e.set(t[r],r);return e}});var _material = require('@mui/material');var _jsxruntime = require('react/jsx-runtime');var Js=t=>{let o=t,{isLoading:e,children:r}=o,n=X(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,$(y({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ne= exports.Button =Js;function Ie(t){return _jsxruntime.jsx.call(void 0, _material.Stack,y({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function wo(t){let n=t,{label:e}=n,r=X(n,["label"]);return _jsxruntime.jsx.call(void 0, _material.FormControl,{component:"fieldset",children:_jsxruntime.jsx.call(void 0, _material.FormControlLabel,{label:e,control:_jsxruntime.jsx.call(void 0, _material.Checkbox,y({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var on="#59C3E0",sa={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:on,dark:"#2C96B3"},background:{default:"#F2F2F2",paper:"#FEFEFE"},error:{main:"#F44336",dark:"#BE0D00",light:"#FF6C5F"},warning:{main:"#FFCD38",dark:"#C29000",light:"#FFED58"},success:{main:"#4CAF50",dark:"#187B1C",light:"#7DE081"},grey:{800:"#202024",700:"#262626",600:"#333333",500:"#808080",400:"#BBBBBA",300:"#E0E0E0",200:"#F2F2F2",100:"#FAFAFA"}},typography:{h1:{fontSize:"2rem",fontFamily:"Poppins"},h2:{fontSize:"1.75rem"},h3:{fontSize:"1.5rem"},h4:{fontSize:"1.25rem"},h5:{fontSize:"1rem"},h6:{fontSize:"0.875rem"},button:{fontSize:"0.875rem",fontWeight:"bold",textTransform:"none"},body1:{fontSize:"1rem",color:"#262626"},body2:{fontSize:"0.875rem",color:"#808080"},fontFamily:["sans-serif","Roboto","Poppins"].join(",")},components:{MuiContainer:{defaultProps:{maxWidth:!1},styleOverrides:{root:{paddingTop:"16px",paddingBottom:"16px"}}},MuiButton:{defaultProps:{size:"small",variant:"outlined"},styleOverrides:{root:{textTransform:"none",fontWeight:"bold"},contained:{color:"rgba(255,255,255,0.85)",boxShadow:"none"},outlined:{background:"white",":disabled":{background:"none",boxShadow:"none",borderColor:"#E0E0E0"}}}},MuiFormControl:{defaultProps:{size:"small"}},MuiCheckbox:{defaultProps:{size:"small"}},MuiTextField:{defaultProps:{size:"small",fullWidth:!0},styleOverrides:{root:{"& label":{color:"#808080"}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"0.875rem"}}},MuiSvgIcon:{defaultProps:{fontSize:"small",color:"inherit"}},MuiIconButton:{defaultProps:{size:"small"},styleOverrides:{root:{}}},MuiPopover:{styleOverrides:{paper:{borderRadius:"12px"}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{"& .MuiIcon-root":{color:on},"& .MuiTypography-root":{color:on}},":hover":{borderRadius:"6px",background:"rgba(89, 195, 224, 15%)"}}}},MuiTableCell:{styleOverrides:{root:{padding:0,"&.selected":{backgroundColor:"#199"}},head:{backgroundColor:"#FAFAFA",border:"1px solid #D0D0D0",color:"#808080","& span":{color:"#808080"},"& div":{marginLeft:"4px"}},body:{backgroundColor:"#ffffff00",border:"1px solid #D0D0D0",borderTop:"none",borderBottom:"none","& > div":{fontSize:"9pt",paddingLeft:"6px",paddingRight:"6px",paddingTop:"2px",paddingBottom:"2px"}}}},MuiTableRow:{styleOverrides:{root:{backgroundColor:"#FFFFFF",height:"30px","&.MuiTableRow-hover":{"&:hover":{backgroundColor:"#ffffde"}}},head:{borderRadius:"4px","& div":{fontWeight:"600",fontSize:"13px",padding:"2px"}}}},MUIDataTableHeadCell:{styleOverrides:{toolButton:{height:"48px"}}},MUIDataTableBodyRow:{styleOverrides:{root:{"&:hover":{backgroundColor:"#333"},"&:nth-of-type(even)":{backgroundColor:"#F5F5F5"},"&:last-child":{borderBottom:"1px solid #D0D0D0"}}}},MuiTableHead:{styleOverrides:{root:{height:"48px"}}},MuiDrawer:{styleOverrides:{paper:{}}},MuiDialog:{styleOverrides:{paper:{borderRadius:"6px"}}},MuiDialogContent:{styleOverrides:{root:{}}}}},aa=_styles.createTheme.call(void 0, sa),la=_styles.responsiveFontSizes.call(void 0, aa),N= exports.theme =la;var ca={"primary-light":N.palette.primary.light,primary:N.palette.primary.main,"primary-dark":N.palette.primary.dark,"text-secondary":N.palette.text.secondary,"text-primary":N.palette.text.primary,"background-paper":N.palette.background.paper,background:N.palette.background.default,"error-light":N.palette.error.light,error:N.palette.error.main,"erro-drark":N.palette.error.dark,"warning-light":N.palette.warning.light,warning:N.palette.warning.main,"warning-dark":N.palette.warning.dark,"success-light":N.palette.success.light,success:N.palette.success.main,"success-dark":N.palette.success.dark,"grey-100":N.palette.grey[100],"grey-200":N.palette.grey[200],"grey-300":N.palette.grey[300],"grey-400":N.palette.grey[400],"grey-500":N.palette.grey[500],"grey-600":N.palette.grey[600],"grey-700":N.palette.grey[700],"grey-800":N.palette.grey[800]};function Oo(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(ca).map(([t,e])=>_jsxruntime.jsx.call(void 0, _material.Box,{sx:{backgroundColor:e,padding:"2rem"},children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",fontFamily:N.typography.fontFamily,color:_polished.getContrast.call(void 0, e,"#FFF")<3.5?"#000":"#FFF"},children:[_jsxruntime.jsx.call(void 0, "strong",{children:t}),_jsxruntime.jsx.call(void 0, "span",{children:e})]})},t))})}var _hooks = require('@data-c/hooks');var _react = require('react'); var wi = _interopRequireWildcard(_react); var dt = _interopRequireWildcard(_react);function Ao(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var sn=null;function an(t){let s=t,{value:e,onChange:r}=s,n=X(s,["value","onChange"]);sn=null;let o=_react.useCallback.call(void 0, l=>{let a=l.target.value||"0.00";_hooks.isValidNumber.call(void 0, a)&&(sn==="Backspace"?a=(Ao(a)/10).toFixed(2):a=(Ao(a)*10).toFixed(2),r&&(l.target.value=a,r(l,a)))},[]),i=_react.useCallback.call(void 0, l=>{l.target.selectionStart===l.target.selectionEnd&&(l.target.selectionStart=l.target.value.length,l.target.selectionEnd=l.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,y({onKeyDown:l=>{sn=l.key},onSelect:l=>{i(l)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}an.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var _o={content:{cancel:"error",confirm:"primary"},info:{cancel:"error",confirm:"info"},success:{cancel:"error",confirm:"success"},warning:{cancel:"primary",confirm:"warning"},error:{cancel:"primary",confirm:"error"}};function Le(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Ie,{children:[o&&_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{o()},color:_o[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ne,{onClick:()=>{i&&i()},color:_o[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var ya={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};Le.defaultProps=ya;function Pe(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s,dialogActionsProps:l}=t,a=_material.useTheme.call(void 0, ),u=n==="none"?null:n||_jsxruntime.jsx.call(void 0, Le,y({onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s},l)),f=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),c=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,$(y({},t),{children:[_jsxruntime.jsx.call(void 0, _material.DialogTitle,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{color:p=>{if(s!=="content")return p.palette[c||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[f&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:f}),e]})}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>o({},"escapeKeyDown"),sx:{mr:-1,color:a.palette.text.primary},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{color:"inherit"})})]})}),_jsxruntime.jsx.call(void 0, _material.DialogContent,{children:_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1,color:p=>p.palette.grey[500],fontFamily:p=>p.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:u})]}))}Pe.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function un(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeConfirm:n}=_providers.useFormApi.call(void 0, ),{onDelete:o,hideCancelButton:i,type:s}=t;return _jsxruntime.jsx.call(void 0, Le,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function cn(t){let{isOpenConfirm:e}=_providers.useFormData.call(void 0, ),{closeConfirm:r}=_providers.useFormApi.call(void 0, ),{type:n,title:o,children:i,actions:s,onDelete:l}=t;return _jsxruntime.jsx.call(void 0, Pe,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, un,{type:n,onDelete:l||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Ra={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};cn.defaultProps=Ra;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var Va=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,l=_react.useMemo.call(void 0, ()=>Math.max(0,Math.ceil(e/r)),[e,r]);return _jsxruntime.jsx.call(void 0, _material.TableFooter,{children:_jsxruntime.jsx.call(void 0, _material.TableRow,{children:_jsxruntime.jsxs.call(void 0, _material.TableCell,{colSpan:1e3,sx:{display:"flex",justifyContent:"flex-end",padding:"12px 12px 12px 12px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"128px",fontSize:"8pt"},label:"Tamanho da p\xE1gina",size:"small",value:r,select:!0,onChange:a=>{i(a.target.value)},children:s.map(a=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:a,children:a},a))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:l,showFirstButton:!0,showLastButton:!0,onChange:(a,u)=>{o(u)},page:n,color:"primary"})]})})})},Bo=Va;var Za={body:{noMatch:"Nenhum registro encontrado",toolTip:"Ordenar"},pagination:{next:"Pr\xF3ximo",previous:"Anterior",rowsPerPage:"Linhas por p\xE1g:",displayRows:"de"},toolbar:{search:"Procurar",downloadCsv:"Download CSV",print:"Imprimir",viewColumns:"Colunas",filterTable:"Procurar na Tabela"},filter:{all:"Todos",title:"Filtros",reset:"Limpar"},viewColumns:{title:"Visualizar Colunas",titleAria:"Mostrar/Ocultar Colunas da Tabela"},selectedRows:{text:"Linhas Selecionadas",delete:"Remover",deleteAria:"Remover Linhas Selecionadas"}},Xa=t=>({filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:Za,serverSide:!0,rowsPerPageOptions:[15,50,100],rowsPerPage:15,fixedHeader:!0,fixedSelectColumn:!1,tableBodyMaxHeight:t}),Ja=t=>{let H=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:l,pagination:a,changePage:u,changePageSize:f,changeSort:c}=H,p=X(H,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),d=_material.useTheme.call(void 0, ),x=_material.useMediaQuery.call(void 0, d.breakpoints.up("xl"))?75:70,C=a?`${x}vh`:`calc(${x}vh + 65px)`,O=Xa(C),w=l||{};return w&&(u&&(w.onChangePage=u),f&&(w.onChangeRowsPerPage=f),c&&(w.onColumnSortChange=c),w.customFooter=(k,E,z,G,L,V)=>!a||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, Bo,{count:a.totalRecords,page:a.page,rowsPerPage:a.pageSize,rowsPerPageOptions:(w==null?void 0:w.rowsPerPageOptions)||(O==null?void 0:O.rowsPerPageOptions),changeRowsPerPage:w==null?void 0:w.onChangeRowsPerPage,changePage:w==null?void 0:w.onChangePage,textLabels:V})),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{}),e&&_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},spacing:2,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:e})}),_jsxruntime.jsx.call(void 0, _muidatatables2.default,y({title:r,data:i,columns:s,options:y(y({},O),w)},p))]})},Qa= exports.DataTable =Ja;var al=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=X(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,$(y({},e),{classes:{popper:t}}))})(({theme:t})=>({[`& .${_material.tooltipClasses.tooltip}`]:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",maxWidth:320,minWidth:180,fontSize:t.typography.pxToRem(12),border:"1px solid #dadde9"}})),ll={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},ul=t=>{let{title:e,type:r}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{mt:.5},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, _material.Icon,{color:r,fontSize:"small",children:r})," ",_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",sx:{ml:.5},children:ll[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},jo=t=>{let i=t,{type:e,children:r,title:n}=i,o=X(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, al,$(y({arrow:!0,title:_jsxruntime.jsx.call(void 0, ul,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};jo.defaultProps={type:"info"};var st=jo;var Vm=()=>({style:{width:"80px",textAlign:"center"}}),Um= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function pn(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:l,disabled:a,disabledUpdateButton:u,disabledDeleteButton:f,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:p,icon:d,iconButtonProps:g,tooltip:x,visible:C,disabled:O})=>C===null||!!C&&_jsxruntime.jsxs.call(void 0, _material.IconButton,$(y({onClick:()=>e(p,r),size:"small",disabled:O},g),{children:[x&&_jsxruntime.jsx.call(void 0, st,{type:x.type,title:x.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:d})}),!x&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:d})]}),p)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:a||c,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para transportar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"})})]}),o&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",color:"primary",onClick:()=>e("edit",r),disabled:a||u,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"info",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para editar este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"})})]}),i&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("delete",r),color:"primary",disabled:a||f,children:[l&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!l&&_jsxruntime.jsx.call(void 0, st,{type:"warning",title:_jsxruntime.jsx.call(void 0, _material.Box,{children:"Clique para excluir este registro."}),children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"})})]})]})}pn.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function Ut(t){let{renderLabel:e,disableds:r}=t,{deleteFilterValue:n,deleteAllFilterValues:o}=_providers.useFilterApi.call(void 0, ),{filterValues:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),l=_react.useMemo.call(void 0, ()=>{if(Object.keys(s||{}).length>0){let f=!1,c=Object.keys(s||{});for(let p=0;p<c.length;p++){let d=s[c[p]];if(Array.isArray(d)&&d.length>0){f=!0;break}else if(!Array.isArray(d)&&d){f=!0;break}}return f}return!1},[s]),a=_react.useCallback.call(void 0, u=>e?e(i[u].label,s[u]):`${i[u].label} - ${s&&s[u]}`,[e,i,s]);return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:1},children:l&&Object.keys(s||{}).map(u=>{let f=Array.isArray(r)&&r.includes(u),c;if(f||(c=()=>{n&&n(u)}),Array.isArray(s[u])&&s[u].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u);if(!Array.isArray(s[u])&&s[u])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(u),onDelete:c,variant:"outlined"},u)})}),l&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mr:.5,ml:.5,display:"flex",alignContent:"center",alignItems:"center"},children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o&&o()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{fontSize:"small",color:"error"})})})]})}function qt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=X(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,$(y({PaperProps:{style:{borderRadius:"12px 0 0 12px"}},onClose:n},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:l=>l.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:l=>`solid 1px ${l.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:l=>l.spacing(2)},children:e}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{color:"error"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{padding:l=>l.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:l=>l.spacing(1),pb:l=>l.spacing(1),pl:l=>l.spacing(2),pr:l=>l.spacing(2),borderTop:l=>`solid 1px ${l.palette.grey[300]}`},children:r})]})}))}qt.defaultProps={anchor:"right"};var Fl=()=>{let{applyFilterValues:t,closeFilter:e,deleteAllFilterValues:r}=_providers.useFilterApi.call(void 0, );function n(){e()}function o(){t(),e()}function i(){r&&(r(),e())}return _jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end","& > button:first-child":{mr:1}},children:[_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,onClick:i,color:"error",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.RestartAlt,{})," Redefinir Padr\xE3o"]}),_jsxruntime.jsxs.call(void 0, _material.Button,{fullWidth:!0,variant:"contained",onClick:o,children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})," Aplicar"]})]})},Ol=t=>{let{title:e,children:r,onApplyFilters:n,drawerProps:o}=t,{isOpen:i,appliedValues:s}=_providers.useFilterData.call(void 0, ),{closeFilter:l}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(s)},[s]),_jsxruntime.jsx.call(void 0, qt,$(y({},o),{drawerTitle:e,open:i,children:r,onClose:()=>l(),actions:_jsxruntime.jsx.call(void 0, Fl,{})}))};function xn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:l,disableds:a,disableFilterControl:u,drawerProps:f}=t,{openFilter:c}=_providers.useFilterApi.call(void 0, ),p=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,$(y({variant:"contained",onClick:()=>{c()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[u&&p,!u&&_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",direction:"row",justifyContent:"flex-end",alignItems:"center",alignContent:"center"},children:[_jsxruntime.jsx.call(void 0, Ut,{renderLabel:l,disableds:a}),p]}),_jsxruntime.jsx.call(void 0, Ol,$(y({},f),{onApplyFilters:s,title:o||"",children:i}))]})}xn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Go(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function bn(t){let{formValues:e,isSubmitting:r}=_providers.useFormData.call(void 0, ),{closeForm:n}=_providers.useFormApi.call(void 0, ),{onSubmitForm:o,hideCancelButton:i,confirmButtonLabel:s}=t;return _jsxruntime.jsx.call(void 0, Le,{confirmLabel:s||"Salvar",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Tn(t){let{view:e,children:r,actions:n,onSubmitForm:o,triggerButton:i,dialogProps:s,triggerButtonLabel:l,confirmButtonLabel:a}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:f,openForm:c}=_providers.useFormApi.call(void 0, ),p=n||_jsxruntime.jsx.call(void 0, bn,{hideCancelButton:e==="plain",confirmButtonLabel:a,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),d=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:()=>{c()},children:l||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[d,_jsxruntime.jsx.call(void 0, Pe,$(y({},s),{onClose:()=>{f()},open:!!u,children:r,actions:p}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[r,p]})}var Ll={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};Tn.defaultProps=Ll;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function Wt(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var _react2 = require('@emotion/react');function _n(t,e){let r=_styled2.default.call(void 0, t,e);return process.env.NODE_ENV!=="production"?(...n)=>{let o=typeof t=="string"?`"${t}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
3
|
+
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}var yi=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))};function R(){return R=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},R.apply(this,arguments)}function he(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Oe(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function bi(t){if(!Oe(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=bi(t[r])}),e}function ye(t,e,r={clone:!0}){let n=r.clone?R({},t):t;return Oe(t)&&Oe(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(Oe(e[o])&&o in t&&Oe(t[o])?n[o]=ye(t[o],e[o],r):r.clone?n[o]=Oe(e[o])?bi(e[o]):e[o]:n[o]=e[o])}),n}var eu=["values","unit","step"];var tu=t=>{let e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>R({},r,{[n.key]:n.val}),{})};function Mn(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=t,o=he(t,eu),i=tu(e),s=Object.keys(i);function l(p){return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r})`}function a(p){return`@media (max-width:${(typeof e[p]=="number"?e[p]:p)-n/100}${r})`}function u(p,d){let g=s.indexOf(d);return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r}) and (max-width:${(g!==-1&&typeof e[s[g]]=="number"?e[s[g]]:d)-n/100}${r})`}function f(p){return s.indexOf(p)+1<s.length?u(p,s[s.indexOf(p)+1]):l(p)}function c(p){let d=s.indexOf(p);return d===0?l(s[1]):d===s.length-1?a(s[d]):u(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return R({keys:s,values:i,up:l,down:a,between:u,only:f,not:c,unit:r},o)}var ru={borderRadius:4},vi=ru;var ct=We(ir()),nu=process.env.NODE_ENV!=="production"?ct.default.oneOfType([ct.default.number,ct.default.string,ct.default.object,ct.default.array]):{},xe=nu;function ou(t,e){return e?ye(t,e,{clone:!1}):t}var Ne=ou;var sr={xs:0,sm:600,md:900,lg:1200,xl:1536},Ti={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${sr[t]}px)`};function ie(t,e,r){let n=t.theme||{};if(Array.isArray(e)){let i=n.breakpoints||Ti;return e.reduce((s,l,a)=>(s[i.up(i.keys[a])]=r(e[a]),s),{})}if(typeof e=="object"){let i=n.breakpoints||Ti;return Object.keys(e).reduce((s,l)=>{if(Object.keys(i.values||sr).indexOf(l)!==-1){let a=i.up(l);s[a]=r(e[l],l)}else{let a=l;s[a]=e[a]}return s},{})}return r(e)}function Dn(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((n,o)=>{let i=t.up(o);return n[i]={},n},{}))||{}}function Rn(t,e){return t.reduce((r,n)=>{let o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},e)}function Ci(t,...e){let r=Dn(t),n=[r,...e].reduce((o,i)=>ye(o,i),{});return Rn(Object.keys(r),n)}function iu(t,e){if(typeof t!="object")return{};let r={},n=Object.keys(e);return Array.isArray(t)?n.forEach((o,i)=>{i<t.length&&(r[o]=!0)}):n.forEach(o=>{t[o]!=null&&(r[o]=!0)}),r}function ar({values:t,breakpoints:e,base:r}){let n=r||iu(t,e),o=Object.keys(n);if(o.length===0)return t;let i;return o.reduce((s,l,a)=>(Array.isArray(t)?(s[l]=t[a]!=null?t[a]:t[i],i=a):typeof t=="object"?(s[l]=t[l]!=null?t[l]:t[i],i=l):s[l]=t,s),{})}function ze(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Wt(7));return t.charAt(0).toUpperCase()+t.slice(1)}function ft(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){let n=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(n!=null)return n}return e.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,t)}function Ft(t,e,r,n=r){let o;return typeof t=="function"?o=t(r):Array.isArray(t)?o=t[r]||n:o=ft(t,r)||n,e&&(o=e(o,n,t)),o}function su(t){let{prop:e,cssProperty:r=t.prop,themeKey:n,transform:o}=t,i=s=>{if(s[e]==null)return null;let l=s[e],a=s.theme,u=ft(a,n)||{};return ie(s,l,c=>{let p=Ft(u,o,c);return c===p&&typeof c=="string"&&(p=Ft(u,o,`${e}${c==="default"?"":ze(c)}`,c)),r===!1?p:{[r]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:xe}:{},i.filterProps=[e],i}var J=su;function $n(t){let e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}var au={m:"margin",p:"padding"},lu={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Si={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uu=$n(t=>{if(t.length>2)if(Si[t])t=Si[t];else return[t];let[e,r]=t.split(""),n=au[e],o=lu[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),lr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ur=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Bn=[...lr,...ur];function Ke(t,e,r,n){var o;let i=(o=ft(t,e,!1))!=null?o:r;return typeof i=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),i*s):Array.isArray(i)?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
4
4
|
`)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
|
|
5
5
|
`))),i[s]):typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
6
|
-
`)),()=>{})}function At(t){return Ke(t,"spacing",8,"spacing")}function Oe(t,e){if(typeof e=="string"||e==null)return e;let r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function vu(t,e){return r=>t.reduce((n,o)=>(n[o]=Oe(e,r),n),{})}function Tu(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=bu(r),i=vu(o,n),s=t[r];return ie(t,s,i)}function Un(t,e){let r=At(t.theme);return Object.keys(t).map(n=>Tu(t,e,n,r)).reduce(ze,{})}function ee(t){return Un(t,Cr)}ee.propTypes=process.env.NODE_ENV!=="production"?Cr.reduce((t,e)=>(t[e]=Te,t),{}):{};ee.filterProps=Cr;function te(t){return Un(t,Sr)}te.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((t,e)=>(t[e]=Te,t),{}):{};te.filterProps=Sr;function Mi(t){return Un(t,Vn)}Mi.propTypes=process.env.NODE_ENV!=="production"?Vn.reduce((t,e)=>(t[e]=Te,t),{}):{};Mi.filterProps=Vn;function qn(t=8){if(t.mui)return t;let e=At({spacing:t}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{let s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function Cu(...t){let e=t.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>e[i]?ze(o,e[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=t.reduce((n,o)=>n.concat(o.filterProps),[]),r}var Ve=Cu;function xe(t){return typeof t!="number"?t:`${t}px solid`}function Ce(t,e){return J({prop:t,themeKey:"borders",transform:e})}var Su=Ce("border",xe),Pu=Ce("borderTop",xe),Eu=Ce("borderRight",xe),wu=Ce("borderBottom",xe),_u=Ce("borderLeft",xe),Fu=Ce("borderColor"),ku=Ce("borderTopColor"),Ou=Ce("borderRightColor"),Au=Ce("borderBottomColor"),Mu=Ce("borderLeftColor"),Du=Ce("outline",xe),Ru=Ce("outlineColor"),Mt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ke(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Oe(e,n)});return ie(t,t.borderRadius,r)}return null};Mt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Te}:{};Mt.filterProps=["borderRadius"];var hy=Ve(Su,Pu,Eu,wu,_u,Fu,ku,Ou,Au,Mu,Mt,Du,Ru);var Dt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ke(t.theme,"spacing",8,"gap"),r=n=>({gap:Oe(e,n)});return ie(t,t.gap,r)}return null};Dt.propTypes=process.env.NODE_ENV!=="production"?{gap:Te}:{};Dt.filterProps=["gap"];var Rt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ke(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Oe(e,n)});return ie(t,t.columnGap,r)}return null};Rt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Te}:{};Rt.filterProps=["columnGap"];var $t=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ke(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Oe(e,n)});return ie(t,t.rowGap,r)}return null};$t.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Te}:{};$t.filterProps=["rowGap"];var $u=J({prop:"gridColumn"}),Bu=J({prop:"gridRow"}),Iu=J({prop:"gridAutoFlow"}),Lu=J({prop:"gridAutoColumns"}),ju=J({prop:"gridAutoRows"}),Nu=J({prop:"gridTemplateColumns"}),zu=J({prop:"gridTemplateRows"}),Vu=J({prop:"gridTemplateAreas"}),Uu=J({prop:"gridArea"}),Cy=Ve(Dt,Rt,$t,$u,Bu,Iu,Lu,ju,Nu,zu,Vu,Uu);function He(t,e){return e==="grey"?e:t}var qu=J({prop:"color",themeKey:"palette",transform:He}),Wu=J({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:He}),Yu=J({prop:"backgroundColor",themeKey:"palette",transform:He}),wy=Ve(qu,Wu,Yu);function me(t){return t<=1&&t!==0?`${t*100}%`:t}var Gu=J({prop:"width",transform:me}),Pr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,o;let i=((n=t.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||vr[r];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:me(r)}};return ie(t,t.maxWidth,e)}return null};Pr.filterProps=["maxWidth"];var Ku=J({prop:"minWidth",transform:me}),Hu=J({prop:"height",transform:me}),Zu=J({prop:"maxHeight",transform:me}),Xu=J({prop:"minHeight",transform:me}),Ay=J({prop:"size",cssProperty:"width",transform:me}),My=J({prop:"size",cssProperty:"height",transform:me}),Ju=J({prop:"boxSizing"}),Dy=Ve(Gu,Pr,Ku,Hu,Zu,Xu,Ju);var Qu={border:{themeKey:"borders",transform:xe},borderTop:{themeKey:"borders",transform:xe},borderRight:{themeKey:"borders",transform:xe},borderBottom:{themeKey:"borders",transform:xe},borderLeft:{themeKey:"borders",transform:xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Mt},color:{themeKey:"palette",transform:He},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:He},backgroundColor:{themeKey:"palette",transform:He},p:{style:te},pt:{style:te},pr:{style:te},pb:{style:te},pl:{style:te},px:{style:te},py:{style:te},padding:{style:te},paddingTop:{style:te},paddingRight:{style:te},paddingBottom:{style:te},paddingLeft:{style:te},paddingX:{style:te},paddingY:{style:te},paddingInline:{style:te},paddingInlineStart:{style:te},paddingInlineEnd:{style:te},paddingBlock:{style:te},paddingBlockStart:{style:te},paddingBlockEnd:{style:te},m:{style:ee},mt:{style:ee},mr:{style:ee},mb:{style:ee},ml:{style:ee},mx:{style:ee},my:{style:ee},margin:{style:ee},marginTop:{style:ee},marginRight:{style:ee},marginBottom:{style:ee},marginLeft:{style:ee},marginX:{style:ee},marginY:{style:ee},marginInline:{style:ee},marginInlineStart:{style:ee},marginInlineEnd:{style:ee},marginBlock:{style:ee},marginBlockStart:{style:ee},marginBlockEnd:{style:ee},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Dt},rowGap:{style:$t},columnGap:{style:Rt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:me},maxWidth:{style:Pr},minWidth:{transform:me},height:{transform:me},maxHeight:{transform:me},minHeight:{transform:me},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},pt=Qu;function ec(...t){let e=t.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function tc(t,e){return typeof t=="function"?t(e):t}function rc(){function t(r,n,o,i){let s={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};let{cssProperty:a=r,themeKey:u,transform:p,style:c}=l;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let f=ft(o,u)||{};return c?c(s):ie(s,n,g=>{let x=Ot(f,p,g);return g===x&&typeof g=="string"&&(x=Ot(f,p,`${r}${g==="default"?"":ye(g)}`,g)),a===!1?x:{[a]:x}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:pt;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;let p=jn(i.breakpoints),c=Object.keys(p),f=p;return Object.keys(u).forEach(d=>{let g=tc(u[d],i);if(g!=null)if(typeof g=="object")if(s[d])f=ze(f,t(d,g,i,s));else{let x=ie({theme:i},g,E=>({[d]:E}));ec(x,g)?f[d]=e({sx:g,theme:i}):f=ze(f,x)}else f=ze(f,t(d,g,i,s))}),Nn(c,f)}return Array.isArray(o)?o.map(l):l(o)}return e}var Di=rc();Di.filterProps=["sx"];var Bt=Di;var nc=["breakpoints","palette","spacing","shape"];function oc(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=ge(t,nc),l=Ln(r),a=qn(o),u=de({breakpoints:l,direction:"ltr",components:{},palette:L({mode:"light"},n),spacing:a,shape:L({},Fi,i)},s);return u=e.reduce((p,c)=>de(p,c),u),u.unstable_sxConfig=L({},pt,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return Bt({sx:c,theme:this})},u}var Ze=oc;function ic(t){return Object.keys(t).length===0}function sc(t=null){let e=Ri.useContext(_react2.ThemeContext);return!e||ic(e)?t:e}var $i=sc;var ac=Ze();function lc(t=ac){return $i(t)}var Bi=lc;var uc=["sx"],cc=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:pt;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function Er(t){let{sx:e}=t,r=ge(t,uc),{systemProps:n,otherProps:o}=cc(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let l=e(...s);return be(l)?L({},n,l):n}:i=L({},n,e),L({},o,{sx:i})}function Ii(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Ii(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function fc(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Ii(t))&&(n&&(n+=" "),n+=e);return n}var Li=fc;var pc=["variant"];function ji(t){return t.length===0}function wr(t){let{variant:e}=t,r=ge(t,pc),n=e||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=ji(n)?t[o]:ye(t[o]):n+=`${ji(n)?o:ye(o)}${ye(t[o].toString())}`}),n}var dc=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function mc(t){return Object.keys(t).length===0}function hc(t){return typeof t=="string"&&t.charCodeAt(0)>96}var gc=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,Fr=t=>{let e=0,r={};return t&&t.forEach(n=>{let o="";typeof n.props=="function"?(o=`callback${e}`,e+=1):o=wr(n.props),r[o]=n.style}),r},yc=(t,e)=>{let r=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants),Fr(r)},kr=(t,e,r)=>{let{ownerState:n={}}=t,o=[],i=0;return r&&r.forEach(s=>{let l=!0;if(typeof s.props=="function"){let a=L({},t,n);l=s.props(a)}else Object.keys(s.props).forEach(a=>{n[a]!==s.props[a]&&t[a]!==s.props[a]&&(l=!1)});l&&(typeof s.props=="function"?o.push(e[`callback${i}`]):o.push(e[wr(s.props)])),typeof s.props=="function"&&(i+=1)}),o},xc=(t,e,r,n)=>{var o;let i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return kr(t,e,i)};function Wn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var bc=Ze(),Ni=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function _r({defaultTheme:t,theme:e,themeId:r}){return mc(e)?t:e[r]||e}function vc(t){return t?(e,r)=>r[t]:null}var zi=({styledArg:t,props:e,defaultTheme:r,themeId:n})=>{let o=t(L({},e,{theme:_r(L({},e,{defaultTheme:r,themeId:n}))})),i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){let s=kr(e,Fr(i),i);return[o,...s]}return o};function Yn(t={}){let{themeId:e,defaultTheme:r=bc,rootShouldForwardProp:n=Wn,slotShouldForwardProp:o=Wn}=t,i=s=>Bt(L({},s,{theme:_r(L({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{xi(s,v=>v.filter(A=>!(A!=null&&A.__mui_systemSx)));let{name:a,slot:u,skipVariantsResolver:p,skipSx:c,overridesResolver:f=vc(Ni(u))}=l,d=ge(l,dc),g=p!==void 0?p:u&&u!=="Root"&&u!=="root"||!1,x=c||!1,E;process.env.NODE_ENV!=="production"&&a&&(E=`${a}-${Ni(u||"Root")}`);let k=Wn;u==="Root"||u==="root"?k=n:u?k=o:hc(s)&&(k=void 0);let _=Dn(s,L({shouldForwardProp:k,label:E},d)),K=(v,...A)=>{let H=A?A.map(T=>{if(typeof T=="function"&&T.__emotion_real!==T)return b=>zi({styledArg:T,props:b,defaultTheme:r,themeId:e});if(be(T)){let b=T,O;return T&&T.variants&&(O=T.variants,delete b.variants,b=m=>{let h=T;return kr(m,Fr(O),O).forEach(w=>{h=de(h,w)}),h}),b}return T}):[],j=v;if(be(v)){let T;v&&v.variants&&(T=v.variants,delete j.variants,j=b=>{let O=v;return kr(b,Fr(T),T).forEach(h=>{O=de(O,h)}),O})}else typeof v=="function"&&v.__emotion_real!==v&&(j=T=>zi({styledArg:v,props:T,defaultTheme:r,themeId:e}));a&&f&&H.push(T=>{let b=_r(L({},T,{defaultTheme:r,themeId:e})),O=gc(a,b);if(O){let m={};return Object.entries(O).forEach(([h,P])=>{m[h]=typeof P=="function"?P(L({},T,{theme:b})):P}),f(T,m)}return null}),a&&!g&&H.push(T=>{let b=_r(L({},T,{defaultTheme:r,themeId:e}));return xc(T,yc(a,b),b,a)}),x||H.push(i);let U=H.length-A.length;if(Array.isArray(v)&&U>0){let T=new Array(U).fill("");j=[...v,...T],j.raw=[...v.raw,...T]}let V=_(j,...H);if(process.env.NODE_ENV!=="production"){let T;a&&(T=`${a}${ye(u||"")}`),T===void 0&&(T=`Styled(${br(s)})`),V.displayName=T}return s.muiName&&(V.muiName=s.muiName),V};return _.withConfig&&(K.withConfig=_.withConfig),K}}var Tc=Yn(),Vi=Tc;function Gn(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:_t(e.components[r].defaultProps,n)}function Or({props:t,name:e,defaultTheme:r,themeId:n}){let o=Bi(r);return n&&(o=o[n]||o),Gn({theme:o,name:e,props:t})}var Z=We(ar());var Q=We(ar());var Cc=["component","direction","spacing","divider","children","className","useFlexGap"],Pc=Ze(),Ec=Vi("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function wc(t){return Or({props:t,name:"MuiStack",defaultTheme:Pc})}function _c(t,e){let r=dt.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(dt.cloneElement(e,{key:`separator-${i}`})),n),[])}var Fc=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],kc=({ownerState:t,theme:e})=>{let r=L({display:"flex",flexDirection:"column"},ie({theme:e},Tr({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=At(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=Tr({values:t.direction,base:o}),s=Tr({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,p)=>{if(!i[a]){let f=u>0?i[p[u-1]]:"column";i[a]=f}}),r=de(r,ie({theme:e},s,(a,u)=>t.useFlexGap?{gap:Oe(n,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Fc(u?i[u]:t.direction)}`]:Oe(n,a)}}))}return r=Oi(e.breakpoints,r),r};function Kn(t={}){let{createStyledComponent:e=Ec,useThemeProps:r=wc,componentName:n="MuiStack"}=t,o=()=>Ft({root:["root"]},a=>kt(n,a),{}),i=e(kc),s=dt.forwardRef(function(a,u){let p=r(a),c=Er(p),{component:f="div",direction:d="column",spacing:g=0,divider:x,children:E,className:k,useFlexGap:_=!1}=c,K=ge(c,Cc),v={direction:d,spacing:g,useFlexGap:_},A=o();return _jsxruntime.jsx.call(void 0, i,L({as:f,ownerState:v,ref:u,className:Li(A.root,k)},K,{children:x?_c(E,x):E}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:Q.default.node,direction:Q.default.oneOfType([Q.default.oneOf(["column-reverse","column","row-reverse","row"]),Q.default.arrayOf(Q.default.oneOf(["column-reverse","column","row-reverse","row"])),Q.default.object]),divider:Q.default.node,spacing:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.number,Q.default.string])),Q.default.number,Q.default.object,Q.default.string]),sx:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.func,Q.default.object,Q.default.bool])),Q.default.func,Q.default.object])}),s}var Ui=Kn();process.env.NODE_ENV!=="production"&&(Ui.propTypes={children:Z.default.node,component:Z.default.elementType,direction:Z.default.oneOfType([Z.default.oneOf(["column-reverse","column","row-reverse","row"]),Z.default.arrayOf(Z.default.oneOf(["column-reverse","column","row-reverse","row"])),Z.default.object]),divider:Z.default.node,spacing:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.number,Z.default.string])),Z.default.number,Z.default.object,Z.default.string]),sx:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.func,Z.default.object,Z.default.bool])),Z.default.func,Z.default.object]),useFlexGap:Z.default.bool});var Ar=Ui;var Dc=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Yi(t){let{label:e,children:r,labelProps:n,contentProps:o,isNumber:i,showDivider:s}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",gap:4},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsx.call(void 0, Ar,{children:_jsxruntime.jsx.call(void 0, Dc,$(y({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, Ar,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function Dr(t){let{typographyProps:e,onChange:r,onEscape:n,value:o,displayEditButton:i,displaySaveButton:s,textFieldProps:l,isEditing:a,isLoading:u,error:p}=t,H=l||{},{InputProps:c,value:f,onKeyDown:d,onChange:g}=H,x=X(H,["InputProps","value","onKeyDown","onChange"]),[E,k]=_react.useState.call(void 0, !1),[_,K]=_react.useState.call(void 0, !1),[v,A]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{A(o)},[o]),_react.useEffect.call(void 0, ()=>{k(!!a)},[a]),_react.useEffect.call(void 0, ()=>{p&&K(!0)},[p]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!E&&!u&&!_&&_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{cursor:"pointer"},direction:"row",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, _material.Typography,$(y({onClick:()=>{k(!0)}},e),{children:v})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{k(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(E||u||_)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>k(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,y({disabled:u,autoFocus:!0,value:v,error:_,onKeyDown:j=>{j.key==="Enter"&&(r(v),k(!1)),j.key==="Escape"&&(A(o),k(!1),K(!1),n&&n(o,v))},onChange:j=>{let U=j.target.value;A(U)},InputProps:{endAdornment:_jsxruntime.jsxs.call(void 0, _material.InputAdornment,{position:"end",children:[u&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{size:18}),s&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o!=v&&r(v),k(!1)},edge:"end",children:o!=v?_jsxruntime.jsx.call(void 0, _iconsmaterial.Save,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{})})]})}},x))})]})}function Ji(t){let{title:e,children:r,onBack:n,onClose:o,onUpdate:i,toolbarProps:s}=t,[l,a]=_react.useState.call(void 0, !1),[u,p]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{p(e)},[e]);let c=_material.useMediaQuery.call(void 0, d=>d.breakpoints.down("sm")),f={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,$(y({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:c||o?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",flexGrow:1},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),i&&_jsxruntime.jsx.call(void 0, Dr,{typographyProps:f,value:u,onChange:d=>{i&&i(d)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,$(y({},f),{children:e}))]}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),r]})}))}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Rr(t){let i=t,{onSearch:e}=i,r=X(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let l=s.target.value;n(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({onChange:o,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function to(t){let b=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:l,onChange:a,onSearch:u,renderValue:p,dialogProps:c,disabled:f,filterOptions:d,optionKeyName:g}=b,x=X(b,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:E,openDialog:k,closeDialog:_}=_hooks.useDialog.call(void 0, ),[K,v]=_react.useState.call(void 0, null),A=i||Ri.default.Fragment,H=_lodash2.default.debounce(O=>u(O),500),j=_react.useCallback.call(void 0, (O,m)=>ue(this,null,function*(){H(m)}),[H]),U=_react.useCallback.call(void 0, (O,m,h)=>{if(g&&(m!=null&&m[g].includes("Adicionar op\xE7\xE3o:"))){let P=m[g].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),w=$(y({},m),{[g]:P});a&&a(w);return}a&&a(m)},[a]);function V(O,m=!1,h=!1){var P;if(O){let w=Ri.default.Children.toArray((P=O.props)==null?void 0:P.children),F=w.length===1?0:1;return w.splice(F,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>k(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),m&&w.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),Ri.default.cloneElement(O,{},w)}return O}function T(O,m){if(!g)return O;let P=_material.createFilterOptions.call(void 0, )(O,m),{inputValue:w}=m,F=O.some(R=>w===R[g]);return w!==""&&!F&&P.push({[g]:`Adicionar op\xE7\xE3o: "${w}"`}),P}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:f,loadingText:"Carregando...",loading:o,onChange:U,value:e,onInputChange:j,options:n,getOptionLabel:p,filterOptions:T,renderInput:O=>_jsxruntime.jsx.call(void 0, _material.TextField,y($(y({label:r,onDoubleClick:()=>{f||k()}},O),{InputProps:$(y({},O.InputProps),{endAdornment:V(O.InputProps.endAdornment,o,f)}),disabled:f}),x)),clearIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.BackspaceOutlined,{}),componentsProps:{clearIndicator:{sx:{visibility:"visible"}}},noOptionsText:"Nenhum registro"}),_jsxruntime.jsx.call(void 0, _providers.FormProvider,{children:_jsxruntime.jsx.call(void 0, we,$(y({open:E,onClose:()=>_(),actions:"none"},c),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, Rr,{placeholder:"Pesquisar",onSearch:O=>v(O)}),i&&_jsxruntime.jsx.call(void 0, A,{})]}),_jsxruntime.jsx.call(void 0, s,y({query:K,enableTransporter:!0,onTransport:O=>{_(),a&&a(O)}},l))]})}))})]})}var ff={dialogProps:{maxWidth:"md",fullWidth:!0}};to.defaultProps=ff;function ro(t){let{label:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"header",sx:{alignItems:"center",gap:1},children:_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h3",sx:{fontWeight:"medium",color:r=>r.palette.grey[600]},children:e})})}var _axios = require('axios');var Pe=We(ls()),It=We(fs()),ys=We(ds()),Mf=Object.prototype.toString,Df=Error.prototype.toString,Rf=RegExp.prototype.toString,$f=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Bf=/^Symbol\((.*)\)(.*)$/;function If(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function ms(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return If(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return $f.call(t).replace(Bf,"Symbol($1)");let n=Mf.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+Df.call(t)+"]":n==="RegExp"?Rf.call(t):null}function $e(t,e){let r=ms(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=ms(this[n],e);return i!==null?i:o},2)}function xs(t){return t==null?[]:[].concat(t)}var bs,Lf=/\$\{\s*(\w+)\s*\}/g;bs=Symbol.toStringTag;var ce=class extends Error{static formatError(e,r){let n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof e=="string"?e.replace(Lf,(o,i)=>$e(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,o,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[bs]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],xs(e).forEach(s=>{if(ce.isError(s)){this.errors.push(...s.errors);let l=s.inner.length?s.inner:[s];this.inner.push(...l)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,ce)}},Ae={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let o=n!=null&&n!==r?` (cast from the value \`${$e(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${$e(r,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${$e(r,!0)}\``+o}},_e={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ue={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},uo={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},co={isValue:"${path} field must be ${value}"},fo={noUnknown:"${path} field has unspecified keys: ${unknown}"},Lr={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},vs={notType:t=>{let{path:e,value:r,spec:n}=t,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${$e(r,!0)}\``;if(r.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${$e(r,!0)}\``}return ce.formatError(Ae.notType,t)}},vv=Object.assign(Object.create(null),{mixed:Ae,string:_e,number:Ue,date:uo,object:fo,array:Lr,boolean:co,tuple:vs}),Gr=t=>t&&t.__isYupSchema__,gt=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...l)=>l.every(a=>a===n);return new gt(e,(l,a)=>{var u;let p=s(...l)?o:i;return(u=p==null?void 0:p(a))!=null?u:a})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,e,r);if(o===void 0||o===e)return e;if(!Gr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},Ir={context:"$",value:"."};var Be=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Ir.context,this.isValue=this.key[0]===Ir.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Ir.context:this.isValue?Ir.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,Pe.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let o=this.isContext?n:this.isValue?e:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};Be.prototype.__isYupRef=!0;var Fe=t=>t==null;function mt(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},l,a){let{name:u,test:p,params:c,message:f,skipAbsent:d}=t,{parent:g,context:x,abortEarly:E=s.spec.abortEarly,disableStackTrace:k=s.spec.disableStackTrace}=o;function _(b){return Be.isRef(b)?b.getValue(r,g,x):b}function K(b={}){var O;let m=Object.assign({value:r,originalValue:i,label:s.spec.label,path:b.path||n,spec:s.spec},c,b.params);for(let P of Object.keys(m))m[P]=_(m[P]);let h=new ce(ce.formatError(b.message||f,m),r,m.path,b.type||u,(O=b.disableStackTrace)!=null?O:k);return h.params=m,h}let v=E?l:a,A={path:n,parent:g,type:u,from:o.from,createError:K,resolve:_,options:o,originalValue:i,schema:s},H=b=>{ce.isError(b)?v(b):b?a(null):v(K())},j=b=>{ce.isError(b)?v(b):l(b)};if(d&&Fe(r))return H(!0);let V;try{var T;if(V=p.call(A,r,A),typeof((T=V)==null?void 0:T.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${A.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(V).then(H,j)}}catch(b){j(b);return}H(V)}return e.OPTIONS=t,e}function jf(t,e,r,n=r){let o,i,s;return e?((0,Pe.forEach)(e,(l,a,u)=>{let p=a?l.slice(1,l.length-1):l;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",f=u?parseInt(p,10):0;if(t.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&f>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);o=r,r=r&&r[f],t=c?t.spec.types[f]:t.innerType}if(!u){if(!t.fields||!t.fields[p])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=r,r=r&&r[p],t=t.fields[p]}i=p,s=a?"["+l+"]":"."+l}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var yt=class extends Set{describe(){let e=[];for(let r of this.values())e.push(Be.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new yt(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function ht(t,e=new Map){if(Gr(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=ht(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,o]of t.entries())r.set(n,ht(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(ht(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=ht(o,e)}else throw Error(`Unable to clone ${t}`);return r}var se=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new yt,this._blacklist=new yt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ae.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=ht(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,o,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({value:e},r)),o=r.assert==="ignore-optionality",i=n._cast(e,r);if(r.assert!==!1&&!n.isType(i)){if(o&&Fe(i))return i;let s=$e(e),l=$e(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
6
|
+
`)),()=>{})}function Ot(t){return Ke(t,"spacing",8,"spacing")}function ke(t,e){if(typeof e=="string"||e==null)return e;let r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function cu(t,e){return r=>t.reduce((n,o)=>(n[o]=ke(e,r),n),{})}function fu(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=uu(r),i=cu(o,n),s=t[r];return ie(t,s,i)}function In(t,e){let r=Ot(t.theme);return Object.keys(t).map(n=>fu(t,e,n,r)).reduce(Ne,{})}function ee(t){return In(t,lr)}ee.propTypes=process.env.NODE_ENV!=="production"?lr.reduce((t,e)=>(t[e]=xe,t),{}):{};ee.filterProps=lr;function te(t){return In(t,ur)}te.propTypes=process.env.NODE_ENV!=="production"?ur.reduce((t,e)=>(t[e]=xe,t),{}):{};te.filterProps=ur;function Pi(t){return In(t,Bn)}Pi.propTypes=process.env.NODE_ENV!=="production"?Bn.reduce((t,e)=>(t[e]=xe,t),{}):{};Pi.filterProps=Bn;function Ln(t=8){if(t.mui)return t;let e=Ot({spacing:t}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{let s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function pu(...t){let e=t.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>e[i]?Ne(o,e[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?t.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=t.reduce((n,o)=>n.concat(o.filterProps),[]),r}var Ve=pu;function ge(t){return typeof t!="number"?t:`${t}px solid`}function be(t,e){return J({prop:t,themeKey:"borders",transform:e})}var du=be("border",ge),mu=be("borderTop",ge),hu=be("borderRight",ge),gu=be("borderBottom",ge),yu=be("borderLeft",ge),xu=be("borderColor"),bu=be("borderTopColor"),vu=be("borderRightColor"),Tu=be("borderBottomColor"),Cu=be("borderLeftColor"),Su=be("outline",ge),Pu=be("outlineColor"),kt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ke(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ke(e,n)});return ie(t,t.borderRadius,r)}return null};kt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:xe}:{};kt.filterProps=["borderRadius"];var zg=Ve(du,mu,hu,gu,yu,xu,bu,vu,Tu,Cu,kt,Su,Pu);var At=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ke(t.theme,"spacing",8,"gap"),r=n=>({gap:ke(e,n)});return ie(t,t.gap,r)}return null};At.propTypes=process.env.NODE_ENV!=="production"?{gap:xe}:{};At.filterProps=["gap"];var _t=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ke(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ke(e,n)});return ie(t,t.columnGap,r)}return null};_t.propTypes=process.env.NODE_ENV!=="production"?{columnGap:xe}:{};_t.filterProps=["columnGap"];var Mt=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ke(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ke(e,n)});return ie(t,t.rowGap,r)}return null};Mt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:xe}:{};Mt.filterProps=["rowGap"];var Eu=J({prop:"gridColumn"}),wu=J({prop:"gridRow"}),Fu=J({prop:"gridAutoFlow"}),Ou=J({prop:"gridAutoColumns"}),ku=J({prop:"gridAutoRows"}),Au=J({prop:"gridTemplateColumns"}),_u=J({prop:"gridTemplateRows"}),Mu=J({prop:"gridTemplateAreas"}),Du=J({prop:"gridArea"}),Kg=Ve(At,_t,Mt,Eu,wu,Fu,Ou,ku,Au,_u,Mu,Du);function He(t,e){return e==="grey"?e:t}var Ru=J({prop:"color",themeKey:"palette",transform:He}),$u=J({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:He}),Bu=J({prop:"backgroundColor",themeKey:"palette",transform:He}),Jg=Ve(Ru,$u,Bu);function de(t){return t<=1&&t!==0?`${t*100}%`:t}var Iu=J({prop:"width",transform:de}),cr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){let e=r=>{var n,o;let i=((n=t.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||sr[r];return i?((o=t.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:de(r)}};return ie(t,t.maxWidth,e)}return null};cr.filterProps=["maxWidth"];var Lu=J({prop:"minWidth",transform:de}),ju=J({prop:"height",transform:de}),Nu=J({prop:"maxHeight",transform:de}),zu=J({prop:"minHeight",transform:de}),ny=J({prop:"size",cssProperty:"width",transform:de}),oy=J({prop:"size",cssProperty:"height",transform:de}),Vu=J({prop:"boxSizing"}),iy=Ve(Iu,cr,Lu,ju,Nu,zu,Vu);var Uu={border:{themeKey:"borders",transform:ge},borderTop:{themeKey:"borders",transform:ge},borderRight:{themeKey:"borders",transform:ge},borderBottom:{themeKey:"borders",transform:ge},borderLeft:{themeKey:"borders",transform:ge},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ge},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:kt},color:{themeKey:"palette",transform:He},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:He},backgroundColor:{themeKey:"palette",transform:He},p:{style:te},pt:{style:te},pr:{style:te},pb:{style:te},pl:{style:te},px:{style:te},py:{style:te},padding:{style:te},paddingTop:{style:te},paddingRight:{style:te},paddingBottom:{style:te},paddingLeft:{style:te},paddingX:{style:te},paddingY:{style:te},paddingInline:{style:te},paddingInlineStart:{style:te},paddingInlineEnd:{style:te},paddingBlock:{style:te},paddingBlockStart:{style:te},paddingBlockEnd:{style:te},m:{style:ee},mt:{style:ee},mr:{style:ee},mb:{style:ee},ml:{style:ee},mx:{style:ee},my:{style:ee},margin:{style:ee},marginTop:{style:ee},marginRight:{style:ee},marginBottom:{style:ee},marginLeft:{style:ee},marginX:{style:ee},marginY:{style:ee},marginInline:{style:ee},marginInlineStart:{style:ee},marginInlineEnd:{style:ee},marginBlock:{style:ee},marginBlockStart:{style:ee},marginBlockEnd:{style:ee},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:At},rowGap:{style:Mt},columnGap:{style:_t},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:de},maxWidth:{style:cr},minWidth:{transform:de},height:{transform:de},maxHeight:{transform:de},minHeight:{transform:de},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},pt=Uu;function qu(...t){let e=t.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function Wu(t,e){return typeof t=="function"?t(e):t}function Yu(){function t(r,n,o,i){let s={[r]:n,theme:o},l=i[r];if(!l)return{[r]:n};let{cssProperty:a=r,themeKey:u,transform:f,style:c}=l;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let p=ft(o,u)||{};return c?c(s):ie(s,n,g=>{let x=Ft(p,f,g);return g===x&&typeof g=="string"&&(x=Ft(p,f,`${r}${g==="default"?"":ze(g)}`,g)),a===!1?x:{[a]:x}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:pt;function l(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;let f=Dn(i.breakpoints),c=Object.keys(f),p=f;return Object.keys(u).forEach(d=>{let g=Wu(u[d],i);if(g!=null)if(typeof g=="object")if(s[d])p=Ne(p,t(d,g,i,s));else{let x=ie({theme:i},g,C=>({[d]:C}));qu(x,g)?p[d]=e({sx:g,theme:i}):p=Ne(p,x)}else p=Ne(p,t(d,g,i,s))}),Rn(c,p)}return Array.isArray(o)?o.map(l):l(o)}return e}var Ei=Yu();Ei.filterProps=["sx"];var Dt=Ei;function jn(t,e){let r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:r.palette.mode===t?e:{}}var Gu=["breakpoints","palette","spacing","shape"];function Ku(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=he(t,Gu),l=Mn(r),a=Ln(o),u=ye({breakpoints:l,direction:"ltr",components:{},palette:R({mode:"light"},n),spacing:a,shape:R({},vi,i)},s);return u.applyStyles=jn,u=e.reduce((f,c)=>ye(f,c),u),u.unstable_sxConfig=R({},pt,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return Dt({sx:c,theme:this})},u}var Ze=Ku;function Hu(t){return Object.keys(t).length===0}function Zu(t=null){let e=wi.useContext(_react2.ThemeContext);return!e||Hu(e)?t:e}var Fi=Zu;var Xu=Ze();function Ju(t=Xu){return Fi(t)}var Oi=Ju;var Qu=["sx"],ec=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:pt;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function fr(t){let{sx:e}=t,r=he(t,Qu),{systemProps:n,otherProps:o}=ec(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let l=e(...s);return Oe(l)?R({},n,l):n}:i=R({},n,e),R({},o,{sx:i})}var ki=t=>t,tc=()=>{let t=ki;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ki}}},rc=tc(),Nn=rc;function Ai(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Ai(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function nc(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Ai(t))&&(n&&(n+=" "),n+=e);return n}var _i=nc;var oc={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function pr(t,e,r="Mui"){let n=oc[e];return n?`${r}-${n}`:`${Nn.generate(t)}-${e}`}var Sr=We($i()),ac=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function lc(t){let e=`${t}`.match(ac);return e&&e[1]||""}function Ii(t,e=""){return t.displayName||t.name||lc(t)||e}function Bi(t,e,r){let n=Ii(e);return t.displayName||(n!==""?`${r}(${n})`:r)}function Pr(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return Ii(t,"Component");if(typeof t=="object")switch(t.$$typeof){case Sr.ForwardRef:return Bi(t,t.render,"ForwardRef");case Sr.Memo:return Bi(t,t.type,"memo");default:return}}}var uc=["ownerState"],cc=["variants"],fc=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function pc(t){return Object.keys(t).length===0}function dc(t){return typeof t=="string"&&t.charCodeAt(0)>96}function qn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var mc=Ze(),Li=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function Er({defaultTheme:t,theme:e,themeId:r}){return pc(e)?t:e[r]||e}function hc(t){return t?(e,r)=>r[t]:null}function wr(t,e){let{ownerState:r}=e,n=he(e,uc),o=typeof t=="function"?t(R({ownerState:r},n)):t;if(Array.isArray(o))return o.flatMap(i=>wr(i,R({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){let{variants:i=[]}=o,l=he(o,cc);return i.forEach(a=>{let u=!0;typeof a.props=="function"?u=a.props(R({ownerState:r},n,r)):Object.keys(a.props).forEach(f=>{(r==null?void 0:r[f])!==a.props[f]&&n[f]!==a.props[f]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof a.style=="function"?a.style(R({ownerState:r},n,r)):a.style))}),l}return o}function Wn(t={}){let{themeId:e,defaultTheme:r=mc,rootShouldForwardProp:n=qn,slotShouldForwardProp:o=qn}=t,i=s=>Dt(R({},s,{theme:Er(R({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,l={})=>{yi(s,E=>E.filter(z=>!(z!=null&&z.__mui_systemSx)));let{name:a,slot:u,skipVariantsResolver:f,skipSx:c,overridesResolver:p=hc(Li(u))}=l,d=he(l,fc),g=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,x=c||!1,C;process.env.NODE_ENV!=="production"&&a&&(C=`${a}-${Li(u||"Root")}`);let O=qn;u==="Root"||u==="root"?O=n:u?O=o:dc(s)&&(O=void 0);let w=_n(s,R({shouldForwardProp:O,label:C},d)),H=E=>typeof E=="function"&&E.__emotion_real!==E||Oe(E)?z=>wr(E,R({},z,{theme:Er({theme:z.theme,defaultTheme:r,themeId:e})})):E,k=(E,...z)=>{let G=H(E),L=z?z.map(H):[];a&&p&&L.push(b=>{let A=Er(R({},b,{defaultTheme:r,themeId:e}));if(!A.components||!A.components[a]||!A.components[a].styleOverrides)return null;let m=A.components[a].styleOverrides,h={};return Object.entries(m).forEach(([P,S])=>{h[P]=wr(S,R({},b,{theme:A}))}),p(b,h)}),a&&!g&&L.push(b=>{var A;let m=Er(R({},b,{defaultTheme:r,themeId:e})),h=m==null||(A=m.components)==null||(A=A[a])==null?void 0:A.variants;return wr({variants:h},R({},b,{theme:m}))}),x||L.push(i);let V=L.length-z.length;if(Array.isArray(E)&&V>0){let b=new Array(V).fill("");G=[...E,...b],G.raw=[...E.raw,...b]}let K=w(G,...L);if(process.env.NODE_ENV!=="production"){let b;a&&(b=`${a}${ze(u||"")}`),b===void 0&&(b=`Styled(${Pr(s)})`),K.displayName=b}return s.muiName&&(K.muiName=s.muiName),K};return w.withConfig&&(k.withConfig=w.withConfig),k}}var gc=Wn(),ji=gc;function Rt(t,e){let r=R({},e);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=R({},t[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){let o=t[n]||{},i=e[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=R({},i),Object.keys(o).forEach(s=>{r[n][s]=Rt(o[s],i[s])}))}else r[n]===void 0&&(r[n]=t[n])}),r}function Yn(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:Rt(e.components[r].defaultProps,n)}function Fr({props:t,name:e,defaultTheme:r,themeId:n}){let o=Oi(r);return n&&(o=o[n]||o),Yn({theme:o,name:e,props:t})}function Or(t,e,r=void 0){let n={};return Object.keys(t).forEach(o=>{n[o]=t[o].reduce((i,s)=>{if(s){let l=e(s);l!==""&&i.push(l),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}var Z=We(ir());var Q=We(ir());var yc=["component","direction","spacing","divider","children","className","useFlexGap"],bc=Ze(),vc=ji("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Tc(t){return Fr({props:t,name:"MuiStack",defaultTheme:bc})}function Cc(t,e){let r=dt.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(dt.cloneElement(e,{key:`separator-${i}`})),n),[])}var Sc=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Pc=({ownerState:t,theme:e})=>{let r=R({display:"flex",flexDirection:"column"},ie({theme:e},ar({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=Ot(e),o=Object.keys(e.breakpoints.values).reduce((a,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(a[u]=!0),a),{}),i=ar({values:t.direction,base:o}),s=ar({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((a,u,f)=>{if(!i[a]){let p=u>0?i[f[u-1]]:"column";i[a]=p}}),r=ye(r,ie({theme:e},s,(a,u)=>t.useFlexGap?{gap:ke(n,a)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Sc(u?i[u]:t.direction)}`]:ke(n,a)}}))}return r=Ci(e.breakpoints,r),r};function Gn(t={}){let{createStyledComponent:e=vc,useThemeProps:r=Tc,componentName:n="MuiStack"}=t,o=()=>Or({root:["root"]},a=>pr(n,a),{}),i=e(Pc),s=dt.forwardRef(function(a,u){let f=r(a),c=fr(f),{component:p="div",direction:d="column",spacing:g=0,divider:x,children:C,className:O,useFlexGap:w=!1}=c,H=he(c,yc),k={direction:d,spacing:g,useFlexGap:w},E=o();return _jsxruntime.jsx.call(void 0, i,R({as:p,ownerState:k,ref:u,className:_i(E.root,O)},H,{children:x?Cc(C,x):C}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:Q.default.node,direction:Q.default.oneOfType([Q.default.oneOf(["column-reverse","column","row-reverse","row"]),Q.default.arrayOf(Q.default.oneOf(["column-reverse","column","row-reverse","row"])),Q.default.object]),divider:Q.default.node,spacing:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.number,Q.default.string])),Q.default.number,Q.default.object,Q.default.string]),sx:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.func,Q.default.object,Q.default.bool])),Q.default.func,Q.default.object])}),s}var Ni=Gn();process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:Z.default.node,component:Z.default.elementType,direction:Z.default.oneOfType([Z.default.oneOf(["column-reverse","column","row-reverse","row"]),Z.default.arrayOf(Z.default.oneOf(["column-reverse","column","row-reverse","row"])),Z.default.object]),divider:Z.default.node,spacing:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.number,Z.default.string])),Z.default.number,Z.default.object,Z.default.string]),sx:Z.default.oneOfType([Z.default.arrayOf(Z.default.oneOfType([Z.default.func,Z.default.object,Z.default.bool])),Z.default.func,Z.default.object]),useFlexGap:Z.default.bool});var kr=Ni;var Oc=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Ui(t){let{label:e,children:r,labelProps:n,contentProps:o,isNumber:i,showDivider:s}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",gap:4},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsx.call(void 0, kr,{children:_jsxruntime.jsx.call(void 0, Oc,$(y({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, kr,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function _r(t){let{typographyProps:e,onChange:r,onEscape:n,value:o,displayEditButton:i,displaySaveButton:s,textFieldProps:l,isEditing:a,isLoading:u,error:f}=t,z=l||{},{InputProps:c,value:p,onKeyDown:d,onChange:g}=z,x=X(z,["InputProps","value","onKeyDown","onChange"]),[C,O]=_react.useState.call(void 0, !1),[w,H]=_react.useState.call(void 0, !1),[k,E]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{E(o)},[o]),_react.useEffect.call(void 0, ()=>{O(!!a)},[a]),_react.useEffect.call(void 0, ()=>{f&&H(!0)},[f]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!C&&!u&&!w&&_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{cursor:"pointer"},direction:"row",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, _material.Typography,$(y({onClick:()=>{O(!0)}},e),{children:k})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{O(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(C||u||w)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>O(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,y({disabled:u,autoFocus:!0,value:k,error:w,onKeyDown:G=>{G.key==="Enter"&&(r(k),O(!1)),G.key==="Escape"&&(E(o),O(!1),H(!1),n&&n(o,k))},onChange:G=>{let L=G.target.value;E(L)},InputProps:{endAdornment:_jsxruntime.jsxs.call(void 0, _material.InputAdornment,{position:"end",children:[u&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{size:18}),s&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{o!=k&&r(k),O(!1)},edge:"end",children:o!=k?_jsxruntime.jsx.call(void 0, _iconsmaterial.Save,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{})})]})}},x))})]})}function Hi(t){let{title:e,children:r,onBack:n,onClose:o,onUpdate:i,toolbarProps:s}=t,[l,a]=_react.useState.call(void 0, !1),[u,f]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{f(e)},[e]);let c=_material.useMediaQuery.call(void 0, d=>d.breakpoints.down("sm")),p={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,$(y({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:c||o?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",flexGrow:1},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),i&&_jsxruntime.jsx.call(void 0, _r,{typographyProps:p,value:u,onChange:d=>{i&&i(d)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,$(y({},p),{children:e}))]}),o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),r]})}))}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function Mr(t){let i=t,{onSearch:e}=i,r=X(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let l=s.target.value;n(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({onChange:o,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function eo(t){let b=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:l,onChange:a,onSearch:u,renderValue:f,dialogProps:c,disabled:p,filterOptions:d,optionKeyName:g}=b,x=X(b,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:C,openDialog:O,closeDialog:w}=_hooks.useDialog.call(void 0, ),[H,k]=_react.useState.call(void 0, null),E=i||wi.default.Fragment,z=_lodash2.default.debounce(A=>u(A),500),G=_react.useCallback.call(void 0, (A,m)=>ue(this,null,function*(){z(m)}),[z]),L=_react.useCallback.call(void 0, (A,m,h)=>{if(g&&(m!=null&&m[g].includes("Adicionar op\xE7\xE3o:"))){let P=m[g].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),S=$(y({},m),{[g]:P});a&&a(S);return}a&&a(m)},[a]);function V(A,m=!1,h=!1){var P;if(A){let S=wi.default.Children.toArray((P=A.props)==null?void 0:P.children),F=S.length===1?0:1;return S.splice(F,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>O(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),m&&S.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),wi.default.cloneElement(A,{},S)}return A}function K(A,m){if(!g)return A;let P=_material.createFilterOptions.call(void 0, )(A,m),{inputValue:S}=m,F=A.some(D=>S===D[g]);return S!==""&&!F&&P.push({[g]:`Adicionar op\xE7\xE3o: "${S}"`}),P}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:p,loadingText:"Carregando...",loading:o,onChange:L,value:e,onInputChange:G,options:n,getOptionLabel:f,filterOptions:K,renderInput:A=>_jsxruntime.jsx.call(void 0, _material.TextField,y($(y({label:r,onDoubleClick:()=>{p||O()}},A),{InputProps:$(y({},A.InputProps),{endAdornment:V(A.InputProps.endAdornment,o,p)}),disabled:p}),x)),clearIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.BackspaceOutlined,{}),componentsProps:{clearIndicator:{sx:{visibility:"visible"}}},noOptionsText:"Nenhum registro"}),_jsxruntime.jsx.call(void 0, _providers.FormProvider,{children:_jsxruntime.jsx.call(void 0, Pe,$(y({open:C,onClose:()=>w(),actions:"none"},c),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, Mr,{placeholder:"Pesquisar",onSearch:A=>k(A)}),i&&_jsxruntime.jsx.call(void 0, E,{})]}),_jsxruntime.jsx.call(void 0, s,y({query:H,enableTransporter:!0,onTransport:A=>{w(),a&&a(A)}},l))]})}))})]})}var sf={dialogProps:{maxWidth:"md",fullWidth:!0}};eo.defaultProps=sf;function to(t){let{label:e}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"header",sx:{alignItems:"center",gap:1},children:_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h3",sx:{fontWeight:"medium",color:r=>r.palette.grey[600]},children:e})})}var _axios = require('axios');var Ce=We(is()),$t=We(ls()),ms=We(cs()),Ff=Object.prototype.toString,Of=Error.prototype.toString,kf=RegExp.prototype.toString,Af=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",_f=/^Symbol\((.*)\)(.*)$/;function Mf(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function fs(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Mf(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Af.call(t).replace(_f,"Symbol($1)");let n=Ff.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+Of.call(t)+"]":n==="RegExp"?kf.call(t):null}function Re(t,e){let r=fs(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=fs(this[n],e);return i!==null?i:o},2)}function hs(t){return t==null?[]:[].concat(t)}var gs,Df=/\$\{\s*(\w+)\s*\}/g;gs=Symbol.toStringTag;var ce=class extends Error{static formatError(e,r){let n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof e=="string"?e.replace(Df,(o,i)=>Re(r[i])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,o,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[gs]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],hs(e).forEach(s=>{if(ce.isError(s)){this.errors.push(...s.errors);let l=s.inner.length?s.inner:[s];this.inner.push(...l)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,ce)}},Ae={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{let o=n!=null&&n!==r?` (cast from the value \`${Re(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Re(r,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Re(r,!0)}\``+o}},Ee={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ue={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},lo={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},uo={isValue:"${path} field must be ${value}"},co={noUnknown:"${path} field has unspecified keys: ${unknown}"},Br={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ys={notType:t=>{let{path:e,value:r,spec:n}=t,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``;if(r.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Re(r,!0)}\``}return ce.formatError(Ae.notType,t)}},y0=Object.assign(Object.create(null),{mixed:Ae,string:Ee,number:Ue,date:lo,object:co,array:Br,boolean:uo,tuple:ys}),Wr=t=>t&&t.__isYupSchema__,gt=class{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:o,otherwise:i}=r,s=typeof n=="function"?n:(...l)=>l.every(a=>a===n);return new gt(e,(l,a)=>{var u;let f=s(...l)?o:i;return(u=f==null?void 0:f(a))!=null?u:a})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),o=this.fn(n,e,r);if(o===void 0||o===e)return e;if(!Wr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},$r={context:"$",value:"."};var $e=class{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===$r.context,this.isValue=this.key[0]===$r.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?$r.context:this.isValue?$r.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,Ce.getter)(this.path,!0),this.map=r.map}getValue(e,r,n){let o=this.isContext?n:this.isValue?e:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};$e.prototype.__isYupRef=!0;var we=t=>t==null;function mt(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},l,a){let{name:u,test:f,params:c,message:p,skipAbsent:d}=t,{parent:g,context:x,abortEarly:C=s.spec.abortEarly,disableStackTrace:O=s.spec.disableStackTrace}=o;function w(b){return $e.isRef(b)?b.getValue(r,g,x):b}function H(b={}){var A;let m=Object.assign({value:r,originalValue:i,label:s.spec.label,path:b.path||n,spec:s.spec},c,b.params);for(let P of Object.keys(m))m[P]=w(m[P]);let h=new ce(ce.formatError(b.message||p,m),r,m.path,b.type||u,(A=b.disableStackTrace)!=null?A:O);return h.params=m,h}let k=C?l:a,E={path:n,parent:g,type:u,from:o.from,createError:H,resolve:w,options:o,originalValue:i,schema:s},z=b=>{ce.isError(b)?k(b):b?a(null):k(H())},G=b=>{ce.isError(b)?k(b):l(b)};if(d&&we(r))return z(!0);let V;try{var K;if(V=f.call(E,r,E),typeof((K=V)==null?void 0:K.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(V).then(z,G)}}catch(b){G(b);return}z(V)}return e.OPTIONS=t,e}function Rf(t,e,r,n=r){let o,i,s;return e?((0,Ce.forEach)(e,(l,a,u)=>{let f=a?l.slice(1,l.length-1):l;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",p=u?parseInt(f,10):0;if(t.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);o=r,r=r&&r[p],t=c?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=r,r=r&&r[f],t=t.fields[f]}i=f,s=a?"["+l+"]":"."+l}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var yt=class extends Set{describe(){let e=[];for(let r of this.values())e.push($e.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(let n of this.values())r.push(e(n));return r}clone(){return new yt(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function ht(t,e=new Map){if(Wr(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=ht(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(let[n,o]of t.entries())r.set(n,ht(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(ht(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=ht(o,e)}else throw Error(`Unable to clone ${t}`);return r}var se=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new yt,this._blacklist=new yt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ae.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=ht(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone(),o=Object.assign({},r.spec,n.spec);return n.spec=o,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((o,i)=>i.resolve(o,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,o,i;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({value:e},r)),o=r.assert==="ignore-optionality",i=n._cast(e,r);if(r.assert!==!1&&!n.isType(i)){if(o&&we(i))return i;let s=Re(e),l=Re(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
7
7
|
|
|
8
8
|
attempted value: ${s}
|
|
9
|
-
`+(l!==s?`result of cast: ${l}`:""))}return i}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,o){let{path:i,originalValue:s=e,strict:l=this.spec.strict}=r,a=e;l||(a=this._cast(a,Object.assign({assert:!1},r)));let u=[];for(let p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:a,originalValue:s,options:r,tests:u},n,p=>{if(p.length)return o(p,a);this.runTests({path:i,value:a,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(e,r,n){let o=!1,{tests:i,value:s,originalValue:l,path:a,options:u}=e,p=x=>{o||(o=!0,r(x,s))},c=x=>{o||(o=!0,n(x,s))},f=i.length,d=[];if(!f)return c([]);let g={value:s,originalValue:l,path:a,options:u,schema:this};for(let x=0;x<i.length;x++){let E=i[x];E(g,p,function(_){_&&(Array.isArray(_)?d.push(..._):d.push(_)),--f<=0&&c(d)})}}asNestedTest({key:e,index:r,parent:n,parentPath:o,originalParent:i,options:s}){let l=e!=null?e:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let a=typeof l=="number",u=n[l],p=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[l],key:void 0,[a?"index":"key"]:l,path:a||l.includes(".")?`${o||""}[${u?l:`"${l}"`}]`:(o?`${o}.`:"")+e});return(c,f,d)=>this.resolve(p)._validate(u,p,f,d)}validate(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,l)=>o._validate(e,r,(a,u)=>{ce.isError(a)&&(a.value=u),l(a)},(a,u)=>{a.length?l(new ce(a,u,void 0,void 0,i)):s(u)}))}validateSync(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},r,{sync:!0}),(l,a)=>{throw ce.isError(l)&&(l.value=a),l},(l,a)=>{if(l.length)throw new ce(l,e,void 0,void 0,s);i=a}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(ce.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(ce.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):ht(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){let n=this.clone({nullable:e});return n.internalTests.nullable=mt({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){let n=this.clone({optional:e});return n.internalTests.optionality=mt({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=Ae.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ae.notNull){return this.nullability(!1,e)}required(e=Ae.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Ae.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=mt(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),o=xs(e).map(i=>new Be(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new gt(o,r):gt.fromOptions(o,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=mt({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=Ae.oneOf){let n=this.clone();return e.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=mt({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(e,r=Ae.notOneOf){let n=this.clone();return e.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=mt({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,u,p)=>p.findIndex(c=>c.name===a.name)===u)}}};se.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])se.prototype[`${t}At`]=function(e,r,n={}){let{parent:o,parentPath:i,schema:s}=jf(this,e,r,n.context);return s[t](o&&o[i],Object.assign({},n,{parent:o,path:e}))};for(let t of["equals","is"])se.prototype[t]=se.prototype.oneOf;for(let t of["not","nope"])se.prototype[t]=se.prototype.notOneOf;var Nf=()=>!0;function zf(t){return new Nr(t)}var Nr=class extends se{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Nf},e))}};zf.prototype=Nr.prototype;function Vf(){return new zr}var zr=class extends se{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(n.spec.coerce&&!n.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=co.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Fe(r)||r===!0}})}isFalse(e=co.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Fe(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};Vf.prototype=zr.prototype;var Uf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Wf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Yf=t=>Fe(t)||t===t.trim(),Gf={}.toString();function Ie(){return new Vr}var Vr=class extends se{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;let o=e!=null&&e.toString?e.toString():e;return o===Gf?e:o})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||Ae.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=_e.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=_e.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=_e.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||_e.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=_e.email){return this.matches(Uf,{name:"email",message:e,excludeEmptyString:!0})}url(e=_e.url){return this.matches(qf,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=_e.uuid){return this.matches(Wf,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=_e.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Yf})}lowercase(e=_e.lowercase){return this.transform(r=>Fe(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toLowerCase()})}uppercase(e=_e.uppercase){return this.transform(r=>Fe(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toUpperCase()})}};Ie.prototype=Vr.prototype;var Kf=t=>t!=+t;function Hf(){return new Ur}var Ur=class extends se{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Kf(e)}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce)return e;let o=e;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(e,r=Ue.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(e)}})}max(e,r=Ue.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(e)}})}lessThan(e,r=Ue.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(n){return n<this.resolve(e)}})}moreThan(e,r=Ue.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=Ue.positive){return this.moreThan(0,e)}negative(e=Ue.negative){return this.lessThan(0,e)}integer(e=Ue.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>Fe(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>Fe(o)?o:Math[e](o))}};Hf.prototype=Ur.prototype;var Zf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Re(t,e=0){return Number(t)||e}function Xf(t){let e=Zf.exec(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;let r={year:Re(e[1]),month:Re(e[2],1)-1,day:Re(e[3],1),hour:Re(e[4]),minute:Re(e[5]),second:Re(e[6]),millisecond:e[7]?Re(e[7].substring(0,3)):0,z:e[8]||void 0,plusMinus:e[9]||void 0,hourOffset:Re(e[10]),minuteOffset:Re(e[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}var Ts=new Date(""),Jf=t=>Object.prototype.toString.call(t)==="[object Date]";function Cs(){return new Qe}var Qe=class extends se{constructor(){super({type:"date",check(e){return Jf(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,n)=>!n.spec.coerce||n.isType(e)||e===null?e:(e=Xf(e),isNaN(e)?Qe.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(Be.isRef(e))n=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(e,r=uo.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(e,r=uo.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}};Qe.INVALID_DATE=Ts;Cs.prototype=Qe.prototype;Cs.INVALID_DATE=Ts;function Qf(t,e=[]){let r=[],n=new Set,o=new Set(e.map(([s,l])=>`${s}-${l}`));function i(s,l){let a=(0,Pe.split)(s)[0];n.add(a),o.has(`${l}-${a}`)||r.push([l,a])}for(let s of Object.keys(t)){let l=t[s];n.add(s),Be.isRef(l)&&l.isSibling?i(l.path,s):Gr(l)&&"deps"in l&&l.deps.forEach(a=>i(a,s))}return ys.default.array(Array.from(n),r).reverse()}function hs(t,e){let r=1/0;return t.some((n,o)=>{var i;if((i=e.path)!=null&&i.includes(n))return r=o,!0}),r}function Ss(t){return(e,r)=>hs(t,e)-hs(t,r)}var Ps=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch(o){}return r.isType(n)?n:t};function jr(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=jr(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=jr(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(jr)}):"optional"in t?t.optional():t}var ep=(t,e)=>{let r=[...(0,Pe.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),o=(0,Pe.getter)((0,Pe.join)(r),!0)(t);return!!(o&&n in o)},gs=t=>Object.prototype.toString.call(t)==="[object Object]";function tp(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}var rp=Ss([]);function et(t){return new qr(t)}var qr=class extends se{constructor(e){super({type:"object",check(r){return gs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=rp,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let o=super._cast(e,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(o).filter(c=>!this._nodes.includes(c))),a={},u=Object.assign({},r,{parent:a,__validating:r.__validating||!1}),p=!1;for(let c of l){let f=i[c],d=c in o;if(f){let g,x=o[c];u.path=(r.path?`${r.path}.`:"")+c,f=f.resolve({value:x,context:r.context,parent:a});let E=f instanceof se?f.spec:void 0,k=E==null?void 0:E.strict;if(E!=null&&E.strip){p=p||c in o;continue}g=!r.__validating||!k?f.cast(o[c],u):o[c],g!==void 0&&(a[c]=g)}else d&&!s&&(a[c]=o[c]);(d!==c in a||a[c]!==o[c])&&(p=!0)}return p?a:o}_validate(e,r={},n,o){let{from:i=[],originalValue:s=e,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(a,u)=>{if(!l||!gs(u)){o(a,u);return}s=s||u;let p=[];for(let c of this._nodes){let f=this.fields[c];!f||Be.isRef(f)||p.push(f.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:p,value:u,originalValue:s,options:r},n,c=>{o(c.sort(this._sortErrors).concat(a),u)})})}clone(e){let r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[o,i]of Object.entries(this.fields)){let s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;let i=this.fields[n],s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=Qf(e,r),n._sortErrors=Ss(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),o)})}partial(){let e={};for(let[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return jr(this)}pick(e){let r={};for(let n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>e.includes(n)&&e.includes(o)))}omit(e){let r=[];for(let n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let o=(0,Pe.getter)(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return ep(i,e)&&(s=Object.assign({},i),n||delete s[e],s[r]=o(i)),s})}json(){return this.transform(Ps)}noUnknown(e=!0,r=fo.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;let i=tp(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=fo.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let n={};for(let o of Object.keys(r))n[e(o)]=r[o];return n})}camelCase(){return this.transformKeys(It.camelCase)}snakeCase(){return this.transformKeys(It.snakeCase)}constantCase(){return this.transformKeys(e=>(0,It.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[i,s]of Object.entries(r.fields)){var o;let l=e;(o=l)!=null&&o.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=s.describe(l)}return n}};et.prototype=qr.prototype;function np(t){return new Wr(t)}var Wr=class extends se{constructor(e){super({type:"array",spec:{types:e},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=e}_cast(e,r){let n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1,i=n.map((s,l)=>{let a=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return a!==s&&(o=!0),a});return o?i:n}_validate(e,r={},n,o){var i;let s=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(a,u)=>{var p;if(!l||!s||!this._typeCheck(u)){o(a,u);return}let c=new Array(u.length);for(let d=0;d<u.length;d++){var f;c[d]=s.asNestedTest({options:r,index:d,parent:u,parentPath:r.path,originalParent:(f=r.originalValue)!=null?f:e})}this.runTests({value:u,tests:c,originalValue:(p=r.originalValue)!=null?p:e,options:r},n,d=>o(d.concat(a),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ps)}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Gr(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+$e(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=Lr.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r){return r=r||Lr.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r){return r=r||Lr.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,o,i)=>!e(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);if(r.innerType){var o;let i=e;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}};np.prototype=Wr.prototype;function op(t){return new Yr(t)}var Yr=class extends se{constructor(e){super({type:"tuple",spec:{types:e},check(r){let n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(vs.notType)})}_cast(e,r){let{types:n}=this.spec,o=super._cast(e,r);if(!this._typeCheck(o))return o;let i=!1,s=n.map((l,a)=>{let u=l.cast(o[a],Object.assign({},r,{path:`${r.path||""}[${a}]`}));return u!==o[a]&&(i=!0),u});return i?s:o}_validate(e,r={},n,o){let i=this.spec.types;super._validate(e,r,n,(s,l)=>{var a;if(!this._typeCheck(l)){o(s,l);return}let u=[];for(let[c,f]of i.entries()){var p;u[c]=f.asNestedTest({options:r,index:c,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:e})}this.runTests({value:l,tests:u,originalValue:(a=r.originalValue)!=null?a:e,options:r},n,c=>o(c.concat(s),l))})}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=r.spec.types.map((o,i)=>{var s;let l=e;return(s=l)!=null&&s.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.describe(l)}),n}};op.prototype=Yr.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function Lt(t){let u=t,{name:e,label:r,value:n,onChange:o}=u,i=X(u,["name","label","value","onChange"]),[s,l]=_react.useState.call(void 0, !1);function a(){l(!s)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({name:e,label:r,value:n||"",onChange:o,type:s?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:a,edge:"end",children:s?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},i))}function tt(t){let{isValid:e,message:r}=t,n=_material.useTheme.call(void 0, );return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:e?"success":"inherit",sx:{fontSize:"8pt"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:e?n.palette.success.main:"inherit",textDecoration:e?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var Os={senhaAtual:"",senhaNova:""},vp=et().shape({senhaAtual:Ie().required("Informe a Senha Atual."),senhaNova:Ie().required("Informe a Nova Senha.")});function Hr(t){let{isOpen:e,credentialsConfig:r,onClose:n,onSuccess:o,onFailed:i,primeiroAcesso:s,senhaAtual:l,email:a}=t,{alterarSenha:u,isSubmitting:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:c,validationProps:f}=_hooks.useValidations.call(void 0, ),{data:d,handleChange:g,setData:x,changeValue:E}=_hooks.useForm.call(void 0, Os),[k,_]=_react.useState.call(void 0, !1),[K,v]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&E("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{d.senhaNova&&_(_isStrongPassword2.default.call(void 0, d.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[d.senhaNova]);function A(){return ue(this,null,function*(){c(null),v(null),vp.validate(d,{abortEarly:!1}).then(()=>ue(this,null,function*(){var m;let{senhaAtual:b,senhaNova:O}=d;try{(yield u(b,O,a))&&(o&&o(),x(Os))}catch(h){if(i&&i(h),_axios.isAxiosError.call(void 0, h)){v((m=h.response)==null?void 0:m.data.message);return}v("Ocorreu um erro ao tentar alterar a senha")}})).catch(b=>{c(b)})})}function H(){return(d==null?void 0:d.senhaNova.length)>=8}function j(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/[a-z]/g);return Array.isArray(b)&&b.length>0}return!1}function U(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/[A-Z]/g);return Array.isArray(b)&&b.length>0}return!1}function V(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/\d/g);return Array.isArray(b)&&b.length>0}return!1}function T(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/\W/g);return Array.isArray(b)&&b.length>0}return!1}return _jsxruntime.jsx.call(void 0, we,{title:"Atualizar senha",open:!!e,onClose:()=>n(),actions:_jsxruntime.jsxs.call(void 0, Le,{children:[_jsxruntime.jsx.call(void 0, ne,{title:"Cancelar altera\xE7\xE3o de senha",color:"error",onClick:n,children:"Cancelar"}),_jsxruntime.jsx.call(void 0, ne,{title:"Confirmar altera\xE7\xE3o de senha",variant:"contained",onClick:A,isLoading:p,disabled:!k,children:"Alterar Senha"})]}),children:_jsxruntime.jsxs.call(void 0, _material.Grid,{container:!0,spacing:2,children:[s&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"info",children:["Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",_jsxruntime.jsx.call(void 0, "br",{}),"Cadastre uma senha segura para deixar sua conta mais protegida."]})}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, Lt,y({name:"senhaAtual",label:"Senha Atual",value:(d==null?void 0:d.senhaAtual)||"",onChange:g},f("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, Lt,y({name:"senhaNova",label:"Nova Senha",value:(d==null?void 0:d.senhaNova)||"",onChange:g},f("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:[_jsxruntime.jsx.call(void 0, tt,{isValid:H(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, tt,{isValid:j(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, tt,{isValid:U(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, tt,{isValid:V(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, tt,{isValid:T(),message:"A nova senha deve ter ao menos um caracter especial"})]}),K&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:K})})]})})}var Fp=et().shape({email:Ie().required("Informe o e-mail"),password:Ie().required("Informe a senha")});function mo(t){let{onLoginSuccess:e,onLoginFailed:r,onEsqueciSenhaClick:n,credentialsConfig:o}=t,[i,s]=_react.useState.call(void 0, ""),[l,a]=_react.useState.call(void 0, ""),[u,p]=_react.useState.call(void 0, !1),[c,f]=_react.useState.call(void 0, !1),[d,g]=_react.useState.call(void 0, !1),[x,E]=_react.useState.call(void 0, !1),[k,_]=_react.useState.call(void 0, null),{login:K}=_hooks.useCredentials.call(void 0, o),{validationProps:v,setValidationErrors:A}=_hooks.useValidations.call(void 0, );function H(){p(!u)}function j(){return ue(this,null,function*(){A(null),_(null),Fp.validate({email:i,password:l},{abortEarly:!1}).then(()=>ue(this,null,function*(){var U,V;f(!0);try{let T=yield K(i,l);T&&e(T)}catch(T){if(_axios.isAxiosError.call(void 0, T)){if(((U=T.response)==null?void 0:U.data.code)==="E_FIRST_ACCESS"){g(!0);return}_((V=T.response)==null?void 0:V.data.message)}r(T)}})).catch(U=>{A(U)}).finally(()=>{f(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[x&&_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"success",children:["Senha cadastrada com sucesso",_jsxruntime.jsx.call(void 0, "br",{}),"Tudo pronto para voc\xEA fazer o login"]}),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:U=>s(U.target.value)},v("email"))),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"password",label:"Senha",margin:"normal",value:l||"",onChange:U=>a(U.target.value),type:u?"text":"password",onKeyDown:U=>U.key==="Enter"&&j(),InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:H,edge:"end",children:u?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},v("password"))),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:j,isLoading:c,sx:{mt:1},children:"Entrar"}),_jsxruntime.jsx.call(void 0, ne,{onClick:n,variant:"text",sx:{marginTop:.5,fontWeight:"400",":hover":{color:U=>U.palette.primary.dark}},children:"Esqueci a senha"}),k&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:k}),_jsxruntime.jsx.call(void 0, Hr,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:d,onClose:()=>g(!1),onSuccess:()=>{g(!1),E(!0),a("")},credentialsConfig:o})]})}var Dp=et().shape({email:Ie().required("Informe o e-mail")});function ho(t){let{onLoginClick:e,credentialsConfig:r}=t,[n,o]=_react.useState.call(void 0, ""),[i,s]=_react.useState.call(void 0, !1),[l,a]=_react.useState.call(void 0, !1),[u,p]=_react.useState.call(void 0, null),{recuperarSenha:c}=_hooks.useCredentials.call(void 0, r),{validationProps:f,setValidationErrors:d}=_hooks.useValidations.call(void 0, );function g(){return ue(this,null,function*(){d(null),Dp.validate({email:n},{abortEarly:!1}).then(()=>ue(this,null,function*(){var x;try{s(!0),yield c(n),a(!0)}catch(E){p((x=E.response)==null?void 0:x.data.message)}finally{s(!1)}})).catch(x=>{d(x)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:n||"",onChange:x=>o(x.target.value)},f("email"))),_jsxruntime.jsxs.call(void 0, Le,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.palette.primary.dark}},children:"Voltar"}),_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:g,isLoading:i,children:"Recuperar Senha"})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.palette.primary.dark}},children:"Ir para o Login"}),children:"Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function yo(t){var p;let{loginData:e,credentialsConfig:r,onLoginFailed:n,onLoginSuccess:o}=t,[i,s]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:a}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(e==null?void 0:e.empresas)){let c=e==null?void 0:e.empresas[0];s(c==null?void 0:c.uuid)}},[e]);function u(){return ue(this,null,function*(){try{let c=yield l(e,i);c?o(c):n("Nenhuma token definida")}catch(c){n(c)}})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",sx:{minWidth:"290px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{label:"Licen\xE7as",margin:"normal",select:!0,autoFocus:!0,value:i,onChange:c=>{s(c.target.value)},children:(p=e==null?void 0:e.empresas)==null?void 0:p.map(c=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:c.uuid,children:c.nome},c.uuid))}),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:u,isLoading:a,sx:{mt:1},children:"Confirmar"})]})}function Ns(t){var x;let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n,onAlreadyLogged:o,appName:i}=t,[s,l]=_react.useState.call(void 0, ),{selecionarLicenca:a,isAuthenticated:u}=_hooks.useCredentials.call(void 0, e),[p,c]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{u&&o&&o()},[u]);function f(E){return ue(this,null,function*(){try{if(Array.isArray(E==null?void 0:E.empresas)){if((E==null?void 0:E.empresas.length)===1){let k=yield a(E,E.empresas[0].uuid);k&&r(k);return}l(E);return}r(E)}catch(k){n(k)}})}function d(E){return ue(this,null,function*(){n(E)})}function g(){c(!p)}return _jsxruntime.jsxs.call(void 0, _material.Container,{component:"main",maxWidth:"xs",sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:[_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logo.png"}),_jsxruntime.jsx.call(void 0, _material.Paper,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{padding:5},children:[_jsxruntime.jsx.call(void 0, ro,{label:i}),!p&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:s!=null&&s.empresas&&((x=s==null?void 0:s.empresas)==null?void 0:x.length)>0?_jsxruntime.jsx.call(void 0, yo,{loginData:s,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n}):_jsxruntime.jsx.call(void 0, mo,{credentialsConfig:e,onLoginSuccess:f,onLoginFailed:d,onEsqueciSenhaClick:g})}),p&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:_jsxruntime.jsx.call(void 0, ho,{onLoginClick:g,credentialsConfig:e})})]})})]})}var Zp=t=>({transition:t.transitions.create(["transform"],{duration:500})}),Xp=_styles.styled.call(void 0, _iconsmaterial.KeyboardArrowRight,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>y(y(y({color:t.palette.primary.dark},Zp(t)),e&&{transform:"rotate(-180deg)"}),!e&&{transform:"rotate(0)"}));function bo(t){let{open:e,onToogleDrawerMenu:r}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{width:"90%",direction:"row",justifyContent:e?"flex-end":"center",margin:"16px auto",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{size:"small","aria-label":"open drawer",onClick:r,children:_jsxruntime.jsx.call(void 0, Xp,{fontSize:"small",open:e})})})}var ed=_styles.styled.call(void 0, _material.MenuItem,{})(({theme:t})=>({borderRadius:"6px",width:"90%",gap:"16px",margin:"0 auto",padding:"8px 16px",transition:"0.1s ease-in-out","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main},"& .MuiSvgIcon-root":{color:t.palette.primary.main},"& .MuiIcon-root":{color:t.palette.primary.main}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{letterSpacing:"0.5px",color:t.palette.text.secondary,fontSize:t.typography.body1},"& .MuiSvgIcon-root":{fontSize:"24px"}})),td=t=>_jsxruntime.jsx.call(void 0, ed,y({},t)),Xr=td;function vo(t){let{menuItem:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, !1);if(!e.visible)return null;let s=!!(e!=null&&e.items&&(e==null?void 0:e.items.length)>0);function l(){i(!o)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Xr,{onClick:()=>{if(e!=null&&e.link){n(e.link);return}l()},selected:r===e.link,children:[!!e.icon&&_jsxruntime.jsx.call(void 0, _material.Icon,{children:e.icon}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:e.label}),s&&!o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),s&&o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(e==null?void 0:e.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:o,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, nt,{activeMenu:r,sx:{pl:a=>a.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:n})})]})}function nt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:n}=i,o=X(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,$(y({component:"nav",disablePadding:!0},o),{children:e.map(s=>_jsxruntime.jsx.call(void 0, vo,{onMenuClick:n,activeMenu:r,menuItem:s},s.id))}))}function To(t){let{menus:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, null),s=(a,u,p)=>{i({element:a.currentTarget,id:u,items:p})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:e.map(a=>a.visible?_jsxruntime.jsxs.call(void 0, Xr,{onMouseEnter:u=>{a!=null&&a.link||s(u,a.id,a.items)},onMouseLeave:()=>{a!=null&&a.link||l()},onClick:()=>{a!=null&&a.link&&n(a.link)},selected:r===a.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:a.icon})}),(o==null?void 0:o.id)===a.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:o==null?void 0:o.element,open:!!(o!=null&&o.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, nt,{activeMenu:r,onMenuClick:n,menus:(a==null?void 0:a.items)||[],sx:{minWidth:"240px",backgroundColor:z.palette.background.paper,borderRadius:"12px",padding:"16px 4px",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);"}})})]},`minMenu-${a.id}`):null)})}var Us=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),qs=t=>({transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${t.spacing(8)} + 1px)`,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(8)} + 1px)`}}),Sd=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>y(y({width:r,bgcolor:t.palette.background.paper,boxShadow:"2px 3px 20px -16px rgb(32 32 36 / 30%)",borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},e&&$(y({},Us(r,t)),{"& .MuiDrawer-paper":Us(r,t)})),!e&&$(y({},qs(t)),{"& .MuiDrawer-paper":qs(t)})));function Ws(t){let g=t,{open:e,items:r,width:n,logo:o,minLogo:i,label:s,minLabel:l,link:a,version:u,activeMenu:p,onMenuClick:c,toggleMenu:f}=g,d=X(g,["open","items","width","logo","minLogo","label","minLabel","link","version","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, Sd,$(y({width:n,open:e,onClose:()=>f(!1)},d),{children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:z.mixins.toolbar},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:.5,alignItems:"center",p:1,children:[_jsxruntime.jsx.call(void 0, "img",{src:e?o:i,alt:"logo"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body2",fontWeight:e?"700":"400",children:[e?s:l," ",u&&_jsxruntime.jsx.call(void 0, _material.Link,{underline:"none",target:"_blank",rel:"noreferrer",href:a,children:u})]})]})}),_jsxruntime.jsx.call(void 0, bo,{open:!!e,onToogleDrawerMenu:f}),e&&_jsxruntime.jsx.call(void 0, nt,{onMenuClick:c,activeMenu:p,menus:r}),!e&&_jsxruntime.jsx.call(void 0, To,{onMenuClick:c,activeMenu:p,menus:r})]}))}exports.AlterarSenha = Hr; exports.Button = ne; exports.ButtonContainer = Le; exports.Checkbox = _o; exports.ColorsGrid = ko; exports.CurrencyCellStyle = Km; exports.CurrencyTextField = un; exports.DataTable = rl; exports.DataTableOptions = mn; exports.DeleteContainer = pn; exports.Dialog = we; exports.DrawerMenu = Ws; exports.Editable = Dr; exports.FilterContainer = vn; exports.FilterControl = Wt; exports.Flag = Ko; exports.FormContainer = Sn; exports.LabelValue = Yi; exports.MioAuth = Ns; exports.OptionStyles = Gm; exports.PageTitle = Ji; exports.PasswordTextField = Lt; exports.SearchTextField = Rr; exports.Tooltip = st; exports.Transporter = to; exports.theme = z;
|
|
9
|
+
`+(l!==s?`result of cast: ${l}`:""))}return i}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,o){let{path:i,originalValue:s=e,strict:l=this.spec.strict}=r,a=e;l||(a=this._cast(a,Object.assign({assert:!1},r)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:i,value:a,originalValue:s,options:r,tests:u},n,f=>{if(f.length)return o(f,a);this.runTests({path:i,value:a,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(e,r,n){let o=!1,{tests:i,value:s,originalValue:l,path:a,options:u}=e,f=x=>{o||(o=!0,r(x,s))},c=x=>{o||(o=!0,n(x,s))},p=i.length,d=[];if(!p)return c([]);let g={value:s,originalValue:l,path:a,options:u,schema:this};for(let x=0;x<i.length;x++){let C=i[x];C(g,f,function(w){w&&(Array.isArray(w)?d.push(...w):d.push(w)),--p<=0&&c(d)})}}asNestedTest({key:e,index:r,parent:n,parentPath:o,originalParent:i,options:s}){let l=e!=null?e:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let a=typeof l=="number",u=n[l],f=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[l],key:void 0,[a?"index":"key"]:l,path:a||l.includes(".")?`${o||""}[${u?l:`"${l}"`}]`:(o?`${o}.`:"")+e});return(c,p,d)=>this.resolve(f)._validate(u,f,p,d)}validate(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((s,l)=>o._validate(e,r,(a,u)=>{ce.isError(a)&&(a.value=u),l(a)},(a,u)=>{a.length?l(new ce(a,u,void 0,void 0,i)):s(u)}))}validateSync(e,r){var n;let o=this.resolve(Object.assign({},r,{value:e})),i,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},r,{sync:!0}),(l,a)=>{throw ce.isError(l)&&(l.value=a),l},(l,a)=>{if(l.length)throw new ce(l,e,void 0,void 0,s);i=a}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(ce.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(ce.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):ht(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){let n=this.clone({nullable:e});return n.internalTests.nullable=mt({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){let n=this.clone({optional:e});return n.internalTests.optionality=mt({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=Ae.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ae.notNull){return this.nullability(!1,e)}required(e=Ae.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Ae.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=mt(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),o=hs(e).map(i=>new $e(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new gt(o,r):gt.fromOptions(o,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=mt({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=Ae.oneOf){let n=this.clone();return e.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=mt({message:r,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),n}notOneOf(e,r=Ae.notOneOf){let n=this.clone();return e.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=mt({message:r,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){let r=(e?this.resolve(e):this).clone(),{label:n,meta:o,optional:i,nullable:s}=r.spec;return{meta:o,label:n,optional:i,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,u,f)=>f.findIndex(c=>c.name===a.name)===u)}}};se.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])se.prototype[`${t}At`]=function(e,r,n={}){let{parent:o,parentPath:i,schema:s}=Rf(this,e,r,n.context);return s[t](o&&o[i],Object.assign({},n,{parent:o,path:e}))};for(let t of["equals","is"])se.prototype[t]=se.prototype.oneOf;for(let t of["not","nope"])se.prototype[t]=se.prototype.notOneOf;var $f=()=>!0;function Bf(t){return new Lr(t)}var Lr=class extends se{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:$f},e))}};Bf.prototype=Lr.prototype;function If(){return new jr}var jr=class extends se{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(n.spec.coerce&&!n.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=uo.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return we(r)||r===!0}})}isFalse(e=uo.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return we(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}};If.prototype=jr.prototype;var Lf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,jf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Nf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,zf=t=>we(t)||t===t.trim(),Vf={}.toString();function Be(){return new Nr}var Nr=class extends se{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce||n.isType(e)||Array.isArray(e))return e;let o=e!=null&&e.toString?e.toString():e;return o===Vf?e:o})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||Ae.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=Ee.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=Ee.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=Ee.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,o,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:i}=r:o=r),this.test({name:i||"matches",message:o||Ee.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=Ee.email){return this.matches(Lf,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ee.url){return this.matches(jf,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ee.uuid){return this.matches(Nf,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Ee.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:zf})}lowercase(e=Ee.lowercase){return this.transform(r=>we(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>we(r)||r===r.toLowerCase()})}uppercase(e=Ee.uppercase){return this.transform(r=>we(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>we(r)||r===r.toUpperCase()})}};Be.prototype=Nr.prototype;var Uf=t=>t!=+t;function qf(){return new zr}var zr=class extends se{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Uf(e)}}),this.withMutation(()=>{this.transform((e,r,n)=>{if(!n.spec.coerce)return e;let o=e;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(e,r=Ue.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(e)}})}max(e,r=Ue.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(e)}})}lessThan(e,r=Ue.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(n){return n<this.resolve(e)}})}moreThan(e,r=Ue.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=Ue.positive){return this.moreThan(0,e)}negative(e=Ue.negative){return this.lessThan(0,e)}integer(e=Ue.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>we(e)?e:e|0)}round(e){var r;let n=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(n.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(o=>we(o)?o:Math[e](o))}};qf.prototype=zr.prototype;var Wf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function De(t,e=0){return Number(t)||e}function Yf(t){let e=Wf.exec(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;let r={year:De(e[1]),month:De(e[2],1)-1,day:De(e[3],1),hour:De(e[4]),minute:De(e[5]),second:De(e[6]),millisecond:e[7]?De(e[7].substring(0,3)):0,z:e[8]||void 0,plusMinus:e[9]||void 0,hourOffset:De(e[10]),minuteOffset:De(e[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}var xs=new Date(""),Gf=t=>Object.prototype.toString.call(t)==="[object Date]";function bs(){return new Qe}var Qe=class extends se{constructor(){super({type:"date",check(e){return Gf(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,n)=>!n.spec.coerce||n.isType(e)||e===null?e:(e=Yf(e),isNaN(e)?Qe.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if($e.isRef(e))n=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(e,r=lo.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(e,r=lo.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}};Qe.INVALID_DATE=xs;bs.prototype=Qe.prototype;bs.INVALID_DATE=xs;function Kf(t,e=[]){let r=[],n=new Set,o=new Set(e.map(([s,l])=>`${s}-${l}`));function i(s,l){let a=(0,Ce.split)(s)[0];n.add(a),o.has(`${l}-${a}`)||r.push([l,a])}for(let s of Object.keys(t)){let l=t[s];n.add(s),$e.isRef(l)&&l.isSibling?i(l.path,s):Wr(l)&&"deps"in l&&l.deps.forEach(a=>i(a,s))}return ms.default.array(Array.from(n),r).reverse()}function ps(t,e){let r=1/0;return t.some((n,o)=>{var i;if((i=e.path)!=null&&i.includes(n))return r=o,!0}),r}function vs(t){return(e,r)=>ps(t,e)-ps(t,r)}var Ts=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch(o){}return r.isType(n)?n:t};function Ir(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=Ir(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Ir(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Ir)}):"optional"in t?t.optional():t}var Hf=(t,e)=>{let r=[...(0,Ce.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),o=(0,Ce.getter)((0,Ce.join)(r),!0)(t);return!!(o&&n in o)},ds=t=>Object.prototype.toString.call(t)==="[object Object]";function Zf(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}var Xf=vs([]);function et(t){return new Vr(t)}var Vr=class extends se{constructor(e){super({type:"object",check(r){return ds(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Xf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let o=super._cast(e,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let i=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(o).filter(c=>!this._nodes.includes(c))),a={},u=Object.assign({},r,{parent:a,__validating:r.__validating||!1}),f=!1;for(let c of l){let p=i[c],d=c in o;if(p){let g,x=o[c];u.path=(r.path?`${r.path}.`:"")+c,p=p.resolve({value:x,context:r.context,parent:a});let C=p instanceof se?p.spec:void 0,O=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||c in o;continue}g=!r.__validating||!O?p.cast(o[c],u):o[c],g!==void 0&&(a[c]=g)}else d&&!s&&(a[c]=o[c]);(d!==c in a||a[c]!==o[c])&&(f=!0)}return f?a:o}_validate(e,r={},n,o){let{from:i=[],originalValue:s=e,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(a,u)=>{if(!l||!ds(u)){o(a,u);return}s=s||u;let f=[];for(let c of this._nodes){let p=this.fields[c];!p||$e.isRef(p)||f.push(p.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:f,value:u,originalValue:s,options:r},n,c=>{o(c.sort(this._sortErrors).concat(a),u)})})}clone(e){let r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[o,i]of Object.entries(this.fields)){let s=n[o];n[o]=s===void 0?i:s}return r.withMutation(o=>o.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var o;let i=this.fields[n],s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=Kf(e,r),n._sortErrors=vs(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),o)})}partial(){let e={};for(let[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Ir(this)}pick(e){let r={};for(let n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,o])=>e.includes(n)&&e.includes(o)))}omit(e){let r=[];for(let n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let o=(0,Ce.getter)(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Hf(i,e)&&(s=Object.assign({},i),n||delete s[e],s[r]=o(i)),s})}json(){return this.transform(Ts)}noUnknown(e=!0,r=co.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;let i=Zf(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=co.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;let n={};for(let o of Object.keys(r))n[e(o)]=r[o];return n})}camelCase(){return this.transformKeys($t.camelCase)}snakeCase(){return this.transformKeys($t.snakeCase)}constantCase(){return this.transformKeys(e=>(0,$t.snakeCase)(e).toUpperCase())}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(let[i,s]of Object.entries(r.fields)){var o;let l=e;(o=l)!=null&&o.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.fields[i]=s.describe(l)}return n}};et.prototype=Vr.prototype;function Jf(t){return new Ur(t)}var Ur=class extends se{constructor(e){super({type:"array",spec:{types:e},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=e}_cast(e,r){let n=super._cast(e,r);if(!this._typeCheck(n)||!this.innerType)return n;let o=!1,i=n.map((s,l)=>{let a=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return a!==s&&(o=!0),a});return o?i:n}_validate(e,r={},n,o){var i;let s=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(a,u)=>{var f;if(!l||!s||!this._typeCheck(u)){o(a,u);return}let c=new Array(u.length);for(let d=0;d<u.length;d++){var p;c[d]=s.asNestedTest({options:r,index:d,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:e})}this.runTests({value:u,tests:c,originalValue:(f=r.originalValue)!=null?f:e,options:r},n,d=>o(d.concat(a),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ts)}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!Wr(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Re(e));return r.innerType=e,r.spec=Object.assign({},r.spec,{types:e}),r}length(e,r=Br.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r){return r=r||Br.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r){return r=r||Br.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(n,o,i)=>!e(n,o,i):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);if(r.innerType){var o;let i=e;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=r.innerType.describe(i)}return n}};Jf.prototype=Ur.prototype;function Qf(t){return new qr(t)}var qr=class extends se{constructor(e){super({type:"tuple",spec:{types:e},check(r){let n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(ys.notType)})}_cast(e,r){let{types:n}=this.spec,o=super._cast(e,r);if(!this._typeCheck(o))return o;let i=!1,s=n.map((l,a)=>{let u=l.cast(o[a],Object.assign({},r,{path:`${r.path||""}[${a}]`}));return u!==o[a]&&(i=!0),u});return i?s:o}_validate(e,r={},n,o){let i=this.spec.types;super._validate(e,r,n,(s,l)=>{var a;if(!this._typeCheck(l)){o(s,l);return}let u=[];for(let[c,p]of i.entries()){var f;u[c]=p.asNestedTest({options:r,index:c,parent:l,parentPath:r.path,originalParent:(f=r.originalValue)!=null?f:e})}this.runTests({value:l,tests:u,originalValue:(a=r.originalValue)!=null?a:e,options:r},n,c=>o(c.concat(s),l))})}describe(e){let r=(e?this.resolve(e):this).clone(),n=super.describe(e);return n.innerType=r.spec.types.map((o,i)=>{var s;let l=e;return(s=l)!=null&&s.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.describe(l)}),n}};Qf.prototype=qr.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function Bt(t){let u=t,{name:e,label:r,value:n,onChange:o}=u,i=X(u,["name","label","value","onChange"]),[s,l]=_react.useState.call(void 0, !1);function a(){l(!s)}return _jsxruntime.jsx.call(void 0, _material.TextField,y({name:e,label:r,value:n||"",onChange:o,type:s?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:a,edge:"end",children:s?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},i))}function tt(t){let{isValid:e,message:r}=t,n=_material.useTheme.call(void 0, );return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:e?"success":"inherit",sx:{fontSize:"8pt"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:e?n.palette.success.main:"inherit",textDecoration:e?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var Fs={senhaAtual:"",senhaNova:""},hp=et().shape({senhaAtual:Be().required("Informe a Senha Atual."),senhaNova:Be().required("Informe a Nova Senha.")});function Gr(t){let{isOpen:e,credentialsConfig:r,onClose:n,onSuccess:o,onFailed:i,primeiroAcesso:s,senhaAtual:l,email:a}=t,{alterarSenha:u,isSubmitting:f}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:c,validationProps:p}=_hooks.useValidations.call(void 0, ),{data:d,handleChange:g,setData:x,changeValue:C}=_hooks.useForm.call(void 0, Fs),[O,w]=_react.useState.call(void 0, !1),[H,k]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&C("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{d.senhaNova&&w(_isStrongPassword2.default.call(void 0, d.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[d.senhaNova]);function E(){return ue(this,null,function*(){c(null),k(null),hp.validate(d,{abortEarly:!1}).then(()=>ue(this,null,function*(){var m;let{senhaAtual:b,senhaNova:A}=d;try{(yield u(b,A,a))&&(o&&o(),x(Fs))}catch(h){if(i&&i(h),_axios.isAxiosError.call(void 0, h)){k((m=h.response)==null?void 0:m.data.message);return}k("Ocorreu um erro ao tentar alterar a senha")}})).catch(b=>{c(b)})})}function z(){return(d==null?void 0:d.senhaNova.length)>=8}function G(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/[a-z]/g);return Array.isArray(b)&&b.length>0}return!1}function L(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/[A-Z]/g);return Array.isArray(b)&&b.length>0}return!1}function V(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/\d/g);return Array.isArray(b)&&b.length>0}return!1}function K(){if(d!=null&&d.senhaNova){let b=d==null?void 0:d.senhaNova.match(/\W/g);return Array.isArray(b)&&b.length>0}return!1}return _jsxruntime.jsx.call(void 0, Pe,{title:"Atualizar senha",open:!!e,onClose:()=>n(),actions:_jsxruntime.jsxs.call(void 0, Ie,{children:[_jsxruntime.jsx.call(void 0, ne,{title:"Cancelar altera\xE7\xE3o de senha",color:"error",onClick:n,children:"Cancelar"}),_jsxruntime.jsx.call(void 0, ne,{title:"Confirmar altera\xE7\xE3o de senha",variant:"contained",onClick:E,isLoading:f,disabled:!O,children:"Alterar Senha"})]}),children:_jsxruntime.jsxs.call(void 0, _material.Grid,{container:!0,spacing:2,children:[s&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"info",children:["Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",_jsxruntime.jsx.call(void 0, "br",{}),"Cadastre uma senha segura para deixar sua conta mais protegida."]})}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, Bt,y({name:"senhaAtual",label:"Senha Atual",value:(d==null?void 0:d.senhaAtual)||"",onChange:g},p("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, Bt,y({name:"senhaNova",label:"Nova Senha",value:(d==null?void 0:d.senhaNova)||"",onChange:g},p("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:[_jsxruntime.jsx.call(void 0, tt,{isValid:z(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, tt,{isValid:G(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, tt,{isValid:L(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, tt,{isValid:V(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, tt,{isValid:K(),message:"A nova senha deve ter ao menos um caracter especial"})]}),H&&_jsxruntime.jsx.call(void 0, _material.Grid,{item:!0,xl:12,lg:12,md:12,sm:12,xs:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:H})})]})})}var Sp=et().shape({email:Be().required("Informe o e-mail"),password:Be().required("Informe a senha")});function po(t){let{onLoginSuccess:e,onLoginFailed:r,onEsqueciSenhaClick:n,credentialsConfig:o}=t,[i,s]=_react.useState.call(void 0, ""),[l,a]=_react.useState.call(void 0, ""),[u,f]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),[d,g]=_react.useState.call(void 0, !1),[x,C]=_react.useState.call(void 0, !1),[O,w]=_react.useState.call(void 0, null),{login:H}=_hooks.useCredentials.call(void 0, o),{validationProps:k,setValidationErrors:E}=_hooks.useValidations.call(void 0, );function z(){f(!u)}function G(){return ue(this,null,function*(){E(null),w(null),Sp.validate({email:i,password:l},{abortEarly:!1}).then(()=>ue(this,null,function*(){var L,V;p(!0);try{let K=yield H(i,l);K&&e(K)}catch(K){if(_axios.isAxiosError.call(void 0, K)){if(((L=K.response)==null?void 0:L.data.code)==="E_FIRST_ACCESS"){g(!0);return}w((V=K.response)==null?void 0:V.data.message)}r(K)}})).catch(L=>{E(L)}).finally(()=>{p(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[x&&_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"success",children:["Senha cadastrada com sucesso",_jsxruntime.jsx.call(void 0, "br",{}),"Tudo pronto para voc\xEA fazer o login"]}),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:L=>s(L.target.value)},k("email"))),_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"password",label:"Senha",margin:"normal",value:l||"",onChange:L=>a(L.target.value),type:u?"text":"password",onKeyDown:L=>L.key==="Enter"&&G(),InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:z,edge:"end",children:u?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},k("password"))),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:G,isLoading:c,sx:{mt:1},children:"Entrar"}),_jsxruntime.jsx.call(void 0, ne,{onClick:n,variant:"text",sx:{marginTop:.5,fontWeight:"400",":hover":{color:L=>L.palette.primary.dark}},children:"Esqueci a senha"}),O&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:O}),_jsxruntime.jsx.call(void 0, Gr,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:d,onClose:()=>g(!1),onSuccess:()=>{g(!1),C(!0),a("")},credentialsConfig:o})]})}var Op=et().shape({email:Be().required("Informe o e-mail")});function mo(t){let{onLoginClick:e,credentialsConfig:r}=t,[n,o]=_react.useState.call(void 0, ""),[i,s]=_react.useState.call(void 0, !1),[l,a]=_react.useState.call(void 0, !1),[u,f]=_react.useState.call(void 0, null),{recuperarSenha:c}=_hooks.useCredentials.call(void 0, r),{validationProps:p,setValidationErrors:d}=_hooks.useValidations.call(void 0, );function g(){return ue(this,null,function*(){d(null),Op.validate({email:n},{abortEarly:!1}).then(()=>ue(this,null,function*(){var x;try{s(!0),yield c(n),a(!0)}catch(C){f((x=C.response)==null?void 0:x.data.message)}finally{s(!1)}})).catch(x=>{d(x)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,y({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:n||"",onChange:x=>o(x.target.value)},p("email"))),_jsxruntime.jsxs.call(void 0, Ie,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.palette.primary.dark}},children:"Voltar"}),_jsxruntime.jsx.call(void 0, ne,{variant:"contained",onClick:g,isLoading:i,children:"Recuperar Senha"})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, ne,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:x=>x.palette.primary.dark}},children:"Ir para o Login"}),children:"Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function go(t){var f;let{loginData:e,credentialsConfig:r,onLoginFailed:n,onLoginSuccess:o}=t,[i,s]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:a}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(e==null?void 0:e.empresas)){let c=e==null?void 0:e.empresas[0];s(c==null?void 0:c.uuid)}},[e]);function u(){return ue(this,null,function*(){try{let c=yield l(e,i);c?o(c):n("Nenhuma token definida")}catch(c){n(c)}})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",sx:{minWidth:"290px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{label:"Licen\xE7as",margin:"normal",select:!0,autoFocus:!0,value:i,onChange:c=>{s(c.target.value)},children:(f=e==null?void 0:e.empresas)==null?void 0:f.map(c=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:c.uuid,children:c.nome},c.uuid))}),_jsxruntime.jsx.call(void 0, ne,{fullWidth:!0,variant:"contained",onClick:u,isLoading:a,sx:{mt:1},children:"Confirmar"})]})}function Is(t){var x;let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n,onAlreadyLogged:o,appName:i}=t,[s,l]=_react.useState.call(void 0, ),{selecionarLicenca:a,isAuthenticated:u}=_hooks.useCredentials.call(void 0, e),[f,c]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{u&&o&&o()},[u]);function p(C){return ue(this,null,function*(){try{if(Array.isArray(C==null?void 0:C.empresas)){if((C==null?void 0:C.empresas.length)===1){let O=yield a(C,C.empresas[0].uuid);O&&r(O);return}l(C);return}r(C)}catch(O){n(O)}})}function d(C){return ue(this,null,function*(){n(C)})}function g(){c(!f)}return _jsxruntime.jsxs.call(void 0, _material.Container,{component:"main",maxWidth:"xs",sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:[_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logo.png"}),_jsxruntime.jsx.call(void 0, _material.Paper,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{padding:5},children:[_jsxruntime.jsx.call(void 0, to,{label:i}),!f&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:s!=null&&s.empresas&&((x=s==null?void 0:s.empresas)==null?void 0:x.length)>0?_jsxruntime.jsx.call(void 0, go,{loginData:s,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n}):_jsxruntime.jsx.call(void 0, po,{credentialsConfig:e,onLoginSuccess:p,onLoginFailed:d,onEsqueciSenhaClick:g})}),f&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:_jsxruntime.jsx.call(void 0, mo,{onLoginClick:g,credentialsConfig:e})})]})})]})}var Wp=t=>({transition:t.transitions.create(["transform"],{duration:500})}),Yp=_styles.styled.call(void 0, _iconsmaterial.KeyboardArrowRight,{shouldForwardProp:t=>t!=="open"})(({theme:t,open:e})=>y(y(y({color:t.palette.primary.dark},Wp(t)),e&&{transform:"rotate(-180deg)"}),!e&&{transform:"rotate(0)"}));function xo(t){let{open:e,onToogleDrawerMenu:r}=t;return _jsxruntime.jsx.call(void 0, _material.Stack,{width:"90%",direction:"row",justifyContent:e?"flex-end":"center",margin:"16px auto",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{size:"small","aria-label":"open drawer",onClick:r,children:_jsxruntime.jsx.call(void 0, Yp,{fontSize:"small",open:e})})})}var Hp=_styles.styled.call(void 0, _material.MenuItem,{})(({theme:t})=>({borderRadius:"6px",width:"90%",gap:"16px",margin:"0 auto",padding:"8px 16px",transition:"0.1s ease-in-out","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:t.palette.primary.main},"& .MuiSvgIcon-root":{color:t.palette.primary.main},"& .MuiIcon-root":{color:t.palette.primary.main}},"& .MuiIcon-root":{color:t.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{letterSpacing:"0.5px",color:t.palette.text.secondary,fontSize:t.typography.body1},"& .MuiSvgIcon-root":{fontSize:"24px"}})),Zp=t=>_jsxruntime.jsx.call(void 0, Hp,y({},t)),Hr=Zp;function bo(t){let{menuItem:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, !1);if(!e.visible)return null;let s=!!(e!=null&&e.items&&(e==null?void 0:e.items.length)>0);function l(){i(!o)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Hr,{onClick:()=>{if(e!=null&&e.link){n(e.link);return}l()},selected:r===e.link,children:[!!e.icon&&_jsxruntime.jsx.call(void 0, _material.Icon,{children:e.icon}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:e.label}),s&&!o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),s&&o&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(e==null?void 0:e.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:o,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, nt,{activeMenu:r,sx:{pl:a=>a.spacing(1.5)},menus:(e==null?void 0:e.items)||[],onMenuClick:n})})]})}function nt(t){let i=t,{menus:e,activeMenu:r,onMenuClick:n}=i,o=X(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,$(y({component:"nav",disablePadding:!0},o),{children:e.map(s=>_jsxruntime.jsx.call(void 0, bo,{onMenuClick:n,activeMenu:r,menuItem:s},s.id))}))}function vo(t){let{menus:e,activeMenu:r,onMenuClick:n}=t,[o,i]=_react.useState.call(void 0, null),s=(a,u,f)=>{i({element:a.currentTarget,id:u,items:f})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:e.map(a=>a.visible?_jsxruntime.jsxs.call(void 0, Hr,{onMouseEnter:u=>{a!=null&&a.link||s(u,a.id,a.items)},onMouseLeave:()=>{a!=null&&a.link||l()},onClick:()=>{a!=null&&a.link&&n(a.link)},selected:r===a.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:a.icon})}),(o==null?void 0:o.id)===a.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:o==null?void 0:o.element,open:!!(o!=null&&o.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, nt,{activeMenu:r,onMenuClick:n,menus:(a==null?void 0:a.items)||[],sx:{minWidth:"240px",backgroundColor:N.palette.background.paper,borderRadius:"12px",padding:"16px 4px",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);"}})})]},`minMenu-${a.id}`):null)})}var Ns=(t,e)=>({width:t,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),zs=t=>({transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${t.spacing(8)} + 1px)`,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(8)} + 1px)`}}),xd=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:t=>t!=="open"&&t!=="width"})(({theme:t,open:e,width:r})=>y(y({width:r,bgcolor:t.palette.background.paper,boxShadow:"2px 3px 20px -16px rgb(32 32 36 / 30%)",borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},e&&$(y({},Ns(r,t)),{"& .MuiDrawer-paper":Ns(r,t)})),!e&&$(y({},zs(t)),{"& .MuiDrawer-paper":zs(t)})));function Vs(t){let g=t,{open:e,items:r,width:n,logo:o,minLogo:i,label:s,minLabel:l,link:a,version:u,activeMenu:f,onMenuClick:c,toggleMenu:p}=g,d=X(g,["open","items","width","logo","minLogo","label","minLabel","link","version","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, xd,$(y({width:n,open:e,onClose:()=>p(!1)},d),{children:[_jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:N.mixins.toolbar},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:.5,alignItems:"center",p:1,children:[_jsxruntime.jsx.call(void 0, "img",{src:e?o:i,alt:"logo"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body2",fontWeight:e?"700":"400",children:[e?s:l," ",u&&_jsxruntime.jsx.call(void 0, _material.Link,{underline:"none",target:"_blank",rel:"noreferrer",href:a,children:u})]})]})}),_jsxruntime.jsx.call(void 0, xo,{open:!!e,onToogleDrawerMenu:p}),e&&_jsxruntime.jsx.call(void 0, nt,{onMenuClick:c,activeMenu:f,menus:r}),!e&&_jsxruntime.jsx.call(void 0, vo,{onMenuClick:c,activeMenu:f,menus:r})]}))}exports.AlterarSenha = Gr; exports.Button = ne; exports.ButtonContainer = Ie; exports.Checkbox = wo; exports.ColorsGrid = Oo; exports.CurrencyCellStyle = Um; exports.CurrencyTextField = an; exports.DataTable = Qa; exports.DataTableOptions = pn; exports.DeleteContainer = cn; exports.Dialog = Pe; exports.DrawerMenu = Vs; exports.Editable = _r; exports.FilterContainer = xn; exports.FilterControl = Ut; exports.Flag = Go; exports.FormContainer = Tn; exports.LabelValue = Ui; exports.MioAuth = Is; exports.OptionStyles = Vm; exports.PageTitle = Hi; exports.PasswordTextField = Bt; exports.SearchTextField = Mr; exports.Tooltip = st; exports.Transporter = eo; exports.theme = N;
|
|
10
10
|
/*! Bundled license information:
|
|
11
11
|
|
|
12
12
|
react-is/cjs/react-is.production.min.js:
|
|
@@ -60,7 +60,7 @@ react-is/cjs/react-is.development.js:
|
|
|
60
60
|
|
|
61
61
|
@mui/styled-engine/index.js:
|
|
62
62
|
(**
|
|
63
|
-
* @mui/styled-engine v5.15.
|
|
63
|
+
* @mui/styled-engine v5.15.14
|
|
64
64
|
*
|
|
65
65
|
* @license MIT
|
|
66
66
|
* This source code is licensed under the MIT license found in the
|