@data-c/ui 0.0.116-alpha.0 → 0.0.117-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 as=Object.create;var Nr=Object.defineProperty,ls=Object.defineProperties,us=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertyNames,_t=Object.getOwnPropertySymbols,ps=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable;var eo=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))zr.call(e,r)&&eo(t,r,e[r]);if(_t)for(var r of _t(e))to.call(e,r)&&eo(t,r,e[r]);return t},Z=(t,e)=>ls(t,cs(e));var ne=(t,e)=>{var r={};for(var n in t)zr.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&_t)for(var n of _t(t))e.indexOf(n)<0&&to.call(t,n)&&(r[n]=t[n]);return r};var se=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ds=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fs(e))!zr.call(t,o)&&o!==r&&Nr(t,o,{get:()=>e[o],enumerable:!(n=us(e,o))||n.enumerable});return t};var Ne=(t,e,r)=>(r=t!=null?as(ps(t)):{},ds(e||!t||!t.__esModule?Nr(r,"default",{value:t,enumerable:!0}):r,t));var he=(t,e,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(u){o(u)}},s=l=>{try{a(r.throw(l))}catch(u){o(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(t,e)).next())});var Oo=se(j=>{"use strict";var ee=typeof Symbol=="function"&&Symbol.for,an=ee?Symbol.for("react.element"):60103,ln=ee?Symbol.for("react.portal"):60106,Bt=ee?Symbol.for("react.fragment"):60107,It=ee?Symbol.for("react.strict_mode"):60108,Mt=ee?Symbol.for("react.profiler"):60114,Lt=ee?Symbol.for("react.provider"):60109,jt=ee?Symbol.for("react.context"):60110,un=ee?Symbol.for("react.async_mode"):60111,Nt=ee?Symbol.for("react.concurrent_mode"):60111,zt=ee?Symbol.for("react.forward_ref"):60112,Vt=ee?Symbol.for("react.suspense"):60113,el=ee?Symbol.for("react.suspense_list"):60120,Ut=ee?Symbol.for("react.memo"):60115,qt=ee?Symbol.for("react.lazy"):60116,tl=ee?Symbol.for("react.block"):60121,rl=ee?Symbol.for("react.fundamental"):60117,nl=ee?Symbol.for("react.responder"):60118,ol=ee?Symbol.for("react.scope"):60119;function pe(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case an:switch(t=t.type,t){case un:case Nt:case Bt:case Mt:case It:case Vt:return t;default:switch(t=t&&t.$$typeof,t){case jt:case zt:case qt:case Ut:case Lt:return t;default:return e}}case ln:return e}}}function _o(t){return pe(t)===Nt}j.AsyncMode=un;j.ConcurrentMode=Nt;j.ContextConsumer=jt;j.ContextProvider=Lt;j.Element=an;j.ForwardRef=zt;j.Fragment=Bt;j.Lazy=qt;j.Memo=Ut;j.Portal=ln;j.Profiler=Mt;j.StrictMode=It;j.Suspense=Vt;j.isAsyncMode=function(t){return _o(t)||pe(t)===un};j.isConcurrentMode=_o;j.isContextConsumer=function(t){return pe(t)===jt};j.isContextProvider=function(t){return pe(t)===Lt};j.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===an};j.isForwardRef=function(t){return pe(t)===zt};j.isFragment=function(t){return pe(t)===Bt};j.isLazy=function(t){return pe(t)===qt};j.isMemo=function(t){return pe(t)===Ut};j.isPortal=function(t){return pe(t)===ln};j.isProfiler=function(t){return pe(t)===Mt};j.isStrictMode=function(t){return pe(t)===It};j.isSuspense=function(t){return pe(t)===Vt};j.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Bt||t===Nt||t===Mt||t===It||t===Vt||t===el||typeof t=="object"&&t!==null&&(t.$$typeof===qt||t.$$typeof===Ut||t.$$typeof===Lt||t.$$typeof===jt||t.$$typeof===zt||t.$$typeof===rl||t.$$typeof===nl||t.$$typeof===ol||t.$$typeof===tl)};j.typeOf=pe});var Fo=se(N=>{"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,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,E=t?Symbol.for("react.block"):60121,I=t?Symbol.for("react.fundamental"):60117,A=t?Symbol.for("react.responder"):60118,Y=t?Symbol.for("react.scope"):60119;function re(g){return typeof g=="string"||typeof g=="function"||g===n||g===u||g===i||g===o||g===c||g===p||typeof g=="object"&&g!==null&&(g.$$typeof===y||g.$$typeof===m||g.$$typeof===s||g.$$typeof===a||g.$$typeof===d||g.$$typeof===I||g.$$typeof===A||g.$$typeof===Y||g.$$typeof===E)}function S(g){if(typeof g=="object"&&g!==null){var ft=g.$$typeof;switch(ft){case e:var x=g.type;switch(x){case l:case u:case n:case i:case o:case c:return x;default:var Ke=x&&x.$$typeof;switch(Ke){case a:case d:case y:case m:case s:return Ke;default:return ft}}case r:return ft}}}var M=l,J=u,X=a,Te=s,K=e,T=d,P=n,_=y,f=m,h=r,b=i,v=o,C=c,k=!1;function O(g){return k||(k=!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.")),F(g)||S(g)===l}function F(g){return S(g)===u}function $(g){return S(g)===a}function L(g){return S(g)===s}function R(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function ie(g){return S(g)===d}function Q(g){return S(g)===n}function Ee(g){return S(g)===y}function Br(g){return S(g)===m}function Ir(g){return S(g)===r}function Mr(g){return S(g)===i}function Lr(g){return S(g)===o}function jr(g){return S(g)===c}N.AsyncMode=M,N.ConcurrentMode=J,N.ContextConsumer=X,N.ContextProvider=Te,N.Element=K,N.ForwardRef=T,N.Fragment=P,N.Lazy=_,N.Memo=f,N.Portal=h,N.Profiler=b,N.StrictMode=v,N.Suspense=C,N.isAsyncMode=O,N.isConcurrentMode=F,N.isContextConsumer=$,N.isContextProvider=L,N.isElement=R,N.isForwardRef=ie,N.isFragment=Q,N.isLazy=Ee,N.isMemo=Br,N.isPortal=Ir,N.isProfiler=Mr,N.isStrictMode=Lr,N.isSuspense=jr,N.isValidElementType=re,N.typeOf=S}()});var fn=se((Yd,cn)=>{"use strict";process.env.NODE_ENV==="production"?cn.exports=Oo():cn.exports=Fo()});var $o=se((Kd,Ao)=>{"use strict";var ko=Object.getOwnPropertySymbols,il=Object.prototype.hasOwnProperty,sl=Object.prototype.propertyIsEnumerable;function al(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function ll(){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}}Ao.exports=ll()?Object.assign:function(t,e){for(var r,n=al(t),o,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var s in r)il.call(r,s)&&(n[s]=r[s]);if(ko){o=ko(r);for(var a=0;a<o.length;a++)sl.call(r,o[a])&&(n[o[a]]=r[o[a]])}}return n}});var Wt=se((Gd,Ro)=>{"use strict";var ul="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ro.exports=ul});var pn=se((Hd,Do)=>{Do.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var jo=se((Zd,Lo)=>{"use strict";var dn=function(){};process.env.NODE_ENV!=="production"&&(Bo=Wt(),Yt={},Io=pn(),dn=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var Bo,Yt,Io;function Mo(t,e,r,n,o){if(process.env.NODE_ENV!=="production"){for(var i in t)if(Io(t,i)){var s;try{if(typeof t[i]!="function"){var a=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 a.name="Invariant Violation",a}s=t[i](e,i,n,r,null,Bo)}catch(u){s=u}if(s&&!(s instanceof Error)&&dn((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 Yt)){Yt[s.message]=!0;var l=o?o():"";dn("Failed "+r+" type: "+s.message+(l!=null?l:""))}}}}Mo.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Yt={})};Lo.exports=Mo});var Vo=se((Xd,zo)=>{"use strict";var cl=fn(),fl=$o(),Qe=Wt(),mn=pn(),No=jo(),et=function(){};process.env.NODE_ENV!=="production"&&(et=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function Kt(){return null}zo.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function o(f){var h=f&&(r&&f[r]||f[n]);if(typeof h=="function")return h}var i="<<anonymous>>",s={array:d("array"),bigint:d("bigint"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:c(),arrayOf:p,element:m(),elementType:y(),instanceOf:E,node:re(),objectOf:A,oneOf:I,oneOfType:Y,shape:M,exact:J};function a(f,h){return f===h?f!==0||1/f===1/h:f!==f&&h!==h}function l(f,h){this.message=f,this.data=h&&typeof h=="object"?h:{},this.stack=""}l.prototype=Error.prototype;function u(f){if(process.env.NODE_ENV!=="production")var h={},b=0;function v(k,O,F,$,L,R,ie){if($=$||i,R=R||F,ie!==Qe){if(e){var Q=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 Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Ee=$+":"+F;!h[Ee]&&b<3&&(et("You are manually calling a React.PropTypes validation function for the `"+R+"` prop on `"+$+"`. 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[Ee]=!0,b++)}}return O[F]==null?k?O[F]===null?new l("The "+L+" `"+R+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new l("The "+L+" `"+R+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:f(O,F,$,L,R)}var C=v.bind(null,!1);return C.isRequired=v.bind(null,!0),C}function d(f){function h(b,v,C,k,O,F){var $=b[v],L=K($);if(L!==f){var R=T($);return new l("Invalid "+k+" `"+O+"` of type "+("`"+R+"` supplied to `"+C+"`, expected ")+("`"+f+"`."),{expectedType:f})}return null}return u(h)}function c(){return u(Kt)}function p(f){function h(b,v,C,k,O){if(typeof f!="function")return new l("Property `"+O+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var F=b[v];if(!Array.isArray(F)){var $=K(F);return new l("Invalid "+k+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an array."))}for(var L=0;L<F.length;L++){var R=f(F,L,C,k,O+"["+L+"]",Qe);if(R instanceof Error)return R}return null}return u(h)}function m(){function f(h,b,v,C,k){var O=h[b];if(!t(O)){var F=K(O);return new l("Invalid "+C+" `"+k+"` of type "+("`"+F+"` supplied to `"+v+"`, expected a single ReactElement."))}return null}return u(f)}function y(){function f(h,b,v,C,k){var O=h[b];if(!cl.isValidElementType(O)){var F=K(O);return new l("Invalid "+C+" `"+k+"` of type "+("`"+F+"` supplied to `"+v+"`, expected a single ReactElement type."))}return null}return u(f)}function E(f){function h(b,v,C,k,O){if(!(b[v]instanceof f)){var F=f.name||i,$=_(b[v]);return new l("Invalid "+k+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected ")+("instance of `"+F+"`."))}return null}return u(h)}function I(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&(arguments.length>1?et("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])."):et("Invalid argument supplied to oneOf, expected an array.")),Kt;function h(b,v,C,k,O){for(var F=b[v],$=0;$<f.length;$++)if(a(F,f[$]))return null;var L=JSON.stringify(f,function(ie,Q){var Ee=T(Q);return Ee==="symbol"?String(Q):Q});return new l("Invalid "+k+" `"+O+"` of value `"+String(F)+"` "+("supplied to `"+C+"`, expected one of "+L+"."))}return u(h)}function A(f){function h(b,v,C,k,O){if(typeof f!="function")return new l("Property `"+O+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+k+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an object."));for(var L in F)if(mn(F,L)){var R=f(F,L,C,k,O+"."+L,Qe);if(R instanceof Error)return R}return null}return u(h)}function Y(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&et("Invalid argument supplied to oneOfType, expected an instance of array."),Kt;for(var h=0;h<f.length;h++){var b=f[h];if(typeof b!="function")return et("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(b)+" at index "+h+"."),Kt}function v(C,k,O,F,$){for(var L=[],R=0;R<f.length;R++){var ie=f[R],Q=ie(C,k,O,F,$,Qe);if(Q==null)return null;Q.data&&mn(Q.data,"expectedType")&&L.push(Q.data.expectedType)}var Ee=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new l("Invalid "+F+" `"+$+"` supplied to "+("`"+O+"`"+Ee+"."))}return u(v)}function re(){function f(h,b,v,C,k){return X(h[b])?null:new l("Invalid "+C+" `"+k+"` supplied to "+("`"+v+"`, expected a ReactNode."))}return u(f)}function S(f,h,b,v,C){return new l((f||"React class")+": "+h+" type `"+b+"."+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function M(f){function h(b,v,C,k,O){var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+k+" `"+O+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));for(var L in f){var R=f[L];if(typeof R!="function")return S(C,k,O,L,T(R));var ie=R(F,L,C,k,O+"."+L,Qe);if(ie)return ie}return null}return u(h)}function J(f){function h(b,v,C,k,O){var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+k+" `"+O+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));var L=fl({},b[v],f);for(var R in L){var ie=f[R];if(mn(f,R)&&typeof ie!="function")return S(C,k,O,R,T(ie));if(!ie)return new l("Invalid "+k+" `"+O+"` key `"+R+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(b[v],null," ")+`
|
|
2
|
-
Valid keys: `+JSON.stringify(Object.keys(f),null," "));var Q=ie(F,R,C,k,O+"."+R,Qe);if(Q)return Q}return null}return u(h)}function X(f){switch(typeof f){case"number":case"string":case"undefined":return!0;case"boolean":return!f;case"object":if(Array.isArray(f))return f.every(X);if(f===null||t(f))return!0;var h=o(f);if(h){var b=h.call(f),v;if(h!==f.entries){for(;!(v=b.next()).done;)if(!X(v.value))return!1}else for(;!(v=b.next()).done;){var C=v.value;if(C&&!X(C[1]))return!1}}else return!1;return!0;default:return!1}}function Te(f,h){return f==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function K(f){var h=typeof f;return Array.isArray(f)?"array":f instanceof RegExp?"object":Te(h,f)?"symbol":h}function T(f){if(typeof f=="undefined"||f===null)return""+f;var h=K(f);if(h==="object"){if(f instanceof Date)return"date";if(f instanceof RegExp)return"regexp"}return h}function P(f){var h=T(f);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function _(f){return!f.constructor||!f.constructor.name?i:f.constructor.name}return s.checkPropTypes=No,s.resetWarningCache=No.resetWarningCache,s.PropTypes=s,s}});var Yo=se((Jd,Wo)=>{"use strict";var pl=Wt();function Uo(){}function qo(){}qo.resetWarningCache=Uo;Wo.exports=function(){function t(n,o,i,s,a,l){if(l!==pl){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:qo,resetWarningCache:Uo};return r.PropTypes=r,r}});var Gt=se((Qd,hn)=>{process.env.NODE_ENV!=="production"?(Ko=fn(),Go=!0,hn.exports=Vo()(Ko.isElement,Go)):hn.exports=Yo()();var Ko,Go});var Zo=se(z=>{"use strict";var gn=Symbol.for("react.element"),xn=Symbol.for("react.portal"),Ht=Symbol.for("react.fragment"),Zt=Symbol.for("react.strict_mode"),Xt=Symbol.for("react.profiler"),Jt=Symbol.for("react.provider"),Qt=Symbol.for("react.context"),dl=Symbol.for("react.server_context"),er=Symbol.for("react.forward_ref"),tr=Symbol.for("react.suspense"),rr=Symbol.for("react.suspense_list"),nr=Symbol.for("react.memo"),or=Symbol.for("react.lazy"),ml=Symbol.for("react.offscreen"),Ho;Ho=Symbol.for("react.module.reference");function ge(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case gn:switch(t=t.type,t){case Ht:case Xt:case Zt:case tr:case rr:return t;default:switch(t=t&&t.$$typeof,t){case dl:case Qt:case er:case or:case nr:case Jt:return t;default:return e}}case xn:return e}}}z.ContextConsumer=Qt;z.ContextProvider=Jt;z.Element=gn;z.ForwardRef=er;z.Fragment=Ht;z.Lazy=or;z.Memo=nr;z.Portal=xn;z.Profiler=Xt;z.StrictMode=Zt;z.Suspense=tr;z.SuspenseList=rr;z.isAsyncMode=function(){return!1};z.isConcurrentMode=function(){return!1};z.isContextConsumer=function(t){return ge(t)===Qt};z.isContextProvider=function(t){return ge(t)===Jt};z.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===gn};z.isForwardRef=function(t){return ge(t)===er};z.isFragment=function(t){return ge(t)===Ht};z.isLazy=function(t){return ge(t)===or};z.isMemo=function(t){return ge(t)===nr};z.isPortal=function(t){return ge(t)===xn};z.isProfiler=function(t){return ge(t)===Xt};z.isStrictMode=function(t){return ge(t)===Zt};z.isSuspense=function(t){return ge(t)===tr};z.isSuspenseList=function(t){return ge(t)===rr};z.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ht||t===Xt||t===Zt||t===tr||t===rr||t===ml||typeof t=="object"&&t!==null&&(t.$$typeof===or||t.$$typeof===nr||t.$$typeof===Jt||t.$$typeof===Qt||t.$$typeof===er||t.$$typeof===Ho||t.getModuleId!==void 0)};z.typeOf=ge});var Xo=se(V=>{"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"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=!1,E=!1,I=!1,A=!1,Y=!1,re;re=Symbol.for("react.module.reference");function S(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===o||Y||x===n||x===u||x===d||A||x===m||y||E||I||typeof x=="object"&&x!==null&&(x.$$typeof===p||x.$$typeof===c||x.$$typeof===i||x.$$typeof===s||x.$$typeof===l||x.$$typeof===re||x.getModuleId!==void 0))}function M(x){if(typeof x=="object"&&x!==null){var Ke=x.$$typeof;switch(Ke){case t:var wt=x.type;switch(wt){case r:case o:case n:case u:case d:return wt;default:var Qn=wt&&wt.$$typeof;switch(Qn){case a:case s:case l:case p:case c:case i:return Qn;default:return Ke}}case e:return Ke}}}var J=s,X=i,Te=t,K=l,T=r,P=p,_=c,f=e,h=o,b=n,v=u,C=d,k=!1,O=!1;function F(x){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(x){return O||(O=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(x){return M(x)===s}function R(x){return M(x)===i}function ie(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Q(x){return M(x)===l}function Ee(x){return M(x)===r}function Br(x){return M(x)===p}function Ir(x){return M(x)===c}function Mr(x){return M(x)===e}function Lr(x){return M(x)===o}function jr(x){return M(x)===n}function g(x){return M(x)===u}function ft(x){return M(x)===d}V.ContextConsumer=J,V.ContextProvider=X,V.Element=Te,V.ForwardRef=K,V.Fragment=T,V.Lazy=P,V.Memo=_,V.Portal=f,V.Profiler=h,V.StrictMode=b,V.Suspense=v,V.SuspenseList=C,V.isAsyncMode=F,V.isConcurrentMode=$,V.isContextConsumer=L,V.isContextProvider=R,V.isElement=ie,V.isForwardRef=Q,V.isFragment=Ee,V.isLazy=Br,V.isMemo=Ir,V.isPortal=Mr,V.isProfiler=Lr,V.isStrictMode=jr,V.isSuspense=g,V.isSuspenseList=ft,V.isValidElementType=S,V.typeOf=M}()});var Jo=se((nm,bn)=>{"use strict";process.env.NODE_ENV==="production"?bn.exports=Zo():bn.exports=Xo()});var Ii=se((Gg,Bi)=>{"use strict";function We(t){this._maxSize=t,this.clear()}We.prototype.clear=function(){this._size=0,this._values=Object.create(null)};We.prototype.get=function(t){return this._values[t]};We.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var pc=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Di=/^\d+$/,dc=/^\d/,mc=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hc=/^\s*(['"]?)(.*?)(\1)\s*$/,Nn=512,Ai=new We(Nn),$i=new We(Nn),Ri=new We(Nn);Bi.exports={Cache:We,split:jn,normalizePath:Ln,setter:function(t){var e=Ln(t);return $i.get(t)||$i.set(t,function(n,o){for(var i=0,s=e.length,a=n;i<s-1;){var l=e[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return n;a=a[e[i++]]}a[e[i]]=o})},getter:function(t,e){var r=Ln(t);return Ri.get(t)||Ri.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+(zn(r)||Di.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){yc(Array.isArray(t)?t:jn(t),e,r)}};function Ln(t){return Ai.get(t)||Ai.set(t,jn(t).map(function(e){return e.replace(hc,"$2")}))}function jn(t){return t.match(pc)||[""]}function yc(t,e,r){var n=t.length,o,i,s,a;for(i=0;i<n;i++)o=t[i],o&&(bc(o)&&(o='"'+o+'"'),a=zn(o),s=!a&&/^\d+$/.test(o),e.call(r,o,a,s,i,t))}function zn(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function gc(t){return t.match(dc)&&!t.match(Di)}function xc(t){return mc.test(t)}function bc(t){return!zn(t)&&(gc(t)||xc(t))}});var ji=se((Hg,Li)=>{var vc=/[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,Tr=t=>t.match(vc)||[],Cr=t=>t[0].toUpperCase()+t.slice(1),Vn=(t,e)=>Tr(t).join(e).toLowerCase(),Mi=t=>Tr(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Tc=t=>Cr(Mi(t)),Cc=t=>Vn(t,"_"),Sc=t=>Vn(t,"-"),Pc=t=>Cr(Vn(t," ")),Ec=t=>Tr(t).map(Cr).join(" ");Li.exports={words:Tr,upperFirst:Cr,camelCase:Mi,pascalCase:Tc,snakeCase:Cc,kebabCase:Sc,sentenceCase:Pc,titleCase:Ec}});var zi=se((Zg,Un)=>{Un.exports=function(t){return Ni(wc(t),t)};Un.exports.array=Ni;function Ni(t,e){var r=t.length,n=new Array(r),o={},i=r,s=_c(e),a=Oc(t);for(e.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(t[i],i,new Set);return n;function l(u,d,c){if(c.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch(E){p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[d]){o[d]=!0;var m=s.get(u)||new Set;if(m=Array.from(m),d=m.length){c.add(u);do{var y=m[--d];l(y,a.get(y),c)}while(d);c.delete(u)}n[--r]=u}}}function wc(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 _c(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 Oc(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 ys=t=>{let o=t,{isLoading:e,children:r}=o,n=ne(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,Z(w({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ce= exports.Button =ys;function Ge(t){return _jsxruntime.jsx.call(void 0, _material.Stack,w({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function no(t){let n=t,{label:e}=n,r=ne(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,w({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var Ur="#59C3E0",Ps={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:Ur,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:Ur},"& .MuiTypography-root":{color:Ur}},":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:{}}}}},Es=_styles.createTheme.call(void 0, Ps),ws=_styles.responsiveFontSizes.call(void 0, Es),U= exports.theme =ws;var Os={"primary-light":U.palette.primary.light,primary:U.palette.primary.main,"primary-dark":U.palette.primary.dark,"text-secondary":U.palette.text.secondary,"text-primary":U.palette.text.primary,"background-paper":U.palette.background.paper,background:U.palette.background.default,"error-light":U.palette.error.light,error:U.palette.error.main,"erro-drark":U.palette.error.dark,"warning-light":U.palette.warning.light,warning:U.palette.warning.main,"warning-dark":U.palette.warning.dark,"success-light":U.palette.success.light,success:U.palette.success.main,"success-dark":U.palette.success.dark,"grey-100":U.palette.grey[100],"grey-200":U.palette.grey[200],"grey-300":U.palette.grey[300],"grey-400":U.palette.grey[400],"grey-500":U.palette.grey[500],"grey-600":U.palette.grey[600],"grey-700":U.palette.grey[700],"grey-800":U.palette.grey[800]};function io(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(Os).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:U.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 ci = _interopRequireWildcard(_react); var ot = _interopRequireWildcard(_react);function ao(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var qr=null;function Wr(t){let s=t,{value:e,onChange:r}=s,n=ne(s,["value","onChange"]);qr=null;let o=_react.useCallback.call(void 0, a=>{let l=a.target.value||"0.00";_hooks.isValidNumber.call(void 0, l)&&(qr==="Backspace"?l=(ao(l)/10).toFixed(2):l=(ao(l)*10).toFixed(2),r&&(a.target.value=l,r(a,l)))},[]),i=_react.useCallback.call(void 0, a=>{a.target.selectionStart===a.target.selectionEnd&&(a.target.selectionStart=a.target.value.length,a.target.selectionEnd=a.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,w({onKeyDown:a=>{qr=a.key},onSelect:a=>{i(a)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}Wr.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var lo={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 Ie(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Ge,{children:[o&&_jsxruntime.jsx.call(void 0, ce,{onClick:()=>{o()},color:lo[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ce,{onClick:()=>{i&&i()},color:lo[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var Bs={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};Ie.defaultProps=Bs;function Fe(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s}=t,a=_material.useTheme.call(void 0, ),l=n==="none"?null:n||_jsxruntime.jsx.call(void 0, Ie,{onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s}),u=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),d=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,Z(w({},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:c=>{if(s!=="content")return c.palette[d||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[u&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:u}),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:c=>c.palette.grey[500],fontFamily:c=>c.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:l})]}))}Fe.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function Kr(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, Ie,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Gr(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:a}=t;return _jsxruntime.jsx.call(void 0, Fe,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, Kr,{type:n,onDelete:a||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Js={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};Gr.defaultProps=Js;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var sa=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,a=_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:l=>{i(l.target.value)},children:s.map(l=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:l,children:l},l))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:a,showFirstButton:!0,showLastButton:!0,onChange:(l,u)=>{o(u)},page:n,color:"primary"})]})})})},mo=sa;var pa={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"}},Ft={filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:pa,serverSide:!0,fixedHeader:!1,rowsPerPageOptions:[15,50,100],rowsPerPage:15},da=t=>{let y=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:a,pagination:l,changePage:u,changePageSize:d,changeSort:c}=y,p=ne(y,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),m=a||{};return m&&(u&&(m.onChangePage=u),d&&(m.onChangeRowsPerPage=d),c&&(m.onColumnSortChange=c),m.customFooter=(E,I,A,Y,re,S)=>!l||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, mo,{count:l.totalRecords,page:l.page,rowsPerPage:l.pageSize,rowsPerPageOptions:(m==null?void 0:m.rowsPerPageOptions)||(Ft==null?void 0:Ft.rowsPerPageOptions),changeRowsPerPage:m==null?void 0:m.onChangeRowsPerPage,changePage:m==null?void 0:m.onChangePage,textLabels:S})),_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,w({title:r,data:i,columns:s,options:w(w({},Ft),m)},p))]})},ma= exports.DataTable =da;var Ca=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=ne(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,Z(w({},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"}})),Sa={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},Pa=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:Sa[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},go=t=>{let i=t,{type:e,children:r,title:n}=i,o=ne(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, Ca,Z(w({arrow:!0,title:_jsxruntime.jsx.call(void 0, Pa,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};go.defaultProps={type:"info"};var Ze=go;var Hp=()=>({style:{width:"80px",textAlign:"center"}}),Zp= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function Zr(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:a,disabled:l,disabledUpdateButton:u,disabledDeleteButton:d,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:p,icon:m,iconButtonProps:y,tooltip:E,visible:I,disabled:A})=>I===null||!!I&&_jsxruntime.jsxs.call(void 0, _material.IconButton,Z(w({onClick:()=>e(p,r),size:"small",disabled:A},y),{children:[E&&_jsxruntime.jsx.call(void 0, Ze,{type:E.type,title:E.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:m})}),!E&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:m})]}),p)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:l||c,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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:l||u,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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:l||d,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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"})})]})]})}Zr.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function $t(t){let{renderLabel:e}=t,{deleteFilterValue:r,deleteAllFilterValues:n}=_providers.useFilterApi.call(void 0, ),{filterValues:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),s=_react.useMemo.call(void 0, ()=>{if(Object.keys(i||{}).length>0){let u=!1,d=Object.keys(i||{});for(let c=0;c<d.length;c++){let p=i[d[c]];if(Array.isArray(p)&&p.length>0){u=!0;break}else if(!Array.isArray(p)&&p){u=!0;break}}return u}return!1},[i]),a=_react.useCallback.call(void 0, l=>e?e(o[l].label,i[l]):`${o[l].label} - ${i&&i[l]}`,[e,o,i]);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",alignItems:"center",gap:1},children:s&&Object.keys(i||{}).map(l=>{if(Array.isArray(i[l])&&i[l].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(l),onDelete:()=>{r&&r(l)},variant:"outlined"},l);if(!Array.isArray(i[l])&&i[l])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(l),onDelete:()=>{r&&r(l)},variant:"outlined"},l)})}),s&&_jsxruntime.jsx.call(void 0, _material.Box,{children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{n&&n()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{fontSize:"small",color:"error"})})})]})}function Rt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=ne(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,Z(w({PaperProps:{style:{borderRadius:"12px 0 0 12px"}}},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:a=>a.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:a=>`solid 1px ${a.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:a=>a.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:a=>a.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:a=>a.spacing(1),pb:a=>a.spacing(1),pl:a=>a.spacing(2),pr:a=>a.spacing(2),borderTop:a=>`solid 1px ${a.palette.grey[300]}`},children:r})]})}))}Rt.defaultProps={anchor:"right"};var za=()=>{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:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Button,{onClick:n,color:"error",children:"Cancelar"}),_jsxruntime.jsx.call(void 0, _material.Button,{onClick:i,children:"Resetar Filtros"}),_jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:o,children:"Aplicar Filtros"})]})},Va=t=>{let{title:e,children:r,onApplyFilters:n}=t,{isOpen:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),{closeFilter:s}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(i)},[i]),_jsxruntime.jsx.call(void 0, Rt,{drawerTitle:e,open:o,children:r,onClose:()=>s(),actions:_jsxruntime.jsx.call(void 0, za,{})})};function rn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:a}=t,{openFilter:l}=_providers.useFilterApi.call(void 0, ),u=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,Z(w({variant:"contained",onClick:()=>{l()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_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, $t,{renderLabel:a}),u]}),_jsxruntime.jsx.call(void 0, Va,{onApplyFilters:s,title:o||"",children:i})]})}rn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Po(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function nn(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, Ie,{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:a,confirmButtonLabel:l}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:d,openForm:c}=_providers.useFormApi.call(void 0, ),p=n||_jsxruntime.jsx.call(void 0, nn,{hideCancelButton:e==="plain",confirmButtonLabel:l,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),m=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ce,{variant:"contained",onClick:()=>{c()},children:a||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[m,_jsxruntime.jsx.call(void 0, Fe,Z(w({},s),{onClose:()=>{d()},open:!!u,children:r,actions:p}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[r,p]})}var Ja={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};sn.defaultProps=Ja;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function B(){return B=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},B.apply(this,arguments)}function ye(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function wo(t){if(!ye(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=wo(t[r])}),e}function ue(t,e,r={clone:!0}){let n=r.clone?B({},t):t;return ye(t)&&ye(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(ye(e[o])&&o in t&&ye(t[o])?n[o]=ue(t[o],e[o],r):r.clone?n[o]=ye(e[o])?wo(e[o]):e[o]:n[o]=e[o])}),n}function yn(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 ir=Ne(Jo()),hl=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function yl(t){let e=`${t}`.match(hl);return e&&e[1]||""}function ei(t,e=""){return t.displayName||t.name||yl(t)||e}function Qo(t,e,r){let n=ei(e);return t.displayName||(n!==""?`${r}(${n})`:r)}function sr(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return ei(t,"Component");if(typeof t=="object")switch(t.$$typeof){case ir.ForwardRef:return Qo(t,t.render,"ForwardRef");case ir.Memo:return Qo(t,t.type,"memo");default:return}}}function de(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":yn(7));return t.charAt(0).toUpperCase()+t.slice(1)}function mt(t,e){let r=B({},e);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=B({},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]=B({},i),Object.keys(o).forEach(s=>{r[n][s]=mt(o[s],i[s])}))}else r[n]===void 0&&(r[n]=t[n])}),r}function ht(t,e,r=void 0){let n={};return Object.keys(t).forEach(o=>{n[o]=t[o].reduce((i,s)=>{if(s){let a=e(s);a!==""&&i.push(a),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}var ti=t=>t,gl=()=>{let t=ti;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ti}}},xl=gl(),vn=xl;var bl={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 yt(t,e,r="Mui"){let n=bl[e];return n?`${r}-${n}`:`${vn.generate(t)}-${e}`}var _react2 = require('@emotion/react');function Tn(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(`
|
|
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 as=Object.create;var Nr=Object.defineProperty,ls=Object.defineProperties,us=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertyNames,_t=Object.getOwnPropertySymbols,ps=Object.getPrototypeOf,zr=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable;var eo=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))zr.call(e,r)&&eo(t,r,e[r]);if(_t)for(var r of _t(e))to.call(e,r)&&eo(t,r,e[r]);return t},Z=(t,e)=>ls(t,cs(e));var ne=(t,e)=>{var r={};for(var n in t)zr.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&_t)for(var n of _t(t))e.indexOf(n)<0&&to.call(t,n)&&(r[n]=t[n]);return r};var se=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ds=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fs(e))!zr.call(t,o)&&o!==r&&Nr(t,o,{get:()=>e[o],enumerable:!(n=us(e,o))||n.enumerable});return t};var Ne=(t,e,r)=>(r=t!=null?as(ps(t)):{},ds(e||!t||!t.__esModule?Nr(r,"default",{value:t,enumerable:!0}):r,t));var he=(t,e,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(u){o(u)}},s=l=>{try{a(r.throw(l))}catch(u){o(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(t,e)).next())});var Oo=se(j=>{"use strict";var ee=typeof Symbol=="function"&&Symbol.for,an=ee?Symbol.for("react.element"):60103,ln=ee?Symbol.for("react.portal"):60106,Bt=ee?Symbol.for("react.fragment"):60107,It=ee?Symbol.for("react.strict_mode"):60108,Mt=ee?Symbol.for("react.profiler"):60114,Lt=ee?Symbol.for("react.provider"):60109,jt=ee?Symbol.for("react.context"):60110,un=ee?Symbol.for("react.async_mode"):60111,Nt=ee?Symbol.for("react.concurrent_mode"):60111,zt=ee?Symbol.for("react.forward_ref"):60112,Vt=ee?Symbol.for("react.suspense"):60113,el=ee?Symbol.for("react.suspense_list"):60120,Ut=ee?Symbol.for("react.memo"):60115,qt=ee?Symbol.for("react.lazy"):60116,tl=ee?Symbol.for("react.block"):60121,rl=ee?Symbol.for("react.fundamental"):60117,nl=ee?Symbol.for("react.responder"):60118,ol=ee?Symbol.for("react.scope"):60119;function pe(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case an:switch(t=t.type,t){case un:case Nt:case Bt:case Mt:case It:case Vt:return t;default:switch(t=t&&t.$$typeof,t){case jt:case zt:case qt:case Ut:case Lt:return t;default:return e}}case ln:return e}}}function _o(t){return pe(t)===Nt}j.AsyncMode=un;j.ConcurrentMode=Nt;j.ContextConsumer=jt;j.ContextProvider=Lt;j.Element=an;j.ForwardRef=zt;j.Fragment=Bt;j.Lazy=qt;j.Memo=Ut;j.Portal=ln;j.Profiler=Mt;j.StrictMode=It;j.Suspense=Vt;j.isAsyncMode=function(t){return _o(t)||pe(t)===un};j.isConcurrentMode=_o;j.isContextConsumer=function(t){return pe(t)===jt};j.isContextProvider=function(t){return pe(t)===Lt};j.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===an};j.isForwardRef=function(t){return pe(t)===zt};j.isFragment=function(t){return pe(t)===Bt};j.isLazy=function(t){return pe(t)===qt};j.isMemo=function(t){return pe(t)===Ut};j.isPortal=function(t){return pe(t)===ln};j.isProfiler=function(t){return pe(t)===Mt};j.isStrictMode=function(t){return pe(t)===It};j.isSuspense=function(t){return pe(t)===Vt};j.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Bt||t===Nt||t===Mt||t===It||t===Vt||t===el||typeof t=="object"&&t!==null&&(t.$$typeof===qt||t.$$typeof===Ut||t.$$typeof===Lt||t.$$typeof===jt||t.$$typeof===zt||t.$$typeof===rl||t.$$typeof===nl||t.$$typeof===ol||t.$$typeof===tl)};j.typeOf=pe});var Fo=se(N=>{"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,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,P=t?Symbol.for("react.block"):60121,L=t?Symbol.for("react.fundamental"):60117,q=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function re(g){return typeof g=="string"||typeof g=="function"||g===n||g===u||g===i||g===o||g===c||g===p||typeof g=="object"&&g!==null&&(g.$$typeof===y||g.$$typeof===m||g.$$typeof===s||g.$$typeof===a||g.$$typeof===d||g.$$typeof===L||g.$$typeof===q||g.$$typeof===k||g.$$typeof===P)}function S(g){if(typeof g=="object"&&g!==null){var ft=g.$$typeof;switch(ft){case e:var x=g.type;switch(x){case l:case u:case n:case i:case o:case c:return x;default:var Ke=x&&x.$$typeof;switch(Ke){case a:case d:case y:case m:case s:return Ke;default:return ft}}case r:return ft}}}var I=l,J=u,X=a,Te=s,K=e,T=d,E=n,_=y,f=m,h=r,b=i,v=o,C=c,A=!1;function O(g){return A||(A=!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.")),F(g)||S(g)===l}function F(g){return S(g)===u}function $(g){return S(g)===a}function M(g){return S(g)===s}function R(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function ie(g){return S(g)===d}function Q(g){return S(g)===n}function Ee(g){return S(g)===y}function Br(g){return S(g)===m}function Ir(g){return S(g)===r}function Mr(g){return S(g)===i}function Lr(g){return S(g)===o}function jr(g){return S(g)===c}N.AsyncMode=I,N.ConcurrentMode=J,N.ContextConsumer=X,N.ContextProvider=Te,N.Element=K,N.ForwardRef=T,N.Fragment=E,N.Lazy=_,N.Memo=f,N.Portal=h,N.Profiler=b,N.StrictMode=v,N.Suspense=C,N.isAsyncMode=O,N.isConcurrentMode=F,N.isContextConsumer=$,N.isContextProvider=M,N.isElement=R,N.isForwardRef=ie,N.isFragment=Q,N.isLazy=Ee,N.isMemo=Br,N.isPortal=Ir,N.isProfiler=Mr,N.isStrictMode=Lr,N.isSuspense=jr,N.isValidElementType=re,N.typeOf=S}()});var fn=se((Yd,cn)=>{"use strict";process.env.NODE_ENV==="production"?cn.exports=Oo():cn.exports=Fo()});var $o=se((Kd,Ao)=>{"use strict";var ko=Object.getOwnPropertySymbols,il=Object.prototype.hasOwnProperty,sl=Object.prototype.propertyIsEnumerable;function al(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function ll(){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}}Ao.exports=ll()?Object.assign:function(t,e){for(var r,n=al(t),o,i=1;i<arguments.length;i++){r=Object(arguments[i]);for(var s in r)il.call(r,s)&&(n[s]=r[s]);if(ko){o=ko(r);for(var a=0;a<o.length;a++)sl.call(r,o[a])&&(n[o[a]]=r[o[a]])}}return n}});var Wt=se((Gd,Ro)=>{"use strict";var ul="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ro.exports=ul});var pn=se((Hd,Do)=>{Do.exports=Function.call.bind(Object.prototype.hasOwnProperty)});var jo=se((Zd,Lo)=>{"use strict";var dn=function(){};process.env.NODE_ENV!=="production"&&(Bo=Wt(),Yt={},Io=pn(),dn=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});var Bo,Yt,Io;function Mo(t,e,r,n,o){if(process.env.NODE_ENV!=="production"){for(var i in t)if(Io(t,i)){var s;try{if(typeof t[i]!="function"){var a=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 a.name="Invariant Violation",a}s=t[i](e,i,n,r,null,Bo)}catch(u){s=u}if(s&&!(s instanceof Error)&&dn((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 Yt)){Yt[s.message]=!0;var l=o?o():"";dn("Failed "+r+" type: "+s.message+(l!=null?l:""))}}}}Mo.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Yt={})};Lo.exports=Mo});var Vo=se((Xd,zo)=>{"use strict";var cl=fn(),fl=$o(),Qe=Wt(),mn=pn(),No=jo(),et=function(){};process.env.NODE_ENV!=="production"&&(et=function(t){var e="Warning: "+t;typeof console!="undefined"&&console.error(e);try{throw new Error(e)}catch(r){}});function Kt(){return null}zo.exports=function(t,e){var r=typeof Symbol=="function"&&Symbol.iterator,n="@@iterator";function o(f){var h=f&&(r&&f[r]||f[n]);if(typeof h=="function")return h}var i="<<anonymous>>",s={array:d("array"),bigint:d("bigint"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:c(),arrayOf:p,element:m(),elementType:y(),instanceOf:P,node:re(),objectOf:q,oneOf:L,oneOfType:k,shape:I,exact:J};function a(f,h){return f===h?f!==0||1/f===1/h:f!==f&&h!==h}function l(f,h){this.message=f,this.data=h&&typeof h=="object"?h:{},this.stack=""}l.prototype=Error.prototype;function u(f){if(process.env.NODE_ENV!=="production")var h={},b=0;function v(A,O,F,$,M,R,ie){if($=$||i,R=R||F,ie!==Qe){if(e){var Q=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 Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var Ee=$+":"+F;!h[Ee]&&b<3&&(et("You are manually calling a React.PropTypes validation function for the `"+R+"` prop on `"+$+"`. 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[Ee]=!0,b++)}}return O[F]==null?A?O[F]===null?new l("The "+M+" `"+R+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new l("The "+M+" `"+R+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:f(O,F,$,M,R)}var C=v.bind(null,!1);return C.isRequired=v.bind(null,!0),C}function d(f){function h(b,v,C,A,O,F){var $=b[v],M=K($);if(M!==f){var R=T($);return new l("Invalid "+A+" `"+O+"` of type "+("`"+R+"` supplied to `"+C+"`, expected ")+("`"+f+"`."),{expectedType:f})}return null}return u(h)}function c(){return u(Kt)}function p(f){function h(b,v,C,A,O){if(typeof f!="function")return new l("Property `"+O+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var F=b[v];if(!Array.isArray(F)){var $=K(F);return new l("Invalid "+A+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an array."))}for(var M=0;M<F.length;M++){var R=f(F,M,C,A,O+"["+M+"]",Qe);if(R instanceof Error)return R}return null}return u(h)}function m(){function f(h,b,v,C,A){var O=h[b];if(!t(O)){var F=K(O);return new l("Invalid "+C+" `"+A+"` of type "+("`"+F+"` supplied to `"+v+"`, expected a single ReactElement."))}return null}return u(f)}function y(){function f(h,b,v,C,A){var O=h[b];if(!cl.isValidElementType(O)){var F=K(O);return new l("Invalid "+C+" `"+A+"` of type "+("`"+F+"` supplied to `"+v+"`, expected a single ReactElement type."))}return null}return u(f)}function P(f){function h(b,v,C,A,O){if(!(b[v]instanceof f)){var F=f.name||i,$=_(b[v]);return new l("Invalid "+A+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected ")+("instance of `"+F+"`."))}return null}return u(h)}function L(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&(arguments.length>1?et("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])."):et("Invalid argument supplied to oneOf, expected an array.")),Kt;function h(b,v,C,A,O){for(var F=b[v],$=0;$<f.length;$++)if(a(F,f[$]))return null;var M=JSON.stringify(f,function(ie,Q){var Ee=T(Q);return Ee==="symbol"?String(Q):Q});return new l("Invalid "+A+" `"+O+"` of value `"+String(F)+"` "+("supplied to `"+C+"`, expected one of "+M+"."))}return u(h)}function q(f){function h(b,v,C,A,O){if(typeof f!="function")return new l("Property `"+O+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+A+" `"+O+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an object."));for(var M in F)if(mn(F,M)){var R=f(F,M,C,A,O+"."+M,Qe);if(R instanceof Error)return R}return null}return u(h)}function k(f){if(!Array.isArray(f))return process.env.NODE_ENV!=="production"&&et("Invalid argument supplied to oneOfType, expected an instance of array."),Kt;for(var h=0;h<f.length;h++){var b=f[h];if(typeof b!="function")return et("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+E(b)+" at index "+h+"."),Kt}function v(C,A,O,F,$){for(var M=[],R=0;R<f.length;R++){var ie=f[R],Q=ie(C,A,O,F,$,Qe);if(Q==null)return null;Q.data&&mn(Q.data,"expectedType")&&M.push(Q.data.expectedType)}var Ee=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new l("Invalid "+F+" `"+$+"` supplied to "+("`"+O+"`"+Ee+"."))}return u(v)}function re(){function f(h,b,v,C,A){return X(h[b])?null:new l("Invalid "+C+" `"+A+"` supplied to "+("`"+v+"`, expected a ReactNode."))}return u(f)}function S(f,h,b,v,C){return new l((f||"React class")+": "+h+" type `"+b+"."+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function I(f){function h(b,v,C,A,O){var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+A+" `"+O+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));for(var M in f){var R=f[M];if(typeof R!="function")return S(C,A,O,M,T(R));var ie=R(F,M,C,A,O+"."+M,Qe);if(ie)return ie}return null}return u(h)}function J(f){function h(b,v,C,A,O){var F=b[v],$=K(F);if($!=="object")return new l("Invalid "+A+" `"+O+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));var M=fl({},b[v],f);for(var R in M){var ie=f[R];if(mn(f,R)&&typeof ie!="function")return S(C,A,O,R,T(ie));if(!ie)return new l("Invalid "+A+" `"+O+"` key `"+R+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(b[v],null," ")+`
|
|
2
|
+
Valid keys: `+JSON.stringify(Object.keys(f),null," "));var Q=ie(F,R,C,A,O+"."+R,Qe);if(Q)return Q}return null}return u(h)}function X(f){switch(typeof f){case"number":case"string":case"undefined":return!0;case"boolean":return!f;case"object":if(Array.isArray(f))return f.every(X);if(f===null||t(f))return!0;var h=o(f);if(h){var b=h.call(f),v;if(h!==f.entries){for(;!(v=b.next()).done;)if(!X(v.value))return!1}else for(;!(v=b.next()).done;){var C=v.value;if(C&&!X(C[1]))return!1}}else return!1;return!0;default:return!1}}function Te(f,h){return f==="symbol"?!0:h?h["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&h instanceof Symbol:!1}function K(f){var h=typeof f;return Array.isArray(f)?"array":f instanceof RegExp?"object":Te(h,f)?"symbol":h}function T(f){if(typeof f=="undefined"||f===null)return""+f;var h=K(f);if(h==="object"){if(f instanceof Date)return"date";if(f instanceof RegExp)return"regexp"}return h}function E(f){var h=T(f);switch(h){case"array":case"object":return"an "+h;case"boolean":case"date":case"regexp":return"a "+h;default:return h}}function _(f){return!f.constructor||!f.constructor.name?i:f.constructor.name}return s.checkPropTypes=No,s.resetWarningCache=No.resetWarningCache,s.PropTypes=s,s}});var Yo=se((Jd,Wo)=>{"use strict";var pl=Wt();function Uo(){}function qo(){}qo.resetWarningCache=Uo;Wo.exports=function(){function t(n,o,i,s,a,l){if(l!==pl){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:qo,resetWarningCache:Uo};return r.PropTypes=r,r}});var Gt=se((Qd,hn)=>{process.env.NODE_ENV!=="production"?(Ko=fn(),Go=!0,hn.exports=Vo()(Ko.isElement,Go)):hn.exports=Yo()();var Ko,Go});var Zo=se(z=>{"use strict";var gn=Symbol.for("react.element"),xn=Symbol.for("react.portal"),Ht=Symbol.for("react.fragment"),Zt=Symbol.for("react.strict_mode"),Xt=Symbol.for("react.profiler"),Jt=Symbol.for("react.provider"),Qt=Symbol.for("react.context"),dl=Symbol.for("react.server_context"),er=Symbol.for("react.forward_ref"),tr=Symbol.for("react.suspense"),rr=Symbol.for("react.suspense_list"),nr=Symbol.for("react.memo"),or=Symbol.for("react.lazy"),ml=Symbol.for("react.offscreen"),Ho;Ho=Symbol.for("react.module.reference");function ge(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case gn:switch(t=t.type,t){case Ht:case Xt:case Zt:case tr:case rr:return t;default:switch(t=t&&t.$$typeof,t){case dl:case Qt:case er:case or:case nr:case Jt:return t;default:return e}}case xn:return e}}}z.ContextConsumer=Qt;z.ContextProvider=Jt;z.Element=gn;z.ForwardRef=er;z.Fragment=Ht;z.Lazy=or;z.Memo=nr;z.Portal=xn;z.Profiler=Xt;z.StrictMode=Zt;z.Suspense=tr;z.SuspenseList=rr;z.isAsyncMode=function(){return!1};z.isConcurrentMode=function(){return!1};z.isContextConsumer=function(t){return ge(t)===Qt};z.isContextProvider=function(t){return ge(t)===Jt};z.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===gn};z.isForwardRef=function(t){return ge(t)===er};z.isFragment=function(t){return ge(t)===Ht};z.isLazy=function(t){return ge(t)===or};z.isMemo=function(t){return ge(t)===nr};z.isPortal=function(t){return ge(t)===xn};z.isProfiler=function(t){return ge(t)===Xt};z.isStrictMode=function(t){return ge(t)===Zt};z.isSuspense=function(t){return ge(t)===tr};z.isSuspenseList=function(t){return ge(t)===rr};z.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Ht||t===Xt||t===Zt||t===tr||t===rr||t===ml||typeof t=="object"&&t!==null&&(t.$$typeof===or||t.$$typeof===nr||t.$$typeof===Jt||t.$$typeof===Qt||t.$$typeof===er||t.$$typeof===Ho||t.getModuleId!==void 0)};z.typeOf=ge});var Xo=se(V=>{"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"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=!1,P=!1,L=!1,q=!1,k=!1,re;re=Symbol.for("react.module.reference");function S(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===o||k||x===n||x===u||x===d||q||x===m||y||P||L||typeof x=="object"&&x!==null&&(x.$$typeof===p||x.$$typeof===c||x.$$typeof===i||x.$$typeof===s||x.$$typeof===l||x.$$typeof===re||x.getModuleId!==void 0))}function I(x){if(typeof x=="object"&&x!==null){var Ke=x.$$typeof;switch(Ke){case t:var wt=x.type;switch(wt){case r:case o:case n:case u:case d:return wt;default:var Qn=wt&&wt.$$typeof;switch(Qn){case a:case s:case l:case p:case c:case i:return Qn;default:return Ke}}case e:return Ke}}}var J=s,X=i,Te=t,K=l,T=r,E=p,_=c,f=e,h=o,b=n,v=u,C=d,A=!1,O=!1;function F(x){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(x){return O||(O=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function M(x){return I(x)===s}function R(x){return I(x)===i}function ie(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Q(x){return I(x)===l}function Ee(x){return I(x)===r}function Br(x){return I(x)===p}function Ir(x){return I(x)===c}function Mr(x){return I(x)===e}function Lr(x){return I(x)===o}function jr(x){return I(x)===n}function g(x){return I(x)===u}function ft(x){return I(x)===d}V.ContextConsumer=J,V.ContextProvider=X,V.Element=Te,V.ForwardRef=K,V.Fragment=T,V.Lazy=E,V.Memo=_,V.Portal=f,V.Profiler=h,V.StrictMode=b,V.Suspense=v,V.SuspenseList=C,V.isAsyncMode=F,V.isConcurrentMode=$,V.isContextConsumer=M,V.isContextProvider=R,V.isElement=ie,V.isForwardRef=Q,V.isFragment=Ee,V.isLazy=Br,V.isMemo=Ir,V.isPortal=Mr,V.isProfiler=Lr,V.isStrictMode=jr,V.isSuspense=g,V.isSuspenseList=ft,V.isValidElementType=S,V.typeOf=I}()});var Jo=se((nm,bn)=>{"use strict";process.env.NODE_ENV==="production"?bn.exports=Zo():bn.exports=Xo()});var Ii=se((Gg,Bi)=>{"use strict";function We(t){this._maxSize=t,this.clear()}We.prototype.clear=function(){this._size=0,this._values=Object.create(null)};We.prototype.get=function(t){return this._values[t]};We.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var pc=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Di=/^\d+$/,dc=/^\d/,mc=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hc=/^\s*(['"]?)(.*?)(\1)\s*$/,Nn=512,Ai=new We(Nn),$i=new We(Nn),Ri=new We(Nn);Bi.exports={Cache:We,split:jn,normalizePath:Ln,setter:function(t){var e=Ln(t);return $i.get(t)||$i.set(t,function(n,o){for(var i=0,s=e.length,a=n;i<s-1;){var l=e[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return n;a=a[e[i++]]}a[e[i]]=o})},getter:function(t,e){var r=Ln(t);return Ri.get(t)||Ri.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+(zn(r)||Di.test(r)?"["+r+"]":(e?".":"")+r)},"")},forEach:function(t,e,r){yc(Array.isArray(t)?t:jn(t),e,r)}};function Ln(t){return Ai.get(t)||Ai.set(t,jn(t).map(function(e){return e.replace(hc,"$2")}))}function jn(t){return t.match(pc)||[""]}function yc(t,e,r){var n=t.length,o,i,s,a;for(i=0;i<n;i++)o=t[i],o&&(bc(o)&&(o='"'+o+'"'),a=zn(o),s=!a&&/^\d+$/.test(o),e.call(r,o,a,s,i,t))}function zn(t){return typeof t=="string"&&t&&["'",'"'].indexOf(t.charAt(0))!==-1}function gc(t){return t.match(dc)&&!t.match(Di)}function xc(t){return mc.test(t)}function bc(t){return!zn(t)&&(gc(t)||xc(t))}});var ji=se((Hg,Li)=>{var vc=/[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,Tr=t=>t.match(vc)||[],Cr=t=>t[0].toUpperCase()+t.slice(1),Vn=(t,e)=>Tr(t).join(e).toLowerCase(),Mi=t=>Tr(t).reduce((e,r)=>`${e}${e?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Tc=t=>Cr(Mi(t)),Cc=t=>Vn(t,"_"),Sc=t=>Vn(t,"-"),Pc=t=>Cr(Vn(t," ")),Ec=t=>Tr(t).map(Cr).join(" ");Li.exports={words:Tr,upperFirst:Cr,camelCase:Mi,pascalCase:Tc,snakeCase:Cc,kebabCase:Sc,sentenceCase:Pc,titleCase:Ec}});var zi=se((Zg,Un)=>{Un.exports=function(t){return Ni(wc(t),t)};Un.exports.array=Ni;function Ni(t,e){var r=t.length,n=new Array(r),o={},i=r,s=_c(e),a=Oc(t);for(e.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(t[i],i,new Set);return n;function l(u,d,c){if(c.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch(P){p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[d]){o[d]=!0;var m=s.get(u)||new Set;if(m=Array.from(m),d=m.length){c.add(u);do{var y=m[--d];l(y,a.get(y),c)}while(d);c.delete(u)}n[--r]=u}}}function wc(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 _c(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 Oc(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 ys=t=>{let o=t,{isLoading:e,children:r}=o,n=ne(o,["isLoading","children"]);return _jsxruntime.jsx.call(void 0, _material.Button,Z(w({},n),{disabled:e?!0:n.disabled,children:e?_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:22}):r}))},ce= exports.Button =ys;function Ge(t){return _jsxruntime.jsx.call(void 0, _material.Stack,w({direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1},t))}function no(t){let n=t,{label:e}=n,r=ne(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,w({},r))})})}var _polished = require('polished');var _styles = require('@mui/material/styles');var Ur="#59C3E0",Ps={palette:{text:{primary:"#262626",secondary:"#808080"},primary:{light:"#83EDFF",main:Ur,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:Ur},"& .MuiTypography-root":{color:Ur}},":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:{}}}}},Es=_styles.createTheme.call(void 0, Ps),ws=_styles.responsiveFontSizes.call(void 0, Es),U= exports.theme =ws;var Os={"primary-light":U.palette.primary.light,primary:U.palette.primary.main,"primary-dark":U.palette.primary.dark,"text-secondary":U.palette.text.secondary,"text-primary":U.palette.text.primary,"background-paper":U.palette.background.paper,background:U.palette.background.default,"error-light":U.palette.error.light,error:U.palette.error.main,"erro-drark":U.palette.error.dark,"warning-light":U.palette.warning.light,warning:U.palette.warning.main,"warning-dark":U.palette.warning.dark,"success-light":U.palette.success.light,success:U.palette.success.main,"success-dark":U.palette.success.dark,"grey-100":U.palette.grey[100],"grey-200":U.palette.grey[200],"grey-300":U.palette.grey[300],"grey-400":U.palette.grey[400],"grey-500":U.palette.grey[500],"grey-600":U.palette.grey[600],"grey-700":U.palette.grey[700],"grey-800":U.palette.grey[800]};function io(){return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:Object.entries(Os).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:U.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 ci = _interopRequireWildcard(_react); var ot = _interopRequireWildcard(_react);function ao(t){if(!t)return 0;let e=String(t);return e=e.replace(/\./g,"").replace(/,/g,"."),parseFloat(e)}var qr=null;function Wr(t){let s=t,{value:e,onChange:r}=s,n=ne(s,["value","onChange"]);qr=null;let o=_react.useCallback.call(void 0, a=>{let l=a.target.value||"0.00";_hooks.isValidNumber.call(void 0, l)&&(qr==="Backspace"?l=(ao(l)/10).toFixed(2):l=(ao(l)*10).toFixed(2),r&&(a.target.value=l,r(a,l)))},[]),i=_react.useCallback.call(void 0, a=>{a.target.selectionStart===a.target.selectionEnd&&(a.target.selectionStart=a.target.value.length,a.target.selectionEnd=a.target.value.length)},[]);return _jsxruntime.jsx.call(void 0, _material.TextField,w({onKeyDown:a=>{qr=a.key},onSelect:a=>{i(a)},onChange:o,value:_hooks.formatCurrency.call(void 0, String(e),2)||"",inputProps:{style:{textAlign:"right"}}},n))}Wr.defaultProps={value:0};var _iconsmaterial = require('@mui/icons-material');var lo={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 Ie(t){let{cancelLabel:e,confirmLabel:r,type:n,onCancel:o,onConfirm:i,isLoadingConfirmButton:s}=t;return _jsxruntime.jsxs.call(void 0, Ge,{children:[o&&_jsxruntime.jsx.call(void 0, ce,{onClick:()=>{o()},color:lo[n||"content"].cancel,children:e}),_jsxruntime.jsx.call(void 0, ce,{onClick:()=>{i&&i()},color:lo[n||"content"].confirm,variant:"contained",isLoading:s,children:r})]})}var Bs={cancelLabel:"Cancelar",confirmLabel:"Ok",type:"content",isLoadingConfirmButton:!1};Ie.defaultProps=Bs;function Fe(t){let{title:e,children:r,actions:n,onClose:o,onConfirm:i,type:s}=t,a=_material.useTheme.call(void 0, ),l=n==="none"?null:n||_jsxruntime.jsx.call(void 0, Ie,{onCancel:()=>{o&&o({},"backdropClick")},onConfirm:()=>{i&&i()},type:s}),u=_react.useMemo.call(void 0, ()=>s==="error"?"error_outlined":s==="warning"?"error_amber":s==="info"||s==="success"?"info":!1,[s]),d=_react.useMemo.call(void 0, ()=>s!=="content"?s:"primary",[s]);return _jsxruntime.jsxs.call(void 0, _material.Dialog,Z(w({},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:c=>{if(s!=="content")return c.palette[d||"primary"].main}},fontSize:"17pt",variant:"h3",children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[u&&_jsxruntime.jsx.call(void 0, _material.Icon,{sx:{mr:1},fontSize:"medium",children:u}),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:c=>c.palette.grey[500],fontFamily:c=>c.typography.fontFamily},children:r})}),_jsxruntime.jsx.call(void 0, _material.DialogActions,{sx:{padding:2},children:l})]}))}Fe.defaultProps={fullWidth:!0,type:"content"};var _providers = require('@data-c/providers');function Kr(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, Ie,{type:s,confirmLabel:"Excluir",onConfirm:()=>o(e),onCancel:i?void 0:()=>n(),isLoadingConfirmButton:r})}function Gr(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:a}=t;return _jsxruntime.jsx.call(void 0, Fe,{type:n,open:e,title:o,actions:s||_jsxruntime.jsx.call(void 0, Kr,{type:n,onDelete:a||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onDelete")})}),onClose:()=>{r()},maxWidth:"xs",children:i})}var Js={open:!1,title:"Excluir Registro Permanentemente?",children:"Voc\xEA n\xE3o poder\xE1 recuperar este registro ap\xF3s exclu\xED-lo!",type:"error"};Gr.defaultProps=Js;var _muidatatables = require('mui-datatables'); var _muidatatables2 = _interopRequireDefault(_muidatatables);var sa=t=>{let{count:e,rowsPerPage:r,page:n,changePage:o,changeRowsPerPage:i,rowsPerPageOptions:s}=t,a=_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:l=>{i(l.target.value)},children:s.map(l=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:l,children:l},l))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:a,showFirstButton:!0,showLastButton:!0,onChange:(l,u)=>{o(u)},page:n,color:"primary"})]})})})},mo=sa;var pa={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"}},Ft={filterType:"textField",selectableRows:"none",elevation:0,responsive:"standard",print:!1,download:!1,filter:!1,search:!1,sort:!1,viewColumns:!1,textLabels:pa,serverSide:!0,fixedHeader:!1,rowsPerPageOptions:[15,50,100],rowsPerPage:15},da=t=>{let y=t,{error:e,tableTitle:r,isLoading:n,isFetching:o,data:i,columns:s,options:a,pagination:l,changePage:u,changePageSize:d,changeSort:c}=y,p=ne(y,["error","tableTitle","isLoading","isFetching","data","columns","options","pagination","changePage","changePageSize","changeSort"]),m=a||{};return m&&(u&&(m.onChangePage=u),d&&(m.onChangeRowsPerPage=d),c&&(m.onColumnSortChange=c),m.customFooter=(P,L,q,k,re,S)=>!l||n?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{}):_jsxruntime.jsx.call(void 0, mo,{count:l.totalRecords,page:l.page,rowsPerPage:l.pageSize,rowsPerPageOptions:(m==null?void 0:m.rowsPerPageOptions)||(Ft==null?void 0:Ft.rowsPerPageOptions),changeRowsPerPage:m==null?void 0:m.onChangeRowsPerPage,changePage:m==null?void 0:m.onChangePage,textLabels:S})),_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,w({title:r,data:i,columns:s,options:w(w({},Ft),m)},p))]})},ma= exports.DataTable =da;var Ca=_styles.styled.call(void 0, r=>{var n=r,{className:t}=n,e=ne(n,["className"]);return _jsxruntime.jsx.call(void 0, _material.Tooltip,Z(w({},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"}})),Sa={info:"Informa\xE7\xE3o",warning:"Aten\xE7\xE3o"},Pa=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:Sa[r]})]}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{mt:.5}}),_jsxruntime.jsx.call(void 0, _material.Box,{sx:{mt:1},children:e})]})},go=t=>{let i=t,{type:e,children:r,title:n}=i,o=ne(i,["type","children","title"]);return _jsxruntime.jsx.call(void 0, Ca,Z(w({arrow:!0,title:_jsxruntime.jsx.call(void 0, Pa,{title:n||"",type:e}),enterDelay:300},o),{children:r}))};go.defaultProps={type:"info"};var Ze=go;var Hp=()=>({style:{width:"80px",textAlign:"center"}}),Zp= exports.CurrencyCellStyle =()=>({style:{width:"128px",textAlign:"right"}});function Zr(t){let{onClick:e,value:r,extraOptions:n,displayUpdateButton:o,displayDeleteButton:i,displayTransporterButton:s,disableTooltip:a,disabled:l,disabledUpdateButton:u,disabledDeleteButton:d,disabledTransporterButton:c}=t;return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[n&&n.map(({id:p,icon:m,iconButtonProps:y,tooltip:P,visible:L,disabled:q})=>L===null||!!L&&_jsxruntime.jsxs.call(void 0, _material.IconButton,Z(w({onClick:()=>e(p,r),size:"small",disabled:q},y),{children:[P&&_jsxruntime.jsx.call(void 0, Ze,{type:P.type,title:P.content,children:_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:m})}),!P&&_jsxruntime.jsx.call(void 0, _material.Icon,{fontSize:"small",children:m})]}),p)),s&&_jsxruntime.jsxs.call(void 0, _material.IconButton,{size:"small",onClick:()=>e("transport",r),color:"primary",disabled:l||c,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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:l||u,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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:l||d,children:[a&&_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{fontSize:"small"}),!a&&_jsxruntime.jsx.call(void 0, Ze,{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"})})]})]})}Zr.defaultProps={displayUpdateButton:!0,displayDeleteButton:!0,displayTransporterButton:!1,disableTooltip:!0};function $t(t){let{renderLabel:e}=t,{deleteFilterValue:r,deleteAllFilterValues:n}=_providers.useFilterApi.call(void 0, ),{filterValues:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),s=_react.useMemo.call(void 0, ()=>{if(Object.keys(i||{}).length>0){let u=!1,d=Object.keys(i||{});for(let c=0;c<d.length;c++){let p=i[d[c]];if(Array.isArray(p)&&p.length>0){u=!0;break}else if(!Array.isArray(p)&&p){u=!0;break}}return u}return!1},[i]),a=_react.useCallback.call(void 0, l=>e?e(o[l].label,i[l]):`${o[l].label} - ${i&&i[l]}`,[e,o,i]);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",alignItems:"center",gap:1},children:s&&Object.keys(i||{}).map(l=>{if(Array.isArray(i[l])&&i[l].length>0)return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(l),onDelete:()=>{r&&r(l)},variant:"outlined"},l);if(!Array.isArray(i[l])&&i[l])return _jsxruntime.jsx.call(void 0, _material.Chip,{size:"small",label:a(l),onDelete:()=>{r&&r(l)},variant:"outlined"},l)})}),s&&_jsxruntime.jsx.call(void 0, _material.Box,{children:_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{n&&n()},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{fontSize:"small",color:"error"})})})]})}function Rt(t){let s=t,{drawerTitle:e,actions:r,onClose:n,children:o}=s,i=ne(s,["drawerTitle","actions","onClose","children"]);return _jsxruntime.jsx.call(void 0, _material.Drawer,Z(w({PaperProps:{style:{borderRadius:"12px 0 0 12px"}}},i),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{width:"360px",height:"100%",justifyContent:"space-between",backgroundColor:a=>a.palette.background.paper},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",alignContent:"center",height:"48px",borderBottom:a=>`solid 1px ${a.palette.grey[300]}`},children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h5",sx:{pl:a=>a.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:a=>a.spacing(2)},children:o})]}),r&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{pt:a=>a.spacing(1),pb:a=>a.spacing(1),pl:a=>a.spacing(2),pr:a=>a.spacing(2),borderTop:a=>`solid 1px ${a.palette.grey[300]}`},children:r})]})}))}Rt.defaultProps={anchor:"right"};var za=()=>{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:"space-between"},children:[_jsxruntime.jsx.call(void 0, _material.Button,{onClick:n,color:"error",children:"Cancelar"}),_jsxruntime.jsx.call(void 0, _material.Button,{onClick:i,children:"Resetar Filtros"}),_jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:o,children:"Aplicar Filtros"})]})},Va=t=>{let{title:e,children:r,onApplyFilters:n}=t,{isOpen:o,appliedValues:i}=_providers.useFilterData.call(void 0, ),{closeFilter:s}=_providers.useFilterApi.call(void 0, );return _react.useEffect.call(void 0, ()=>{n&&n(i)},[i]),_jsxruntime.jsx.call(void 0, Rt,{drawerTitle:e,open:o,children:r,onClose:()=>s(),actions:_jsxruntime.jsx.call(void 0, za,{})})};function rn(t){let{triggerButtonLabel:e,triggerButtonProps:r,triggerButton:n,title:o,children:i,onApplyFilters:s,renderLabel:a}=t,{openFilter:l}=_providers.useFilterApi.call(void 0, ),u=n==="none"?null:n||_jsxruntime.jsx.call(void 0, _material.Button,Z(w({variant:"contained",onClick:()=>{l()}},r),{children:e||"Adicionar"}));return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_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, $t,{renderLabel:a}),u]}),_jsxruntime.jsx.call(void 0, Va,{onApplyFilters:s,title:o||"",children:i})]})}rn.defaultProps={triggerButtonLabel:"Pesquisar",triggerButtonProps:{variant:"contained",startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})},title:"Pesquisar"};function Po(t){let{isFlagged:e,type:r}=t;return e?_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:r,sx:{fontSize:"10pt"}}):null}function nn(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, Ie,{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:a,confirmButtonLabel:l}=t,{isOpen:u}=_providers.useFormData.call(void 0, ),{closeForm:d,openForm:c}=_providers.useFormApi.call(void 0, ),p=n||_jsxruntime.jsx.call(void 0, nn,{hideCancelButton:e==="plain",confirmButtonLabel:l,onSubmitForm:o||(()=>{throw new Error("Nenhuma a\xE7\xE3o foi definida para ser executada em onSubmitForm")})}),m=i==="none"?null:i||_jsxruntime.jsx.call(void 0, ce,{variant:"contained",onClick:()=>{c()},children:a||"Adicionar"});return e==="dialog"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[m,_jsxruntime.jsx.call(void 0, Fe,Z(w({},s),{onClose:()=>{d()},open:!!u,children:r,actions:p}))]}):_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[r,p]})}var Ja={view:"dialog",dialogProps:{maxWidth:"md",fullWidth:!0}};sn.defaultProps=Ja;var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);function B(){return B=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},B.apply(this,arguments)}function ye(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function wo(t){if(!ye(t))return t;let e={};return Object.keys(t).forEach(r=>{e[r]=wo(t[r])}),e}function ue(t,e,r={clone:!0}){let n=r.clone?B({},t):t;return ye(t)&&ye(e)&&Object.keys(e).forEach(o=>{o!=="__proto__"&&(ye(e[o])&&o in t&&ye(t[o])?n[o]=ue(t[o],e[o],r):r.clone?n[o]=ye(e[o])?wo(e[o]):e[o]:n[o]=e[o])}),n}function yn(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 ir=Ne(Jo()),hl=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function yl(t){let e=`${t}`.match(hl);return e&&e[1]||""}function ei(t,e=""){return t.displayName||t.name||yl(t)||e}function Qo(t,e,r){let n=ei(e);return t.displayName||(n!==""?`${r}(${n})`:r)}function sr(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return ei(t,"Component");if(typeof t=="object")switch(t.$$typeof){case ir.ForwardRef:return Qo(t,t.render,"ForwardRef");case ir.Memo:return Qo(t,t.type,"memo");default:return}}}function de(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":yn(7));return t.charAt(0).toUpperCase()+t.slice(1)}function mt(t,e){let r=B({},e);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=B({},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]=B({},i),Object.keys(o).forEach(s=>{r[n][s]=mt(o[s],i[s])}))}else r[n]===void 0&&(r[n]=t[n])}),r}function ht(t,e,r=void 0){let n={};return Object.keys(t).forEach(o=>{n[o]=t[o].reduce((i,s)=>{if(s){let a=e(s);a!==""&&i.push(a),r&&r[s]&&i.push(r[s])}return i},[]).join(" ")}),n}var ti=t=>t,gl=()=>{let t=ti;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ti}}},xl=gl(),vn=xl;var bl={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 yt(t,e,r="Mui"){let n=bl[e];return n?`${r}-${n}`:`${vn.generate(t)}-${e}`}var _react2 = require('@emotion/react');function Tn(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
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 ri=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))};function me(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}var Tl=["values","unit","step"];var Cl=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)=>B({},r,{[n.key]:n.val}),{})};function Cn(t){let{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=t,o=me(t,Tl),i=Cl(e),s=Object.keys(i);function a(p){return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r})`}function l(p){return`@media (max-width:${(typeof e[p]=="number"?e[p]:p)-n/100}${r})`}function u(p,m){let y=s.indexOf(m);return`@media (min-width:${typeof e[p]=="number"?e[p]:p}${r}) and (max-width:${(y!==-1&&typeof e[s[y]]=="number"?e[s[y]]:m)-n/100}${r})`}function d(p){return s.indexOf(p)+1<s.length?u(p,s[s.indexOf(p)+1]):a(p)}function c(p){let m=s.indexOf(p);return m===0?a(s[1]):m===s.length-1?l(s[m]):u(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return B({keys:s,values:i,up:a,down:l,between:u,only:d,not:c,unit:r},o)}var Sl={borderRadius:4},oi=Sl;var tt=Ne(Gt()),Pl=process.env.NODE_ENV!=="production"?tt.default.oneOfType([tt.default.number,tt.default.string,tt.default.object,tt.default.array]):{},xe=Pl;function El(t,e){return e?ue(t,e,{clone:!1}):t}var Me=El;var ar={xs:0,sm:600,md:900,lg:1200,xl:1536},ii={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${ar[t]}px)`};function te(t,e,r){let n=t.theme||{};if(Array.isArray(e)){let i=n.breakpoints||ii;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=r(e[l]),s),{})}if(typeof e=="object"){let i=n.breakpoints||ii;return Object.keys(e).reduce((s,a)=>{if(Object.keys(i.values||ar).indexOf(a)!==-1){let l=i.up(a);s[l]=r(e[a],a)}else{let l=a;s[l]=e[l]}return s},{})}return r(e)}function Sn(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((n,o)=>{let i=t.up(o);return n[i]={},n},{}))||{}}function Pn(t,e){return t.reduce((r,n)=>{let o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},e)}function si(t,...e){let r=Sn(t),n=[r,...e].reduce((o,i)=>ue(o,i),{});return Pn(Object.keys(r),n)}function wl(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 lr({values:t,breakpoints:e,base:r}){let n=r||wl(t,e),o=Object.keys(n);if(o.length===0)return t;let i;return o.reduce((s,a,l)=>(Array.isArray(t)?(s[a]=t[l]!=null?t[l]:t[i],i=l):typeof t=="object"?(s[a]=t[a]!=null?t[a]:t[i],i=a):s[a]=t,s),{})}function rt(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 gt(t,e,r,n=r){let o;return typeof t=="function"?o=t(r):Array.isArray(t)?o=t[r]||n:o=rt(t,r)||n,e&&(o=e(o,n,t)),o}function _l(t){let{prop:e,cssProperty:r=t.prop,themeKey:n,transform:o}=t,i=s=>{if(s[e]==null)return null;let a=s[e],l=s.theme,u=rt(l,n)||{};return te(s,a,c=>{let p=gt(u,o,c);return c===p&&typeof c=="string"&&(p=gt(u,o,`${e}${c==="default"?"":de(c)}`,c)),r===!1?p:{[r]:p}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:xe}:{},i.filterProps=[e],i}var D=_l;function En(t){let e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}var Ol={m:"margin",p:"padding"},Fl={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ai={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kl=En(t=>{if(t.length>2)if(ai[t])t=ai[t];else return[t];let[e,r]=t.split(""),n=Ol[e],o=Fl[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),ur=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],wn=[...ur,...cr];function Ve(t,e,r,n){var o;let i=(o=rt(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 xt(t){return Ve(t,"spacing",8,"spacing")}function we(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 Al(t,e){return r=>t.reduce((n,o)=>(n[o]=we(e,r),n),{})}function $l(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=kl(r),i=Al(o,n),s=t[r];return te(t,s,i)}function _n(t,e){let r=xt(t.theme);return Object.keys(t).map(n=>$l(t,e,n,r)).reduce(Me,{})}function G(t){return _n(t,ur)}G.propTypes=process.env.NODE_ENV!=="production"?ur.reduce((t,e)=>(t[e]=xe,t),{}):{};G.filterProps=ur;function H(t){return _n(t,cr)}H.propTypes=process.env.NODE_ENV!=="production"?cr.reduce((t,e)=>(t[e]=xe,t),{}):{};H.filterProps=cr;function li(t){return _n(t,wn)}li.propTypes=process.env.NODE_ENV!=="production"?wn.reduce((t,e)=>(t[e]=xe,t),{}):{};li.filterProps=wn;function On(t=8){if(t.mui)return t;let e=xt({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 Rl(...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]?Me(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 Le=Rl;function Ce(t){return typeof t!="number"?t:`${t}px solid`}var Dl=D({prop:"border",themeKey:"borders",transform:Ce}),Bl=D({prop:"borderTop",themeKey:"borders",transform:Ce}),Il=D({prop:"borderRight",themeKey:"borders",transform:Ce}),Ml=D({prop:"borderBottom",themeKey:"borders",transform:Ce}),Ll=D({prop:"borderLeft",themeKey:"borders",transform:Ce}),jl=D({prop:"borderColor",themeKey:"palette"}),Nl=D({prop:"borderTopColor",themeKey:"palette"}),zl=D({prop:"borderRightColor",themeKey:"palette"}),Vl=D({prop:"borderBottomColor",themeKey:"palette"}),Ul=D({prop:"borderLeftColor",themeKey:"palette"}),bt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ve(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:we(e,n)});return te(t,t.borderRadius,r)}return null};bt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:xe}:{};bt.filterProps=["borderRadius"];var dh=Le(Dl,Bl,Il,Ml,Ll,jl,Nl,zl,Vl,Ul,bt);var vt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ve(t.theme,"spacing",8,"gap"),r=n=>({gap:we(e,n)});return te(t,t.gap,r)}return null};vt.propTypes=process.env.NODE_ENV!=="production"?{gap:xe}:{};vt.filterProps=["gap"];var Tt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ve(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:we(e,n)});return te(t,t.columnGap,r)}return null};Tt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:xe}:{};Tt.filterProps=["columnGap"];var Ct=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ve(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:we(e,n)});return te(t,t.rowGap,r)}return null};Ct.propTypes=process.env.NODE_ENV!=="production"?{rowGap:xe}:{};Ct.filterProps=["rowGap"];var ql=D({prop:"gridColumn"}),Wl=D({prop:"gridRow"}),Yl=D({prop:"gridAutoFlow"}),Kl=D({prop:"gridAutoColumns"}),Gl=D({prop:"gridAutoRows"}),Hl=D({prop:"gridTemplateColumns"}),Zl=D({prop:"gridTemplateRows"}),Xl=D({prop:"gridTemplateAreas"}),Jl=D({prop:"gridArea"}),vh=Le(vt,Tt,Ct,ql,Wl,Yl,Kl,Gl,Hl,Zl,Xl,Jl);function Ue(t,e){return e==="grey"?e:t}var Ql=D({prop:"color",themeKey:"palette",transform:Ue}),eu=D({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ue}),tu=D({prop:"backgroundColor",themeKey:"palette",transform:Ue}),Ph=Le(Ql,eu,tu);function fe(t){return t<=1&&t!==0?`${t*100}%`:t}var ru=D({prop:"width",transform:fe}),fr=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])||ar[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:fe(r)}};return te(t,t.maxWidth,e)}return null};fr.filterProps=["maxWidth"];var nu=D({prop:"minWidth",transform:fe}),ou=D({prop:"height",transform:fe}),iu=D({prop:"maxHeight",transform:fe}),su=D({prop:"minHeight",transform:fe}),Fh=D({prop:"size",cssProperty:"width",transform:fe}),kh=D({prop:"size",cssProperty:"height",transform:fe}),au=D({prop:"boxSizing"}),Ah=Le(ru,fr,nu,ou,iu,su,au);var lu={border:{themeKey:"borders",transform:Ce},borderTop:{themeKey:"borders",transform:Ce},borderRight:{themeKey:"borders",transform:Ce},borderBottom:{themeKey:"borders",transform:Ce},borderLeft:{themeKey:"borders",transform:Ce},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:bt},color:{themeKey:"palette",transform:Ue},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ue},backgroundColor:{themeKey:"palette",transform:Ue},p:{style:H},pt:{style:H},pr:{style:H},pb:{style:H},pl:{style:H},px:{style:H},py:{style:H},padding:{style:H},paddingTop:{style:H},paddingRight:{style:H},paddingBottom:{style:H},paddingLeft:{style:H},paddingX:{style:H},paddingY:{style:H},paddingInline:{style:H},paddingInlineStart:{style:H},paddingInlineEnd:{style:H},paddingBlock:{style:H},paddingBlockStart:{style:H},paddingBlockEnd:{style:H},m:{style:G},mt:{style:G},mr:{style:G},mb:{style:G},ml:{style:G},mx:{style:G},my:{style:G},margin:{style:G},marginTop:{style:G},marginRight:{style:G},marginBottom:{style:G},marginLeft:{style:G},marginX:{style:G},marginY:{style:G},marginInline:{style:G},marginInlineStart:{style:G},marginInlineEnd:{style:G},marginBlock:{style:G},marginBlockStart:{style:G},marginBlockEnd:{style:G},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:vt},rowGap:{style:Ct},columnGap:{style:Tt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:fe},maxWidth:{style:fr},minWidth:{transform:fe},height:{transform:fe},maxHeight:{transform:fe},minHeight:{transform:fe},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},nt=lu;function uu(...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 cu(t,e){return typeof t=="function"?t(e):t}function fu(){function t(r,n,o,i){let s={[r]:n,theme:o},a=i[r];if(!a)return{[r]:n};let{cssProperty:l=r,themeKey:u,transform:d,style:c}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let p=rt(o,u)||{};return c?c(s):te(s,n,y=>{let E=gt(p,d,y);return y===E&&typeof y=="string"&&(E=gt(p,d,`${r}${y==="default"?"":de(y)}`,y)),l===!1?E:{[l]:E}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:nt;function a(l){let u=l;if(typeof l=="function")u=l(i);else if(typeof l!="object")return l;if(!u)return null;let d=Sn(i.breakpoints),c=Object.keys(d),p=d;return Object.keys(u).forEach(m=>{let y=cu(u[m],i);if(y!=null)if(typeof y=="object")if(s[m])p=Me(p,t(m,y,i,s));else{let E=te({theme:i},y,I=>({[m]:I}));uu(E,y)?p[m]=e({sx:y,theme:i}):p=Me(p,E)}else p=Me(p,t(m,y,i,s))}),Pn(c,p)}return Array.isArray(o)?o.map(a):a(o)}return e}var ui=fu();ui.filterProps=["sx"];var St=ui;var pu=["breakpoints","palette","spacing","shape"];function du(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=me(t,pu),a=Cn(r),l=On(o),u=ue({breakpoints:a,direction:"ltr",components:{},palette:B({mode:"light"},n),spacing:l,shape:B({},oi,i)},s);return u=e.reduce((d,c)=>ue(d,c),u),u.unstable_sxConfig=B({},nt,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return St({sx:c,theme:this})},u}var qe=du;function mu(t){return Object.keys(t).length===0}function hu(t=null){let e=ci.useContext(_react2.ThemeContext);return!e||mu(e)?t:e}var fi=hu;var yu=qe();function gu(t=yu){return fi(t)}var pi=gu;var xu=["sx"],bu=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:nt;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function pr(t){let{sx:e}=t,r=me(t,xu),{systemProps:n,otherProps:o}=bu(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let a=e(...s);return ye(a)?B({},n,a):n}:i=B({},n,e),B({},o,{sx:i})}function di(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=di(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function vu(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=di(t))&&(n&&(n+=" "),n+=e);return n}var mi=vu;var Tu=["variant"];function hi(t){return t.length===0}function dr(t){let{variant:e}=t,r=me(t,Tu),n=e||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=hi(n)?t[o]:de(t[o]):n+=`${hi(n)?o:de(o)}${de(t[o].toString())}`}),n}var Cu=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Su(t){return Object.keys(t).length===0}function Pu(t){return typeof t=="string"&&t.charCodeAt(0)>96}var Eu=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,hr=t=>{let e={};return t&&t.forEach(r=>{let n=dr(r.props);e[n]=r.style}),e},wu=(t,e)=>{let r=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants),hr(r)},yr=(t,e,r)=>{let{ownerState:n={}}=t,o=[];return r&&r.forEach(i=>{let s=!0;Object.keys(i.props).forEach(a=>{n[a]!==i.props[a]&&t[a]!==i.props[a]&&(s=!1)}),s&&o.push(e[dr(i.props)])}),o},_u=(t,e,r,n)=>{var o;let i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return yr(t,e,i)};function Fn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var Ou=qe(),yi=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function mr({defaultTheme:t,theme:e,themeId:r}){return Su(e)?t:e[r]||e}function Fu(t){return t?(e,r)=>r[t]:null}var gi=({styledArg:t,props:e,defaultTheme:r,themeId:n})=>{let o=t(B({},e,{theme:mr(B({},e,{defaultTheme:r,themeId:n}))})),i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){let s=yr(e,hr(i),i);return[o,...s]}return o};function kn(t={}){let{themeId:e,defaultTheme:r=Ou,rootShouldForwardProp:n=Fn,slotShouldForwardProp:o=Fn}=t,i=s=>St(B({},s,{theme:mr(B({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,a={})=>{ri(s,S=>S.filter(M=>!(M!=null&&M.__mui_systemSx)));let{name:l,slot:u,skipVariantsResolver:d,skipSx:c,overridesResolver:p=Fu(yi(u))}=a,m=me(a,Cu),y=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,E=c||!1,I;process.env.NODE_ENV!=="production"&&l&&(I=`${l}-${yi(u||"Root")}`);let A=Fn;u==="Root"||u==="root"?A=n:u?A=o:Pu(s)&&(A=void 0);let Y=Tn(s,B({shouldForwardProp:A,label:I},m)),re=(S,...M)=>{let J=M?M.map(T=>{if(typeof T=="function"&&T.__emotion_real!==T)return P=>gi({styledArg:T,props:P,defaultTheme:r,themeId:e});if(ye(T)){let P=T,_;return T&&T.variants&&(_=T.variants,delete P.variants,P=f=>{let h=T;return yr(f,hr(_),_).forEach(v=>{h=ue(h,v)}),h}),P}return T}):[],X=S;if(ye(S)){let T;S&&S.variants&&(T=S.variants,delete X.variants,X=P=>{let _=S;return yr(P,hr(T),T).forEach(h=>{_=ue(_,h)}),_})}else typeof S=="function"&&S.__emotion_real!==S&&(X=T=>gi({styledArg:S,props:T,defaultTheme:r,themeId:e}));l&&p&&J.push(T=>{let P=mr(B({},T,{defaultTheme:r,themeId:e})),_=Eu(l,P);if(_){let f={};return Object.entries(_).forEach(([h,b])=>{f[h]=typeof b=="function"?b(B({},T,{theme:P})):b}),p(T,f)}return null}),l&&!y&&J.push(T=>{let P=mr(B({},T,{defaultTheme:r,themeId:e}));return _u(T,wu(l,P),P,l)}),E||J.push(i);let Te=J.length-M.length;if(Array.isArray(S)&&Te>0){let T=new Array(Te).fill("");X=[...S,...T],X.raw=[...S.raw,...T]}let K=Y(X,...J);if(process.env.NODE_ENV!=="production"){let T;l&&(T=`${l}${de(u||"")}`),T===void 0&&(T=`Styled(${sr(s)})`),K.displayName=T}return s.muiName&&(K.muiName=s.muiName),K};return Y.withConfig&&(re.withConfig=Y.withConfig),re}}var ku=kn(),xi=ku;function An(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:mt(e.components[r].defaultProps,n)}function gr({props:t,name:e,defaultTheme:r,themeId:n}){let o=pi(r);return n&&(o=o[n]||o),An({theme:o,name:e,props:t})}var q=Ne(Gt());var W=Ne(Gt());var Au=["component","direction","spacing","divider","children","className","useFlexGap"],Ru=qe(),Du=xi("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Bu(t){return gr({props:t,name:"MuiStack",defaultTheme:Ru})}function Iu(t,e){let r=ot.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(ot.cloneElement(e,{key:`separator-${i}`})),n),[])}var Mu=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Lu=({ownerState:t,theme:e})=>{let r=B({display:"flex",flexDirection:"column"},te({theme:e},lr({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=xt(e),o=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),i=lr({values:t.direction,base:o}),s=lr({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,u,d)=>{if(!i[l]){let p=u>0?i[d[u-1]]:"column";i[l]=p}}),r=ue(r,te({theme:e},s,(l,u)=>t.useFlexGap?{gap:we(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Mu(u?i[u]:t.direction)}`]:we(n,l)}}))}return r=si(e.breakpoints,r),r};function $n(t={}){let{createStyledComponent:e=Du,useThemeProps:r=Bu,componentName:n="MuiStack"}=t,o=()=>ht({root:["root"]},l=>yt(n,l),{}),i=e(Lu),s=ot.forwardRef(function(l,u){let d=r(l),c=pr(d),{component:p="div",direction:m="column",spacing:y=0,divider:E,children:I,className:A,useFlexGap:Y=!1}=c,re=me(c,Au),S={direction:m,spacing:y,useFlexGap:Y},M=o();return _jsxruntime.jsx.call(void 0, i,B({as:p,ownerState:S,ref:u,className:mi(M.root,A)},re,{children:E?Iu(I,E):I}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:W.default.node,direction:W.default.oneOfType([W.default.oneOf(["column-reverse","column","row-reverse","row"]),W.default.arrayOf(W.default.oneOf(["column-reverse","column","row-reverse","row"])),W.default.object]),divider:W.default.node,spacing:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.number,W.default.string])),W.default.number,W.default.object,W.default.string]),sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object])}),s}var bi=$n();process.env.NODE_ENV!=="production"&&(bi.propTypes={children:q.default.node,component:q.default.elementType,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]),useFlexGap:q.default.bool});var xr=bi;var Vu=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Ci(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, xr,{children:_jsxruntime.jsx.call(void 0, Vu,Z(w({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, xr,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function wi(t){let{title:e,children:r,onBack:n,onClose:o}=t,i=_material.useMediaQuery.call(void 0, s=>s.breakpoints.down("sm"));return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:i||o?"column":"row",justifyContent:"space-between",alignItems:i?"center":"flex-end",gap:2,marginBottom:2},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{width:"100%",direction:"row",sx:{alignItems:"center"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h2",sx:{fontWeight:"700"},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"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{children:r})]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function vr(t){let i=t,{onSearch:e}=i,r=ne(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let a=s.target.value;n(a)}return _jsxruntime.jsx.call(void 0, _material.TextField,w({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 In(t){let P=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:a,onChange:l,onSearch:u,renderValue:d,dialogProps:c,disabled:p,filterOptions:m,optionKeyName:y}=P,E=ne(P,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:I,openDialog:A,closeDialog:Y}=_hooks.useDialog.call(void 0, ),[re,S]=_react.useState.call(void 0, null),M=i||ci.default.Fragment,J=_lodash2.default.debounce(_=>u(_),500),X=_react.useCallback.call(void 0, (_,f)=>he(this,null,function*(){J(f)}),[J]),Te=_react.useCallback.call(void 0, (_,f,h)=>{if(y&&(f!=null&&f[y].includes("Adicionar op\xE7\xE3o:"))){let b=f[y].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),v=Z(w({},f),{[y]:b});l&&l(v);return}l&&l(f)},[l]);function K(_,f=!1,h=!1){var b;if(_){let v=ci.default.Children.toArray((b=_.props)==null?void 0:b.children),C=v.length===1?0:1;return v.splice(C,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>A(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),f&&v.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),ci.default.cloneElement(_,{},v)}return _}function T(_,f){if(!y)return _;let b=_material.createFilterOptions.call(void 0, )(_,f),{inputValue:v}=f,C=_.some(k=>v===k[y]);return v!==""&&!C&&b.push({[y]:`Adicionar op\xE7\xE3o: "${v}"`}),b}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:p,loadingText:"Carregando...",loading:o,onChange:Te,value:e,onInputChange:X,options:n,getOptionLabel:d,filterOptions:T,renderInput:_=>_jsxruntime.jsx.call(void 0, _material.TextField,w(Z(w({label:r,onDoubleClick:()=>{p||A()}},_),{InputProps:Z(w({},_.InputProps),{endAdornment:K(_.InputProps.endAdornment,o,p)}),disabled:p}),E)),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, Fe,Z(w({open:I,onClose:()=>Y(),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, vr,{placeholder:"Pesquisar",onSearch:_=>S(_)}),i&&_jsxruntime.jsx.call(void 0, M,{})]}),_jsxruntime.jsx.call(void 0, s,w({query:re,enableTransporter:!0,onTransport:_=>{Y(),l&&l(_)}},a))]})}))})]})}var lc={dialogProps:{maxWidth:"md",fullWidth:!0}};In.defaultProps=lc;function Mn(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 ve=Ne(Ii()),Pt=Ne(ji()),Wi=Ne(zi()),Fc=Object.prototype.toString,kc=Error.prototype.toString,Ac=RegExp.prototype.toString,$c=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Rc=/^Symbol\((.*)\)(.*)$/;function Dc(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Vi(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Dc(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return $c.call(t).replace(Rc,"Symbol($1)");let n=Fc.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+kc.call(t)+"]":n==="RegExp"?Ac.call(t):null}function $e(t,e){let r=Vi(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=Vi(this[n],e);return i!==null?i:o},2)}function Yi(t){return t==null?[]:[].concat(t)}var Ki,Bc=/\$\{\s*(\w+)\s*\}/g;Ki=Symbol.toStringTag;var ae=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(Bc,(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[Ki]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],Yi(e).forEach(s=>{if(ae.isError(s)){this.errors.push(...s.errors);let a=s.inner.length?s.inner:[s];this.inner.push(...a)}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,ae)}},_e={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}},Se={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"},je={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"},qn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Wn={isValue:"${path} field must be ${value}"},Yn={noUnknown:"${path} field has unspecified keys: ${unknown}"},Pr={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"},Gi={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 ae.formatError(_e.notType,t)}},Xg=Object.assign(Object.create(null),{mixed:_e,string:Se,number:je,date:qn,object:Yn,array:Pr,boolean:Wn,tuple:Gi}),Rr=t=>t&&t.__isYupSchema__,lt=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:(...a)=>a.every(l=>l===n);return new lt(e,(a,l)=>{var u;let d=s(...a)?o:i;return(u=d==null?void 0:d(l))!=null?u:l})}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(!Rr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},Sr={context:"$",value:"."};var Re=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]===Sr.context,this.isValue=this.key[0]===Sr.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Sr.context:this.isValue?Sr.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,ve.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}};Re.prototype.__isYupRef=!0;var Pe=t=>t==null;function st(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){let{name:u,test:d,params:c,message:p,skipAbsent:m}=t,{parent:y,context:E,abortEarly:I=s.spec.abortEarly,disableStackTrace:A=s.spec.disableStackTrace}=o;function Y(P){return Re.isRef(P)?P.getValue(r,y,E):P}function re(P={}){var _;let f=Object.assign({value:r,originalValue:i,label:s.spec.label,path:P.path||n,spec:s.spec},c,P.params);for(let b of Object.keys(f))f[b]=Y(f[b]);let h=new ae(ae.formatError(P.message||p,f),r,f.path,P.type||u,(_=P.disableStackTrace)!=null?_:A);return h.params=f,h}let S=I?a:l,M={path:n,parent:y,type:u,from:o.from,createError:re,resolve:Y,options:o,originalValue:i,schema:s},J=P=>{ae.isError(P)?S(P):P?l(null):S(re())},X=P=>{ae.isError(P)?S(P):a(P)};if(m&&Pe(r))return J(!0);let K;try{var T;if(K=d.call(M,r,M),typeof((T=K)==null?void 0:T.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(K).then(J,X)}}catch(P){X(P);return}J(K)}return e.OPTIONS=t,e}function Ic(t,e,r,n=r){let o,i,s;return e?((0,ve.forEach)(e,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",p=u?parseInt(d,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: ${a}, 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[d])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[d],t=t.fields[d]}i=d,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var ut=class extends Set{describe(){let e=[];for(let r of this.values())e.push(Re.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 ut(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function at(t,e=new Map){if(Rr(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]=at(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,at(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(at(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=at(o,e)}else throw Error(`Unable to clone ${t}`);return r}var oe=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 ut,this._blacklist=new ut,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_e.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=at(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&&Pe(i))return i;let s=$e(e),a=$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 xt(t){return Ve(t,"spacing",8,"spacing")}function we(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 Al(t,e){return r=>t.reduce((n,o)=>(n[o]=we(e,r),n),{})}function $l(t,e,r,n){if(e.indexOf(r)===-1)return null;let o=kl(r),i=Al(o,n),s=t[r];return te(t,s,i)}function _n(t,e){let r=xt(t.theme);return Object.keys(t).map(n=>$l(t,e,n,r)).reduce(Me,{})}function G(t){return _n(t,ur)}G.propTypes=process.env.NODE_ENV!=="production"?ur.reduce((t,e)=>(t[e]=xe,t),{}):{};G.filterProps=ur;function H(t){return _n(t,cr)}H.propTypes=process.env.NODE_ENV!=="production"?cr.reduce((t,e)=>(t[e]=xe,t),{}):{};H.filterProps=cr;function li(t){return _n(t,wn)}li.propTypes=process.env.NODE_ENV!=="production"?wn.reduce((t,e)=>(t[e]=xe,t),{}):{};li.filterProps=wn;function On(t=8){if(t.mui)return t;let e=xt({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 Rl(...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]?Me(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 Le=Rl;function Ce(t){return typeof t!="number"?t:`${t}px solid`}var Dl=D({prop:"border",themeKey:"borders",transform:Ce}),Bl=D({prop:"borderTop",themeKey:"borders",transform:Ce}),Il=D({prop:"borderRight",themeKey:"borders",transform:Ce}),Ml=D({prop:"borderBottom",themeKey:"borders",transform:Ce}),Ll=D({prop:"borderLeft",themeKey:"borders",transform:Ce}),jl=D({prop:"borderColor",themeKey:"palette"}),Nl=D({prop:"borderTopColor",themeKey:"palette"}),zl=D({prop:"borderRightColor",themeKey:"palette"}),Vl=D({prop:"borderBottomColor",themeKey:"palette"}),Ul=D({prop:"borderLeftColor",themeKey:"palette"}),bt=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){let e=Ve(t.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:we(e,n)});return te(t,t.borderRadius,r)}return null};bt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:xe}:{};bt.filterProps=["borderRadius"];var dh=Le(Dl,Bl,Il,Ml,Ll,jl,Nl,zl,Vl,Ul,bt);var vt=t=>{if(t.gap!==void 0&&t.gap!==null){let e=Ve(t.theme,"spacing",8,"gap"),r=n=>({gap:we(e,n)});return te(t,t.gap,r)}return null};vt.propTypes=process.env.NODE_ENV!=="production"?{gap:xe}:{};vt.filterProps=["gap"];var Tt=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){let e=Ve(t.theme,"spacing",8,"columnGap"),r=n=>({columnGap:we(e,n)});return te(t,t.columnGap,r)}return null};Tt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:xe}:{};Tt.filterProps=["columnGap"];var Ct=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){let e=Ve(t.theme,"spacing",8,"rowGap"),r=n=>({rowGap:we(e,n)});return te(t,t.rowGap,r)}return null};Ct.propTypes=process.env.NODE_ENV!=="production"?{rowGap:xe}:{};Ct.filterProps=["rowGap"];var ql=D({prop:"gridColumn"}),Wl=D({prop:"gridRow"}),Yl=D({prop:"gridAutoFlow"}),Kl=D({prop:"gridAutoColumns"}),Gl=D({prop:"gridAutoRows"}),Hl=D({prop:"gridTemplateColumns"}),Zl=D({prop:"gridTemplateRows"}),Xl=D({prop:"gridTemplateAreas"}),Jl=D({prop:"gridArea"}),vh=Le(vt,Tt,Ct,ql,Wl,Yl,Kl,Gl,Hl,Zl,Xl,Jl);function Ue(t,e){return e==="grey"?e:t}var Ql=D({prop:"color",themeKey:"palette",transform:Ue}),eu=D({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ue}),tu=D({prop:"backgroundColor",themeKey:"palette",transform:Ue}),Ph=Le(Ql,eu,tu);function fe(t){return t<=1&&t!==0?`${t*100}%`:t}var ru=D({prop:"width",transform:fe}),fr=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])||ar[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:fe(r)}};return te(t,t.maxWidth,e)}return null};fr.filterProps=["maxWidth"];var nu=D({prop:"minWidth",transform:fe}),ou=D({prop:"height",transform:fe}),iu=D({prop:"maxHeight",transform:fe}),su=D({prop:"minHeight",transform:fe}),Fh=D({prop:"size",cssProperty:"width",transform:fe}),kh=D({prop:"size",cssProperty:"height",transform:fe}),au=D({prop:"boxSizing"}),Ah=Le(ru,fr,nu,ou,iu,su,au);var lu={border:{themeKey:"borders",transform:Ce},borderTop:{themeKey:"borders",transform:Ce},borderRight:{themeKey:"borders",transform:Ce},borderBottom:{themeKey:"borders",transform:Ce},borderLeft:{themeKey:"borders",transform:Ce},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:bt},color:{themeKey:"palette",transform:Ue},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ue},backgroundColor:{themeKey:"palette",transform:Ue},p:{style:H},pt:{style:H},pr:{style:H},pb:{style:H},pl:{style:H},px:{style:H},py:{style:H},padding:{style:H},paddingTop:{style:H},paddingRight:{style:H},paddingBottom:{style:H},paddingLeft:{style:H},paddingX:{style:H},paddingY:{style:H},paddingInline:{style:H},paddingInlineStart:{style:H},paddingInlineEnd:{style:H},paddingBlock:{style:H},paddingBlockStart:{style:H},paddingBlockEnd:{style:H},m:{style:G},mt:{style:G},mr:{style:G},mb:{style:G},ml:{style:G},mx:{style:G},my:{style:G},margin:{style:G},marginTop:{style:G},marginRight:{style:G},marginBottom:{style:G},marginLeft:{style:G},marginX:{style:G},marginY:{style:G},marginInline:{style:G},marginInlineStart:{style:G},marginInlineEnd:{style:G},marginBlock:{style:G},marginBlockStart:{style:G},marginBlockEnd:{style:G},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:vt},rowGap:{style:Ct},columnGap:{style:Tt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:fe},maxWidth:{style:fr},minWidth:{transform:fe},height:{transform:fe},maxHeight:{transform:fe},minHeight:{transform:fe},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},nt=lu;function uu(...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 cu(t,e){return typeof t=="function"?t(e):t}function fu(){function t(r,n,o,i){let s={[r]:n,theme:o},a=i[r];if(!a)return{[r]:n};let{cssProperty:l=r,themeKey:u,transform:d,style:c}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};let p=rt(o,u)||{};return c?c(s):te(s,n,y=>{let P=gt(p,d,y);return y===P&&typeof y=="string"&&(P=gt(p,d,`${r}${y==="default"?"":de(y)}`,y)),l===!1?P:{[l]:P}})}function e(r){var n;let{sx:o,theme:i={}}=r||{};if(!o)return null;let s=(n=i.unstable_sxConfig)!=null?n:nt;function a(l){let u=l;if(typeof l=="function")u=l(i);else if(typeof l!="object")return l;if(!u)return null;let d=Sn(i.breakpoints),c=Object.keys(d),p=d;return Object.keys(u).forEach(m=>{let y=cu(u[m],i);if(y!=null)if(typeof y=="object")if(s[m])p=Me(p,t(m,y,i,s));else{let P=te({theme:i},y,L=>({[m]:L}));uu(P,y)?p[m]=e({sx:y,theme:i}):p=Me(p,P)}else p=Me(p,t(m,y,i,s))}),Pn(c,p)}return Array.isArray(o)?o.map(a):a(o)}return e}var ui=fu();ui.filterProps=["sx"];var St=ui;var pu=["breakpoints","palette","spacing","shape"];function du(t={},...e){let{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=t,s=me(t,pu),a=Cn(r),l=On(o),u=ue({breakpoints:a,direction:"ltr",components:{},palette:B({mode:"light"},n),spacing:l,shape:B({},oi,i)},s);return u=e.reduce((d,c)=>ue(d,c),u),u.unstable_sxConfig=B({},nt,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(c){return St({sx:c,theme:this})},u}var qe=du;function mu(t){return Object.keys(t).length===0}function hu(t=null){let e=ci.useContext(_react2.ThemeContext);return!e||mu(e)?t:e}var fi=hu;var yu=qe();function gu(t=yu){return fi(t)}var pi=gu;var xu=["sx"],bu=t=>{var e,r;let n={systemProps:{},otherProps:{}},o=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:nt;return Object.keys(t).forEach(i=>{o[i]?n.systemProps[i]=t[i]:n.otherProps[i]=t[i]}),n};function pr(t){let{sx:e}=t,r=me(t,xu),{systemProps:n,otherProps:o}=bu(r),i;return Array.isArray(e)?i=[n,...e]:typeof e=="function"?i=(...s)=>{let a=e(...s);return ye(a)?B({},n,a):n}:i=B({},n,e),B({},o,{sx:i})}function di(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=di(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function vu(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=di(t))&&(n&&(n+=" "),n+=e);return n}var mi=vu;var Tu=["variant"];function hi(t){return t.length===0}function dr(t){let{variant:e}=t,r=me(t,Tu),n=e||"";return Object.keys(r).sort().forEach(o=>{o==="color"?n+=hi(n)?t[o]:de(t[o]):n+=`${hi(n)?o:de(o)}${de(t[o].toString())}`}),n}var Cu=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Su(t){return Object.keys(t).length===0}function Pu(t){return typeof t=="string"&&t.charCodeAt(0)>96}var Eu=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,hr=t=>{let e={};return t&&t.forEach(r=>{let n=dr(r.props);e[n]=r.style}),e},wu=(t,e)=>{let r=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants),hr(r)},yr=(t,e,r)=>{let{ownerState:n={}}=t,o=[];return r&&r.forEach(i=>{let s=!0;Object.keys(i.props).forEach(a=>{n[a]!==i.props[a]&&t[a]!==i.props[a]&&(s=!1)}),s&&o.push(e[dr(i.props)])}),o},_u=(t,e,r,n)=>{var o;let i=r==null||(o=r.components)==null||(o=o[n])==null?void 0:o.variants;return yr(t,e,i)};function Fn(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}var Ou=qe(),yi=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function mr({defaultTheme:t,theme:e,themeId:r}){return Su(e)?t:e[r]||e}function Fu(t){return t?(e,r)=>r[t]:null}var gi=({styledArg:t,props:e,defaultTheme:r,themeId:n})=>{let o=t(B({},e,{theme:mr(B({},e,{defaultTheme:r,themeId:n}))})),i;if(o&&o.variants&&(i=o.variants,delete o.variants),i){let s=yr(e,hr(i),i);return[o,...s]}return o};function kn(t={}){let{themeId:e,defaultTheme:r=Ou,rootShouldForwardProp:n=Fn,slotShouldForwardProp:o=Fn}=t,i=s=>St(B({},s,{theme:mr(B({},s,{defaultTheme:r,themeId:e}))}));return i.__mui_systemSx=!0,(s,a={})=>{ri(s,S=>S.filter(I=>!(I!=null&&I.__mui_systemSx)));let{name:l,slot:u,skipVariantsResolver:d,skipSx:c,overridesResolver:p=Fu(yi(u))}=a,m=me(a,Cu),y=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,P=c||!1,L;process.env.NODE_ENV!=="production"&&l&&(L=`${l}-${yi(u||"Root")}`);let q=Fn;u==="Root"||u==="root"?q=n:u?q=o:Pu(s)&&(q=void 0);let k=Tn(s,B({shouldForwardProp:q,label:L},m)),re=(S,...I)=>{let J=I?I.map(T=>{if(typeof T=="function"&&T.__emotion_real!==T)return E=>gi({styledArg:T,props:E,defaultTheme:r,themeId:e});if(ye(T)){let E=T,_;return T&&T.variants&&(_=T.variants,delete E.variants,E=f=>{let h=T;return yr(f,hr(_),_).forEach(v=>{h=ue(h,v)}),h}),E}return T}):[],X=S;if(ye(S)){let T;S&&S.variants&&(T=S.variants,delete X.variants,X=E=>{let _=S;return yr(E,hr(T),T).forEach(h=>{_=ue(_,h)}),_})}else typeof S=="function"&&S.__emotion_real!==S&&(X=T=>gi({styledArg:S,props:T,defaultTheme:r,themeId:e}));l&&p&&J.push(T=>{let E=mr(B({},T,{defaultTheme:r,themeId:e})),_=Eu(l,E);if(_){let f={};return Object.entries(_).forEach(([h,b])=>{f[h]=typeof b=="function"?b(B({},T,{theme:E})):b}),p(T,f)}return null}),l&&!y&&J.push(T=>{let E=mr(B({},T,{defaultTheme:r,themeId:e}));return _u(T,wu(l,E),E,l)}),P||J.push(i);let Te=J.length-I.length;if(Array.isArray(S)&&Te>0){let T=new Array(Te).fill("");X=[...S,...T],X.raw=[...S.raw,...T]}let K=k(X,...J);if(process.env.NODE_ENV!=="production"){let T;l&&(T=`${l}${de(u||"")}`),T===void 0&&(T=`Styled(${sr(s)})`),K.displayName=T}return s.muiName&&(K.muiName=s.muiName),K};return k.withConfig&&(re.withConfig=k.withConfig),re}}var ku=kn(),xi=ku;function An(t){let{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:mt(e.components[r].defaultProps,n)}function gr({props:t,name:e,defaultTheme:r,themeId:n}){let o=pi(r);return n&&(o=o[n]||o),An({theme:o,name:e,props:t})}var W=Ne(Gt());var Y=Ne(Gt());var Au=["component","direction","spacing","divider","children","className","useFlexGap"],Ru=qe(),Du=xi("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Bu(t){return gr({props:t,name:"MuiStack",defaultTheme:Ru})}function Iu(t,e){let r=ot.Children.toArray(t).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(ot.cloneElement(e,{key:`separator-${i}`})),n),[])}var Mu=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Lu=({ownerState:t,theme:e})=>{let r=B({display:"flex",flexDirection:"column"},te({theme:e},lr({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){let n=xt(e),o=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),i=lr({values:t.direction,base:o}),s=lr({values:t.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,u,d)=>{if(!i[l]){let p=u>0?i[d[u-1]]:"column";i[l]=p}}),r=ue(r,te({theme:e},s,(l,u)=>t.useFlexGap?{gap:we(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Mu(u?i[u]:t.direction)}`]:we(n,l)}}))}return r=si(e.breakpoints,r),r};function $n(t={}){let{createStyledComponent:e=Du,useThemeProps:r=Bu,componentName:n="MuiStack"}=t,o=()=>ht({root:["root"]},l=>yt(n,l),{}),i=e(Lu),s=ot.forwardRef(function(l,u){let d=r(l),c=pr(d),{component:p="div",direction:m="column",spacing:y=0,divider:P,children:L,className:q,useFlexGap:k=!1}=c,re=me(c,Au),S={direction:m,spacing:y,useFlexGap:k},I=o();return _jsxruntime.jsx.call(void 0, i,B({as:p,ownerState:S,ref:u,className:mi(I.root,q)},re,{children:P?Iu(L,P):L}))});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:Y.default.node,direction:Y.default.oneOfType([Y.default.oneOf(["column-reverse","column","row-reverse","row"]),Y.default.arrayOf(Y.default.oneOf(["column-reverse","column","row-reverse","row"])),Y.default.object]),divider:Y.default.node,spacing:Y.default.oneOfType([Y.default.arrayOf(Y.default.oneOfType([Y.default.number,Y.default.string])),Y.default.number,Y.default.object,Y.default.string]),sx:Y.default.oneOfType([Y.default.arrayOf(Y.default.oneOfType([Y.default.func,Y.default.object,Y.default.bool])),Y.default.func,Y.default.object])}),s}var bi=$n();process.env.NODE_ENV!=="production"&&(bi.propTypes={children:W.default.node,component:W.default.elementType,direction:W.default.oneOfType([W.default.oneOf(["column-reverse","column","row-reverse","row"]),W.default.arrayOf(W.default.oneOf(["column-reverse","column","row-reverse","row"])),W.default.object]),divider:W.default.node,spacing:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.number,W.default.string])),W.default.number,W.default.object,W.default.string]),sx:W.default.oneOfType([W.default.arrayOf(W.default.oneOfType([W.default.func,W.default.object,W.default.bool])),W.default.func,W.default.object]),useFlexGap:W.default.bool});var xr=bi;var Vu=_styled2.default.call(void 0, (0, _material.Typography))(({theme:t})=>({fontWeight:"bold"}));function Ci(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, xr,{children:_jsxruntime.jsx.call(void 0, Vu,Z(w({},n),{children:e}))}),_jsxruntime.jsx.call(void 0, xr,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),s&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function wi(t){let{title:e,children:r,onBack:n,onClose:o}=t,i=_material.useMediaQuery.call(void 0, s=>s.breakpoints.down("sm"));return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:i||o?"column":"row",justifyContent:"space-between",alignItems:i?"center":"flex-end",gap:2,marginBottom:2},children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{width:"100%",direction:"row",sx:{alignItems:"center"},children:[n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",variant:"h2",sx:{fontWeight:"700"},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"})})]}),_jsxruntime.jsx.call(void 0, _material.Box,{children:r})]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function vr(t){let i=t,{onSearch:e}=i,r=ne(i,["onSearch"]),n=_lodash2.default.debounce(s=>e(s),500);function o(s){let a=s.target.value;n(a)}return _jsxruntime.jsx.call(void 0, _material.TextField,w({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 In(t){let E=t,{value:e,label:r,options:n,isLoading:o,form:i,table:s,tableProps:a,onChange:l,onSearch:u,renderValue:d,dialogProps:c,disabled:p,filterOptions:m,optionKeyName:y}=E,P=ne(E,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:L,openDialog:q,closeDialog:k}=_hooks.useDialog.call(void 0, ),[re,S]=_react.useState.call(void 0, null),I=i||ci.default.Fragment,J=_lodash2.default.debounce(_=>u(_),500),X=_react.useCallback.call(void 0, (_,f)=>he(this,null,function*(){J(f)}),[J]),Te=_react.useCallback.call(void 0, (_,f,h)=>{if(y&&(f!=null&&f[y].includes("Adicionar op\xE7\xE3o:"))){let b=f[y].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),v=Z(w({},f),{[y]:b});l&&l(v);return}l&&l(f)},[l]);function K(_,f=!1,h=!1){var b;if(_){let v=ci.default.Children.toArray((b=_.props)==null?void 0:b.children),C=v.length===1?0:1;return v.splice(C,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>q(),disabled:h,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),f&&v.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),ci.default.cloneElement(_,{},v)}return _}function T(_,f){if(!y)return _;let b=_material.createFilterOptions.call(void 0, )(_,f),{inputValue:v}=f,C=_.some(A=>v===A[y]);return v!==""&&!C&&b.push({[y]:`Adicionar op\xE7\xE3o: "${v}"`}),b}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:p,loadingText:"Carregando...",loading:o,onChange:Te,value:e,onInputChange:X,options:n,getOptionLabel:d,filterOptions:T,renderInput:_=>_jsxruntime.jsx.call(void 0, _material.TextField,w(Z(w({label:r,onDoubleClick:()=>{p||q()}},_),{InputProps:Z(w({},_.InputProps),{endAdornment:K(_.InputProps.endAdornment,o,p)}),disabled:p}),P)),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, Fe,Z(w({open:L,onClose:()=>k(),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, vr,{placeholder:"Pesquisar",onSearch:_=>S(_)}),i&&_jsxruntime.jsx.call(void 0, I,{})]}),_jsxruntime.jsx.call(void 0, s,w({query:re,enableTransporter:!0,onTransport:_=>{k(),l&&l(_)}},a))]})}))})]})}var lc={dialogProps:{maxWidth:"md",fullWidth:!0}};In.defaultProps=lc;function Mn(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 ve=Ne(Ii()),Pt=Ne(ji()),Wi=Ne(zi()),Fc=Object.prototype.toString,kc=Error.prototype.toString,Ac=RegExp.prototype.toString,$c=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Rc=/^Symbol\((.*)\)(.*)$/;function Dc(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function Vi(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return Dc(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return $c.call(t).replace(Rc,"Symbol($1)");let n=Fc.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+kc.call(t)+"]":n==="RegExp"?Ac.call(t):null}function $e(t,e){let r=Vi(t,e);return r!==null?r:JSON.stringify(t,function(n,o){let i=Vi(this[n],e);return i!==null?i:o},2)}function Yi(t){return t==null?[]:[].concat(t)}var Ki,Bc=/\$\{\s*(\w+)\s*\}/g;Ki=Symbol.toStringTag;var ae=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(Bc,(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[Ki]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],Yi(e).forEach(s=>{if(ae.isError(s)){this.errors.push(...s.errors);let a=s.inner.length?s.inner:[s];this.inner.push(...a)}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,ae)}},_e={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}},Se={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"},je={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"},qn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Wn={isValue:"${path} field must be ${value}"},Yn={noUnknown:"${path} field has unspecified keys: ${unknown}"},Pr={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"},Gi={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 ae.formatError(_e.notType,t)}},Xg=Object.assign(Object.create(null),{mixed:_e,string:Se,number:je,date:qn,object:Yn,array:Pr,boolean:Wn,tuple:Gi}),Rr=t=>t&&t.__isYupSchema__,lt=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:(...a)=>a.every(l=>l===n);return new lt(e,(a,l)=>{var u;let d=s(...a)?o:i;return(u=d==null?void 0:d(l))!=null?u:l})}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(!Rr(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}},Sr={context:"$",value:"."};var Re=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]===Sr.context,this.isValue=this.key[0]===Sr.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Sr.context:this.isValue?Sr.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,ve.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}};Re.prototype.__isYupRef=!0;var Pe=t=>t==null;function st(t){function e({value:r,path:n="",options:o,originalValue:i,schema:s},a,l){let{name:u,test:d,params:c,message:p,skipAbsent:m}=t,{parent:y,context:P,abortEarly:L=s.spec.abortEarly,disableStackTrace:q=s.spec.disableStackTrace}=o;function k(E){return Re.isRef(E)?E.getValue(r,y,P):E}function re(E={}){var _;let f=Object.assign({value:r,originalValue:i,label:s.spec.label,path:E.path||n,spec:s.spec},c,E.params);for(let b of Object.keys(f))f[b]=k(f[b]);let h=new ae(ae.formatError(E.message||p,f),r,f.path,E.type||u,(_=E.disableStackTrace)!=null?_:q);return h.params=f,h}let S=L?a:l,I={path:n,parent:y,type:u,from:o.from,createError:re,resolve:k,options:o,originalValue:i,schema:s},J=E=>{ae.isError(E)?S(E):E?l(null):S(re())},X=E=>{ae.isError(E)?S(E):a(E)};if(m&&Pe(r))return J(!0);let K;try{var T;if(K=d.call(I,r,I),typeof((T=K)==null?void 0:T.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${I.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(K).then(J,X)}}catch(E){X(E);return}J(K)}return e.OPTIONS=t,e}function Ic(t,e,r,n=r){let o,i,s;return e?((0,ve.forEach)(e,(a,l,u)=>{let d=l?a.slice(1,a.length-1):a;t=t.resolve({context:n,parent:o,value:r});let c=t.type==="tuple",p=u?parseInt(d,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: ${a}, 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[d])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[d],t=t.fields[d]}i=d,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}var ut=class extends Set{describe(){let e=[];for(let r of this.values())e.push(Re.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 ut(this.values())}merge(e,r){let n=this.clone();return e.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}};function at(t,e=new Map){if(Rr(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]=at(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,at(o,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(let n of t)r.add(at(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(let[n,o]of Object.entries(t))r[n]=at(o,e)}else throw Error(`Unable to clone ${t}`);return r}var oe=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 ut,this._blacklist=new ut,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_e.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=at(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&&Pe(i))return i;let s=$e(e),a=$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}".
|
|
7
7
|
|
|
8
8
|
attempted value: ${s}
|
|
9
|
-
`+(a!==s?`result of cast: ${a}`:""))}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:a=this.spec.strict}=r,l=e;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,d=>{if(d.length)return o(d,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(e,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=e,d=E=>{o||(o=!0,r(E,s))},c=E=>{o||(o=!0,n(E,s))},p=i.length,m=[];if(!p)return c([]);let y={value:s,originalValue:a,path:l,options:u,schema:this};for(let E=0;E<i.length;E++){let I=i[E];I(y,d,function(Y){Y&&(Array.isArray(Y)?m.push(...Y):m.push(Y)),--p<=0&&c(m)})}}asNestedTest({key:e,index:r,parent:n,parentPath:o,originalParent:i,options:s}){let a=e!=null?e:r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");let l=typeof a=="number",u=n[a],d=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${u?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(c,p,m)=>this.resolve(d)._validate(u,d,p,m)}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,a)=>o._validate(e,r,(l,u)=>{ae.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new ae(l,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}),(a,l)=>{throw ae.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new ae(a,e,void 0,void 0,s);i=l}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(ae.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(ae.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):at(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=st({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=st({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=_e.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=_e.notNull){return this.nullability(!1,e)}required(e=_e.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=_e.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=st(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=Yi(e).map(i=>new Re(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new lt(o,r):lt.fromOptions(o,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=st({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=_e.oneOf){let n=this.clone();return e.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=st({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=_e.notOneOf){let n=this.clone();return e.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=st({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(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,d)=>d.findIndex(c=>c.name===l.name)===u)}}};oe.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])oe.prototype[`${t}At`]=function(e,r,n={}){let{parent:o,parentPath:i,schema:s}=Ic(this,e,r,n.context);return s[t](o&&o[i],Object.assign({},n,{parent:o,path:e}))};for(let t of["equals","is"])oe.prototype[t]=oe.prototype.oneOf;for(let t of["not","nope"])oe.prototype[t]=oe.prototype.notOneOf;var Mc=()=>!0;function Lc(t){return new wr(t)}var wr=class extends oe{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Mc},e))}};Lc.prototype=wr.prototype;function jc(){return new _r}var _r=class extends oe{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=Wn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Pe(r)||r===!0}})}isFalse(e=Wn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Pe(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)}};jc.prototype=_r.prototype;var Nc=/^[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])?)*$/,zc=/^((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,Vc=/^(?:[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,Uc=t=>Pe(t)||t===t.trim(),qc={}.toString();function ct(){return new Or}var Or=class extends oe{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===qc?e:o})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||_e.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=Se.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=Se.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=Se.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||Se.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=Se.email){return this.matches(Nc,{name:"email",message:e,excludeEmptyString:!0})}url(e=Se.url){return this.matches(zc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Se.uuid){return this.matches(Vc,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Se.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Uc})}lowercase(e=Se.lowercase){return this.transform(r=>Pe(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Pe(r)||r===r.toLowerCase()})}uppercase(e=Se.uppercase){return this.transform(r=>Pe(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Pe(r)||r===r.toUpperCase()})}};ct.prototype=Or.prototype;var Wc=t=>t!=+t;function Yc(){return new Fr}var Fr=class extends oe{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Wc(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=je.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=je.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=je.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=je.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=je.positive){return this.moreThan(0,e)}negative(e=je.negative){return this.lessThan(0,e)}integer(e=je.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>Pe(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=>Pe(o)?o:Math[e](o))}};Yc.prototype=Fr.prototype;var Kc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ae(t,e=0){return Number(t)||e}function Gc(t){let e=Kc.exec(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;let r={year:Ae(e[1]),month:Ae(e[2],1)-1,day:Ae(e[3],1),hour:Ae(e[4]),minute:Ae(e[5]),second:Ae(e[6]),millisecond:e[7]?Ae(e[7].substring(0,3)):0,z:e[8]||void 0,plusMinus:e[9]||void 0,hourOffset:Ae(e[10]),minuteOffset:Ae(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 Hi=new Date(""),Hc=t=>Object.prototype.toString.call(t)==="[object Date]";function Zi(){return new Ye}var Ye=class extends oe{constructor(){super({type:"date",check(e){return Hc(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,n)=>!n.spec.coerce||n.isType(e)||e===null?e:(e=Gc(e),isNaN(e)?Ye.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(Re.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=qn.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=qn.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)}})}};Ye.INVALID_DATE=Hi;Zi.prototype=Ye.prototype;Zi.INVALID_DATE=Hi;function Zc(t,e=[]){let r=[],n=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=(0,ve.split)(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(let s of Object.keys(t)){let a=t[s];n.add(s),Re.isRef(a)&&a.isSibling?i(a.path,s):Rr(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return Wi.default.array(Array.from(n),r).reverse()}function Ui(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 Xi(t){return(e,r)=>Ui(t,e)-Ui(t,r)}var Ji=(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 Er(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=Er(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Er(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Er)}):"optional"in t?t.optional():t}var Xc=(t,e)=>{let r=[...(0,ve.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),o=(0,ve.getter)((0,ve.join)(r),!0)(t);return!!(o&&n in o)},qi=t=>Object.prototype.toString.call(t)==="[object Object]";function Jc(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}var Qc=Xi([]);function Et(t){return new kr(t)}var kr=class extends oe{constructor(e){super({type:"object",check(r){return qi(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Qc,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,a=[].concat(this._nodes,Object.keys(o).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),d=!1;for(let c of a){let p=i[c],m=c in o;if(p){let y,E=o[c];u.path=(r.path?`${r.path}.`:"")+c,p=p.resolve({value:E,context:r.context,parent:l});let I=p instanceof oe?p.spec:void 0,A=I==null?void 0:I.strict;if(I!=null&&I.strip){d=d||c in o;continue}y=!r.__validating||!A?p.cast(o[c],u):o[c],y!==void 0&&(l[c]=y)}else m&&!s&&(l[c]=o[c]);(m!==c in l||l[c]!==o[c])&&(d=!0)}return d?l:o}_validate(e,r={},n,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(l,u)=>{if(!a||!qi(u)){o(l,u);return}s=s||u;let d=[];for(let c of this._nodes){let p=this.fields[c];!p||Re.isRef(p)||d.push(p.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:d,value:u,originalValue:s,options:r},n,c=>{o(c.sort(this._sortErrors).concat(l),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=Zc(e,r),n._sortErrors=Xi(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 Er(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,ve.getter)(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Xc(i,e)&&(s=Object.assign({},i),n||delete s[e],s[r]=o(i)),s})}json(){return this.transform(Ji)}noUnknown(e=!0,r=Yn.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=Jc(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Yn.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(Pt.camelCase)}snakeCase(){return this.transformKeys(Pt.snakeCase)}constantCase(){return this.transformKeys(e=>(0,Pt.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 a=e;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}};Et.prototype=kr.prototype;function ef(t){return new Ar(t)}var Ar=class extends oe{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,a)=>{let l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(e,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(l,u)=>{var d;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let c=new Array(u.length);for(let m=0;m<u.length;m++){var p;c[m]=s.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:e})}this.runTests({value:u,tests:c,originalValue:(d=r.originalValue)!=null?d:e,options:r},n,m=>o(m.concat(l),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ji)}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(!Rr(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=Pr.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||Pr.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||Pr.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}};ef.prototype=Ar.prototype;function tf(t){return new $r(t)}var $r=class extends oe{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(Gi.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((a,l)=>{let u=a.cast(o[l],Object.assign({},r,{path:`${r.path||""}[${l}]`}));return u!==o[l]&&(i=!0),u});return i?s:o}_validate(e,r={},n,o){let i=this.spec.types;super._validate(e,r,n,(s,a)=>{var l;if(!this._typeCheck(a)){o(s,a);return}let u=[];for(let[c,p]of i.entries()){var d;u[c]=p.asNestedTest({options:r,index:c,parent:a,parentPath:r.path,originalParent:(d=r.originalValue)!=null?d:e})}this.runTests({value:a,tests:u,originalValue:(l=r.originalValue)!=null?l:e,options:r},n,c=>o(c.concat(s),a))})}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 a=e;return(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),o.describe(a)}),n}};tf.prototype=$r.prototype;var uf=Et().shape({email:ct().required("Informe o e-mail"),password:ct().required("Informe a senha")});function Kn(t){let{onLoginSuccess:e,onEsqueciSenhaClick:r,credentialsConfig:n}=t,[o,i]=_react.useState.call(void 0, ""),[s,a]=_react.useState.call(void 0, ""),[l,u]=_react.useState.call(void 0, !1),[d,c]=_react.useState.call(void 0, !1),{login:p}=_hooks.useCredentials.call(void 0, n),{validationProps:m,setValidationErrors:y}=_hooks.useValidations.call(void 0, );function E(){u(!l)}function I(){return he(this,null,function*(){y(null),uf.validate({email:o,password:s},{abortEarly:!1}).then(()=>he(this,null,function*(){c(!0);let A=yield p(o,s);A&&e(A)})).catch(A=>{y(A)}).finally(()=>{c(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:o||"",onChange:A=>i(A.target.value)},m("email"))),_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"password",label:"Senha",margin:"normal",value:s||"",onChange:A=>a(A.target.value),type:l?"text":"password",onKeyDown:A=>A.key==="Enter"&&I(),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:E,edge:"end",children:l?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},m("password"))),_jsxruntime.jsx.call(void 0, ce,{fullWidth:!0,variant:"contained",onClick:I,isLoading:d,sx:{mt:1},children:"Entrar"}),_jsxruntime.jsx.call(void 0, ce,{onClick:r,variant:"text",sx:{marginTop:.5,fontWeight:"400",":hover":{color:A=>A.palette.primary.dark}},children:"Esqueci a senha"})]})}var hf=Et().shape({email:ct().required("Informe o e-mail")});function Hn(t){let{onLoginClick:e,credentialsConfig:r}=t,[n,o]=_react.useState.call(void 0, ""),[i,s]=_react.useState.call(void 0, !1),{recuperarSenha:a}=_hooks.useCredentials.call(void 0, r),{validationProps:l,setValidationErrors:u}=_hooks.useValidations.call(void 0, );function d(){return he(this,null,function*(){u(null),hf.validate({email:n},{abortEarly:!1}).then(()=>he(this,null,function*(){try{s(!0),yield a(n)}catch(c){throw new Error(c)}finally{s(!1)}})).catch(c=>{u(c)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:n||"",onChange:c=>o(c.target.value)},l("email"))),_jsxruntime.jsxs.call(void 0, Ge,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, ce,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:c=>c.palette.primary.dark}},children:"Voltar"}),_jsxruntime.jsx.call(void 0, ce,{variant:"contained",onClick:d,isLoading:i,children:"Recuperar Senha"})]})]})}function Xn(t){var d;let{loginData:e,credentialsConfig:r,onLoginFailed:n,onLoginSuccess:o}=t,[i,s]=_react.useState.call(void 0, ""),{selecionarLicenca:a,isSubmitting:l}=_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 he(this,null,function*(){try{let c=yield a(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:(d=e==null?void 0:e.empresas)==null?void 0:d.map(c=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:c.uuid,children:c.nome},c.uuid))}),_jsxruntime.jsx.call(void 0, ce,{fullWidth:!0,variant:"contained",onClick:u,isLoading:l,sx:{mt:1},children:"Confirmar"})]})}function ss(t){var p;let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n,appName:o}=t,[i,s]=_react.useState.call(void 0, ),[a,l]=_react.useState.call(void 0, !1),{selecionarLicenca:u}=_hooks.useCredentials.call(void 0, e);function d(m){return he(this,null,function*(){try{if(Array.isArray(m==null?void 0:m.empresas)){if((m==null?void 0:m.empresas.length)===1){let y=yield u(m,m.empresas[0].uuid);y&&r(y);return}s(m);return}r(m)}catch(y){n(y)}})}function c(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:"100vh"},children:_jsxruntime.jsxs.call(void 0, _material.Container,{component:"main",maxWidth:"xs",sx:{height:"80%",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, Mn,{label:o}),!a&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:i!=null&&i.empresas&&((p=i==null?void 0:i.empresas)==null?void 0:p.length)>0?_jsxruntime.jsx.call(void 0, Xn,{loginData:i,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n}):_jsxruntime.jsx.call(void 0, Kn,{credentialsConfig:e,onLoginSuccess:d,onEsqueciSenhaClick:c})}),a&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:_jsxruntime.jsx.call(void 0, Hn,{onLoginClick:c,credentialsConfig:e})})]})})]})})}exports.Button = ce; exports.ButtonContainer = Ge; exports.Checkbox = no; exports.ColorsGrid = io; exports.CurrencyCellStyle = Zp; exports.CurrencyTextField = Wr; exports.DataTable = ma; exports.DataTableOptions = Zr; exports.DeleteContainer = Gr; exports.Dialog = Fe; exports.FilterContainer = rn; exports.FilterControl = $t; exports.Flag = Po; exports.FormContainer = sn; exports.LabelValue = Ci; exports.MioAuth = ss; exports.OptionStyles = Hp; exports.PageTitle = wi; exports.SearchTextField = vr; exports.Tooltip = Ze; exports.Transporter = In; exports.theme = U;
|
|
9
|
+
`+(a!==s?`result of cast: ${a}`:""))}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:a=this.spec.strict}=r,l=e;a||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:i,value:l,originalValue:s,options:r,tests:u},n,d=>{if(d.length)return o(d,l);this.runTests({path:i,value:l,originalValue:s,options:r,tests:this.tests},n,o)})}runTests(e,r,n){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=e,d=P=>{o||(o=!0,r(P,s))},c=P=>{o||(o=!0,n(P,s))},p=i.length,m=[];if(!p)return c([]);let y={value:s,originalValue:a,path:l,options:u,schema:this};for(let P=0;P<i.length;P++){let L=i[P];L(y,d,function(k){k&&(Array.isArray(k)?m.push(...k):m.push(k)),--p<=0&&c(m)})}}asNestedTest({key:e,index:r,parent:n,parentPath:o,originalParent:i,options:s}){let a=e!=null?e:r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");let l=typeof a=="number",u=n[a],d=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${u?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(c,p,m)=>this.resolve(d)._validate(u,d,p,m)}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,a)=>o._validate(e,r,(l,u)=>{ae.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new ae(l,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}),(a,l)=>{throw ae.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new ae(a,e,void 0,void 0,s);i=l}),i}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(ae.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(ae.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):at(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=st({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=st({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=_e.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=_e.notNull){return this.nullability(!1,e)}required(e=_e.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=_e.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=st(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=Yi(e).map(i=>new Re(i));return o.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new lt(o,r):lt.fromOptions(o,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=st({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=_e.oneOf){let n=this.clone();return e.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=st({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=_e.notOneOf){let n=this.clone();return e.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=st({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(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,d)=>d.findIndex(c=>c.name===l.name)===u)}}};oe.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])oe.prototype[`${t}At`]=function(e,r,n={}){let{parent:o,parentPath:i,schema:s}=Ic(this,e,r,n.context);return s[t](o&&o[i],Object.assign({},n,{parent:o,path:e}))};for(let t of["equals","is"])oe.prototype[t]=oe.prototype.oneOf;for(let t of["not","nope"])oe.prototype[t]=oe.prototype.notOneOf;var Mc=()=>!0;function Lc(t){return new wr(t)}var wr=class extends oe{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Mc},e))}};Lc.prototype=wr.prototype;function jc(){return new _r}var _r=class extends oe{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=Wn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Pe(r)||r===!0}})}isFalse(e=Wn.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Pe(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)}};jc.prototype=_r.prototype;var Nc=/^[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])?)*$/,zc=/^((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,Vc=/^(?:[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,Uc=t=>Pe(t)||t===t.trim(),qc={}.toString();function ct(){return new Or}var Or=class extends oe{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===qc?e:o})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||_e.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=Se.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=Se.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=Se.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||Se.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=Se.email){return this.matches(Nc,{name:"email",message:e,excludeEmptyString:!0})}url(e=Se.url){return this.matches(zc,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Se.uuid){return this.matches(Vc,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Se.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:Uc})}lowercase(e=Se.lowercase){return this.transform(r=>Pe(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Pe(r)||r===r.toLowerCase()})}uppercase(e=Se.uppercase){return this.transform(r=>Pe(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Pe(r)||r===r.toUpperCase()})}};ct.prototype=Or.prototype;var Wc=t=>t!=+t;function Yc(){return new Fr}var Fr=class extends oe{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!Wc(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=je.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=je.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=je.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=je.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(n){return n>this.resolve(e)}})}positive(e=je.positive){return this.moreThan(0,e)}negative(e=je.negative){return this.lessThan(0,e)}integer(e=je.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(e=>Pe(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=>Pe(o)?o:Math[e](o))}};Yc.prototype=Fr.prototype;var Kc=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ae(t,e=0){return Number(t)||e}function Gc(t){let e=Kc.exec(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;let r={year:Ae(e[1]),month:Ae(e[2],1)-1,day:Ae(e[3],1),hour:Ae(e[4]),minute:Ae(e[5]),second:Ae(e[6]),millisecond:e[7]?Ae(e[7].substring(0,3)):0,z:e[8]||void 0,plusMinus:e[9]||void 0,hourOffset:Ae(e[10]),minuteOffset:Ae(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 Hi=new Date(""),Hc=t=>Object.prototype.toString.call(t)==="[object Date]";function Zi(){return new Ye}var Ye=class extends oe{constructor(){super({type:"date",check(e){return Hc(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r,n)=>!n.spec.coerce||n.isType(e)||e===null?e:(e=Gc(e),isNaN(e)?Ye.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(Re.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=qn.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=qn.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)}})}};Ye.INVALID_DATE=Hi;Zi.prototype=Ye.prototype;Zi.INVALID_DATE=Hi;function Zc(t,e=[]){let r=[],n=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=(0,ve.split)(s)[0];n.add(l),o.has(`${a}-${l}`)||r.push([a,l])}for(let s of Object.keys(t)){let a=t[s];n.add(s),Re.isRef(a)&&a.isSibling?i(a.path,s):Rr(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return Wi.default.array(Array.from(n),r).reverse()}function Ui(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 Xi(t){return(e,r)=>Ui(t,e)-Ui(t,r)}var Ji=(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 Er(t){if("fields"in t){let e={};for(let[r,n]of Object.entries(t.fields))e[r]=Er(n);return t.setFields(e)}if(t.type==="array"){let e=t.optional();return e.innerType&&(e.innerType=Er(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Er)}):"optional"in t?t.optional():t}var Xc=(t,e)=>{let r=[...(0,ve.normalizePath)(e)];if(r.length===1)return r[0]in t;let n=r.pop(),o=(0,ve.getter)((0,ve.join)(r),!0)(t);return!!(o&&n in o)},qi=t=>Object.prototype.toString.call(t)==="[object Object]";function Jc(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}var Qc=Xi([]);function Et(t){return new kr(t)}var kr=class extends oe{constructor(e){super({type:"object",check(r){return qi(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Qc,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,a=[].concat(this._nodes,Object.keys(o).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),d=!1;for(let c of a){let p=i[c],m=c in o;if(p){let y,P=o[c];u.path=(r.path?`${r.path}.`:"")+c,p=p.resolve({value:P,context:r.context,parent:l});let L=p instanceof oe?p.spec:void 0,q=L==null?void 0:L.strict;if(L!=null&&L.strip){d=d||c in o;continue}y=!r.__validating||!q?p.cast(o[c],u):o[c],y!==void 0&&(l[c]=y)}else m&&!s&&(l[c]=o[c]);(m!==c in l||l[c]!==o[c])&&(d=!0)}return d?l:o}_validate(e,r={},n,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:s},...i],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(l,u)=>{if(!a||!qi(u)){o(l,u);return}s=s||u;let d=[];for(let c of this._nodes){let p=this.fields[c];!p||Re.isRef(p)||d.push(p.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:s}))}this.runTests({tests:d,value:u,originalValue:s,options:r},n,c=>{o(c.sort(this._sortErrors).concat(l),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=Zc(e,r),n._sortErrors=Xi(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 Er(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,ve.getter)(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Xc(i,e)&&(s=Object.assign({},i),n||delete s[e],s[r]=o(i)),s})}json(){return this.transform(Ji)}noUnknown(e=!0,r=Yn.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=Jc(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Yn.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(Pt.camelCase)}snakeCase(){return this.transformKeys(Pt.snakeCase)}constantCase(){return this.transformKeys(e=>(0,Pt.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 a=e;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),n.fields[i]=s.describe(a)}return n}};Et.prototype=kr.prototype;function ef(t){return new Ar(t)}var Ar=class extends oe{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,a)=>{let l=this.innerType.cast(s,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return l!==s&&(o=!0),l});return o?i:n}_validate(e,r={},n,o){var i;let s=this.innerType,a=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(e,r,n,(l,u)=>{var d;if(!a||!s||!this._typeCheck(u)){o(l,u);return}let c=new Array(u.length);for(let m=0;m<u.length;m++){var p;c[m]=s.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:e})}this.runTests({value:u,tests:c,originalValue:(d=r.originalValue)!=null?d:e,options:r},n,m=>o(m.concat(l),u))})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}json(){return this.transform(Ji)}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(!Rr(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=Pr.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||Pr.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||Pr.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}};ef.prototype=Ar.prototype;function tf(t){return new $r(t)}var $r=class extends oe{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(Gi.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((a,l)=>{let u=a.cast(o[l],Object.assign({},r,{path:`${r.path||""}[${l}]`}));return u!==o[l]&&(i=!0),u});return i?s:o}_validate(e,r={},n,o){let i=this.spec.types;super._validate(e,r,n,(s,a)=>{var l;if(!this._typeCheck(a)){o(s,a);return}let u=[];for(let[c,p]of i.entries()){var d;u[c]=p.asNestedTest({options:r,index:c,parent:a,parentPath:r.path,originalParent:(d=r.originalValue)!=null?d:e})}this.runTests({value:a,tests:u,originalValue:(l=r.originalValue)!=null?l:e,options:r},n,c=>o(c.concat(s),a))})}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 a=e;return(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),o.describe(a)}),n}};tf.prototype=$r.prototype;var uf=Et().shape({email:ct().required("Informe o e-mail"),password:ct().required("Informe a senha")});function Kn(t){let{onLoginSuccess:e,onLoginFailed:r,onEsqueciSenhaClick:n,credentialsConfig:o}=t,[i,s]=_react.useState.call(void 0, ""),[a,l]=_react.useState.call(void 0, ""),[u,d]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),{login:m}=_hooks.useCredentials.call(void 0, o),{validationProps:y,setValidationErrors:P}=_hooks.useValidations.call(void 0, );function L(){d(!u)}function q(){return he(this,null,function*(){P(null),uf.validate({email:i,password:a},{abortEarly:!1}).then(()=>he(this,null,function*(){p(!0);try{let k=yield m(i,a);k&&e(k)}catch(k){r(k)}})).catch(k=>{P(k)}).finally(()=>{p(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:k=>s(k.target.value)},y("email"))),_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"password",label:"Senha",margin:"normal",value:a||"",onChange:k=>l(k.target.value),type:u?"text":"password",onKeyDown:k=>k.key==="Enter"&&q(),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:L,edge:"end",children:u?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})})}},y("password"))),_jsxruntime.jsx.call(void 0, ce,{fullWidth:!0,variant:"contained",onClick:q,isLoading:c,sx:{mt:1},children:"Entrar"}),_jsxruntime.jsx.call(void 0, ce,{onClick:n,variant:"text",sx:{marginTop:.5,fontWeight:"400",":hover":{color:k=>k.palette.primary.dark}},children:"Esqueci a senha"})]})}var hf=Et().shape({email:ct().required("Informe o e-mail")});function Hn(t){let{onLoginClick:e,credentialsConfig:r}=t,[n,o]=_react.useState.call(void 0, ""),[i,s]=_react.useState.call(void 0, !1),{recuperarSenha:a}=_hooks.useCredentials.call(void 0, r),{validationProps:l,setValidationErrors:u}=_hooks.useValidations.call(void 0, );function d(){return he(this,null,function*(){u(null),hf.validate({email:n},{abortEarly:!1}).then(()=>he(this,null,function*(){try{s(!0),yield a(n)}catch(c){throw new Error(c)}finally{s(!1)}})).catch(c=>{u(c)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,w({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:n||"",onChange:c=>o(c.target.value)},l("email"))),_jsxruntime.jsxs.call(void 0, Ge,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, ce,{onClick:e,variant:"text",sx:{fontWeight:"400",":hover":{color:c=>c.palette.primary.dark}},children:"Voltar"}),_jsxruntime.jsx.call(void 0, ce,{variant:"contained",onClick:d,isLoading:i,children:"Recuperar Senha"})]})]})}function Xn(t){var d;let{loginData:e,credentialsConfig:r,onLoginFailed:n,onLoginSuccess:o}=t,[i,s]=_react.useState.call(void 0, ""),{selecionarLicenca:a,isSubmitting:l}=_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 he(this,null,function*(){try{let c=yield a(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:(d=e==null?void 0:e.empresas)==null?void 0:d.map(c=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:c.uuid,children:c.nome},c.uuid))}),_jsxruntime.jsx.call(void 0, ce,{fullWidth:!0,variant:"contained",onClick:u,isLoading:l,sx:{mt:1},children:"Confirmar"})]})}function ss(t){var p;let{credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n,appName:o}=t,[i,s]=_react.useState.call(void 0, ),[a,l]=_react.useState.call(void 0, !1),{selecionarLicenca:u}=_hooks.useCredentials.call(void 0, e);function d(m){return he(this,null,function*(){try{if(Array.isArray(m==null?void 0:m.empresas)){if((m==null?void 0:m.empresas.length)===1){let y=yield u(m,m.empresas[0].uuid);y&&r(y);return}s(m);return}r(m)}catch(y){n(y)}})}function c(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.Box,{sx:{height:"100vh"},children:_jsxruntime.jsxs.call(void 0, _material.Container,{component:"main",maxWidth:"xs",sx:{height:"80%",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, Mn,{label:o}),!a&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:i!=null&&i.empresas&&((p=i==null?void 0:i.empresas)==null?void 0:p.length)>0?_jsxruntime.jsx.call(void 0, Xn,{loginData:i,credentialsConfig:e,onLoginSuccess:r,onLoginFailed:n}):_jsxruntime.jsx.call(void 0, Kn,{credentialsConfig:e,onLoginSuccess:d,onLoginFailed:n,onEsqueciSenhaClick:c})}),a&&_jsxruntime.jsx.call(void 0, _material.Box,{sx:{marginTop:3},children:_jsxruntime.jsx.call(void 0, Hn,{onLoginClick:c,credentialsConfig:e})})]})})]})})}exports.Button = ce; exports.ButtonContainer = Ge; exports.Checkbox = no; exports.ColorsGrid = io; exports.CurrencyCellStyle = Zp; exports.CurrencyTextField = Wr; exports.DataTable = ma; exports.DataTableOptions = Zr; exports.DeleteContainer = Gr; exports.Dialog = Fe; exports.FilterContainer = rn; exports.FilterControl = $t; exports.Flag = Po; exports.FormContainer = sn; exports.LabelValue = Ci; exports.MioAuth = ss; exports.OptionStyles = Hp; exports.PageTitle = wi; exports.SearchTextField = vr; exports.Tooltip = Ze; exports.Transporter = In; exports.theme = U;
|
|
10
10
|
/*! Bundled license information:
|
|
11
11
|
|
|
12
12
|
react-is/cjs/react-is.production.min.js:
|