jclib-ui 1.1.19 → 1.2.1
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/jclib-ui.css +1 -1
- package/dist/jclib-ui.es.js +92 -73
- package/dist/jclib-ui.es.js.map +1 -1
- package/dist/jclib-ui.umd.js +83 -63
- package/dist/jclib-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/lib/navbar/NavbarColors.d.ts +0 -91
package/dist/jclib-ui.umd.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/"production"===process.env.NODE_ENV?g.exports=function(){if(m)return v;m=1;var e=t,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,l={},u=null,c=null;for(s in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:u,ref:c,props:l,_owner:o.current}}return v.Fragment=r,v.jsx=s,v.jsxs=s,v}():g.exports=(b||(b=1,"production"!==process.env.NODE_ENV&&function(){var e,n=t,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,v=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,n)}function y(e){return e.displayName||"Context"}function k(e){if(null==e)return null;if("number"==typeof e.tag&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case i:return"Portal";case s:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case u:return y(e)+".Consumer";case l:return y(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:k(e.type)||"Memo";case f:var n=e,r=n._payload,m=n._init;try{return k(m(r))}catch(g){return null}}return null}e=Symbol.for("react.module.reference");var C,_,w,j,S,E,N,A=Object.assign,I=0;function T(){}T.__reactDisabledLog=!0;var F,D=v.ReactCurrentDispatcher;function O(e,t,n){if(void 0===F)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);F=r&&r[1]||""}return"\n"+F+e}var R,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function P(e,t){if(!e||M)return"";var n,r=R.get(e);if(void 0!==r)return r;M=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=D.current,D.current=null,function(){if(0===I){C=console.log,_=console.info,w=console.warn,j=console.error,S=console.group,E=console.groupCollapsed,N=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(f){n=f}Reflect.construct(e,[],a)}else{try{a.call()}catch(f){n=f}e.call(a.prototype)}}else{try{throw Error()}catch(f){n=f}e()}}catch(m){if(m&&n&&"string"==typeof m.stack){for(var s=m.stack.split("\n"),l=n.stack.split("\n"),u=s.length-1,c=l.length-1;u>=1&&c>=0&&s[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(s[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||s[u]!==l[c]){var d="\n"+s[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&R.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{M=!1,D.current=i,function(){if(0===--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:C}),info:A({},e,{value:_}),warn:A({},e,{value:w}),error:A({},e,{value:j}),group:A({},e,{value:S}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:N})})}I<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var h=e?e.displayName||e.name:"",p=h?O(h):"";return"function"==typeof e&&R.set(e,p),p}function L(e,t,n){if(null==e)return"";if("function"==typeof e)return P(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return O(e);switch(e){case d:return O("Suspense");case h:return O("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return P(e.render,!1);case p:return L(e.type,t,n);case f:var i=e,o=i._payload,a=i._init;try{return L(a(o),t,n)}catch(s){}}return""}R=new B;var V=Object.prototype.hasOwnProperty,z={},$=v.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);$.setExtraStackFrame(n)}else $.setExtraStackFrame(null)}var q=Array.isArray;function H(e){return q(e)}function W(e){return""+e}function Y(e){if(function(e){try{return W(e),!1}catch(t){return!0}}(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),W(e)}var G,K,X=v.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n,i,o){var a,s={},l=null,u=null;for(a in void 0!==n&&(Y(n),l=""+n),function(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(Y(t.key),l=""+t.key),function(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e){"string"==typeof e.ref&&X.current}(t)),t)V.call(t,a)&&!J.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===s[a]&&(s[a]=c[a])}if(l||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){G||(G=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(s,d),u&&function(e,t){var n=function(){K||(K=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(s,d)}return function(e,t,n,i,o,a,s){var l={$$typeof:r,type:e,key:t,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,u,o,i,X.current,s)}var Q,ee=v.ReactCurrentOwner,te=v.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function ie(){if(ee.current){var e=k(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var oe={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ie();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!oe[n]){oe[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+k(e._owner.type)+"."),ne(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function se(e,t){if("object"==typeof e)if(H(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ae(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var i=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof i&&i!==e.entries)for(var o,a=i.call(e);!(o=a.next()).done;)re(o.value)&&ae(o.value,t)}}function le(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=k(n);!function(e,t,n,r,i){var o=Function.call.bind(V);for(var a in e)if(o(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){s=u}!s||s instanceof Error||(U(i),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),U(null)),s instanceof Error&&!(s.message in z)&&(z[s.message]=!0,U(i),b("Failed %s type: %s",n,s.message),U(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Q||(Q=!0,b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ue={};function ce(t,n,i,g,v,x){var y=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===s||t===a||t===d||t===h||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===l||t.$$typeof===u||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)}(t);if(!y){var C,_="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),_+=ie(),null===t?C="null":H(t)?C="array":void 0!==t&&t.$$typeof===r?(C="<"+(k(t.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):C=typeof t,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,_)}var w=Z(t,n,i,v,x);if(null==w)return w;if(y){var j=n.children;if(void 0!==j)if(g)if(H(j)){for(var S=0;S<j.length;S++)se(j[S],t);Object.freeze&&Object.freeze(j)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else se(j,t)}if(V.call(n,"key")){var E=k(t),N=Object.keys(n).filter(function(e){return"key"!==e}),A=N.length>0?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}";ue[E+A]||(b('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',A,E,N.length>0?"{"+N.join(": ..., ")+": ...}":"{}",E),ue[E+A]=!0)}return t===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(w):le(w),w}var de=function(e,t,n){return ce(e,t,n,!1)},he=function(e,t,n){return ce(e,t,n,!0)};x.Fragment=o,x.jsx=de,x.jsxs=he}()),x);var y=g.exports;const k=i.div`
|
|
10
|
+
*/"production"===process.env.NODE_ENV?g.exports=function(){if(m)return v;m=1;var e=t,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,l={},u=null,c=null;for(s in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,s)&&!a.hasOwnProperty(s)&&(l[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===l[s]&&(l[s]=t[s]);return{$$typeof:n,type:e,key:u,ref:c,props:l,_owner:o.current}}return v.Fragment=r,v.jsx=s,v.jsxs=s,v}():g.exports=(b||(b=1,"production"!==process.env.NODE_ENV&&function(){var e,n=t,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.iterator,v=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,n)}function y(e){return e.displayName||"Context"}function k(e){if(null==e)return null;if("number"==typeof e.tag&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case i:return"Portal";case s:return"Profiler";case a:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case u:return y(e)+".Consumer";case l:return y(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:k(e.type)||"Memo";case f:var n=e,r=n._payload,m=n._init;try{return k(m(r))}catch(g){return null}}return null}e=Symbol.for("react.module.reference");var j,C,_,w,S,E,N,A=Object.assign,I=0;function T(){}T.__reactDisabledLog=!0;var F,D=v.ReactCurrentDispatcher;function O(e,t,n){if(void 0===F)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);F=r&&r[1]||""}return"\n"+F+e}var R,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function P(e,t){if(!e||M)return"";var n,r=R.get(e);if(void 0!==r)return r;M=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=D.current,D.current=null,function(){if(0===I){j=console.log,C=console.info,_=console.warn,w=console.error,S=console.group,E=console.groupCollapsed,N=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(f){n=f}Reflect.construct(e,[],a)}else{try{a.call()}catch(f){n=f}e.call(a.prototype)}}else{try{throw Error()}catch(f){n=f}e()}}catch(m){if(m&&n&&"string"==typeof m.stack){for(var s=m.stack.split("\n"),l=n.stack.split("\n"),u=s.length-1,c=l.length-1;u>=1&&c>=0&&s[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(s[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||s[u]!==l[c]){var d="\n"+s[u].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&R.set(e,d),d}}while(u>=1&&c>=0);break}}}finally{M=!1,D.current=i,function(){if(0===--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:j}),info:A({},e,{value:C}),warn:A({},e,{value:_}),error:A({},e,{value:w}),group:A({},e,{value:S}),groupCollapsed:A({},e,{value:E}),groupEnd:A({},e,{value:N})})}I<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var h=e?e.displayName||e.name:"",p=h?O(h):"";return"function"==typeof e&&R.set(e,p),p}function L(e,t,n){if(null==e)return"";if("function"==typeof e)return P(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return O(e);switch(e){case d:return O("Suspense");case h:return O("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return P(e.render,!1);case p:return L(e.type,t,n);case f:var i=e,o=i._payload,a=i._init;try{return L(a(o),t,n)}catch(s){}}return""}R=new B;var V=Object.prototype.hasOwnProperty,z={},$=v.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);$.setExtraStackFrame(n)}else $.setExtraStackFrame(null)}var q=Array.isArray;function H(e){return q(e)}function W(e){return""+e}function Y(e){if(function(e){try{return W(e),!1}catch(t){return!0}}(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),W(e)}var G,K,X=v.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n,i,o){var a,s={},l=null,u=null;for(a in void 0!==n&&(Y(n),l=""+n),function(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(Y(t.key),l=""+t.key),function(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e){"string"==typeof e.ref&&X.current}(t)),t)V.call(t,a)&&!J.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===s[a]&&(s[a]=c[a])}if(l||u){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){G||(G=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(s,d),u&&function(e,t){var n=function(){K||(K=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(s,d)}return function(e,t,n,i,o,a,s){var l={$$typeof:r,type:e,key:t,ref:n,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,u,o,i,X.current,s)}var Q,ee=v.ReactCurrentOwner,te=v.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=L(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function ie(){if(ee.current){var e=k(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var oe={};function ae(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ie();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!oe[n]){oe[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+k(e._owner.type)+"."),ne(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function se(e,t){if("object"==typeof e)if(H(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ae(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var i=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof i&&i!==e.entries)for(var o,a=i.call(e);!(o=a.next()).done;)re(o.value)&&ae(o.value,t)}}function le(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=k(n);!function(e,t,n,r,i){var o=Function.call.bind(V);for(var a in e)if(o(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){s=u}!s||s instanceof Error||(U(i),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),U(null)),s instanceof Error&&!(s.message in z)&&(z[s.message]=!0,U(i),b("Failed %s type: %s",n,s.message),U(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Q||(Q=!0,b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ue={};function ce(t,n,i,g,v,x){var y=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===s||t===a||t===d||t===h||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===l||t.$$typeof===u||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)}(t);if(!y){var j,C="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),C+=ie(),null===t?j="null":H(t)?j="array":void 0!==t&&t.$$typeof===r?(j="<"+(k(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):j=typeof t,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,C)}var _=Z(t,n,i,v,x);if(null==_)return _;if(y){var w=n.children;if(void 0!==w)if(g)if(H(w)){for(var S=0;S<w.length;S++)se(w[S],t);Object.freeze&&Object.freeze(w)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else se(w,t)}if(V.call(n,"key")){var E=k(t),N=Object.keys(n).filter(function(e){return"key"!==e}),A=N.length>0?"{key: someKey, "+N.join(": ..., ")+": ...}":"{key: someKey}";ue[E+A]||(b('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',A,E,N.length>0?"{"+N.join(": ..., ")+": ...}":"{}",E),ue[E+A]=!0)}return t===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(_):le(_),_}var de=function(e,t,n){return ce(e,t,n,!1)},he=function(e,t,n){return ce(e,t,n,!0)};x.Fragment=o,x.jsx=de,x.jsxs=he}()),x);var y=g.exports;const k=i.div`
|
|
11
11
|
position: fixed;
|
|
12
12
|
top: 3px;
|
|
13
13
|
left: 3px;
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
border-radius: 99px;
|
|
19
19
|
pointer-events: none;
|
|
20
20
|
z-index: 9999999;
|
|
21
|
-
`,
|
|
21
|
+
`,j=" 🔴 ",C=" 🟢 ";function _(){t.useEffect(()=>{("localhost"==window.location.hostname||"127.0.0.1"==window.location.hostname||"[::1]"==window.location.hostname||window.location.hostname.startsWith("192.168."))&&!document.title.includes(j)&&(document.title=`${j}${document.title}`)},[])}function w(e){function r(){const t=e?[].concat(e):["test.","test-","dev."];return Boolean(t.some(e=>window.location.hostname.includes(e)))}if(t.useEffect(()=>{r()&&!document.title.includes(C)&&(document.title=`${C}${document.title}`)},[e]),r()&&n.isMobile())return y.jsx(k,{})}const S=t.createContext({modalList:[],theme:"light",toggleTheme:()=>{},versionApp:"",addModal:(e,t)=>{},removeModal:e=>{},clearModals:()=>{},showBtnTop:!1,setShowBtnTop:()=>{},globalApiConfig:null,setTheme:()=>{},canChangeTheme:!1,reportType:0,setReportType:e=>{}}),E="sys/theme";let N=!1;function A(){const e=t.useContext(S);if(!(null==e?void 0:e.addModal))throw new Error("'ModalProvider' não encontrado!");return e}const I=1,T=2,F=3,D="jc-alert-hide-sb";function O({type:e=T,onConfirm:i,onCancel:o,title:a,text:s="",children:l,defaultBtn:u=2}){const c=t.useRef(),d=t.useRef(),{addModal:h,removeModal:p}=A(),[f]=t.useState("alert-"+n.random()),m=r.useDragControls();let g="jc-erro";switch(e){case T:g="jc-aviso";break;case F:g="jc-conf"}const v=t.useCallback(t=>{e===F&&("KeyS"===t.code&&i&&i(),"KeyN"===t.code&&o&&o())},[o,i,e]);return t.useEffect(()=>(h(f,e===F?o:i),()=>p(f)),[]),t.useEffect(()=>{var e;null==(e=null==c?void 0:c.current)||e.focus()},[c]),t.useEffect(()=>(document.addEventListener("keydown",v,!1),document.body.classList.add(D),()=>{document.removeEventListener("keydown",v,!1),document.body.classList.remove(D)}),[v]),y.jsx(r.motion.div,{className:"jc-alert--container",ref:d,children:y.jsxs(r.motion.div,{className:"jc-alert "+g,drag:!0,dragConstraints:d,dragElastic:.1,dragMomentum:!1,dragControls:m,dragListener:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[y.jsx("div",{className:"jc-close-button",onClick:function(){e===F?o():i()},children:y.jsx("i",{className:"fa-solid fa-xmark"})}),y.jsxs("div",{className:"jc-alert-header",onPointerDown:function(e){n.isMobile()||m.start(e)},children:[y.jsxs("div",{className:"icon",children:[e===T&&y.jsx("i",{className:"fa-solid fa-check"}),e===I&&y.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),e===F&&y.jsx("i",{className:"fas fa-question"})]}),y.jsx("div",{className:"jc-alert-title",children:a})]}),y.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?y.jsx(hi,{value:s}):y.jsx(y.Fragment,{children:s||l})}),y.jsxs("div",{className:"jc-alert-buttons",children:[(e===I||e===T)&&y.jsx("button",{ref:c,type:"button",className:"btn btn-confirm",onClick:i,children:"OK"}),e===F&&y.jsxs(y.Fragment,{children:[y.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:i,tabIndex:99,ref:1===u?c:null,children:[y.jsx("u",{children:"S"}),"im"]}),y.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:o,tabIndex:98,ref:2===u?c:null,children:[y.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function R({onConfirm:e,text:t="",children:n}){return y.jsx(O,{type:I,title:"Atenção!",text:t,onConfirm:e,children:n})}const M={baseURL:"",timeout:3e4,auth:{username:"",password:"",header:"x-auth",prefix:"Bearer"},version:"",ident:"",loginRoute:"/",refreshRoute:"",isProductionMode:!0,withCredentials:!1,getToken:()=>"",afterRequest:e=>{}};const B=i.div`
|
|
22
22
|
@media (max-width: 767px) {
|
|
23
23
|
overflow-x: auto;
|
|
24
24
|
}
|
|
25
25
|
`,P=i.table`
|
|
26
26
|
--color-tb: var(--pn-color-border);
|
|
27
|
-
--color-bg: var(--
|
|
27
|
+
--color-bg: var(--jc-superficie);
|
|
28
28
|
--table-border: 1px solid var(--bs-border-color);
|
|
29
29
|
|
|
30
30
|
width: 100%;
|
|
31
|
-
|
|
31
|
+
font-variant-numeric: tabular-nums; // valores alinhados
|
|
32
32
|
|
|
33
33
|
border-collapse: separate;
|
|
34
34
|
border-spacing: 0;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
border-top: ${({hasBorder:e})=>e?"var(--table-border)":"none"};
|
|
37
37
|
|
|
38
38
|
tr {
|
|
39
|
-
--table-line-height:
|
|
39
|
+
--table-line-height: 40px;
|
|
40
40
|
height: var(--table-line-height);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
thead {
|
|
56
|
-
background-color: var(--
|
|
56
|
+
background-color: var(--jc-superficie-2);
|
|
57
57
|
|
|
58
58
|
&.table-header--fixed {
|
|
59
59
|
position: sticky;
|
|
@@ -62,13 +62,16 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
th {
|
|
65
|
-
border-bottom:
|
|
66
|
-
padding:
|
|
67
|
-
color: var(--
|
|
68
|
-
font-
|
|
65
|
+
border-bottom: 1px solid var(--jc-borda);
|
|
66
|
+
padding: var(--jc-esp-2);
|
|
67
|
+
color: var(--jc-texto-suave);
|
|
68
|
+
font-size: var(--jc-fs-xs);
|
|
69
|
+
font-weight: var(--jc-peso-forte);
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
letter-spacing: 0.04em;
|
|
69
72
|
|
|
70
73
|
&:first-child {
|
|
71
|
-
border-left: ${({hasBorder:e})=>e?"
|
|
74
|
+
border-left: ${({hasBorder:e})=>e?"3px solid var(--jc-borda)":"none"};
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
}
|
|
@@ -86,16 +89,25 @@
|
|
|
86
89
|
background-color: var(--table-hover);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
// destaque somente quando não está no formato de card
|
|
93
|
+
@media (min-width: ${({sizeBreak:e})=>Number(e||767)+1}px) {
|
|
94
|
+
&.linha-marcada {
|
|
95
|
+
background-color: var(--table-marked) !important;
|
|
96
|
+
|
|
97
|
+
td:first-child {
|
|
98
|
+
box-shadow: inset 3px 0 0 var(--jc-destaque);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
91
101
|
}
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
td {
|
|
95
|
-
padding:
|
|
105
|
+
padding: var(--jc-esp-1) var(--jc-esp-2);
|
|
106
|
+
// com border-collapse: separate a borda do tr não aparece; a divisória fica no td
|
|
107
|
+
border-bottom: ${({hasBorder:e})=>e?"var(--table-border)":"1px solid var(--jc-borda)"};
|
|
96
108
|
|
|
97
109
|
&:first-child {
|
|
98
|
-
border-left: ${({hasBorder:e})=>e?"
|
|
110
|
+
border-left: ${({hasBorder:e})=>e?"3px solid var(--color-tb)":"none"};
|
|
99
111
|
}
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -144,9 +156,10 @@
|
|
|
144
156
|
flex-direction: column;
|
|
145
157
|
margin-bottom: 10px;
|
|
146
158
|
background-color: var(--color-bg);
|
|
147
|
-
border
|
|
148
|
-
border-
|
|
149
|
-
|
|
159
|
+
border: 1px solid var(--jc-borda);
|
|
160
|
+
border-top: 3px solid var(--color-tb);
|
|
161
|
+
border-radius: var(--jc-raio);
|
|
162
|
+
padding: var(--jc-esp-2) var(--jc-esp-1);
|
|
150
163
|
|
|
151
164
|
&:nth-child(even),
|
|
152
165
|
&:hover {
|
|
@@ -172,9 +185,9 @@
|
|
|
172
185
|
|
|
173
186
|
.titulo {
|
|
174
187
|
display: inline;
|
|
175
|
-
font-size:
|
|
176
|
-
font-weight:
|
|
177
|
-
color:
|
|
188
|
+
font-size: var(--jc-fs-sm);
|
|
189
|
+
font-weight: var(--jc-peso-medio);
|
|
190
|
+
color: var(--jc-texto-suave);
|
|
178
191
|
}
|
|
179
192
|
|
|
180
193
|
.col-campo2 {
|
|
@@ -184,7 +197,7 @@
|
|
|
184
197
|
.acoes {
|
|
185
198
|
margin-top: 5px;
|
|
186
199
|
padding-top: 5px;
|
|
187
|
-
border-top: 1px solid var(--
|
|
200
|
+
border-top: 1px solid var(--jc-borda);
|
|
188
201
|
|
|
189
202
|
.acoes-layout .btn {
|
|
190
203
|
font-size: 17px;
|
|
@@ -209,10 +222,10 @@
|
|
|
209
222
|
width: 15px;
|
|
210
223
|
font-size: 10px;
|
|
211
224
|
border: 1px solid
|
|
212
|
-
${e=>e.value?"
|
|
213
|
-
border-radius:
|
|
214
|
-
color: ${e=>e.value?"
|
|
215
|
-
background-color: ${e=>e.value?"
|
|
225
|
+
${e=>e.value?"var(--jc-secundaria)":"var(--bs-border-color)"};
|
|
226
|
+
border-radius: var(--jc-raio-sm);
|
|
227
|
+
color: ${e=>e.value?"var(--jc-secundaria-contraste)":""};
|
|
228
|
+
background-color: ${e=>e.value?"var(--jc-secundaria)":"var(--jc-superficie)"};
|
|
216
229
|
`,e.hasTableLineClick=!1;function V(e,t){if("function"==typeof e.campo)return e.campo(t);if("string"==typeof e.campo){const r=t[e.campo];return e.campo2?y.jsxs("div",{className:"col-campo2",children:[y.jsx("div",{className:"fw-bold",children:r}),y.jsx("small",{className:"text-secondary",children:t[e.campo2]})]}):"date"==e.tipo?n.formatData(r):"datetime"==e.tipo?n.formatDataHora(r):"float"==e.tipo||"numeric"==e.tipo?n.formatValor(r,2,!1):"money"==e.tipo||"currency"==e.tipo||e.money?n.formatValor(r,2,!0):"boolean"==typeof r?y.jsx("input",{type:"checkbox",checked:r,readOnly:!0,className:"form-check-input",style:{marginTop:3,cursor:"default"}}):r}return null}const z=e=>{let t="left";return("float"===e.tipo||"currency"===e.tipo||e.money)&&(t="right"),e.campoChave&&(t="center"),e.align&&(t=e.align),t};function $({colunas:e,fixedHeader:t,incColActions:n=!0}){return e?y.jsx("thead",{className:t?"table-header--fixed":"",children:y.jsxs("tr",{children:[e.filter(e=>"color"!==e.campo).map((e,t)=>"boolean"!=typeof e.visible||e.visible?y.jsx("th",{className:(null==e?void 0:e.className)||"",style:{textAlign:z(e)},children:e.titulo},t):null),n&&y.jsx("th",{})]})}):null}function U({colunas:e,acoes:n,opcoes:r,dados:i,colorir:o,getLineColor:a,onClick:s}){var l;const u=(null==(l=null==n?void 0:n.acoes)?void 0:l.length)||"auto",[c,d]=t.useState(null);function h(e,t){let n="var(--bs-body-color)";return o&&t.color?t.color:(a&&(n=a(t)||n),n)}if(!i||0==(null==i?void 0:i.length))return null;function p(e){e.preventDefault(),e.stopPropagation()}return y.jsx("tbody",{children:null==i?void 0:i.map((t,i)=>{var o;return y.jsxs("tr",{role:s?"button":"",className:c===i?"linha-marcada":"",onClick:e=>{d(i),s&&s(t,e)},children:[null==e?void 0:e.map((e,n)=>{if("boolean"==typeof e.visible&&!e.visible)return null;let r=e.campoChave?65:e.largura||"auto";return e.campoChave&&e.largura&&(r=e.largura),y.jsx("td",{className:e.className||"",style:{textAlign:z(e),fontWeight:e.campoChave||e.bold?"bold":"normal",color:h(0,t),width:r},onClick:n=>{(null==e?void 0:e.onClick)&&(n.stopPropagation(),e.onClick(t))},role:(null==e?void 0:e.onClick)?"button":"",children:y.jsxs("div",{children:[e.titulo&&y.jsxs("span",{className:"titulo",children:[e.tituloCard||e.titulo,": "]}),V(e,t)]})},n)}),n&&(null==(o=n.acoes)?void 0:o.length)>0&&y.jsx("td",{className:"acoes",style:{width:u},onClick:p,children:y.jsxs("div",{className:"acoes-layout",children:[null==n?void 0:n.acoes.map((e,r)=>y.jsx("span",{onClick:()=>{var r,o;(null==(o=null==(r=null==e?void 0:e.botao)?void 0:r.props)?void 0:o.disabled)||(d(i),e.funcao(t[n.campo],t,i))},children:e.botao},r)),r&&y.jsx("span",{children:y.jsx(L,{items:r,size:"sm",title:"Opções",dados:t,children:y.jsx("i",{className:"fas fa-ellipsis-h"})})})]})})]},i)})})}i.div`
|
|
217
230
|
display: inline-block;
|
|
218
231
|
width: 27px;
|
|
@@ -227,9 +240,9 @@
|
|
|
227
240
|
font-size: 17px;
|
|
228
241
|
}
|
|
229
242
|
`,i.div`
|
|
230
|
-
background-color:
|
|
231
|
-
border: 1px solid ${e=>e.color||"
|
|
232
|
-
border-top: 8px solid ${e=>e.color||"
|
|
243
|
+
background-color: var(--jc-superficie);
|
|
244
|
+
border: 1px solid ${e=>e.color||"var(--jc-borda)"};
|
|
245
|
+
border-top: 8px solid ${e=>e.color||"var(--jc-borda)"};
|
|
233
246
|
border-radius: 0 0 6px 6px;
|
|
234
247
|
padding-bottom: 8px;
|
|
235
248
|
`,i.div`
|
|
@@ -237,12 +250,12 @@
|
|
|
237
250
|
align-items: center;
|
|
238
251
|
padding: 5px 0;
|
|
239
252
|
margin: 5px 20px;
|
|
240
|
-
border-bottom: 1px solid
|
|
253
|
+
border-bottom: 1px solid var(--jc-borda);
|
|
241
254
|
h3 {
|
|
242
255
|
font-size: 20px;
|
|
243
256
|
}
|
|
244
257
|
`,i.div`
|
|
245
|
-
background-color:
|
|
258
|
+
background-color: var(--jc-superficie);
|
|
246
259
|
padding: 5px 20px;
|
|
247
260
|
`,i.h3`
|
|
248
261
|
font-size: 1.5em;
|
|
@@ -252,18 +265,18 @@
|
|
|
252
265
|
cursor: pointer;
|
|
253
266
|
font-size: 22px;
|
|
254
267
|
text-align: center;
|
|
255
|
-
color: ${e=>e.ativo?"
|
|
268
|
+
color: ${e=>e.ativo?"var(--jc-secundaria)":"var(--jc-texto-suave)"};
|
|
256
269
|
transition: all ease 0.5s;
|
|
257
|
-
`;const q=({color:e})=>y.jsx("i",{className:"fas fa-toggle-on",style:{color:e||"
|
|
270
|
+
`;const q=({color:e})=>y.jsx("i",{className:"fas fa-toggle-on",style:{color:e||"var(--jc-secundaria)"}}),H=({color:e})=>y.jsx("i",{className:"fas fa-toggle-off",style:{color:e||"var(--jc-texto-suave)"}}),W=()=>y.jsx("i",{className:"far fa-check-circle"}),Y=()=>y.jsx("i",{className:"fas fa-search"}),G=()=>y.jsx("i",{className:"far fa-copy"}),K=()=>y.jsx("i",{className:"fas fa-times"});i.div`
|
|
258
271
|
width: 16px;
|
|
259
272
|
height: 16px;
|
|
260
273
|
font-size: 9px;
|
|
261
274
|
display: flex;
|
|
262
275
|
justify-content: center;
|
|
263
276
|
align-items: center;
|
|
264
|
-
color:
|
|
265
|
-
background-color: ${e=>e.checked?"
|
|
266
|
-
border: 1px solid ${e=>e.checked?"
|
|
277
|
+
color: var(--jc-secundaria-contraste);
|
|
278
|
+
background-color: ${e=>e.checked?"var(--jc-secundaria)":"var(--jc-superficie)"};
|
|
279
|
+
border: 1px solid ${e=>e.checked?"var(--jc-secundaria)":"var(--jc-borda)"};
|
|
267
280
|
border-radius: 4px;
|
|
268
281
|
cursor: ${e=>e.onClick?"pointer":"default"};
|
|
269
282
|
`;const X=({...e})=>y.jsx("i",{className:"fas fa-sign-out-alt",...e}),J=()=>y.jsx("i",{className:"fa-solid fa-plus"}),Z=()=>y.jsx("i",{className:"fas fa-pencil-alt"}),Q=()=>y.jsx("i",{className:"fas fa-trash-alt"}),ee=()=>y.jsx("i",{className:"fas fa-search"}),te=()=>y.jsx("i",{className:"fa-solid fa-xmark"}),ne=()=>y.jsx("i",{className:"fa-solid fa-circle-question"}),re=({...e})=>y.jsx("i",{className:"fa-solid fa-arrow-up-right-from-square",...e}),ie=({...e})=>y.jsx("i",{className:"fa-solid fa-qrcode",...e});function oe({label:e,...t}){return y.jsxs("div",{className:"inp-color--container",children:[y.jsx("input",{type:"color",...t}),y.jsx("div",{children:e})]})}const ae=i.div`
|
|
@@ -375,7 +388,7 @@
|
|
|
375
388
|
&.close {
|
|
376
389
|
margin-right: var(--margin-hor);
|
|
377
390
|
&:hover {
|
|
378
|
-
color:
|
|
391
|
+
color: var(--jc-erro);
|
|
379
392
|
}
|
|
380
393
|
}
|
|
381
394
|
`,le=({...e})=>y.jsx(se,{type:"button",title:"Fechar",className:"close",...e,children:y.jsx("i",{className:"fa-solid fa-xmark"})});function ue({...e}){return y.jsx(se,{type:"button",className:"btn-help",...e,children:y.jsx(ne,{})})}const ce=({...e})=>y.jsx(se,{type:"button",className:"back",...e,children:y.jsx("i",{className:"fa-solid fa-arrow-left"})}),de=i.div`
|
|
@@ -423,20 +436,26 @@
|
|
|
423
436
|
align-items: center;
|
|
424
437
|
gap: 0 2px;
|
|
425
438
|
|
|
426
|
-
color: var(--
|
|
427
|
-
font-size:
|
|
428
|
-
|
|
439
|
+
color: var(--jc-texto);
|
|
440
|
+
font-size: var(--jc-fs-md);
|
|
441
|
+
font-weight: var(--jc-peso-forte);
|
|
442
|
+
letter-spacing: -0.01em;
|
|
429
443
|
background: var(--pn-degrade);
|
|
444
|
+
border-bottom: 1px solid var(--jc-borda);
|
|
430
445
|
border-radius: var(--pn-internal-radius) var(--pn-internal-radius) 0 0;
|
|
431
446
|
|
|
432
447
|
padding: var(--pn-padding);
|
|
433
|
-
min-height:
|
|
448
|
+
min-height: 48px;
|
|
434
449
|
|
|
435
450
|
.pn-title {
|
|
436
451
|
display: flex;
|
|
437
452
|
align-items: center;
|
|
438
|
-
gap:
|
|
453
|
+
gap: var(--jc-esp-2);
|
|
439
454
|
flex: 1;
|
|
455
|
+
|
|
456
|
+
svg {
|
|
457
|
+
color: var(--jc-secundaria);
|
|
458
|
+
}
|
|
440
459
|
}
|
|
441
460
|
|
|
442
461
|
@media print {
|
|
@@ -449,7 +468,7 @@
|
|
|
449
468
|
display: none;
|
|
450
469
|
}
|
|
451
470
|
}
|
|
452
|
-
`;function ve({value:e,isCount:t,...n}){let r;return r="number"==typeof e?t?Math.min(e,9999):e<=0?"Inclusão":`#${e}`:e,y.jsx("div",{className:"badge bg-
|
|
471
|
+
`;function ve({value:e,isCount:t,...n}){let r;return r="number"==typeof e?t?Math.min(e,9999):e<=0?"Inclusão":`#${e}`:e,y.jsx("div",{className:"badge bg-secundaria-suave text-secundaria",style:{borderRadius:"var(--pn-border-radius)"},...n,children:r})}let be="/home";function xe({title:e,count:t,codigo:n,goBack:r,goHome:i,onClose:o,children:s,maxWidth:l,className:u="",helpLink:c="",...d}){const h=a.useHistory(),p=t&&"number"==typeof t?t:0,f=p>9999?"9999+":p,m=Intl.NumberFormat("pt-br",{}).format(p),g=()=>{if(o)return o();r?h.goBack():h.push(be)},v=d.style||{};return l&&(v.maxWidth=l,d.style=v),y.jsxs("div",{className:"panel--container "+u,...d,children:[y.jsxs(ge,{children:[y.jsx("div",{className:"d-none d-sm-block",children:(r||i||o)&&y.jsx(ce,{title:"Fechar",onClick:g})}),y.jsxs("div",{className:"pn-title",children:[e,0!==p&&y.jsx(ve,{title:`Total de registros: ${m}`,value:f,isCount:!0}),y.jsx(ve,{value:n})]}),c&&y.jsx(ue,{title:"Ir para ajuda",onClick:()=>window.open(c,"_blank","noopener,noreferrer")}),(r||i||o)&&y.jsx(le,{title:"Fechar",onClick:g})]}),y.jsx("div",{className:"pn-body",children:s})]})}function ye({fileTo:e,previewUrl:r,visible:i,setVisible:o}){const{addModal:a,removeModal:s}=A(),[l]=t.useState("preview-"+n.random());return t.useEffect(()=>(i||s(l),()=>s(l)),[i]),t.useEffect(()=>{a(l,o)},[l]),y.jsxs("div",{className:"pr-box",children:[y.jsxs("div",{className:"pr-box--header",children:[y.jsxs("div",{className:"pr-box--title",children:[y.jsxs("div",{className:"pr-box--name",children:[y.jsx("div",{children:"Visualizar relatório:"}),y.jsx("div",{className:"fw-bold",children:e})]}),y.jsx("div",{children:y.jsxs("a",{href:r,download:e,children:[y.jsx("i",{className:"fa-solid fa-download me-2"}),"Salvar relatório"]})})]}),y.jsx("button",{className:"ms-4 btn btn-danger rounded-pill",onClick:o,children:y.jsx(te,{})})]}),y.jsx("iframe",{className:"pr-box--preview",src:r})]})}function ke({title:e,href:t,text:n="",children:r,...i}){let o;return o=t?t.replace(/\D/g,""):null==r?void 0:r.replace(/\D/g,""),y.jsx("a",{href:`https://wa.me/${o}?text=${encodeURI(n)}`,target:"_blank",rel:"noreferrer",title:e||"Enviar mensagem para este número usando o WhatsApp",...i,children:r||t})}function je({href:e,title:t,children:n,...r}){return y.jsx("a",{href:`mailto:${e||n}`,title:t||"Enviar um e-mail para este endereço",...r,children:n||e})}function Ce({to:e,children:t,...n}){return y.jsx("a",{href:e||t,target:"_blank",rel:"noreferrer",...n,children:t||e})}const _e=i.div`
|
|
453
472
|
.alert {
|
|
454
473
|
font-weight: bold;
|
|
455
474
|
margin-bottom: 0;
|
|
@@ -473,10 +492,11 @@
|
|
|
473
492
|
padding-top: 8px;
|
|
474
493
|
}
|
|
475
494
|
}
|
|
476
|
-
`;function
|
|
495
|
+
`;function we(){return y.jsxs(_e,{children:[y.jsx("div",{className:"alert alert-danger",children:"Falha na conexão!"}),y.jsxs("div",{children:["Possíveis causas:",y.jsx("ul",{children:navigator.onLine?y.jsxs(y.Fragment,{children:[y.jsx("li",{children:"Você está sem conexão com a internet;"}),y.jsx("li",{children:"O servidor pode estar passando por uma atualização. Por favor, tente novamente em alguns instantes."}),y.jsx("li",{children:"O servidor pode estar temporariamente indisponível."})]}):y.jsx("li",{children:"Você está sem conexão com a internet;"})}),y.jsxs("div",{children:["Se o erro persistir, por favor, entre em contato com nosso suporte técnico:",y.jsxs("ul",{children:[y.jsxs("li",{children:["Fone e WhatsApp:"," ",y.jsx(ke,{className:"numeros",children:"(27) 9 9774-2904"})]}),y.jsxs("li",{children:["E-mail:"," ",y.jsx(je,{href:"suporte@jcinfoes.com.br?subject="+encodeURI("SIPAR - Sem conexão com o servidor!"),children:"suporte@jcinfoes.com.br"})]})]})]})]})]})}let Se=null;async function Ee(e,t,n){var r;if(!(null==t?void 0:t.refreshRoute))return!1;if(401!==(null==(r=null==e?void 0:e.response)?void 0:r.status))return!1;if(null==n?void 0:n._retry)return!1;if(function(e,t){const n=String((null==e?void 0:e.url)||"");return n===t.refreshRoute||n.endsWith(t.refreshRoute)}(n,t))return!1;Se||(Se=l.post(t.refreshRoute,null,{baseURL:t.baseURL,timeout:t.timeout,withCredentials:!0}).finally(()=>{Se=null}));try{return await Se,!0}catch{return!1}}const Ne={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Ae(e={}){const n=a.useHistory(),r=new AbortController,{globalApiConfig:i}=A(),[o,s]=t.useState(Ne);return"string"==typeof e&&(e={url:e}),[async function(t){var o,a,u,c;let d,h=(null==(o=i.auth)?void 0:o.username)?{username:i.auth.username,password:i.auth.password}:void 0;if(e.headers={...e.headers,...null==t?void 0:t.headers},i.getToken){let t=i.getToken();t&&(i.auth.prefix&&(t=`${i.auth.prefix} ${t}`),e.headers[i.auth.header]=t)}i.version&&(e.headers["x-ver"]=encodeURIComponent(i.version)),i.ident&&(e.headers["x-identify"]=encodeURIComponent(i.ident));let p={baseURL:i.baseURL,timeout:i.timeout,auth:h,withCredentials:i.withCredentials,...e,...t,headers:e.headers};p.report&&(p={...p,responseType:"blob",timeout:0}),s({...Ne,loading:!0}),p.onBefore&&p.onBefore(p);try{let e;try{e=await l({...p,signal:r.signal})}catch(m){if(!(await Ee(m,i,p)))throw m;p._retry=!0,e=await l({...p,signal:r.signal})}i.afterRequest&&i.afterRequest(e),d={...Ne,data:e.data,message:e.statusText,status:e.status,headers:e.headers}}catch(m){const{ERR_NETWORK:e,ECONNABORTED:t,ETIMEDOUT:r}=l.AxiosError;if([e,t,r].includes(null==m?void 0:m.code))d={...Ne,isError:!0,status:400,message:y.jsx(we,{})};else if(m.response)switch(d={...Ne,isError:!0,status:m.response.status,message:(null==(a=m.response.data)?void 0:a.error)||m.response.data,code:null==(u=m.response.data)?void 0:u.code},m.response.status){case 400:case 500:if("blob"==(null==p?void 0:p.responseType)){let e=await m.response.data.text();e=JSON.parse(e),d.message=e.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:d.message="Servidor requer autenticação!",(null==i?void 0:i.setToken)&&(null==i||i.setToken("")),n.push(i.loginRoute);break;case 404:d.message="Servidor não possui este recurso!";break;case 405:d.message=`Método [${(null==(c=p.method)?void 0:c.toUpperCase())||"GET"}] indisponível!`;break;case 429:d.message="Muitos acessos. Tente novamente mais tarde!"}else d={...Ne,isError:!0,message:m.message}}const f=`timeout of ${i.timeout}ms exceeded`;return d.message!=f&&"Network Error"!=d.message||(d.message="Sem conexão com o servidor!"),d.isError?d.error=d.message:d.error=null,d={...d,loading:!1},s(d),(null==e?void 0:e.onTerminated)&&e.onTerminated(d),d},o,function(){r&&r.abort("Cancelado pelo usuário!")}]}let Ie=null;function Te({url:e,file:r,fileTo:i,setLoading:o}){const[a,l]=t.useState(""),[u,c]=t.useState(!1),[d,h]=t.useState(0),[p,f]=t.useState(r),[m,g]=t.useState(""),[v,,b]=Ae({url:e,method:"post",data:{file:p},report:!0,onDownloadProgress:e=>{c(e.loaded>0),h(e.loaded/e.total*100)},onTerminated:e=>{if(204===e.status)return k(3);if(e.error)l(e.error),x();else{const[,r]=i.split(".");n.isDesktop()&&"pdf"==r.toLowerCase()?(t=e.data,g(URL.createObjectURL(t))):(s(e.data,function(){let e=i.split("."),t=`-${n.getDateTimeStr().replace(/\D/g,"")}-${n.getHash(i)}`;return e[0]+=t,e=e.join("."),e}()),f(""))}var t}});function x(){Ie&&clearTimeout(Ie)}function k(e){x(),Ie=setTimeout(()=>v(),1e3*e)}return t.useEffect(()=>()=>x(),[]),t.useEffect(()=>()=>m&&URL.revokeObjectURL(m),[m]),t.useEffect(()=>{p?(o(!0),k(2)):o(!1)},[p]),y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"loading-report--area",children:[y.jsxs("div",{className:"loading-box",style:{display:m?"none":"block"},children:[y.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){u?b():l(""),o(!1)},children:y.jsx("i",{className:"fas fa-times"})}),y.jsxs("div",{className:"line",children:[u?y.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):y.jsx("div",{className:"spinner"}),y.jsx("span",{children:u?"Baixando relatório...":"Gerando relatório..."})]}),y.jsx("div",{className:"pbar",children:y.jsx("div",{style:{width:`${d}%`}})})]}),m&&y.jsx(ye,{fileTo:i,previewUrl:m,setVisible:()=>f(""),visible:!0})]}),a&&y.jsx(R,{onConfirm:()=>o(!1),children:a})]})}function Fe({search:e,setSearch:r,fnSearch:i,fnFilter:a,fnValidateFilter:s,placeHolder:l,...u}){const c=t.useRef();return y.jsxs("div",{className:"inp-pesq--input-area",children:[y.jsxs(o.InputGroup,{children:[y.jsx(o.Input,{innerRef:c,value:e,onChange:e=>r(e.target.value),placeholder:l,...u}),y.jsx(o.Button,{color:"outline-secondary",type:"button",onClick:()=>{r(""),n.isDesktop()&&(null==c?void 0:c.current)&&c.current.focus()},title:"Limpar campo de pesquisa",children:y.jsx(te,{})}),y.jsx(o.Button,{color:"secundaria",title:"Pesquisar",onClick:i,type:i?"button":"submit",children:y.jsx(ee,{})})]}),a&&y.jsxs(o.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[y.jsx("i",{className:"fas fa-filter"}),y.jsx("span",{className:"ip--btn-caption",children:" Filtros"}),s&&s()&&y.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:y.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}const De=i.div`
|
|
477
496
|
position: fixed;
|
|
478
497
|
inset: 0 0 0;
|
|
479
498
|
background-color: var(--jc-overlay-bg);
|
|
499
|
+
backdrop-filter: blur(2px);
|
|
480
500
|
z-index: 1031;
|
|
481
501
|
padding: 0 8px;
|
|
482
502
|
|
|
@@ -487,8 +507,8 @@
|
|
|
487
507
|
padding-bottom: ${e=>e.alignTop?"30px":"0"};
|
|
488
508
|
|
|
489
509
|
& > .mod-panel {
|
|
490
|
-
background-color: var(--
|
|
491
|
-
border: 1px solid var(--
|
|
510
|
+
background-color: var(--jc-superficie);
|
|
511
|
+
border: 1px solid var(--jc-borda);
|
|
492
512
|
border-radius: var(--pn-border-radius);
|
|
493
513
|
|
|
494
514
|
// no modo escuro a borda superior é mais clara
|
|
@@ -578,7 +598,7 @@
|
|
|
578
598
|
transform: ease all 0.4s;
|
|
579
599
|
animation: FadeIn 0.5s both;
|
|
580
600
|
}
|
|
581
|
-
`;function He({visible:e}){const[n,r]=t.useState([0,0]);return e?(setTimeout(()=>{let[e,t]=n;t<100?t++:t>50&&e++,100==e&&(e=0,t=0),r([e,t])},5),y.jsx(qe,{children:y.jsx("div",{className:"floating-bar",style:{left:`${n[0]}%`,width:`${n[1]}%`},children:y.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function We({visible:e,message:t="Aguarde...",isbar:n=!1}){return e?n?y.jsx(He,{visible:e}):y.jsx("div",{className:"loading--container",children:y.jsxs("div",{className:"loading-body",children:[y.jsx("div",{className:"spinner-border text-info"}),y.jsx("span",{children:t})]})}):null}function Ye({name:e,value:t,onChange:n,invalid:r=!1,...i}){return y.jsx(c,{placeholder:"Informe o telefone",className:"form-control "+(r?"is-invalid":""),format:"(##) # ####-####",mask:"_",value:t,name:e,onValueChange:t=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(t,e,n),...i})}const Ge={mask:"**.***.***/****-00",definitions:{"*":/[A-Za-z0-9]/}};function Ke(e){const t=String(e).replace(/\D/g,"");let r=!1;return n.validarCPF(t)||(r=!0),"00000000000"==t&&(r=!1),""==e&&(r=!1),r}function Xe(e){return!n.validarCNPJ(e)}function Je(e){const t=String(e).replace(/[^A-Za-z0-9]/g,"");let n=!1;return t.length<=11&&Ke(e)&&(n=!0),t.length>11&&Xe(e)&&(n=!0),""==e&&(n=!1),n}function Ze(e){return"string"==typeof e||e instanceof String}function Qe(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function et(e,t){return Array.isArray(t)?et(e,(e,n)=>t.includes(n)):Object.entries(e).reduce((e,n)=>{let[r,i]=n;return t(i,r)&&(e[r]=i),e},{})}const tt="NONE",nt="LEFT",rt="FORCE_LEFT",it="RIGHT",ot="FORCE_RIGHT";function at(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function st(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let i;if(n&&r){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!st(t[i],e[i]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const o=t instanceof RegExp,a=e instanceof RegExp;if(o&&a)return t.toString()==e.toString();if(o!=a)return!1;const s=Object.keys(t);for(i=0;i<s.length;i++)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=0;i<s.length;i++)if(!st(e[s[i]],t[s[i]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class lt{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?tt:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?nt:it}}function ut(e,t){return new ut.InputMask(e,t)}function ct(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?ut.MaskedRegExp:Ze(e)?ut.MaskedPattern:e===Date?ut.MaskedDate:e===Number?ut.MaskedNumber:Array.isArray(e)||e===Array?ut.MaskedDynamic:ut.Masked&&e.prototype instanceof ut.Masked?e:ut.Masked&&e instanceof ut.Masked?e.constructor:e instanceof Function?ut.MaskedFunction:(console.warn("Mask not found for mask",e),ut.Masked)}function dt(e){if(!e)throw new Error("Options in not defined");if(ut.Masked){if(e.prototype instanceof ut.Masked)return{mask:e};const{mask:t,...n}=e instanceof ut.Masked?{mask:e}:Qe(e)&&e.mask instanceof ut.Masked?e:{};if(t){const e=t.mask;return{...et(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...n}}}return Qe(e)?{...e}:{mask:e}}function ht(e){if(ut.Masked&&e instanceof ut.Masked)return e;const t=dt(e),n=ct(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}ut.createMask=ht;class pt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}ut.MaskElement=pt;class ft extends pt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ut.HTMLMaskElement=ft;class mt extends ft{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}ut.HTMLMaskElement=ft;class gt extends ft{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}ut.HTMLContenteditableMaskElement=gt;class vt{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>vt.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}vt.MAX_LENGTH=100;ut.InputMask=class{constructor(e,t){this.el=e instanceof pt?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new gt(e):new mt(e),this.masked=ht(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new vt,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ut.Masked)&&this.masked.constructor===ct(e))return void this.masked.updateOptions({mask:e});const t=e instanceof ut.Masked?e:ht({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),i=this.masked.optionsIsChanged(n);r&&(this.mask=t),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,nt))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new lt({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,i=n===this.masked.rawInputValue?t.removeDirection:tt;let o=this.masked.nearestInputPos(t.startChangePos+r,i);i!==tt&&(o=this.masked.nearestInputPos(o,tt)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class bt{static normalize(e){return Array.isArray(e)?e:[e,new bt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}ut.ChangeDetails=bt;class xt{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class yt{constructor(e){this._value="",this._update({...yt.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new xt(this.extractInput(e,t),e)}appendTail(e){return Ze(e)&&(e=new xt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new bt({inserted:e,rawInserted:e})):new bt}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let o=this.pad(t);const a=this._appendCharRaw(e,t);o=o.aggregate(a),a.rawInserted||o.equals(i)?i=o:this.state=n}if(i.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.unshift(this.displayValue.length-i.tailShift)}let r=this.appendTail(n);if(o=r.rawInserted.length===n.toString().length,!(o&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.shift();r=this.appendTail(n),o=r.rawInserted.length===n.toString().length}o&&r.inserted&&(this.state=t)}o||(i=new bt,this.state=r,n&&e&&(n.state=e))}return i}_appendPlaceholder(){return new bt}_appendEager(){return new bt}append(e,t,n){if(!Ze(e))throw new Error("value should be string");const r=Ze(n)?new xt(String(n)):n;let i;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,i]=this.doPrepare(e,t);for(let o=0;o<e.length;++o){const n=this._appendChar(e[o],t,r);if(!n.rawInserted&&!this.doSkipInvalid(e[o],t,r))break;i.aggregate(n)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&i.aggregate(this._appendEager()),null!=r&&(i.tailShift+=this.appendTail(r).tailShift),i}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new bt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),bt.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),bt.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,i){void 0===n&&(n=""),void 0===r&&(r=tt),void 0===i&&(i={input:!0});const o=e+t,a=this.extractTail(o),s=!0===this.eager||"remove"===this.eager;let l;s&&(r=function(e){switch(e){case nt:return rt;case it:return ot;default:return e}}(r),l=this.extractInput(0,o,{raw:!0}));let u=e;const c=new bt;if(r!==tt&&(u=this.nearestInputPos(e,t>1&&0!==e&&!s?tt:r),c.tailShift=u-e),c.aggregate(this.remove(u)),s&&r!==tt&&l===this.rawInputValue)if(r===rt){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new bt({tailShift:-1})).aggregate(this.remove(e-1))}else r===ot&&a.unshift();return c.aggregate(this.append(n,i,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!st(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||yt.EMPTY_VALUES.includes(e)&&yt.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new bt}}yt.DEFAULTS={skipInvalid:!0},yt.EMPTY_VALUES=[void 0,null,""],ut.Masked=yt;class kt{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ze(e)?new xt(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof xt)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof kt){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof ut.MaskedPattern)){return new xt(this.toString()).appendTo(e)}const t=new bt;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],i=e._mapPosToBlock(e.displayValue.length),o=r.stop;let a;if(null!=o&&(!i||i.index<=o)&&((r instanceof kt||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),a=r instanceof kt&&e._blocks[o]),a){const n=a.appendTail(r);t.aggregate(n);const i=r.toString().slice(n.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(e=>{const t="chunks"in e?new kt:new xt;return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class Ct{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,rt),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,nt),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,nt),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,ot),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,tt),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,tt),!0})}}class _t{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new bt}nearestInputPos(e,t){void 0===t&&(t=tt);const n=this._value.length;switch(t){case nt:case rt:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new bt;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,i=new bt({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new bt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new xt("")}appendTail(e){return Ze(e)&&(e=new xt(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class wt{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:a,...s}=e;this.masked=ht(s),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new bt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new bt;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new bt,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new bt:(this.isFilled=!0,new bt({inserted:this.placeholderChar}))}_appendEager(){return new bt}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=tt);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case nt:case rt:return this.isComplete?r:0;case it:case ot:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new bt}}wt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};ut.MaskedRegExp=class extends yt{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class jt extends yt{constructor(e){super({...jt.DEFAULTS,...e,definitions:Object.assign({},wt.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let i=0;i<t.length;++i){if(this.blocks){const e=t.slice(i),n=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));n.sort((e,t)=>t.length-e.length);const r=n[0];if(r){const{expose:e,repeat:t,...n}=dt(this.blocks[r]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},a=null!=t?new ut.RepeatBlock(o):ht(o);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),i+=r.length-1;continue}}let o=t[i],a=o in e;if(o===jt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){n=!n;continue}if("["===o||"]"===o){r=!r;continue}if(o===jt.ESCAPE_CHAR){if(++i,o=t[i],!o)break;a=!1}const s=a?new wt({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...dt(e[o]),parent:this}):new _t({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach((e,n)=>e.state=t[n]),super.state=n}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new bt;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const e=this._blocks[r]._appendEager();if(!e.inserted)break;t.aggregate(e)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new bt;if(!n)return r;for(let o,a=n.index;o=this._blocks[a];++a){var i;const n=o._appendChar(e,{...t,_beforeTailState:null==(i=t._beforeTailState)||null==(i=i._blocks)?void 0:i[a]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new kt;return e===t||this._forEachBlocksInRange(e,t,(e,t,r,i)=>{const o=e.extractTail(r,i);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof kt&&(o.blockIndex=t),n.extend(o)}),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(e,t,i,o)=>{r+=e.extractInput(i,o,n)}),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new bt;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,i=null!=e?e:this._blocks.length;return this._blocks.slice(r,i).forEach(n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],i=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),i=e&&r.index===e.index,o=r.offset,a=e&&i?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,o,a),e&&!i){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,r,i)=>{n.aggregate(e.remove(r,i))}),n}nearestInputPos(e,t){if(void 0===t&&(t=tt),!this._blocks.length)return 0;const n=new Ct(this,e);if(t===tt)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===nt||t===rt){if(t===nt){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===nt){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===rt?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===it||t===ot?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===ot?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,nt)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,(e,t,r,i)=>{n+=e.totalInputPositions(r,i)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){const t=new bt;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}}jt.DEFAULTS={...yt.DEFAULTS,lazy:!0,placeholderChar:"_"},jt.STOP_CHAR="`",jt.ESCAPE_CHAR="\\",jt.InputDefinition=wt,jt.FixedDefinition=_t,ut.MaskedPattern=jt;class St extends jt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=i;const a=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<s.length&&s[l]===a[l];)++l;o.mask=s.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(r.length)+i,n="9".repeat(r.length)+i),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(n[this.value.length],t):Number(i)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new bt;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(e=>this._appendCharRaw(e))}return t}}ut.MaskedRange=St;class Et extends jt{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Ze(t)?t:n}}constructor(e){super(Et.extractPatternOptions({...Et.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...i}={...Et.DEFAULTS,...e},o=Object.assign({},Et.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,r),super._update({...i,mask:Ze(t)?t:n,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Et.extractPatternOptions(e))}}Et.GET_DEFAULT_BLOCKS=()=>({d:{mask:St,from:1,to:31,maxLength:2},m:{mask:St,from:1,to:12,maxLength:2},Y:{mask:St,from:1900,to:9999}}),Et.DEFAULTS={...jt.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[n,r,i]=e.split(".").map(Number);return new Date(i,r-1,n)}},ut.MaskedDate=Et;class Nt extends yt{constructor(e){super({...Nt.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{const{expose:t,...n}=dt(e),r=ht({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:i,a=i.slice(o.length),s=this.currentMask,l=new bt,u=null==s?void 0:s.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==s?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new bt;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new bt;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...i}=e;t&&this.compiledMasks.forEach((e,n)=>e.state=t[n]),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=i}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;const{mask:r,...i}=e[n];return st(t,i)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Nt.DEFAULTS={...yt.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,o=t.compiledMasks.map((o,a)=>{const s=t.currentMask===o,l=s?o.displayValue.length:o.nearestInputPos(o.displayValue.length,rt);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):s||o.remove(l),o.append(e,t.currentMaskFlags(n)),o.appendTail(r),{index:a,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,rt)))}});return o.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[o[0].index]}},ut.MaskedDynamic=Nt;class At extends jt{constructor(e){super({...At.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map(e=>e.length),r=Math.min(...e),i=Math.max(...e)-r;n.mask="*".repeat(r),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,ot),this.value.length),r=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,n));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,(e,n)=>{const i=r[0][n];n>=this.value.length||i===e.value||(e.reset(),e._appendChar(i,t))});const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new bt({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new xt("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new bt;const n=Math.min(super.nearestInputPos(0,ot),this.value.length);let r;for(r=e;r>=0;--r){if(this.enum.filter(e=>this.matchValue(e,this.value.slice(n,r),n)).length>1)break}const i=super.remove(r,t);return i.tailShift+=r-e,i}get isComplete(){return this.enum.indexOf(this.value)>=0}}At.DEFAULTS={...jt.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},ut.MaskedEnum=At;var It;ut.MaskedFunction=class extends yt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Tt extends yt{constructor(e){super({...Tt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+at(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(at).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(at(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let a,s=!isNaN(o),l=!1;if(s){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(Tt.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!t.tail)):s=!1),s&&(s=Boolean(this._value.match(this._numberRegExp)))}s?a=new bt({inserted:this._value.slice(i.length),rawInserted:l?"":e,skip:l}):(this._value=i,a=new bt),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return a.tailShift+=(c-r)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),i=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const o=this._separatorsCountFromSlice(n);return new bt({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case tt:case nt:case rt:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===rt)return n}break}case it:case ot:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,n,r)=>t+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===Tt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tt.EMPTY_VALUES.includes(e)&&Tt.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}It=Tt,Tt.UNMASKED_RADIX=".",Tt.EMPTY_VALUES=[...yt.EMPTY_VALUES,0],Tt.DEFAULTS={...yt.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[It.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},ut.MaskedNumber=Tt;const Ft={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Dt(e,t,n){void 0===t&&(t=Ft.MASKED),void 0===n&&(n=Ft.MASKED);const r=ht(e);return e=>r.runIsolated(r=>(r[t]=e,r[n]))}ut.PIPE_TYPE=Ft,ut.createPipe=Dt,ut.pipe=function(e,t,n,r){return Dt(t,n,r)(e)};ut.RepeatBlock=class extends jt{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:i,...o}=dt(e);this._blockOpts=Object.assign({},this._blockOpts,o);const a=ht(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=i?i:a.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(ht(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new bt;for(let s,l,u=null!=(r=null==(i=this._mapPosToBlock(this.displayValue.length))?void 0:i.index)?r:Math.max(this._blocks.length-1,0);s=null!=(o=this._blocks[u])?o:l=!l&&this._allocateBlock(u);++u){var r,i,o,a;const c=s._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const i=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==o&&(o=this._blocks.length-1);let a=0;for(let s=o;i<=s&&!this._blocks[s].unmaskedValue;--s,++a);a&&(this._blocks.splice(o-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=ut}catch{}var Ot,Rt={exports:{}},Mt={exports:{}},Bt={};var Pt,Lt,Vt,zt,$t,Ut,qt,Ht,Wt,Yt,Gt,Kt,Xt,Jt,Zt={};
|
|
601
|
+
`;function He({visible:e}){const[n,r]=t.useState([0,0]);return e?(setTimeout(()=>{let[e,t]=n;t<100?t++:t>50&&e++,100==e&&(e=0,t=0),r([e,t])},5),y.jsx(qe,{children:y.jsx("div",{className:"floating-bar",style:{left:`${n[0]}%`,width:`${n[1]}%`},children:y.jsx("span",{className:"d-none",children:"Carregando..."})})})):null}function We({visible:e,message:t="Aguarde...",isbar:n=!1}){return e?n?y.jsx(He,{visible:e}):y.jsx("div",{className:"loading--container",children:y.jsxs("div",{className:"loading-body",children:[y.jsx("div",{className:"spinner-border text-info"}),y.jsx("span",{children:t})]})}):null}function Ye({name:e,value:t,onChange:n,invalid:r=!1,...i}){return y.jsx(c,{placeholder:"Informe o telefone",className:"form-control "+(r?"is-invalid":""),format:"(##) # ####-####",mask:"_",value:t,name:e,onValueChange:t=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(t,e,n),...i})}const Ge={mask:"**.***.***/****-00",definitions:{"*":/[A-Za-z0-9]/}};function Ke(e){const t=String(e).replace(/\D/g,"");let r=!1;return n.validarCPF(t)||(r=!0),"00000000000"==t&&(r=!1),""==e&&(r=!1),r}function Xe(e){return!n.validarCNPJ(e)}function Je(e){const t=String(e).replace(/[^A-Za-z0-9]/g,"");let n=!1;return t.length<=11&&Ke(e)&&(n=!0),t.length>11&&Xe(e)&&(n=!0),""==e&&(n=!1),n}function Ze(e){return"string"==typeof e||e instanceof String}function Qe(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function et(e,t){return Array.isArray(t)?et(e,(e,n)=>t.includes(n)):Object.entries(e).reduce((e,n)=>{let[r,i]=n;return t(i,r)&&(e[r]=i),e},{})}const tt="NONE",nt="LEFT",rt="FORCE_LEFT",it="RIGHT",ot="FORCE_RIGHT";function at(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function st(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let i;if(n&&r){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!st(t[i],e[i]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const o=t instanceof RegExp,a=e instanceof RegExp;if(o&&a)return t.toString()==e.toString();if(o!=a)return!1;const s=Object.keys(t);for(i=0;i<s.length;i++)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=0;i<s.length;i++)if(!st(e[s[i]],t[s[i]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class lt{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?tt:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?nt:it}}function ut(e,t){return new ut.InputMask(e,t)}function ct(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?ut.MaskedRegExp:Ze(e)?ut.MaskedPattern:e===Date?ut.MaskedDate:e===Number?ut.MaskedNumber:Array.isArray(e)||e===Array?ut.MaskedDynamic:ut.Masked&&e.prototype instanceof ut.Masked?e:ut.Masked&&e instanceof ut.Masked?e.constructor:e instanceof Function?ut.MaskedFunction:(console.warn("Mask not found for mask",e),ut.Masked)}function dt(e){if(!e)throw new Error("Options in not defined");if(ut.Masked){if(e.prototype instanceof ut.Masked)return{mask:e};const{mask:t,...n}=e instanceof ut.Masked?{mask:e}:Qe(e)&&e.mask instanceof ut.Masked?e:{};if(t){const e=t.mask;return{...et(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...n}}}return Qe(e)?{...e}:{mask:e}}function ht(e){if(ut.Masked&&e instanceof ut.Masked)return e;const t=dt(e),n=ct(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}ut.createMask=ht;class pt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}ut.MaskElement=pt;class ft extends pt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ut.HTMLMaskElement=ft;class mt extends ft{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}ut.HTMLMaskElement=ft;class gt extends ft{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}ut.HTMLContenteditableMaskElement=gt;class vt{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>vt.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}vt.MAX_LENGTH=100;ut.InputMask=class{constructor(e,t){this.el=e instanceof pt?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new gt(e):new mt(e),this.masked=ht(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new vt,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ut.Masked)&&this.masked.constructor===ct(e))return void this.masked.updateOptions({mask:e});const t=e instanceof ut.Masked?e:ht({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),i=this.masked.optionsIsChanged(n);r&&(this.mask=t),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,nt))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new lt({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,i=n===this.masked.rawInputValue?t.removeDirection:tt;let o=this.masked.nearestInputPos(t.startChangePos+r,i);i!==tt&&(o=this.masked.nearestInputPos(o,tt)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class bt{static normalize(e){return Array.isArray(e)?e:[e,new bt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}ut.ChangeDetails=bt;class xt{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class yt{constructor(e){this._value="",this._update({...yt.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new xt(this.extractInput(e,t),e)}appendTail(e){return Ze(e)&&(e=new xt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new bt({inserted:e,rawInserted:e})):new bt}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let o=this.pad(t);const a=this._appendCharRaw(e,t);o=o.aggregate(a),a.rawInserted||o.equals(i)?i=o:this.state=n}if(i.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.unshift(this.displayValue.length-i.tailShift)}let r=this.appendTail(n);if(o=r.rawInserted.length===n.toString().length,!(o&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.shift();r=this.appendTail(n),o=r.rawInserted.length===n.toString().length}o&&r.inserted&&(this.state=t)}o||(i=new bt,this.state=r,n&&e&&(n.state=e))}return i}_appendPlaceholder(){return new bt}_appendEager(){return new bt}append(e,t,n){if(!Ze(e))throw new Error("value should be string");const r=Ze(n)?new xt(String(n)):n;let i;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,i]=this.doPrepare(e,t);for(let o=0;o<e.length;++o){const n=this._appendChar(e[o],t,r);if(!n.rawInserted&&!this.doSkipInvalid(e[o],t,r))break;i.aggregate(n)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&i.aggregate(this._appendEager()),null!=r&&(i.tailShift+=this.appendTail(r).tailShift),i}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new bt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),bt.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),bt.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,i){void 0===n&&(n=""),void 0===r&&(r=tt),void 0===i&&(i={input:!0});const o=e+t,a=this.extractTail(o),s=!0===this.eager||"remove"===this.eager;let l;s&&(r=function(e){switch(e){case nt:return rt;case it:return ot;default:return e}}(r),l=this.extractInput(0,o,{raw:!0}));let u=e;const c=new bt;if(r!==tt&&(u=this.nearestInputPos(e,t>1&&0!==e&&!s?tt:r),c.tailShift=u-e),c.aggregate(this.remove(u)),s&&r!==tt&&l===this.rawInputValue)if(r===rt){let e;for(;l===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new bt({tailShift:-1})).aggregate(this.remove(e-1))}else r===ot&&a.unshift();return c.aggregate(this.append(n,i,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!st(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||yt.EMPTY_VALUES.includes(e)&&yt.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new bt}}yt.DEFAULTS={skipInvalid:!0},yt.EMPTY_VALUES=[void 0,null,""],ut.Masked=yt;class kt{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ze(e)?new xt(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof xt)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof kt){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof ut.MaskedPattern)){return new xt(this.toString()).appendTo(e)}const t=new bt;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],i=e._mapPosToBlock(e.displayValue.length),o=r.stop;let a;if(null!=o&&(!i||i.index<=o)&&((r instanceof kt||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),a=r instanceof kt&&e._blocks[o]),a){const n=a.appendTail(r);t.aggregate(n);const i=r.toString().slice(n.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(e=>{const t="chunks"in e?new kt:new xt;return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class jt{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,rt),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,nt),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,nt),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,ot),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,tt),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,tt),!0})}}class Ct{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new bt}nearestInputPos(e,t){void 0===t&&(t=tt);const n=this._value.length;switch(t){case nt:case rt:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new bt;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,i=new bt({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new bt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new xt("")}appendTail(e){return Ze(e)&&(e=new xt(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class _t{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:a,...s}=e;this.masked=ht(s),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new bt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new bt;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new bt,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new bt:(this.isFilled=!0,new bt({inserted:this.placeholderChar}))}_appendEager(){return new bt}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=tt);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case nt:case rt:return this.isComplete?r:0;case it:case ot:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new bt}}_t.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};ut.MaskedRegExp=class extends yt{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class wt extends yt{constructor(e){super({...wt.DEFAULTS,...e,definitions:Object.assign({},_t.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let i=0;i<t.length;++i){if(this.blocks){const e=t.slice(i),n=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));n.sort((e,t)=>t.length-e.length);const r=n[0];if(r){const{expose:e,repeat:t,...n}=dt(this.blocks[r]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},a=null!=t?new ut.RepeatBlock(o):ht(o);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),i+=r.length-1;continue}}let o=t[i],a=o in e;if(o===wt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){n=!n;continue}if("["===o||"]"===o){r=!r;continue}if(o===wt.ESCAPE_CHAR){if(++i,o=t[i],!o)break;a=!1}const s=a?new _t({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...dt(e[o]),parent:this}):new Ct({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach((e,n)=>e.state=t[n]),super.state=n}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new bt;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const e=this._blocks[r]._appendEager();if(!e.inserted)break;t.aggregate(e)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new bt;if(!n)return r;for(let o,a=n.index;o=this._blocks[a];++a){var i;const n=o._appendChar(e,{...t,_beforeTailState:null==(i=t._beforeTailState)||null==(i=i._blocks)?void 0:i[a]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new kt;return e===t||this._forEachBlocksInRange(e,t,(e,t,r,i)=>{const o=e.extractTail(r,i);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof kt&&(o.blockIndex=t),n.extend(o)}),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(e,t,i,o)=>{r+=e.extractInput(i,o,n)}),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new bt;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,i=null!=e?e:this._blocks.length;return this._blocks.slice(r,i).forEach(n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],i=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),i=e&&r.index===e.index,o=r.offset,a=e&&i?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,o,a),e&&!i){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,r,i)=>{n.aggregate(e.remove(r,i))}),n}nearestInputPos(e,t){if(void 0===t&&(t=tt),!this._blocks.length)return 0;const n=new jt(this,e);if(t===tt)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===nt||t===rt){if(t===nt){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===nt){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===rt?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===it||t===ot?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===ot?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,nt)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,(e,t,r,i)=>{n+=e.totalInputPositions(r,i)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){const t=new bt;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}}wt.DEFAULTS={...yt.DEFAULTS,lazy:!0,placeholderChar:"_"},wt.STOP_CHAR="`",wt.ESCAPE_CHAR="\\",wt.InputDefinition=_t,wt.FixedDefinition=Ct,ut.MaskedPattern=wt;class St extends wt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=i;const a=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<s.length&&s[l]===a[l];)++l;o.mask=s.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(r.length)+i,n="9".repeat(r.length)+i),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(n[this.value.length],t):Number(i)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new bt;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(e=>this._appendCharRaw(e))}return t}}ut.MaskedRange=St;class Et extends wt{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Ze(t)?t:n}}constructor(e){super(Et.extractPatternOptions({...Et.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...i}={...Et.DEFAULTS,...e},o=Object.assign({},Et.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,r),super._update({...i,mask:Ze(t)?t:n,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Et.extractPatternOptions(e))}}Et.GET_DEFAULT_BLOCKS=()=>({d:{mask:St,from:1,to:31,maxLength:2},m:{mask:St,from:1,to:12,maxLength:2},Y:{mask:St,from:1900,to:9999}}),Et.DEFAULTS={...wt.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:(e,t)=>{const[n,r,i]=e.split(".").map(Number);return new Date(i,r-1,n)}},ut.MaskedDate=Et;class Nt extends yt{constructor(e){super({...Nt.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{const{expose:t,...n}=dt(e),r=ht({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:i,a=i.slice(o.length),s=this.currentMask,l=new bt,u=null==s?void 0:s.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==s?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new bt;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new bt;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...i}=e;t&&this.compiledMasks.forEach((e,n)=>e.state=t[n]),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=i}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;const{mask:r,...i}=e[n];return st(t,i)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Nt.DEFAULTS={...yt.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,o=t.compiledMasks.map((o,a)=>{const s=t.currentMask===o,l=s?o.displayValue.length:o.nearestInputPos(o.displayValue.length,rt);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):s||o.remove(l),o.append(e,t.currentMaskFlags(n)),o.appendTail(r),{index:a,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(l,o.nearestInputPos(o.displayValue.length,rt)))}});return o.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[o[0].index]}},ut.MaskedDynamic=Nt;class At extends wt{constructor(e){super({...At.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map(e=>e.length),r=Math.min(...e),i=Math.max(...e)-r;n.mask="*".repeat(r),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,ot),this.value.length),r=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,n));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,(e,n)=>{const i=r[0][n];n>=this.value.length||i===e.value||(e.reset(),e._appendChar(i,t))});const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new bt({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new xt("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new bt;const n=Math.min(super.nearestInputPos(0,ot),this.value.length);let r;for(r=e;r>=0;--r){if(this.enum.filter(e=>this.matchValue(e,this.value.slice(n,r),n)).length>1)break}const i=super.remove(r,t);return i.tailShift+=r-e,i}get isComplete(){return this.enum.indexOf(this.value)>=0}}At.DEFAULTS={...wt.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},ut.MaskedEnum=At;var It;ut.MaskedFunction=class extends yt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Tt extends yt{constructor(e){super({...Tt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+at(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(at).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(at(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let a,s=!isNaN(o),l=!1;if(s){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(Tt.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!t.tail)):s=!1),s&&(s=Boolean(this._value.match(this._numberRegExp)))}s?a=new bt({inserted:this._value.slice(i.length),rawInserted:l?"":e,skip:l}):(this._value=i,a=new bt),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return a.tailShift+=(c-r)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),i=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const o=this._separatorsCountFromSlice(n);return new bt({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case tt:case nt:case rt:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===rt)return n}break}case it:case ot:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,n,r)=>t+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===Tt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tt.EMPTY_VALUES.includes(e)&&Tt.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}It=Tt,Tt.UNMASKED_RADIX=".",Tt.EMPTY_VALUES=[...yt.EMPTY_VALUES,0],Tt.DEFAULTS={...yt.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[It.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},ut.MaskedNumber=Tt;const Ft={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Dt(e,t,n){void 0===t&&(t=Ft.MASKED),void 0===n&&(n=Ft.MASKED);const r=ht(e);return e=>r.runIsolated(r=>(r[t]=e,r[n]))}ut.PIPE_TYPE=Ft,ut.createPipe=Dt,ut.pipe=function(e,t,n,r){return Dt(t,n,r)(e)};ut.RepeatBlock=class extends wt{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:i,...o}=dt(e);this._blockOpts=Object.assign({},this._blockOpts,o);const a=ht(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=i?i:a.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(ht(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new bt;for(let s,l,u=null!=(r=null==(i=this._mapPosToBlock(this.displayValue.length))?void 0:i.index)?r:Math.max(this._blocks.length-1,0);s=null!=(o=this._blocks[u])?o:l=!l&&this._allocateBlock(u);++u){var r,i,o,a;const c=s._appendChar(e,{...t,_beforeTailState:null==(a=t._beforeTailState)||null==(a=a._blocks)?void 0:a[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const i=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==o&&(o=this._blocks.length-1);let a=0;for(let s=o;i<=s&&!this._blocks[s].unmaskedValue;--s,++a);a&&(this._blocks.splice(o-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=ut}catch{}var Ot,Rt={exports:{}},Mt={exports:{}},Bt={};var Pt,Lt,Vt,zt,$t,Ut,qt,Ht,Wt,Yt,Gt,Kt,Xt,Jt,Zt={};
|
|
582
602
|
/** @license React v16.13.1
|
|
583
603
|
* react-is.development.js
|
|
584
604
|
*
|
|
@@ -586,12 +606,12 @@
|
|
|
586
606
|
*
|
|
587
607
|
* This source code is licensed under the MIT license found in the
|
|
588
608
|
* LICENSE file in the root directory of this source tree.
|
|
589
|
-
*/function Qt(){return Lt||(Lt=1,"production"===process.env.NODE_ENV?Mt.exports=function(){if(Ot)return Bt;Ot=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case p:case a:return e;default:return h}}case n:return h}}}function y(e){return x(e)===u}return Bt.AsyncMode=l,Bt.ConcurrentMode=u,Bt.ContextConsumer=s,Bt.ContextProvider=a,Bt.Element=t,Bt.ForwardRef=c,Bt.Fragment=r,Bt.Lazy=f,Bt.Memo=p,Bt.Portal=n,Bt.Profiler=o,Bt.StrictMode=i,Bt.Suspense=d,Bt.isAsyncMode=function(e){return y(e)||x(e)===l},Bt.isConcurrentMode=y,Bt.isContextConsumer=function(e){return x(e)===s},Bt.isContextProvider=function(e){return x(e)===a},Bt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Bt.isForwardRef=function(e){return x(e)===c},Bt.isFragment=function(e){return x(e)===r},Bt.isLazy=function(e){return x(e)===f},Bt.isMemo=function(e){return x(e)===p},Bt.isPortal=function(e){return x(e)===n},Bt.isProfiler=function(e){return x(e)===o},Bt.isStrictMode=function(e){return x(e)===i},Bt.isSuspense=function(e){return x(e)===d},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Bt.typeOf=x,Bt}():Mt.exports=(Pt||(Pt=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case u:case r:case o:case i:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case c:case f:case p:case a:return g;default:return h}}case n:return h}}}var y=l,k=u,
|
|
609
|
+
*/function Qt(){return Lt||(Lt=1,"production"===process.env.NODE_ENV?Mt.exports=function(){if(Ot)return Bt;Ot=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case p:case a:return e;default:return h}}case n:return h}}}function y(e){return x(e)===u}return Bt.AsyncMode=l,Bt.ConcurrentMode=u,Bt.ContextConsumer=s,Bt.ContextProvider=a,Bt.Element=t,Bt.ForwardRef=c,Bt.Fragment=r,Bt.Lazy=f,Bt.Memo=p,Bt.Portal=n,Bt.Profiler=o,Bt.StrictMode=i,Bt.Suspense=d,Bt.isAsyncMode=function(e){return y(e)||x(e)===l},Bt.isConcurrentMode=y,Bt.isContextConsumer=function(e){return x(e)===s},Bt.isContextProvider=function(e){return x(e)===a},Bt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Bt.isForwardRef=function(e){return x(e)===c},Bt.isFragment=function(e){return x(e)===r},Bt.isLazy=function(e){return x(e)===f},Bt.isMemo=function(e){return x(e)===p},Bt.isPortal=function(e){return x(e)===n},Bt.isProfiler=function(e){return x(e)===o},Bt.isStrictMode=function(e){return x(e)===i},Bt.isSuspense=function(e){return x(e)===d},Bt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Bt.typeOf=x,Bt}():Mt.exports=(Pt||(Pt=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case u:case r:case o:case i:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case c:case f:case p:case a:return g;default:return h}}case n:return h}}}var y=l,k=u,j=s,C=a,_=t,w=c,S=r,E=f,N=p,A=n,I=o,T=i,F=d,D=!1;function O(e){return x(e)===u}Zt.AsyncMode=y,Zt.ConcurrentMode=k,Zt.ContextConsumer=j,Zt.ContextProvider=C,Zt.Element=_,Zt.ForwardRef=w,Zt.Fragment=S,Zt.Lazy=E,Zt.Memo=N,Zt.Portal=A,Zt.Profiler=I,Zt.StrictMode=T,Zt.Suspense=F,Zt.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||x(e)===l},Zt.isConcurrentMode=O,Zt.isContextConsumer=function(e){return x(e)===s},Zt.isContextProvider=function(e){return x(e)===a},Zt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Zt.isForwardRef=function(e){return x(e)===c},Zt.isFragment=function(e){return x(e)===r},Zt.isLazy=function(e){return x(e)===f},Zt.isMemo=function(e){return x(e)===p},Zt.isPortal=function(e){return x(e)===n},Zt.isProfiler=function(e){return x(e)===o},Zt.isStrictMode=function(e){return x(e)===i},Zt.isSuspense=function(e){return x(e)===d},Zt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},Zt.typeOf=x}()),Zt)),Mt.exports}
|
|
590
610
|
/*
|
|
591
611
|
object-assign
|
|
592
612
|
(c) Sindre Sorhus
|
|
593
613
|
@license MIT
|
|
594
|
-
*/function en(){if(zt)return Vt;zt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Vt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(r,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]))t.call(o,u)&&(s[u]=o[u]);if(e){a=e(o);for(var c=0;c<a.length;c++)n.call(o,a[c])&&(s[a[c]]=o[a[c]])}}return s},Vt}function tn(){if(Ut)return $t;Ut=1;return $t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function nn(){return Ht?qt:(Ht=1,qt=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var rn=Qt();Rt.exports=function(){if(Kt)return Gt;Kt=1;var e=Qt(),t=en(),n=tn(),r=nn(),i=function(){if(Yt)return Wt;Yt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=tn(),n={},r=nn();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function i(i,o,a,s,l){if("production"!==process.env.NODE_ENV)for(var u in i)if(r(i,u)){var c;try{if("function"!=typeof i[u]){var d=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=i[u](o,u,s,a,null,t)}catch(p){c=p}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var h=l?l():"";e("Failed "+a+" type: "+c.message+(null!=h?h:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Wt=i}(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),Gt=function(s,l){var u="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f(function(t,r,i,o,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new p("Invalid "+o+" `"+a+"` of type `"+b(s)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<s.length;l++){var u=e(s,l,i,o,a+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:f(function(e,t,n,r,i){var o=e[t];return s(o)?null:new p("Invalid "+r+" `"+i+"` of type `"+b(o)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:f(function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+i+" `"+o+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return f(function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||c;return new p("Invalid "+i+" `"+o+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null})},node:f(function(e,t,n,r,i){return v(e[t])?null:new p("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return f(function(t,i,o,a,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[i],u=b(l);if("object"!==u)return new p("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+o+"`, expected an object.");for(var c in l)if(r(l,c)){var d=e(l,c,o,a,s+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?f(function(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(h(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===x(t)?String(t):t});return new p("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&o(arguments.length>1?"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]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),a}return f(function(t,i,o,a,s){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,i,o,a,s,n);if(null==c)return null;c.data&&r(c.data,"expectedType")&&l.push(c.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return f(function(t,r,i,o,a){var s=t[r],l=b(s);if("object"!==l)return new p("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return g(i,o,a,u,x(c));var d=c(s,u,i,o,a+"."+u,n);if(d)return d}return null})},exact:function(e){return f(function(i,o,a,s,l){var u=i[o],c=b(u);if("object"!==c)return new p("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var d=t({},i[o],e);for(var h in d){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(a,s,l,h,x(f));if(!f)return new p("Invalid "+s+" `"+l+"` key `"+h+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(u,h,a,s,l+"."+h,n);if(m)return m}return null})}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,a,s,u,d,h,f){if(u=u||c,h=h||s,f!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=u+":"+s;!t[g]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+u+"`. 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."),t[g]=!0,r++)}}return null==a[s]?i?null===a[s]?new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,s,u,d,h)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function m(e){return f(function(t,n,r,i,o,a){var s=t[n];return b(s)!==e?new p("Invalid "+i+" `"+o+"` of type `"+x(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,i){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Gt}()(rn.isElement,!0)}else Rt.exports=function(){if(Jt)return Xt;Jt=1;var e=tn();function t(){}function n(){}return n.resetWarningCache=t,Xt=function(){function r(t,n,r,i,o,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();const on=f(Rt.exports),an={mask:on.oneOfType([on.array,on.func,on.string,on.instanceOf(RegExp),on.oneOf([Date,Number,ut.Masked]),on.instanceOf(ut.Masked)]),value:on.any,unmask:on.oneOfType([on.bool,on.oneOf(["typed"])]),prepare:on.func,prepareChar:on.func,validate:on.func,commit:on.func,overwrite:on.oneOfType([on.bool,on.oneOf(["shift"])]),eager:on.oneOfType([on.bool,on.oneOf(["append","remove"])]),skipInvalid:on.bool,onAccept:on.func,onComplete:on.func,placeholderChar:on.string,displayChar:on.string,lazy:on.bool,definitions:on.object,blocks:on.object,enum:on.arrayOf(on.string),maxLength:on.number,from:on.number,to:on.number,pattern:on.string,format:on.func,parse:on.func,autofix:on.oneOfType([on.bool,on.oneOf(["pad"])]),radix:on.string,thousandsSeparator:on.string,mapToRadix:on.arrayOf(on.string),scale:on.number,normalizeZeros:on.bool,padFractionalZeros:on.bool,min:on.oneOfType([on.number,on.instanceOf(Date)]),max:on.oneOfType([on.number,on.instanceOf(Date)]),dispatch:on.func,inputRef:on.oneOfType([on.func,on.shape({current:on.object})])},sn=Object.keys(an).filter(e=>"value"!==e),ln=["value","unmask","onAccept","onComplete","inputRef"],un=sn.filter(e=>ln.indexOf(e)<0);const cn=function(e){var n;const r=((n=class extends t.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const e=this.props,t=this._extractMaskOptionsFromProps(e);var n;t.mask?this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t):(this.destroyMask(),"value"in e&&void 0!==e.value&&(null!=(n=this.element)&&n.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value))}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ut(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){const{...t}=e;return Object.keys(t).filter(e=>un.indexOf(e)<0).forEach(e=>{delete t[e]}),t}_extractNonMaskProps(e){const{...t}=e;return sn.forEach(e=>{"maxLength"!==e&&delete t[e]}),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return t.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,n.propTypes=void 0,n),i=e.displayName||e.name||"Component";return r.displayName="IMask("+i+")",r.propTypes=an,t.forwardRef((e,n)=>t.createElement(r,{...e,ref:n}))}(e=>{let{inputRef:n,...r}=e;return t.createElement("input",{...r,ref:n})}),dn=t.forwardRef((e,n)=>t.createElement(cn,{...e,ref:n})),hn=[{mask:"000.000.000-00"},Ge];function pn({value:e,name:t,onChange:n,className:r,...i}){return y.jsx(dn,{className:`form-control ${Xe(e)?"is-invalid":""} ${r||""}`,mask:Ge.mask,definitions:Ge.definitions,onAccept:function(e,r,i){i&&n({target:{name:t,value:e.toUpperCase()}})},value:e,name:t,...i})}function fn(e,t,n){if(n){n({target:{name:t,value:(r=e.floatValue,!r||null==r||isNaN(r)?0:Number(r))}})}var r}const mn=({name:e,onChange:t,onClick:n,allowNegative:r=!1,...i})=>y.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:n=>fn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...i}),gn=({name:e,onChange:t,onClick:n,allowNegative:r=!0,decimalScale:i=2,...o})=>y.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:i,allowNegative:r,onValueChange:n=>fn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...o}),vn=({name:e,onChange:t,allowNegative:n=!0,decimalScale:r=2,...i})=>y.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:r,allowNegative:n,onValueChange:n=>fn(n,e,t),name:e,...i}),bn=({name:e,onChange:t,...n})=>y.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:n=>fn(n,e,t),...n}),xn=e=>y.jsx(c,{name:e.name,format:"##:##",mask:"_",value:e.value,onChange:e.onChange,className:"form-control",...e}),yn=e=>y.jsx(o.Input,{tag:c,name:e.name,format:"###.###.###-##",mask:"_",value:e.value,onChange:e.onChange,invalid:Ke(e.value),...e}),kn=e=>y.jsxs("select",{className:"form-select",name:e.name,value:e.value,onChange:e.onChange,...e,children:[y.jsx("option",{value:"",children:"- Selecione o estado -"}),y.jsx("option",{value:"EX",children:"Estrangeiro"}),y.jsx("option",{value:"AC",children:"Acre"}),y.jsx("option",{value:"AL",children:"Alagoas"}),y.jsx("option",{value:"AP",children:"Amapá"}),y.jsx("option",{value:"AM",children:"Amazonas"}),y.jsx("option",{value:"BA",children:"Bahia"}),y.jsx("option",{value:"CE",children:"Ceará"}),y.jsx("option",{value:"DF",children:"Distrito Federal"}),y.jsx("option",{value:"ES",children:"Espírito Santo"}),y.jsx("option",{value:"GO",children:"Goiás"}),y.jsx("option",{value:"MA",children:"Maranhão"}),y.jsx("option",{value:"MT",children:"Mato Grosso"}),y.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),y.jsx("option",{value:"MG",children:"Minas Gerais"}),y.jsx("option",{value:"PA",children:"Pará"}),y.jsx("option",{value:"PB",children:"Paraíba"}),y.jsx("option",{value:"PR",children:"Paraná"}),y.jsx("option",{value:"PE",children:"Pernambuco"}),y.jsx("option",{value:"PI",children:"Piauí"}),y.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),y.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),y.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),y.jsx("option",{value:"RO",children:"Rondônia"}),y.jsx("option",{value:"RR",children:"Roraima"}),y.jsx("option",{value:"SC",children:"Santa Catarina"}),y.jsx("option",{value:"SP",children:"São Paulo"}),y.jsx("option",{value:"SE",children:"Sergipe"}),y.jsx("option",{value:"TO",children:"Tocantins"})]});function Cn({innerRef:e,loading:t,page:n,pages:r,...i}){return y.jsx("div",{className:"footer-load-more--container",ref:e,hidden:n>=r,...i,children:t&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:y.jsx("span",{className:"visually-hidden",children:"Loading..."})}),"Carregando..."]})})}const _n={q:"",page:1};function wn({isOpen:e,setOpen:r,title:i="Pesquisar",placeHolder:o="Digite o que deseja pesquisar",maxWidth:a=800,searchInit:s,route:l,keyField:u,fields:c,renderLine:d,onClick:h,helpLink:p}){var f,m;const g=t.useRef(null),[v]=t.useState(`box-inp-${n.random(1e4)}`),[b,x]=t.useState([]),[k,C]=t.useState(""),[_,w]=t.useState({..._n,q:s||""}),[j,S]=t.useState(!1),[E,N]=Ae({url:l,params:{..._,limit:n.isDesktop()?28:10},onTerminated:e=>{e.error?C(e.error):e.data instanceof Array?(S(!1),x(e.data)):(S(!0),x(t=>[...t,...e.data.data]))}});function A(){if(!_.q)return C("Informe o que deseja pesquisar!");x([]),_.page>1?w({..._,page:1}):E(),I()}function I(){var e;n.isDesktop()&&(null==(e=document.querySelector(`#${v}`))||e.focus())}return t.useEffect(()=>{_.q.length>0&&E()},[_.page]),t.useEffect(()=>{const e=g.current;if(!e)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&function(){var e;let t=_.page+1;if(t>(null==(e=N.data)?void 0:e.pages)||N.loading||0==b.length)return;N.data||(t=1);w({..._,page:t})}()})});return t.observe(e),()=>t.unobserve(e)},[b]),e?y.jsxs(y.Fragment,{children:[y.jsx(We,{visible:N.loading}),y.jsxs(Re,{title:i,maxWidth:a,visible:!0,setVisible:r,children:[y.jsx(Pe,{helpLink:p,setVisible:r,children:i}),y.jsx(Be,{children:y.jsxs(Me,{children:[y.jsx("div",{className:"my-2",children:y.jsx(Fe,{search:_.q,setSearch:e=>w({..._,q:e}),fnSearch:A,placeHolder:o,onKeyDown:function(e){13===e.keyCode&&(e.preventDefault(),A())},autoFocus:n.isDesktop(),id:v})}),y.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=N.data)?void 0:f.length)&&y.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),b&&y.jsx("table",{children:y.jsx("tbody",{children:null==b?void 0:b.map((e,t)=>y.jsx("tr",{onClick:()=>h(e[u],e),children:d?d(e):c.map((t,n)=>{let r;return r=0==n?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},y.jsx("td",{style:r,children:e[t]},n)})},t))})}),j&&y.jsx(Cn,{innerRef:g,loading:N.loading,page:_.page,pages:null==(m=N.data)?void 0:m.pages})]})]})})]}),k&&y.jsx(R,{onConfirm:()=>{C(),I()},children:k})]}):null}function jn({children:e,findTitle:n,findPlaceHolder:r,findRoute:i,findKeyField:o,findFields:a,findRenderLine:s,findOnSelect:l,...u}){const[c,d]=t.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...u,children:[y.jsxs("option",{value:0,children:["- ",n," -"]}),e]}),y.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:()=>d(!0),children:y.jsx(Y,{})})]}),c&&y.jsx(wn,{title:n,placeHolder:r,fields:a,keyField:o,route:i,isOpen:!0,setOpen:d,renderLine:s,onClick:(e,t)=>{l(e,t),d(!1)}})]})}const Sn=i.div`
|
|
614
|
+
*/function en(){if(zt)return Vt;zt=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Vt=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(r,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]))t.call(o,u)&&(s[u]=o[u]);if(e){a=e(o);for(var c=0;c<a.length;c++)n.call(o,a[c])&&(s[a[c]]=o[a[c]])}}return s},Vt}function tn(){if(Ut)return $t;Ut=1;return $t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function nn(){return Ht?qt:(Ht=1,qt=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var rn=Qt();Rt.exports=function(){if(Kt)return Gt;Kt=1;var e=Qt(),t=en(),n=tn(),r=nn(),i=function(){if(Yt)return Wt;Yt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=tn(),n={},r=nn();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}}function i(i,o,a,s,l){if("production"!==process.env.NODE_ENV)for(var u in i)if(r(i,u)){var c;try{if("function"!=typeof i[u]){var d=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=i[u](o,u,s,a,null,t)}catch(p){c=p}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var h=l?l():"";e("Failed "+a+" type: "+c.message+(null!=h?h:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Wt=i}(),o=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(n){}}),Gt=function(s,l){var u="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f(function(t,r,i,o,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new p("Invalid "+o+" `"+a+"` of type `"+b(s)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<s.length;l++){var u=e(s,l,i,o,a+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:f(function(e,t,n,r,i){var o=e[t];return s(o)?null:new p("Invalid "+r+" `"+i+"` of type `"+b(o)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:f(function(t,n,r,i,o){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+i+" `"+o+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return f(function(t,n,r,i,o){if(!(t[n]instanceof e)){var a=e.name||c;return new p("Invalid "+i+" `"+o+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null})},node:f(function(e,t,n,r,i){return v(e[t])?null:new p("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return f(function(t,i,o,a,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[i],u=b(l);if("object"!==u)return new p("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+o+"`, expected an object.");for(var c in l)if(r(l,c)){var d=e(l,c,o,a,s+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?f(function(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(h(a,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===x(t)?String(t):t});return new p("Invalid "+i+" `"+o+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&o(arguments.length>1?"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]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var i=e[t];if("function"!=typeof i)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+t+"."),a}return f(function(t,i,o,a,s){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,i,o,a,s,n);if(null==c)return null;c.data&&r(c.data,"expectedType")&&l.push(c.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return f(function(t,r,i,o,a){var s=t[r],l=b(s);if("object"!==l)return new p("Invalid "+o+" `"+a+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return g(i,o,a,u,x(c));var d=c(s,u,i,o,a+"."+u,n);if(d)return d}return null})},exact:function(e){return f(function(i,o,a,s,l){var u=i[o],c=b(u);if("object"!==c)return new p("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var d=t({},i[o],e);for(var h in d){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(a,s,l,h,x(f));if(!f)return new p("Invalid "+s+" `"+l+"` key `"+h+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(i[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(u,h,a,s,l+"."+h,n);if(m)return m}return null})}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function i(i,a,s,u,d,h,f){if(u=u||c,h=h||s,f!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=u+":"+s;!t[g]&&r<3&&(o("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+u+"`. 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."),t[g]=!0,r++)}}return null==a[s]?i?null===a[s]?new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+d+" `"+h+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,s,u,d,h)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function m(e){return f(function(t,n,r,i,o,a){var s=t[n];return b(s)!==e?new p("Invalid "+i+" `"+o+"` of type `"+x(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,i){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Gt}()(rn.isElement,!0)}else Rt.exports=function(){if(Jt)return Xt;Jt=1;var e=tn();function t(){}function n(){}return n.resetWarningCache=t,Xt=function(){function r(t,n,r,i,o,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();const on=f(Rt.exports),an={mask:on.oneOfType([on.array,on.func,on.string,on.instanceOf(RegExp),on.oneOf([Date,Number,ut.Masked]),on.instanceOf(ut.Masked)]),value:on.any,unmask:on.oneOfType([on.bool,on.oneOf(["typed"])]),prepare:on.func,prepareChar:on.func,validate:on.func,commit:on.func,overwrite:on.oneOfType([on.bool,on.oneOf(["shift"])]),eager:on.oneOfType([on.bool,on.oneOf(["append","remove"])]),skipInvalid:on.bool,onAccept:on.func,onComplete:on.func,placeholderChar:on.string,displayChar:on.string,lazy:on.bool,definitions:on.object,blocks:on.object,enum:on.arrayOf(on.string),maxLength:on.number,from:on.number,to:on.number,pattern:on.string,format:on.func,parse:on.func,autofix:on.oneOfType([on.bool,on.oneOf(["pad"])]),radix:on.string,thousandsSeparator:on.string,mapToRadix:on.arrayOf(on.string),scale:on.number,normalizeZeros:on.bool,padFractionalZeros:on.bool,min:on.oneOfType([on.number,on.instanceOf(Date)]),max:on.oneOfType([on.number,on.instanceOf(Date)]),dispatch:on.func,inputRef:on.oneOfType([on.func,on.shape({current:on.object})])},sn=Object.keys(an).filter(e=>"value"!==e),ln=["value","unmask","onAccept","onComplete","inputRef"],un=sn.filter(e=>ln.indexOf(e)<0);const cn=function(e){var n;const r=((n=class extends t.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const e=this.props,t=this._extractMaskOptionsFromProps(e);var n;t.mask?this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t):(this.destroyMask(),"value"in e&&void 0!==e.value&&(null!=(n=this.element)&&n.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value))}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ut(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){const{...t}=e;return Object.keys(t).filter(e=>un.indexOf(e)<0).forEach(e=>{delete t[e]}),t}_extractNonMaskProps(e){const{...t}=e;return sn.forEach(e=>{"maxLength"!==e&&delete t[e]}),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return t.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,n.propTypes=void 0,n),i=e.displayName||e.name||"Component";return r.displayName="IMask("+i+")",r.propTypes=an,t.forwardRef((e,n)=>t.createElement(r,{...e,ref:n}))}(e=>{let{inputRef:n,...r}=e;return t.createElement("input",{...r,ref:n})}),dn=t.forwardRef((e,n)=>t.createElement(cn,{...e,ref:n})),hn=[{mask:"000.000.000-00"},Ge];function pn({value:e,name:t,onChange:n,className:r,...i}){return y.jsx(dn,{className:`form-control ${Xe(e)?"is-invalid":""} ${r||""}`,mask:Ge.mask,definitions:Ge.definitions,onAccept:function(e,r,i){i&&n({target:{name:t,value:e.toUpperCase()}})},value:e,name:t,...i})}function fn(e,t,n){if(n){n({target:{name:t,value:(r=e.floatValue,!r||null==r||isNaN(r)?0:Number(r))}})}var r}const mn=({name:e,onChange:t,onClick:n,allowNegative:r=!1,...i})=>y.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,prefix:"R$ ",className:"form-control",allowNegative:r,onValueChange:n=>fn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...i}),gn=({name:e,onChange:t,onClick:n,allowNegative:r=!0,decimalScale:i=2,...o})=>y.jsx(c,{name:e,thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:i,allowNegative:r,onValueChange:n=>fn(n,e,t),onClick:function(e){n?n(e):e.target.select()},...o}),vn=({name:e,onChange:t,allowNegative:n=!0,decimalScale:r=2,...i})=>y.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",suffix:"%",className:"form-control",decimalScale:r,allowNegative:n,onValueChange:n=>fn(n,e,t),name:e,...i}),bn=({name:e,onChange:t,...n})=>y.jsx(c,{thousandSeparator:".",decimalSeparator:",",fixedDecimalScale:!0,prefix:"",className:"form-control",decimalScale:0,allowNegative:!1,onValueChange:n=>fn(n,e,t),...n}),xn=e=>y.jsx(c,{name:e.name,format:"##:##",mask:"_",value:e.value,onChange:e.onChange,className:"form-control",...e}),yn=e=>y.jsx(o.Input,{tag:c,name:e.name,format:"###.###.###-##",mask:"_",value:e.value,onChange:e.onChange,invalid:Ke(e.value),...e}),kn=e=>y.jsxs("select",{className:"form-select",name:e.name,value:e.value,onChange:e.onChange,...e,children:[y.jsx("option",{value:"",children:"- Selecione o estado -"}),y.jsx("option",{value:"EX",children:"Estrangeiro"}),y.jsx("option",{value:"AC",children:"Acre"}),y.jsx("option",{value:"AL",children:"Alagoas"}),y.jsx("option",{value:"AP",children:"Amapá"}),y.jsx("option",{value:"AM",children:"Amazonas"}),y.jsx("option",{value:"BA",children:"Bahia"}),y.jsx("option",{value:"CE",children:"Ceará"}),y.jsx("option",{value:"DF",children:"Distrito Federal"}),y.jsx("option",{value:"ES",children:"Espírito Santo"}),y.jsx("option",{value:"GO",children:"Goiás"}),y.jsx("option",{value:"MA",children:"Maranhão"}),y.jsx("option",{value:"MT",children:"Mato Grosso"}),y.jsx("option",{value:"MS",children:"Mato Grosso do Sul"}),y.jsx("option",{value:"MG",children:"Minas Gerais"}),y.jsx("option",{value:"PA",children:"Pará"}),y.jsx("option",{value:"PB",children:"Paraíba"}),y.jsx("option",{value:"PR",children:"Paraná"}),y.jsx("option",{value:"PE",children:"Pernambuco"}),y.jsx("option",{value:"PI",children:"Piauí"}),y.jsx("option",{value:"RJ",children:"Rio de Janeiro"}),y.jsx("option",{value:"RN",children:"Rio Grande do Norte"}),y.jsx("option",{value:"RS",children:"Rio Grande do Sul"}),y.jsx("option",{value:"RO",children:"Rondônia"}),y.jsx("option",{value:"RR",children:"Roraima"}),y.jsx("option",{value:"SC",children:"Santa Catarina"}),y.jsx("option",{value:"SP",children:"São Paulo"}),y.jsx("option",{value:"SE",children:"Sergipe"}),y.jsx("option",{value:"TO",children:"Tocantins"})]});function jn({innerRef:e,loading:t,page:n,pages:r,...i}){return y.jsx("div",{className:"footer-load-more--container",ref:e,hidden:n>=r,...i,children:t&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"spinner-border spinner-border-sm",role:"status",children:y.jsx("span",{className:"visually-hidden",children:"Loading..."})}),"Carregando..."]})})}const Cn={q:"",page:1};function _n({isOpen:e,setOpen:r,title:i="Pesquisar",placeHolder:o="Digite o que deseja pesquisar",maxWidth:a=800,searchInit:s,route:l,keyField:u,fields:c,renderLine:d,onClick:h,helpLink:p}){var f,m;const g=t.useRef(null),[v]=t.useState(`box-inp-${n.random(1e4)}`),[b,x]=t.useState([]),[k,j]=t.useState(""),[C,_]=t.useState({...Cn,q:s||""}),[w,S]=t.useState(!1),[E,N]=Ae({url:l,params:{...C,limit:n.isDesktop()?28:10},onTerminated:e=>{e.error?j(e.error):e.data instanceof Array?(S(!1),x(e.data)):(S(!0),x(t=>[...t,...e.data.data]))}});function A(){if(!C.q)return j("Informe o que deseja pesquisar!");x([]),C.page>1?_({...C,page:1}):E(),I()}function I(){var e;n.isDesktop()&&(null==(e=document.querySelector(`#${v}`))||e.focus())}return t.useEffect(()=>{C.q.length>0&&E()},[C.page]),t.useEffect(()=>{const e=g.current;if(!e)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&function(){var e;let t=C.page+1;if(t>(null==(e=N.data)?void 0:e.pages)||N.loading||0==b.length)return;N.data||(t=1);_({...C,page:t})}()})});return t.observe(e),()=>t.unobserve(e)},[b]),e?y.jsxs(y.Fragment,{children:[y.jsx(We,{visible:N.loading}),y.jsxs(Re,{title:i,maxWidth:a,visible:!0,setVisible:r,children:[y.jsx(Pe,{helpLink:p,setVisible:r,children:i}),y.jsx(Be,{children:y.jsxs(Me,{children:[y.jsx("div",{className:"my-2",children:y.jsx(Fe,{search:C.q,setSearch:e=>_({...C,q:e}),fnSearch:A,placeHolder:o,onKeyDown:function(e){13===e.keyCode&&(e.preventDefault(),A())},autoFocus:n.isDesktop(),id:v})}),y.jsxs("div",{className:"box-search--data-container",children:[0===(null==(f=N.data)?void 0:f.length)&&y.jsx("div",{className:"alert alert-info text-center bold",children:"Nenhum registro encontrado!"}),b&&y.jsx("table",{children:y.jsx("tbody",{children:null==b?void 0:b.map((e,t)=>y.jsx("tr",{onClick:()=>h(e[u],e),children:d?d(e):c.map((t,n)=>{let r;return r=0==n?{width:60,textAlign:"center",fontWeight:"bold"}:{width:"auto",textAlign:"left",fontWeight:"normal"},y.jsx("td",{style:r,children:e[t]},n)})},t))})}),w&&y.jsx(jn,{innerRef:g,loading:N.loading,page:C.page,pages:null==(m=N.data)?void 0:m.pages})]})]})})]}),k&&y.jsx(R,{onConfirm:()=>{j(),I()},children:k})]}):null}function wn({children:e,findTitle:n,findPlaceHolder:r,findRoute:i,findKeyField:o,findFields:a,findRenderLine:s,findOnSelect:l,...u}){const[c,d]=t.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...u,children:[y.jsxs("option",{value:0,children:["- ",n," -"]}),e]}),y.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-secundaria",onClick:()=>d(!0),children:y.jsx(Y,{})})]}),c&&y.jsx(_n,{title:n,placeHolder:r,fields:a,keyField:o,route:i,isOpen:!0,setOpen:d,renderLine:s,onClick:(e,t)=>{l(e,t),d(!1)}})]})}const Sn=i.div`
|
|
595
615
|
position: relative;
|
|
596
616
|
|
|
597
617
|
input {
|
|
@@ -620,7 +640,7 @@
|
|
|
620
640
|
`;const En=i.div`
|
|
621
641
|
display: inline-block;
|
|
622
642
|
`,Nn=i.span`
|
|
623
|
-
color: ${e=>e.disabled?"
|
|
643
|
+
color: ${e=>e.disabled?"var(--jc-texto-suave)":"var(--jc-texto)"};
|
|
624
644
|
display: flex;
|
|
625
645
|
align-items: center;
|
|
626
646
|
margin: 0px 0 0;
|
|
@@ -629,12 +649,12 @@
|
|
|
629
649
|
span {
|
|
630
650
|
font-size: 20px;
|
|
631
651
|
}
|
|
632
|
-
`;function An(e){return requestAnimationFrame(e)}function In(e){cancelAnimationFrame(e)}function Tn(e){const t=e.ownerDocument;return t.hasFocus()&&t.activeElement===e}function Fn(e){return null==e?void 0:e.ownerDocument}function Dn(e){const t=function(e){var t;return null==(t=Fn(e))?void 0:t.defaultView}(e);return!!t&&e instanceof t.HTMLElement}function On(e){return t.useCallback(()=>{let t=e.current;const n="undefined"!=typeof window&&Dn(t);if(!t||!n)return null;if("INPUT"!==t.nodeName&&(t=t.querySelector("input")),!t)throw new Error("react-input-mask: inputComponent doesn't contain input node");return t},[e])}function Rn(e,n){const r=t.useRef({start:null,end:null}),i=On(e),o=t.useCallback(()=>function(e){const t=e.selectionStart,n=e.selectionEnd;return{start:t,end:n,length:n-t}}(i()),[i]),a=t.useCallback(()=>r.current,[]),s=t.useCallback(e=>{const t=i();t&&Tn(t)&&(!function(e,t,n){void 0===n&&(n=t),e.setSelectionRange(t,n)}(t,e.start,e.end),r.current=o())},[i,o]),l=t.useCallback(()=>{r.current=o()},[o]),[u,c]=function(e){const n=t.useRef(null),r=t.useCallback(()=>{null===n.current&&function t(){e(),n.current=An(t)}()},[e]),i=t.useCallback(()=>{In(n.current),n.current=null},[]);return t.useEffect(()=>{n.current&&(i(),r())},[r,i]),t.useEffect(In,[]),[r,i]}(l);return t.useLayoutEffect(()=>{if(!n)return;const e=i();return e?(e.addEventListener("focus",u),e.addEventListener("blur",c),Tn(e)&&u(),()=>{e.removeEventListener("focus",u),e.removeEventListener("blur",c),c()}):void 0}),{getSelection:o,getLastSelection:a,setSelection:s}}function Mn(e,n){const r=t.useRef(),{getSelection:i,getLastSelection:o,setSelection:a}=Rn(r,n),{getValue:s,getLastValue:l,setValue:u}=function(e,n){const r=On(e),i=t.useRef(n);return{getValue:t.useCallback(()=>r().value,[r]),getLastValue:t.useCallback(()=>i.current,[]),setValue:t.useCallback(e=>{i.current=e;const t=r();t&&(t.value=e)},[r])}}(r,e);return{inputRef:r,getInputState:function(){return{value:s(),selection:i()}},getLastInputState:function(){return{value:l(),selection:o()}},setInputState:function({value:e,selection:t}){u(e),a(t)}}}const Bn=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],Pn={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/};function Ln(e,t){if(!e)throw new Error(t)}function Vn(e){var t,n;t=!e.maxLength||!e.mask,n="react-input-mask: maxLength property shouldn't be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.",t||console.warn(n)}class zn{constructor(e){h(this,"isCharacterAllowedAtPosition",(e,t)=>{const{maskPlaceholder:n}=this.maskOptions;return!!this.isCharacterFillingPosition(e,t)||!!n&&n[t]===e}),h(this,"isCharacterFillingPosition",(e,t)=>{const{mask:n}=this.maskOptions;if(!e||t>=n.length)return!1;if(!this.isPositionEditable(t))return n[t]===e;const r=n[t];return new RegExp(r).test(e)}),h(this,"isPositionEditable",e=>{const{mask:t,permanents:n}=this.maskOptions;return e<t.length&&-1===n.indexOf(e)}),h(this,"isValueEmpty",e=>e.split("").every((e,t)=>!this.isPositionEditable(t)||!this.isCharacterFillingPosition(e,t))),h(this,"isValueFilled",e=>this.getFilledLength(e)===this.maskOptions.lastEditablePosition+1),h(this,"getDefaultSelectionForValue",e=>{const t=this.getFilledLength(e),n=this.getRightEditablePosition(t);return{start:n,end:n}}),h(this,"getFilledLength",e=>function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1}(e.split(""),(e,t)=>this.isPositionEditable(t)&&this.isCharacterFillingPosition(e,t))+1),h(this,"getStringFillingLengthAtPosition",(e,t)=>e.split("").reduce((e,t)=>this.insertCharacterAtPosition(e,t,e.length),function(e,t=1){let n="";for(let r=0;r<t;r++)n+=e;return n}(" ",t)).length-t),h(this,"getLeftEditablePosition",e=>{for(let t=e;t>=0;t--)if(this.isPositionEditable(t))return t;return null}),h(this,"getRightEditablePosition",e=>{const{mask:t}=this.maskOptions;for(let n=e;n<t.length;n++)if(this.isPositionEditable(n))return n;return null}),h(this,"formatValue",e=>{const{maskPlaceholder:t,mask:n}=this.maskOptions;if(!t){for(e=this.insertStringAtPosition("",e,0);e.length<n.length&&!this.isPositionEditable(e.length);)e+=n[e.length];return e}return this.insertStringAtPosition(t,e,0)}),h(this,"clearRange",(e,t,n)=>{if(!n)return e;const r=t+n,{maskPlaceholder:i,mask:o}=this.maskOptions,a=e.split("").map((e,n)=>{const a=this.isPositionEditable(n);return!i&&n>=r&&!a?"":n<t||n>=r?e:a?i?i[n]:"":o[n]}).join("");return this.formatValue(a)}),h(this,"insertCharacterAtPosition",(e,t,n)=>{const{mask:r,maskPlaceholder:i}=this.maskOptions;if(n>=r.length)return e;const o=this.isCharacterAllowedAtPosition(t,n),a=this.isPositionEditable(n),s=this.getRightEditablePosition(n),l=i&&s?t===i[s]:null,u=e.slice(0,n);if(o||!a){e=u+(o?t:r[n])}return o||a||l||(e=this.insertCharacterAtPosition(e,t,n+1)),e}),h(this,"insertStringAtPosition",(e,t,n)=>{const{mask:r,maskPlaceholder:i}=this.maskOptions;if(!t||n>=r.length)return e;const o=t.split(""),a=this.isValueFilled(e)||!!i,s=e.slice(n);if(e=o.reduce((e,t)=>this.insertCharacterAtPosition(e,t,e.length),e.slice(0,n)),a)e+=s.slice(e.length-n);else if(this.isValueFilled(e))e+=r.slice(e.length).join("");else{e=s.split("").filter((e,t)=>this.isPositionEditable(n+t)).reduce((e,t)=>{const n=this.getRightEditablePosition(e.length);return null===n?e:(this.isPositionEditable(e.length)||(e+=r.slice(e.length,n).join("")),this.insertCharacterAtPosition(e,t,e.length))},e)}return e}),h(this,"processChange",(e,t)=>{const{mask:n,prefix:r,lastEditablePosition:i}=this.maskOptions,{value:o,selection:a}=e,s=t.value,l=t.selection;let u=o,c="",d=0,h=0,p=Math.min(l.start,a.start);if(a.end>l.start?(c=u.slice(l.start,a.end),d=this.getStringFillingLengthAtPosition(c,p),h=d?l.length:0):u.length<s.length&&(h=s.length-u.length),u=s,h){if(1===h&&!l.length){p=l.start===a.start?this.getRightEditablePosition(a.start):this.getLeftEditablePosition(a.start)}u=this.clearRange(u,p,h)}return u=this.insertStringAtPosition(u,c,p),p+=d,p>=n.length?p=n.length:p<r.length&&!d?p=r.length:p>=r.length&&p<i&&d&&(p=this.getRightEditablePosition(p)),u=this.formatValue(u),{value:u,enteredString:c,selection:{start:p,end:p}}}),this.maskOptions=function({mask:e,maskPlaceholder:t}){const n=[];if(!e)return{maskPlaceholder:null,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};if("string"==typeof e){let t=!1,r="";e.split("").forEach(e=>{t||"\\"!==e?(!t&&Pn[e]||n.push(r.length),r+=e,t=!1):t=!0}),e=r.split("").map((e,t)=>-1===n.indexOf(t)?Pn[e]:e)}else e.forEach((e,t)=>{"string"==typeof e&&n.push(t)});t&&(t=1===t.length?e.map((e,r)=>-1!==n.indexOf(r)?e:t):t.split(""),n.forEach(n=>{t[n]=e[n]}),t=t.join(""));const r=n.filter((e,t)=>e===t).map(t=>e[t]).join("");let i=e.length-1;for(;-1!==n.indexOf(i);)i--;return{maskPlaceholder:t,prefix:r,mask:e,lastEditablePosition:i,permanents:n}}(e)}}class $n extends t.Component{render(){const{children:e,...n}=this.props;return t.cloneElement(e,n)}}const Un=t.forwardRef(function(e,n){const{alwaysShowMask:r=!1,children:i,mask:o,maskPlaceholder:a="_",beforeMaskedStateChange:s,...l}=e;Vn(e),function(e){const{mask:t,maskPlaceholder:n}=e;Ln(!t||!n||1===n.length||n.length===t.length,`react-input-mask: maskPlaceholder should either be a single character or have the same length as the mask:\nmask: ${t}\nmaskPlaceholder: ${n}`)}(e);const u=new zn({mask:o,maskPlaceholder:a}),c=!!o,d=!l.disabled&&!l.readOnly,h=null!==e.value&&void 0!==e.value,p=function(e){const n=t.useRef();return t.useEffect(()=>{n.current=e}),n.current}(c),f=`${(h?e.value:e.defaultValue)||""}`;const{inputRef:m,getInputState:g,setInputState:v,getLastInputState:b}=Mn(f,c),x=On(m);if(c&&h){const t=x();let n=t&&Tn(t)||r||e.value?u.formatValue(e.value):e.value;s&&(n=s({nextState:{value:n,selection:{start:null,end:null}}}).value),v({...b(),value:n})}const k=b(),
|
|
652
|
+
`;function An(e){return requestAnimationFrame(e)}function In(e){cancelAnimationFrame(e)}function Tn(e){const t=e.ownerDocument;return t.hasFocus()&&t.activeElement===e}function Fn(e){return null==e?void 0:e.ownerDocument}function Dn(e){const t=function(e){var t;return null==(t=Fn(e))?void 0:t.defaultView}(e);return!!t&&e instanceof t.HTMLElement}function On(e){return t.useCallback(()=>{let t=e.current;const n="undefined"!=typeof window&&Dn(t);if(!t||!n)return null;if("INPUT"!==t.nodeName&&(t=t.querySelector("input")),!t)throw new Error("react-input-mask: inputComponent doesn't contain input node");return t},[e])}function Rn(e,n){const r=t.useRef({start:null,end:null}),i=On(e),o=t.useCallback(()=>function(e){const t=e.selectionStart,n=e.selectionEnd;return{start:t,end:n,length:n-t}}(i()),[i]),a=t.useCallback(()=>r.current,[]),s=t.useCallback(e=>{const t=i();t&&Tn(t)&&(!function(e,t,n){void 0===n&&(n=t),e.setSelectionRange(t,n)}(t,e.start,e.end),r.current=o())},[i,o]),l=t.useCallback(()=>{r.current=o()},[o]),[u,c]=function(e){const n=t.useRef(null),r=t.useCallback(()=>{null===n.current&&function t(){e(),n.current=An(t)}()},[e]),i=t.useCallback(()=>{In(n.current),n.current=null},[]);return t.useEffect(()=>{n.current&&(i(),r())},[r,i]),t.useEffect(In,[]),[r,i]}(l);return t.useLayoutEffect(()=>{if(!n)return;const e=i();return e?(e.addEventListener("focus",u),e.addEventListener("blur",c),Tn(e)&&u(),()=>{e.removeEventListener("focus",u),e.removeEventListener("blur",c),c()}):void 0}),{getSelection:o,getLastSelection:a,setSelection:s}}function Mn(e,n){const r=t.useRef(),{getSelection:i,getLastSelection:o,setSelection:a}=Rn(r,n),{getValue:s,getLastValue:l,setValue:u}=function(e,n){const r=On(e),i=t.useRef(n);return{getValue:t.useCallback(()=>r().value,[r]),getLastValue:t.useCallback(()=>i.current,[]),setValue:t.useCallback(e=>{i.current=e;const t=r();t&&(t.value=e)},[r])}}(r,e);return{inputRef:r,getInputState:function(){return{value:s(),selection:i()}},getLastInputState:function(){return{value:l(),selection:o()}},setInputState:function({value:e,selection:t}){u(e),a(t)}}}const Bn=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],Pn={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/};function Ln(e,t){if(!e)throw new Error(t)}function Vn(e){var t,n;t=!e.maxLength||!e.mask,n="react-input-mask: maxLength property shouldn't be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.",t||console.warn(n)}class zn{constructor(e){h(this,"isCharacterAllowedAtPosition",(e,t)=>{const{maskPlaceholder:n}=this.maskOptions;return!!this.isCharacterFillingPosition(e,t)||!!n&&n[t]===e}),h(this,"isCharacterFillingPosition",(e,t)=>{const{mask:n}=this.maskOptions;if(!e||t>=n.length)return!1;if(!this.isPositionEditable(t))return n[t]===e;const r=n[t];return new RegExp(r).test(e)}),h(this,"isPositionEditable",e=>{const{mask:t,permanents:n}=this.maskOptions;return e<t.length&&-1===n.indexOf(e)}),h(this,"isValueEmpty",e=>e.split("").every((e,t)=>!this.isPositionEditable(t)||!this.isCharacterFillingPosition(e,t))),h(this,"isValueFilled",e=>this.getFilledLength(e)===this.maskOptions.lastEditablePosition+1),h(this,"getDefaultSelectionForValue",e=>{const t=this.getFilledLength(e),n=this.getRightEditablePosition(t);return{start:n,end:n}}),h(this,"getFilledLength",e=>function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n],n))return n;return-1}(e.split(""),(e,t)=>this.isPositionEditable(t)&&this.isCharacterFillingPosition(e,t))+1),h(this,"getStringFillingLengthAtPosition",(e,t)=>e.split("").reduce((e,t)=>this.insertCharacterAtPosition(e,t,e.length),function(e,t=1){let n="";for(let r=0;r<t;r++)n+=e;return n}(" ",t)).length-t),h(this,"getLeftEditablePosition",e=>{for(let t=e;t>=0;t--)if(this.isPositionEditable(t))return t;return null}),h(this,"getRightEditablePosition",e=>{const{mask:t}=this.maskOptions;for(let n=e;n<t.length;n++)if(this.isPositionEditable(n))return n;return null}),h(this,"formatValue",e=>{const{maskPlaceholder:t,mask:n}=this.maskOptions;if(!t){for(e=this.insertStringAtPosition("",e,0);e.length<n.length&&!this.isPositionEditable(e.length);)e+=n[e.length];return e}return this.insertStringAtPosition(t,e,0)}),h(this,"clearRange",(e,t,n)=>{if(!n)return e;const r=t+n,{maskPlaceholder:i,mask:o}=this.maskOptions,a=e.split("").map((e,n)=>{const a=this.isPositionEditable(n);return!i&&n>=r&&!a?"":n<t||n>=r?e:a?i?i[n]:"":o[n]}).join("");return this.formatValue(a)}),h(this,"insertCharacterAtPosition",(e,t,n)=>{const{mask:r,maskPlaceholder:i}=this.maskOptions;if(n>=r.length)return e;const o=this.isCharacterAllowedAtPosition(t,n),a=this.isPositionEditable(n),s=this.getRightEditablePosition(n),l=i&&s?t===i[s]:null,u=e.slice(0,n);if(o||!a){e=u+(o?t:r[n])}return o||a||l||(e=this.insertCharacterAtPosition(e,t,n+1)),e}),h(this,"insertStringAtPosition",(e,t,n)=>{const{mask:r,maskPlaceholder:i}=this.maskOptions;if(!t||n>=r.length)return e;const o=t.split(""),a=this.isValueFilled(e)||!!i,s=e.slice(n);if(e=o.reduce((e,t)=>this.insertCharacterAtPosition(e,t,e.length),e.slice(0,n)),a)e+=s.slice(e.length-n);else if(this.isValueFilled(e))e+=r.slice(e.length).join("");else{e=s.split("").filter((e,t)=>this.isPositionEditable(n+t)).reduce((e,t)=>{const n=this.getRightEditablePosition(e.length);return null===n?e:(this.isPositionEditable(e.length)||(e+=r.slice(e.length,n).join("")),this.insertCharacterAtPosition(e,t,e.length))},e)}return e}),h(this,"processChange",(e,t)=>{const{mask:n,prefix:r,lastEditablePosition:i}=this.maskOptions,{value:o,selection:a}=e,s=t.value,l=t.selection;let u=o,c="",d=0,h=0,p=Math.min(l.start,a.start);if(a.end>l.start?(c=u.slice(l.start,a.end),d=this.getStringFillingLengthAtPosition(c,p),h=d?l.length:0):u.length<s.length&&(h=s.length-u.length),u=s,h){if(1===h&&!l.length){p=l.start===a.start?this.getRightEditablePosition(a.start):this.getLeftEditablePosition(a.start)}u=this.clearRange(u,p,h)}return u=this.insertStringAtPosition(u,c,p),p+=d,p>=n.length?p=n.length:p<r.length&&!d?p=r.length:p>=r.length&&p<i&&d&&(p=this.getRightEditablePosition(p)),u=this.formatValue(u),{value:u,enteredString:c,selection:{start:p,end:p}}}),this.maskOptions=function({mask:e,maskPlaceholder:t}){const n=[];if(!e)return{maskPlaceholder:null,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};if("string"==typeof e){let t=!1,r="";e.split("").forEach(e=>{t||"\\"!==e?(!t&&Pn[e]||n.push(r.length),r+=e,t=!1):t=!0}),e=r.split("").map((e,t)=>-1===n.indexOf(t)?Pn[e]:e)}else e.forEach((e,t)=>{"string"==typeof e&&n.push(t)});t&&(t=1===t.length?e.map((e,r)=>-1!==n.indexOf(r)?e:t):t.split(""),n.forEach(n=>{t[n]=e[n]}),t=t.join(""));const r=n.filter((e,t)=>e===t).map(t=>e[t]).join("");let i=e.length-1;for(;-1!==n.indexOf(i);)i--;return{maskPlaceholder:t,prefix:r,mask:e,lastEditablePosition:i,permanents:n}}(e)}}class $n extends t.Component{render(){const{children:e,...n}=this.props;return t.cloneElement(e,n)}}const Un=t.forwardRef(function(e,n){const{alwaysShowMask:r=!1,children:i,mask:o,maskPlaceholder:a="_",beforeMaskedStateChange:s,...l}=e;Vn(e),function(e){const{mask:t,maskPlaceholder:n}=e;Ln(!t||!n||1===n.length||n.length===t.length,`react-input-mask: maskPlaceholder should either be a single character or have the same length as the mask:\nmask: ${t}\nmaskPlaceholder: ${n}`)}(e);const u=new zn({mask:o,maskPlaceholder:a}),c=!!o,d=!l.disabled&&!l.readOnly,h=null!==e.value&&void 0!==e.value,p=function(e){const n=t.useRef();return t.useEffect(()=>{n.current=e}),n.current}(c),f=`${(h?e.value:e.defaultValue)||""}`;const{inputRef:m,getInputState:g,setInputState:v,getLastInputState:b}=Mn(f,c),x=On(m);if(c&&h){const t=x();let n=t&&Tn(t)||r||e.value?u.formatValue(e.value):e.value;s&&(n=s({nextState:{value:n,selection:{start:null,end:null}}}).value),v({...b(),value:n})}const k=b(),j=k.selection,C=k.value;t.useLayoutEffect(()=>{if(!c)return;const e=x();if(!e)return;const t=Tn(e),n=j,i=g();let o={...i};if(!h){const e=i.value,n=u.formatValue(e),a=u.isValueEmpty(n);!a||t||r?o.value=n:a&&!t&&(o.value="")}t&&!p?o.selection=u.getDefaultSelectionForValue(o.value):h&&t&&n&&null!==n.start&&null!==n.end&&(o.selection=n),s&&(o=s({currentState:i,nextState:o})),v(o)});const _={...l,onFocus:function(t){m.current=t.target;const n=g().value;if(c&&!u.isValueFilled(n)){let r=u.formatValue(n),i={value:r,selection:u.getDefaultSelectionForValue(r)};s&&(i=s({currentState:g(),nextState:i}),r=i.value),v(i),r!==n&&e.onChange&&e.onChange(t),An(()=>{v(b())})}e.onFocus&&e.onFocus(t)},onBlur:function(t){const n=g().value,i=b().value;if(c&&!r&&u.isValueEmpty(i)){let r="",i={value:r,selection:{start:null,end:null}};s&&(i=s({currentState:g(),nextState:i}),r=i.value),v(i),r!==n&&e.onChange&&e.onChange(t)}e.onBlur&&e.onBlur(t)},onChange:c&&d?function(t){const n=g(),r=b();let i=u.processChange(n,r);s&&(i=s({currentState:n,previousState:r,nextState:i})),v(i),e.onChange&&e.onChange(t)}:e.onChange,onMouseDown:c&&d?function(t){const n=x(),{value:r}=g(),i=Fn(n);if(!Tn(n)&&!u.isValueFilled(r)){const e=t.clientX,r=t.clientY,o=(new Date).getTime(),a=t=>{if(i.removeEventListener("mouseup",a),!Tn(n))return;const s=Math.abs(t.clientX-e),l=Math.abs(t.clientY-r),c=Math.max(s,l),d=(new Date).getTime()-o;if(c<=10&&d<=200||c<=5&&d<=300){const e=b(),t=u.getDefaultSelectionForValue(e.value),n={...e,selection:t};v(n)}};i.addEventListener("mouseup",a)}e.onMouseDown&&e.onMouseDown(t)}:e.onMouseDown,ref:e=>{m.current=function(e){if(!e||Dn(e))return e;const t=e.input||e.inputRef||e.innerRef,n=t&&"current"in t?t.current:t;return Dn(n)?n:e}(e),!function(e){return"function"==typeof e}(n)?null!==n&&"object"==typeof n&&(n.current=e):n(e)},value:c&&h?C:e.value};return i?(function(e,t){const n=Bn.filter(n=>null!=t.props[n]&&t.props[n]!==e[n]);Ln(!n.length,`react-input-mask: the following props should be passed to the InputMask component, not to children: ${n.join(",")}`)}(e,i),y.jsx($n,{..._,children:i})):y.jsx("input",{..._})});Un.displayName="InputMask";
|
|
633
653
|
/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
|
|
634
|
-
function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Wn=Object.entries,Yn=Object.setPrototypeOf,Gn=Object.isFrozen,Kn=Object.getPrototypeOf,Xn=Object.getOwnPropertyDescriptor;let Jn=Object.freeze,Zn=Object.seal,Qn=Object.create,er="undefined"!=typeof Reflect&&Reflect,tr=er.apply,nr=er.construct;Jn||(Jn=function(e){return e}),Zn||(Zn=function(e){return e}),tr||(tr=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),nr||(nr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const rr=wr(Array.prototype.forEach),ir=wr(Array.prototype.lastIndexOf),or=wr(Array.prototype.pop),ar=wr(Array.prototype.push),sr=wr(Array.prototype.splice),lr=Array.isArray,ur=wr(String.prototype.toLowerCase),cr=wr(String.prototype.toString),dr=wr(String.prototype.match),hr=wr(String.prototype.replace),pr=wr(String.prototype.indexOf),fr=wr(String.prototype.trim),mr=wr(Number.prototype.toString),gr=wr(Boolean.prototype.toString),vr="undefined"==typeof BigInt?null:wr(BigInt.prototype.toString),br="undefined"==typeof Symbol?null:wr(Symbol.prototype.toString),xr=wr(Object.prototype.hasOwnProperty),yr=wr(Object.prototype.toString),kr=wr(RegExp.prototype.test),Cr=(_r=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return nr(_r,t)});var _r;function wr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return tr(e,t,r)}}function jr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ur;if(Yn&&Yn(e,null),!lr(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(Gn(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Sr(e){for(let t=0;t<e.length;t++){xr(e,t)||(e[t]=null)}return e}function Er(e){const t=Qn(null);for(const r of Wn(e)){var n=Hn(r,2);const i=n[0],o=n[1];xr(e,i)&&(lr(o)?t[i]=Sr(o):o&&"object"==typeof o&&o.constructor===Object?t[i]=Er(o):t[i]=o)}return t}function Nr(e,t){for(;null!==e;){const n=Xn(e,t);if(n){if(n.get)return wr(n.get);if("function"==typeof n.value)return wr(n.value)}e=Kn(e)}return function(){return null}}const Ar=Jn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ir=Jn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Tr=Jn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fr=Jn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dr=Jn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Or=Jn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rr=Jn(["#text"]),Mr=Jn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Br=Jn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pr=Jn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lr=Jn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vr=Zn(/{{[\w\W]*|^[\w\W]*}}/g),zr=Zn(/<%[\w\W]*|^[\w\W]*%>/g),$r=Zn(/\${[\w\W]*/g),Ur=Zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),qr=Zn(/^aria-[\-\w]+$/),Hr=Zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wr=Zn(/^(?:\w+script|data):/i),Yr=Zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gr=Zn(/^html$/i),Kr=Zn(/^[a-z][.\w]*(-[.\w]+)+$/i),Xr=Zn(/<[/\w!]/g),Jr=Zn(/<[/\w]/g),Zr=Zn(/<\/no(script|embed|frames)/i),Qr=Zn(/\/>/i),ei=1,ti=3,ni=7,ri=8,ii=9,oi=11,ai=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],si=Jn(jr({},ai)),li=function(){const e={};return rr(ai,t=>{e[t]=Zn(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Jn(e)}(),ui=function(e,t,n,r){return xr(e,t)&&lr(e[t])?jr(r.base?Er(r.base):{},e[t],r.transform):n},ci=function(e,t,n){const r=xr(e,t)?e[t]:void 0;return r&&"object"==typeof r?Er(r):n()};var di=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.4.15",n.removed=[],!t||!t.document||t.document.nodeType!==ii||!t.Element)return n.isSupported=!1,n;let r=t.document;const i=r,o=i.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap;void 0===c&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,h=t.trustedTypes,p=l.prototype,f=Nr(p,"cloneNode"),m=Nr(p,"remove"),g=Nr(p,"removeAttributeNode"),v=Nr(p,"nextSibling"),b=Nr(p,"childNodes"),x=Nr(p,"parentNode"),y=Nr(p,"shadowRoot"),k=Nr(p,"attributes"),C=s&&s.prototype?Nr(s.prototype,"nodeType"):null,_=s&&s.prototype?Nr(s.prototype,"nodeName"):null,w=s&&s.prototype?Nr(s.prototype,"ownerDocument"):null,j=function(e){return C?C(e):e.nodeType},S=function(e){return _?_(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,N,A="",I=!1,T=0;const F=function(){if(T>0)throw Cr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},D=function(e){F(),T++;try{return E.createHTML(e)}finally{T--}},O=function(){return I||(N=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o),I=!0),N},R=r,M=R.implementation,B=R.createNodeIterator,P=R.createDocumentFragment,L=R.getElementsByTagName,V=i.importNode;let z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Wn&&"function"==typeof x&&M&&void 0!==M.createHTMLDocument;const $=Vr,U=zr,q=$r,H=Ur,W=qr,Y=Wr,G=Yr,K=Kr;let X=Hr,J=null;const Z=jr({},[...Ar,...Ir,...Tr,...Dr,...Rr]);let Q=null;const ee=jr({},[...Mr,...Br,...Pr,...Lr]);let te=Object.seal(Qn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,re=null;const ie=Object.seal(Qn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,ae=!0,se=!1,le=!0,ue=!1,ce=!0,de=!1,he=!1,pe=null,fe=null,me=!1,ge=!1,ve=!1,be=!1,xe=!0,ye=!1;const ke="user-content-";let Ce=!0,_e=!1,we={},je=null;const Se=jr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ee=null;const Ne=jr({},["audio","video","img","source","image","track"]);let Ae=null;const Ie=jr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",Fe="http://www.w3.org/2000/svg",De="http://www.w3.org/1999/xhtml";let Oe=De,Re=!1,Me=null;const Be=jr({},[Te,Fe,De],cr),Pe=Jn(["mi","mo","mn","ms","mtext"]);let Le=jr({},Pe);const Ve=Jn(["annotation-xml"]);let ze=jr({},Ve);const $e=jr({},["title","style","font","a","script"]);let Ue=null;const qe=["application/xhtml+xml","text/html"];let He=null,We=null;const Ye=r.createElement("form"),Ge=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(We&&We===e)return;e&&"object"==typeof e||(e={}),e=Er(e),Ue=-1===qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,He="application/xhtml+xml"===Ue?cr:ur,J=ui(e,"ALLOWED_TAGS",Z,{transform:He}),Q=ui(e,"ALLOWED_ATTR",ee,{transform:He}),Me=ui(e,"ALLOWED_NAMESPACES",Be,{transform:cr}),Ae=ui(e,"ADD_URI_SAFE_ATTR",Ie,{transform:He,base:Ie}),Ee=ui(e,"ADD_DATA_URI_TAGS",Ne,{transform:He,base:Ne}),je=ui(e,"FORBID_CONTENTS",Se,{transform:He}),ne=ui(e,"FORBID_TAGS",Er({}),{transform:He}),re=ui(e,"FORBID_ATTR",Er({}),{transform:He}),we=!!xr(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Er(e.USE_PROFILES):e.USE_PROFILES),oe=!1!==e.ALLOW_ARIA_ATTR,ae=!1!==e.ALLOW_DATA_ATTR,se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ue=e.SAFE_FOR_TEMPLATES||!1,ce=!1!==e.SAFE_FOR_XML,de=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,ve=e.RETURN_DOM_FRAGMENT||!1,be=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,xe=!1!==e.SANITIZE_DOM,ye=e.SANITIZE_NAMED_PROPS||!1,Ce=!1!==e.KEEP_CONTENT,_e=e.IN_PLACE||!1,X=function(e){try{return kr(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Hr,Oe="string"==typeof e.NAMESPACE?e.NAMESPACE:De,Le=ci(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>jr({},Pe)),ze=ci(e,"HTML_INTEGRATION_POINTS",()=>jr({},Ve));const t=ci(e,"CUSTOM_ELEMENT_HANDLING",()=>Qn(null));if(te=Qn(null),xr(t,"tagNameCheck")&&Ge(t.tagNameCheck)&&(te.tagNameCheck=t.tagNameCheck),xr(t,"attributeNameCheck")&&Ge(t.attributeNameCheck)&&(te.attributeNameCheck=t.attributeNameCheck),xr(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Zn(te),ue&&(ae=!1),ve&&(ge=!0),we&&(J=jr({},Rr),Q=Qn(null),!0===we.html&&(jr(J,Ar),jr(Q,Mr)),!0===we.svg&&(jr(J,Ir),jr(Q,Br),jr(Q,Lr)),!0===we.svgFilters&&(jr(J,Tr),jr(Q,Br),jr(Q,Lr)),!0===we.mathMl&&(jr(J,Dr),jr(Q,Pr),jr(Q,Lr))),ie.tagCheck=null,ie.attributeCheck=null,xr(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?ie.tagCheck=e.ADD_TAGS:lr(e.ADD_TAGS)&&(J===Z&&(J=Er(J)),jr(J,e.ADD_TAGS,He))),xr(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?ie.attributeCheck=e.ADD_ATTR:lr(e.ADD_ATTR)&&(Q===ee&&(Q=Er(Q)),jr(Q,e.ADD_ATTR,He))),xr(e,"ADD_FORBID_CONTENTS")&&lr(e.ADD_FORBID_CONTENTS)&&(je===Se&&(je=Er(je)),jr(je,e.ADD_FORBID_CONTENTS,He)),Ce&&(J["#text"]=!0),de&&jr(J,["html","head","body"]),J.table&&(jr(J,["tbody"]),delete ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Cr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=E;E=e.TRUSTED_TYPES_POLICY;try{A=D("")}catch(n){throw E=t,n}}else null===e.TRUSTED_TYPES_POLICY?(E=void 0,A=""):(void 0===E&&(E=O()),E&&"string"==typeof A&&(A=D("")));Jn&&Jn(e),We=e},Xe=jr({},[...Ir,...Tr,...Fr]),Je=jr({},[...Dr,...Or]),Ze=function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:Oe,tagName:"template"});const n=ur(e.tagName),r=ur(t.tagName);return!!Me[e.namespaceURI]&&(e.namespaceURI===Fe?function(e,t,n){return t.namespaceURI===De?"svg"===e:t.namespaceURI===Te?"svg"===e&&("annotation-xml"===n||Le[n]):Boolean(Xe[e])}(n,t,r):e.namespaceURI===Te?function(e,t,n){return t.namespaceURI===De?"math"===e:t.namespaceURI===Fe?"math"===e&&ze[n]:Boolean(Je[e])}(n,t,r):e.namespaceURI===De?function(e,t,n){return!(t.namespaceURI===Fe&&!ze[n])&&!(t.namespaceURI===Te&&!Le[n])&&!Je[e]&&($e[e]||!Xe[e])}(n,t,r):!("application/xhtml+xml"!==Ue||!Me[e.namespaceURI]))},Qe=function(e){ar(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){if(m(e),!x(e))throw Cr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},et=function(e,t,n){try{g(e,t)}catch(r){try{e.removeAttribute(n)}catch(i){}}},tt=function(e){it(e);const t=b(e);if(t){const e=[];rr(t,t=>{ar(e,t)}),rr(e,e=>{try{m(e)}catch(t){}})}const n=k(e);if(n)for(let r=n.length-1;r>=0;--r){const t=n[r],i=t&&t.name;"string"==typeof i&&et(e,t,i)}},nt=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(i){r=null}ar(n.removed,{attribute:r||null,from:t});try{r?g(t,r):t.removeAttribute(e)}catch(i){try{t.removeAttribute(e)}catch(o){}}if("is"===e)if(ge||ve)try{Qe(t)}catch(i){}else try{t.setAttribute(e,"")}catch(i){}},rt=function(e){const t=k(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],i=r&&r.name;"string"!=typeof i||Q[He(i)]||et(e,r,i)}},it=function(e){const t=[e];for(;t.length>0;){const e=t.pop();j(e)===ei&&rt(e);const n=b(e);if(n)for(let r=n.length-1;r>=0;--r)t.push(n[r])}},ot=function(e,t){return!!ce&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},at=function(e){let t=null,n=null;if(me)e="<remove></remove>"+e;else{const t=dr(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ue&&Oe===De&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=E?D(e):e;if(Oe===De)try{t=(new d).parseFromString(i,Ue)}catch(a){}if(!t||!t.documentElement){t=M.createDocument(Oe,"template",null);try{t.documentElement.innerHTML=Re?A:i}catch(a){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Oe===De?L.call(t,de?"html":"body")[0]:de?t.documentElement:o},st=function(e){const t=w?w(e):e.ownerDocument;return B.call(t||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},lt=function(e){return e=hr(e,$," "),e=hr(e,U," "),e=hr(e,q," ")},ut=function(e){var t;e.normalize();const n=w?w(e):e.ownerDocument,r=B.call(n||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=lt(i.data),i=r.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&rr(o,e=>{dt(e.content)&&ut(e.content)})},ct=function(e){const t=_?_(e):null;return"string"==typeof t&&("form"===He(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==k(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==C(e)||e.childNodes!==b(e)))},dt=function(e){if(!C||"object"!=typeof e||null===e)return!1;try{return C(e)===oi}catch(t){return!1}},ht=function(e){if(!C||"object"!=typeof e||null===e)return!1;try{return"number"==typeof C(e)}catch(t){return!1}};function pt(e,t,r){0!==e.length&&rr(e,e=>{e.call(n,t,r,We)})}const ft=function(e,t){if(e instanceof RegExp)return kr(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Boolean(e(t,...r))}return!1},mt=function(e,t,n,r){return 0===e.length?t:t===n||t===r?Er(t):t},gt=function(e,t){return e!==t&&null===x(e)&&(_e&&it(e),!0)},vt=function(e,t){if(pt(z.beforeSanitizeElements,e,null),gt(e,t))return!0;if(ct(e))return Qe(e),!0;const r=He(S(e));if(J=mt(z.uponSanitizeElement,J,Z,pe),pt(z.uponSanitizeElement,e,{tagName:r,allowedTags:J}),gt(e,t))return!0;if(function(e,t){return!!(ce&&e.hasChildNodes()&&!ht(e.firstElementChild)&&kr(Xr,e.textContent)&&kr(Xr,e.innerHTML))||!!(ce&&e.namespaceURI===De&&si[t]&&(ht(e.firstElementChild)||"string"==typeof e.textContent&&kr(li[t],e.textContent)))||e.nodeType===ni||!(!ce||e.nodeType!==ri||!kr(Jr,e.data))}(e,r))return Qe(e),!0;if(ne[r]||!(ie.tagCheck instanceof Function&&ie.tagCheck(r))&&!J[r]){const n=function(e,t,n){if(!ne[t]&&yt(t)&&ft(te.tagNameCheck,t))return!1;if(Ce&&!je[t]){const t=x(e),r=b(e);if(r&&t)for(let i=r.length-1;i>=0;--i){const o=e===n?f(r[i],!0):r[i];t.insertBefore(o,v(e))}}return Qe(e),!0}(e,r,t);return!1===n&&pt(z.afterSanitizeElements,e,null),n}if(j(e)===ei&&!Ze(e))return Qe(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&kr(Zr,e.innerHTML))return Qe(e),!0;if(ue&&e.nodeType===ti){const t=lt(e.textContent);e.textContent!==t&&(ar(n.removed,{element:e.cloneNode()}),e.textContent=t)}return pt(z.afterSanitizeElements,e,null),!1},bt=function(e,t,n){if(re[t])return!1;if(ot(t,e))return!1;if(xe&&("id"===t||"name"===t)&&(n in r||n in Ye))return!1;const i=Q[t]||ie.attributeCheck instanceof Function&&ie.attributeCheck(t,e);return!(!ae||!kr(H,t))||(!(!oe||!kr(W,t))||(i?!!Ae[t]||(!!kr(X,hr(n,G,""))||(!("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==pr(n,"data:")||!Ee[e])||(!(!se||kr(Y,hr(n,G,"")))||!n))):yt(e)&&ft(te.tagNameCheck,e)&&ft(te.attributeNameCheck,t,e)||"is"===t&&te.allowCustomizedBuiltInElements&&ft(te.tagNameCheck,n)))},xt=jr({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yt=function(e){return!xt[ur(e)]&&kr(K,e)},kt=function(e,t,n,r){if(E&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!n)switch(h.getAttributeType(e,t)){case"TrustedHTML":return D(r);case"TrustedScriptURL":return function(e){F(),T++;try{return E.createScriptURL(e)}finally{T--}}(r)}return r},Ct=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!ct(e)||(Qe(e),!1)}catch(i){return nt(t,e),!1}},_t=function(e){pt(z.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||ct(e))return;Q=mt(z.uponSanitizeAttribute,Q,ee,fe);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let i=t.length;const o=He(e.nodeName);for(;i--;){const a=t[i],s=a.name,l=a.namespaceURI,u=a.value,c=He(s),d=u;let h="value"===s?d:fr(d),p=!1;if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,pt(z.uponSanitizeAttribute,e,r),h=r.attrValue,!ye||"id"!==c&&"name"!==c||0===pr(h,ke)||(nt(s,e,a),h=ke+h,p=!0),ce&&kr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,h))nt(s,e,a);else if("attributename"===c&&dr(h,"href"))nt(s,e,a);else if(!r.forceKeepAttr)if(r.keepAttr)if(le||!kr(Qr,h))if(ue&&(h=lt(h)),bt(o,c,h)){if(h=kt(o,c,l,h),h!==d){Ct(e,s,l,h)&&p&&or(n.removed)}}else nt(s,e,a);else nt(s,e,a);else nt(s,e,a)}pt(z.afterSanitizeAttributes,e,null)},wt=function(e){let t=null;const n=st(e);for(pt(z.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(pt(z.uponSanitizeShadowNode,t,null),vt(t,e),_t(t),dt(t.content)&&wt(t.content),j(t)===ei){const e=y(t);dt(e)&&(jt(e),wt(e))}pt(z.afterSanitizeShadowDOM,e,null)},jt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){wt(e.shadow);continue}const n=e.node,r=j(n)===ei,i=b(n);if(i)for(let o=i.length-1;o>=0;--o)t.push({node:i[o],shadow:null});if(r){const e=_?_(n):null;if("string"==typeof e&&"template"===He(e)){const e=n.content;dt(e)&&t.push({node:e,shadow:null})}}if(r){const e=y(n);dt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,s=null;if(Re=!e,Re&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return mr(e);case"boolean":return gr(e);case"bigint":return vr?vr(e):"0";case"symbol":return br?br(e):"Symbol()";case"undefined":default:return yr(e);case"function":case"object":{if(null===e)return yr(e);const t=e,n=Nr(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:yr(e)}return yr(e)}}}(e)))throw Cr("dirty is not a string, aborting");if(!n.isSupported)return e;he?(J=pe,Q=fe):Ke(t),(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&(J=Er(J)),z.uponSanitizeAttribute.length>0&&(Q=Er(Q)),n.removed=[];const l=_e&&"string"!=typeof e&&ht(e);if(l){!function(e){if(!ce)return;const t=[e];for(;t.length>0;){const e=t.pop(),r=j(e);if(r===ni||r===ri&&kr(Jr,e.data)){try{m(e)}catch(n){}continue}if(r===ei){const t=e,r=He(S(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&ot("for",r)&&t.removeAttribute("for")}catch(n){}}const i=b(e);if(i)for(let n=i.length-1;n>=0;--n)t.push(i[n])}}(e);const t=S(e);if("string"==typeof t){const n=He(t);if(!J[n]||ne[n])throw tt(e),Cr("root node is forbidden and cannot be sanitized in-place")}if(ct(e))throw tt(e),Cr("root node is clobbered and cannot be sanitized in-place");try{jt(e)}catch(d){throw tt(e),d}}else if(ht(e))r=at("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===ei&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),jt(r);else{if(!ge&&!ue&&!de&&-1===e.indexOf("<"))return E&&be?D(e):e;if(r=at(e),!r)return ge?null:be?A:""}r&&me&&Qe(r.firstChild);const u=l?e:r;try{const e=st(u);for(;a=e.nextNode();)vt(a,u),_t(a),dt(a.content)&&wt(a.content)}catch(d){throw l&&(tt(e),rr(n.removed,e=>{e.element&&it(e.element)})),d}if(l)return rr(n.removed,e=>{e.element&&it(e.element)}),ue&&ut(e),e;if(ge){if(ue&&ut(r),ve)for(s=P.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Q.shadowroot||Q.shadowrootmode)&&(s=V.call(i,s,!0)),s}let c=de?r.outerHTML:r.innerHTML;return de&&J["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&kr(Gr,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),ue&&(c=lt(c)),E&&be?D(c):c},n.setConfig=function(){Ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),he=!0,pe=J,fe=Q},n.clearConfig=function(){We=null,he=!1,pe=null,fe=null,E=N,A=""},n.isValidAttribute=function(e,t,n){We||Ke({});const r=He(e),i=He(t);return bt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&xr(z,e)&&ar(z[e],t)},n.removeHook=function(e,t){if(xr(z,e)){if(void 0!==t){const n=ir(z[e],t);return-1===n?void 0:sr(z[e],n,1)[0]}return or(z[e])}},n.removeHooks=function(e){xr(z,e)&&(z[e]=[])},n.removeAllHooks=function(){z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function hi({value:e}){let t=e;return e&&"string"==typeof e&&(t=e.replaceAll("\n","<br/>")),y.jsx("span",{dangerouslySetInnerHTML:{__html:di.sanitize(t)}})}const pi=i.div`
|
|
635
|
-
--toggle-color-on:
|
|
636
|
-
--toggle-color-off:
|
|
637
|
-
--toggle-color-inactive:
|
|
654
|
+
function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Wn=Object.entries,Yn=Object.setPrototypeOf,Gn=Object.isFrozen,Kn=Object.getPrototypeOf,Xn=Object.getOwnPropertyDescriptor;let Jn=Object.freeze,Zn=Object.seal,Qn=Object.create,er="undefined"!=typeof Reflect&&Reflect,tr=er.apply,nr=er.construct;Jn||(Jn=function(e){return e}),Zn||(Zn=function(e){return e}),tr||(tr=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),nr||(nr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const rr=_r(Array.prototype.forEach),ir=_r(Array.prototype.lastIndexOf),or=_r(Array.prototype.pop),ar=_r(Array.prototype.push),sr=_r(Array.prototype.splice),lr=Array.isArray,ur=_r(String.prototype.toLowerCase),cr=_r(String.prototype.toString),dr=_r(String.prototype.match),hr=_r(String.prototype.replace),pr=_r(String.prototype.indexOf),fr=_r(String.prototype.trim),mr=_r(Number.prototype.toString),gr=_r(Boolean.prototype.toString),vr="undefined"==typeof BigInt?null:_r(BigInt.prototype.toString),br="undefined"==typeof Symbol?null:_r(Symbol.prototype.toString),xr=_r(Object.prototype.hasOwnProperty),yr=_r(Object.prototype.toString),kr=_r(RegExp.prototype.test),jr=(Cr=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return nr(Cr,t)});var Cr;function _r(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return tr(e,t,r)}}function wr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ur;if(Yn&&Yn(e,null),!lr(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(Gn(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Sr(e){for(let t=0;t<e.length;t++){xr(e,t)||(e[t]=null)}return e}function Er(e){const t=Qn(null);for(const r of Wn(e)){var n=Hn(r,2);const i=n[0],o=n[1];xr(e,i)&&(lr(o)?t[i]=Sr(o):o&&"object"==typeof o&&o.constructor===Object?t[i]=Er(o):t[i]=o)}return t}function Nr(e,t){for(;null!==e;){const n=Xn(e,t);if(n){if(n.get)return _r(n.get);if("function"==typeof n.value)return _r(n.value)}e=Kn(e)}return function(){return null}}const Ar=Jn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ir=Jn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Tr=Jn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fr=Jn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dr=Jn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Or=Jn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rr=Jn(["#text"]),Mr=Jn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Br=Jn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pr=Jn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lr=Jn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vr=Zn(/{{[\w\W]*|^[\w\W]*}}/g),zr=Zn(/<%[\w\W]*|^[\w\W]*%>/g),$r=Zn(/\${[\w\W]*/g),Ur=Zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),qr=Zn(/^aria-[\-\w]+$/),Hr=Zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wr=Zn(/^(?:\w+script|data):/i),Yr=Zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gr=Zn(/^html$/i),Kr=Zn(/^[a-z][.\w]*(-[.\w]+)+$/i),Xr=Zn(/<[/\w!]/g),Jr=Zn(/<[/\w]/g),Zr=Zn(/<\/no(script|embed|frames)/i),Qr=Zn(/\/>/i),ei=1,ti=3,ni=7,ri=8,ii=9,oi=11,ai=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],si=Jn(wr({},ai)),li=function(){const e={};return rr(ai,t=>{e[t]=Zn(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Jn(e)}(),ui=function(e,t,n,r){return xr(e,t)&&lr(e[t])?wr(r.base?Er(r.base):{},e[t],r.transform):n},ci=function(e,t,n){const r=xr(e,t)?e[t]:void 0;return r&&"object"==typeof r?Er(r):n()};var di=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.4.15",n.removed=[],!t||!t.document||t.document.nodeType!==ii||!t.Element)return n.isSupported=!1,n;let r=t.document;const i=r,o=i.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap;void 0===c&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,h=t.trustedTypes,p=l.prototype,f=Nr(p,"cloneNode"),m=Nr(p,"remove"),g=Nr(p,"removeAttributeNode"),v=Nr(p,"nextSibling"),b=Nr(p,"childNodes"),x=Nr(p,"parentNode"),y=Nr(p,"shadowRoot"),k=Nr(p,"attributes"),j=s&&s.prototype?Nr(s.prototype,"nodeType"):null,C=s&&s.prototype?Nr(s.prototype,"nodeName"):null,_=s&&s.prototype?Nr(s.prototype,"ownerDocument"):null,w=function(e){return j?j(e):e.nodeType},S=function(e){return C?C(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,N,A="",I=!1,T=0;const F=function(){if(T>0)throw jr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},D=function(e){F(),T++;try{return E.createHTML(e)}finally{T--}},O=function(){return I||(N=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(h,o),I=!0),N},R=r,M=R.implementation,B=R.createNodeIterator,P=R.createDocumentFragment,L=R.getElementsByTagName,V=i.importNode;let z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Wn&&"function"==typeof x&&M&&void 0!==M.createHTMLDocument;const $=Vr,U=zr,q=$r,H=Ur,W=qr,Y=Wr,G=Yr,K=Kr;let X=Hr,J=null;const Z=wr({},[...Ar,...Ir,...Tr,...Dr,...Rr]);let Q=null;const ee=wr({},[...Mr,...Br,...Pr,...Lr]);let te=Object.seal(Qn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,re=null;const ie=Object.seal(Qn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,ae=!0,se=!1,le=!0,ue=!1,ce=!0,de=!1,he=!1,pe=null,fe=null,me=!1,ge=!1,ve=!1,be=!1,xe=!0,ye=!1;const ke="user-content-";let je=!0,Ce=!1,_e={},we=null;const Se=wr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ee=null;const Ne=wr({},["audio","video","img","source","image","track"]);let Ae=null;const Ie=wr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",Fe="http://www.w3.org/2000/svg",De="http://www.w3.org/1999/xhtml";let Oe=De,Re=!1,Me=null;const Be=wr({},[Te,Fe,De],cr),Pe=Jn(["mi","mo","mn","ms","mtext"]);let Le=wr({},Pe);const Ve=Jn(["annotation-xml"]);let ze=wr({},Ve);const $e=wr({},["title","style","font","a","script"]);let Ue=null;const qe=["application/xhtml+xml","text/html"];let He=null,We=null;const Ye=r.createElement("form"),Ge=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(We&&We===e)return;e&&"object"==typeof e||(e={}),e=Er(e),Ue=-1===qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,He="application/xhtml+xml"===Ue?cr:ur,J=ui(e,"ALLOWED_TAGS",Z,{transform:He}),Q=ui(e,"ALLOWED_ATTR",ee,{transform:He}),Me=ui(e,"ALLOWED_NAMESPACES",Be,{transform:cr}),Ae=ui(e,"ADD_URI_SAFE_ATTR",Ie,{transform:He,base:Ie}),Ee=ui(e,"ADD_DATA_URI_TAGS",Ne,{transform:He,base:Ne}),we=ui(e,"FORBID_CONTENTS",Se,{transform:He}),ne=ui(e,"FORBID_TAGS",Er({}),{transform:He}),re=ui(e,"FORBID_ATTR",Er({}),{transform:He}),_e=!!xr(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Er(e.USE_PROFILES):e.USE_PROFILES),oe=!1!==e.ALLOW_ARIA_ATTR,ae=!1!==e.ALLOW_DATA_ATTR,se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ue=e.SAFE_FOR_TEMPLATES||!1,ce=!1!==e.SAFE_FOR_XML,de=e.WHOLE_DOCUMENT||!1,ge=e.RETURN_DOM||!1,ve=e.RETURN_DOM_FRAGMENT||!1,be=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,xe=!1!==e.SANITIZE_DOM,ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Ce=e.IN_PLACE||!1,X=function(e){try{return kr(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Hr,Oe="string"==typeof e.NAMESPACE?e.NAMESPACE:De,Le=ci(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>wr({},Pe)),ze=ci(e,"HTML_INTEGRATION_POINTS",()=>wr({},Ve));const t=ci(e,"CUSTOM_ELEMENT_HANDLING",()=>Qn(null));if(te=Qn(null),xr(t,"tagNameCheck")&&Ge(t.tagNameCheck)&&(te.tagNameCheck=t.tagNameCheck),xr(t,"attributeNameCheck")&&Ge(t.attributeNameCheck)&&(te.attributeNameCheck=t.attributeNameCheck),xr(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Zn(te),ue&&(ae=!1),ve&&(ge=!0),_e&&(J=wr({},Rr),Q=Qn(null),!0===_e.html&&(wr(J,Ar),wr(Q,Mr)),!0===_e.svg&&(wr(J,Ir),wr(Q,Br),wr(Q,Lr)),!0===_e.svgFilters&&(wr(J,Tr),wr(Q,Br),wr(Q,Lr)),!0===_e.mathMl&&(wr(J,Dr),wr(Q,Pr),wr(Q,Lr))),ie.tagCheck=null,ie.attributeCheck=null,xr(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?ie.tagCheck=e.ADD_TAGS:lr(e.ADD_TAGS)&&(J===Z&&(J=Er(J)),wr(J,e.ADD_TAGS,He))),xr(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?ie.attributeCheck=e.ADD_ATTR:lr(e.ADD_ATTR)&&(Q===ee&&(Q=Er(Q)),wr(Q,e.ADD_ATTR,He))),xr(e,"ADD_FORBID_CONTENTS")&&lr(e.ADD_FORBID_CONTENTS)&&(we===Se&&(we=Er(we)),wr(we,e.ADD_FORBID_CONTENTS,He)),je&&(J["#text"]=!0),de&&wr(J,["html","head","body"]),J.table&&(wr(J,["tbody"]),delete ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw jr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw jr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=E;E=e.TRUSTED_TYPES_POLICY;try{A=D("")}catch(n){throw E=t,n}}else null===e.TRUSTED_TYPES_POLICY?(E=void 0,A=""):(void 0===E&&(E=O()),E&&"string"==typeof A&&(A=D("")));Jn&&Jn(e),We=e},Xe=wr({},[...Ir,...Tr,...Fr]),Je=wr({},[...Dr,...Or]),Ze=function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:Oe,tagName:"template"});const n=ur(e.tagName),r=ur(t.tagName);return!!Me[e.namespaceURI]&&(e.namespaceURI===Fe?function(e,t,n){return t.namespaceURI===De?"svg"===e:t.namespaceURI===Te?"svg"===e&&("annotation-xml"===n||Le[n]):Boolean(Xe[e])}(n,t,r):e.namespaceURI===Te?function(e,t,n){return t.namespaceURI===De?"math"===e:t.namespaceURI===Fe?"math"===e&&ze[n]:Boolean(Je[e])}(n,t,r):e.namespaceURI===De?function(e,t,n){return!(t.namespaceURI===Fe&&!ze[n])&&!(t.namespaceURI===Te&&!Le[n])&&!Je[e]&&($e[e]||!Xe[e])}(n,t,r):!("application/xhtml+xml"!==Ue||!Me[e.namespaceURI]))},Qe=function(e){ar(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){if(m(e),!x(e))throw jr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},et=function(e,t,n){try{g(e,t)}catch(r){try{e.removeAttribute(n)}catch(i){}}},tt=function(e){it(e);const t=b(e);if(t){const e=[];rr(t,t=>{ar(e,t)}),rr(e,e=>{try{m(e)}catch(t){}})}const n=k(e);if(n)for(let r=n.length-1;r>=0;--r){const t=n[r],i=t&&t.name;"string"==typeof i&&et(e,t,i)}},nt=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(i){r=null}ar(n.removed,{attribute:r||null,from:t});try{r?g(t,r):t.removeAttribute(e)}catch(i){try{t.removeAttribute(e)}catch(o){}}if("is"===e)if(ge||ve)try{Qe(t)}catch(i){}else try{t.setAttribute(e,"")}catch(i){}},rt=function(e){const t=k(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],i=r&&r.name;"string"!=typeof i||Q[He(i)]||et(e,r,i)}},it=function(e){const t=[e];for(;t.length>0;){const e=t.pop();w(e)===ei&&rt(e);const n=b(e);if(n)for(let r=n.length-1;r>=0;--r)t.push(n[r])}},ot=function(e,t){return!!ce&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},at=function(e){let t=null,n=null;if(me)e="<remove></remove>"+e;else{const t=dr(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ue&&Oe===De&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=E?D(e):e;if(Oe===De)try{t=(new d).parseFromString(i,Ue)}catch(a){}if(!t||!t.documentElement){t=M.createDocument(Oe,"template",null);try{t.documentElement.innerHTML=Re?A:i}catch(a){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Oe===De?L.call(t,de?"html":"body")[0]:de?t.documentElement:o},st=function(e){const t=_?_(e):e.ownerDocument;return B.call(t||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},lt=function(e){return e=hr(e,$," "),e=hr(e,U," "),e=hr(e,q," ")},ut=function(e){var t;e.normalize();const n=_?_(e):e.ownerDocument,r=B.call(n||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=lt(i.data),i=r.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&rr(o,e=>{dt(e.content)&&ut(e.content)})},ct=function(e){const t=C?C(e):null;return"string"==typeof t&&("form"===He(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==k(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==j(e)||e.childNodes!==b(e)))},dt=function(e){if(!j||"object"!=typeof e||null===e)return!1;try{return j(e)===oi}catch(t){return!1}},ht=function(e){if(!j||"object"!=typeof e||null===e)return!1;try{return"number"==typeof j(e)}catch(t){return!1}};function pt(e,t,r){0!==e.length&&rr(e,e=>{e.call(n,t,r,We)})}const ft=function(e,t){if(e instanceof RegExp)return kr(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Boolean(e(t,...r))}return!1},mt=function(e,t,n,r){return 0===e.length?t:t===n||t===r?Er(t):t},gt=function(e,t){return e!==t&&null===x(e)&&(Ce&&it(e),!0)},vt=function(e,t){if(pt(z.beforeSanitizeElements,e,null),gt(e,t))return!0;if(ct(e))return Qe(e),!0;const r=He(S(e));if(J=mt(z.uponSanitizeElement,J,Z,pe),pt(z.uponSanitizeElement,e,{tagName:r,allowedTags:J}),gt(e,t))return!0;if(function(e,t){return!!(ce&&e.hasChildNodes()&&!ht(e.firstElementChild)&&kr(Xr,e.textContent)&&kr(Xr,e.innerHTML))||!!(ce&&e.namespaceURI===De&&si[t]&&(ht(e.firstElementChild)||"string"==typeof e.textContent&&kr(li[t],e.textContent)))||e.nodeType===ni||!(!ce||e.nodeType!==ri||!kr(Jr,e.data))}(e,r))return Qe(e),!0;if(ne[r]||!(ie.tagCheck instanceof Function&&ie.tagCheck(r))&&!J[r]){const n=function(e,t,n){if(!ne[t]&&yt(t)&&ft(te.tagNameCheck,t))return!1;if(je&&!we[t]){const t=x(e),r=b(e);if(r&&t)for(let i=r.length-1;i>=0;--i){const o=e===n?f(r[i],!0):r[i];t.insertBefore(o,v(e))}}return Qe(e),!0}(e,r,t);return!1===n&&pt(z.afterSanitizeElements,e,null),n}if(w(e)===ei&&!Ze(e))return Qe(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&kr(Zr,e.innerHTML))return Qe(e),!0;if(ue&&e.nodeType===ti){const t=lt(e.textContent);e.textContent!==t&&(ar(n.removed,{element:e.cloneNode()}),e.textContent=t)}return pt(z.afterSanitizeElements,e,null),!1},bt=function(e,t,n){if(re[t])return!1;if(ot(t,e))return!1;if(xe&&("id"===t||"name"===t)&&(n in r||n in Ye))return!1;const i=Q[t]||ie.attributeCheck instanceof Function&&ie.attributeCheck(t,e);return!(!ae||!kr(H,t))||(!(!oe||!kr(W,t))||(i?!!Ae[t]||(!!kr(X,hr(n,G,""))||(!("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==pr(n,"data:")||!Ee[e])||(!(!se||kr(Y,hr(n,G,"")))||!n))):yt(e)&&ft(te.tagNameCheck,e)&&ft(te.attributeNameCheck,t,e)||"is"===t&&te.allowCustomizedBuiltInElements&&ft(te.tagNameCheck,n)))},xt=wr({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yt=function(e){return!xt[ur(e)]&&kr(K,e)},kt=function(e,t,n,r){if(E&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!n)switch(h.getAttributeType(e,t)){case"TrustedHTML":return D(r);case"TrustedScriptURL":return function(e){F(),T++;try{return E.createScriptURL(e)}finally{T--}}(r)}return r},jt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!ct(e)||(Qe(e),!1)}catch(i){return nt(t,e),!1}},Ct=function(e){pt(z.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||ct(e))return;Q=mt(z.uponSanitizeAttribute,Q,ee,fe);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let i=t.length;const o=He(e.nodeName);for(;i--;){const a=t[i],s=a.name,l=a.namespaceURI,u=a.value,c=He(s),d=u;let h="value"===s?d:fr(d),p=!1;if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,pt(z.uponSanitizeAttribute,e,r),h=r.attrValue,!ye||"id"!==c&&"name"!==c||0===pr(h,ke)||(nt(s,e,a),h=ke+h,p=!0),ce&&kr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,h))nt(s,e,a);else if("attributename"===c&&dr(h,"href"))nt(s,e,a);else if(!r.forceKeepAttr)if(r.keepAttr)if(le||!kr(Qr,h))if(ue&&(h=lt(h)),bt(o,c,h)){if(h=kt(o,c,l,h),h!==d){jt(e,s,l,h)&&p&&or(n.removed)}}else nt(s,e,a);else nt(s,e,a);else nt(s,e,a)}pt(z.afterSanitizeAttributes,e,null)},_t=function(e){let t=null;const n=st(e);for(pt(z.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(pt(z.uponSanitizeShadowNode,t,null),vt(t,e),Ct(t),dt(t.content)&&_t(t.content),w(t)===ei){const e=y(t);dt(e)&&(wt(e),_t(e))}pt(z.afterSanitizeShadowDOM,e,null)},wt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){_t(e.shadow);continue}const n=e.node,r=w(n)===ei,i=b(n);if(i)for(let o=i.length-1;o>=0;--o)t.push({node:i[o],shadow:null});if(r){const e=C?C(n):null;if("string"==typeof e&&"template"===He(e)){const e=n.content;dt(e)&&t.push({node:e,shadow:null})}}if(r){const e=y(n);dt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,s=null;if(Re=!e,Re&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return mr(e);case"boolean":return gr(e);case"bigint":return vr?vr(e):"0";case"symbol":return br?br(e):"Symbol()";case"undefined":default:return yr(e);case"function":case"object":{if(null===e)return yr(e);const t=e,n=Nr(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:yr(e)}return yr(e)}}}(e)))throw jr("dirty is not a string, aborting");if(!n.isSupported)return e;he?(J=pe,Q=fe):Ke(t),(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&(J=Er(J)),z.uponSanitizeAttribute.length>0&&(Q=Er(Q)),n.removed=[];const l=Ce&&"string"!=typeof e&&ht(e);if(l){!function(e){if(!ce)return;const t=[e];for(;t.length>0;){const e=t.pop(),r=w(e);if(r===ni||r===ri&&kr(Jr,e.data)){try{m(e)}catch(n){}continue}if(r===ei){const t=e,r=He(S(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&ot("for",r)&&t.removeAttribute("for")}catch(n){}}const i=b(e);if(i)for(let n=i.length-1;n>=0;--n)t.push(i[n])}}(e);const t=S(e);if("string"==typeof t){const n=He(t);if(!J[n]||ne[n])throw tt(e),jr("root node is forbidden and cannot be sanitized in-place")}if(ct(e))throw tt(e),jr("root node is clobbered and cannot be sanitized in-place");try{wt(e)}catch(d){throw tt(e),d}}else if(ht(e))r=at("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===ei&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),wt(r);else{if(!ge&&!ue&&!de&&-1===e.indexOf("<"))return E&&be?D(e):e;if(r=at(e),!r)return ge?null:be?A:""}r&&me&&Qe(r.firstChild);const u=l?e:r;try{const e=st(u);for(;a=e.nextNode();)vt(a,u),Ct(a),dt(a.content)&&_t(a.content)}catch(d){throw l&&(tt(e),rr(n.removed,e=>{e.element&&it(e.element)})),d}if(l)return rr(n.removed,e=>{e.element&&it(e.element)}),ue&&ut(e),e;if(ge){if(ue&&ut(r),ve)for(s=P.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Q.shadowroot||Q.shadowrootmode)&&(s=V.call(i,s,!0)),s}let c=de?r.outerHTML:r.innerHTML;return de&&J["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&kr(Gr,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),ue&&(c=lt(c)),E&&be?D(c):c},n.setConfig=function(){Ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),he=!0,pe=J,fe=Q},n.clearConfig=function(){We=null,he=!1,pe=null,fe=null,E=N,A=""},n.isValidAttribute=function(e,t,n){We||Ke({});const r=He(e),i=He(t);return bt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&xr(z,e)&&ar(z[e],t)},n.removeHook=function(e,t){if(xr(z,e)){if(void 0!==t){const n=ir(z[e],t);return-1===n?void 0:sr(z[e],n,1)[0]}return or(z[e])}},n.removeHooks=function(e){xr(z,e)&&(z[e]=[])},n.removeAllHooks=function(){z={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function hi({value:e}){let t=e;return e&&"string"==typeof e&&(t=e.replaceAll("\n","<br/>")),y.jsx("span",{dangerouslySetInnerHTML:{__html:di.sanitize(t)}})}const pi=i.div`
|
|
655
|
+
--toggle-color-on: var(--jc-secundaria);
|
|
656
|
+
--toggle-color-off: var(--jc-texto-suave);
|
|
657
|
+
--toggle-color-inactive: var(--jc-borda);
|
|
638
658
|
--toggle-color-white: #fff;
|
|
639
659
|
--toggle-color-text: var(--bs-body-color);
|
|
640
660
|
|
|
@@ -780,9 +800,9 @@ function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
780
800
|
}
|
|
781
801
|
}
|
|
782
802
|
}
|
|
783
|
-
`;const vi={id:"",caption:"",title:"",isOpen:!1,isVisible:!1},bi=t.createContext(null);function xi(e){let t=!1;for(const n of e)n.isOpen=!1,n.isVisible&&!t&&(n.isOpen=!0,t=!0)}function yi(){return t.useContext(bi)}function ki({isMultine:e}){const{tabs:t,selectTab:n}=yi(),r=t.filter(e=>e.isVisible);return y.jsx("div",{className:"tab-header--container "+(e?"is-tab-multiline":""),children:r.map(e=>y.jsx("button",{type:"button",title:e.title,onClick:()=>n(e.id),hidden:!e.isVisible,className:e.isOpen&&r.length>1?"tab-active":"",tabIndex:-1,children:e.caption||e.title},e.id))})}const
|
|
803
|
+
`;const vi={id:"",caption:"",title:"",isOpen:!1,isVisible:!1},bi=t.createContext(null);function xi(e){let t=!1;for(const n of e)n.isOpen=!1,n.isVisible&&!t&&(n.isOpen=!0,t=!0)}function yi(){return t.useContext(bi)}function ki({isMultine:e}){const{tabs:t,selectTab:n}=yi(),r=t.filter(e=>e.isVisible);return y.jsx("div",{className:"tab-header--container "+(e?"is-tab-multiline":""),children:r.map(e=>y.jsx("button",{type:"button",title:e.title,onClick:()=>n(e.id),hidden:!e.isVisible,className:e.isOpen&&r.length>1?"tab-active":"",tabIndex:-1,children:e.caption||e.title},e.id))})}const ji=i.div`
|
|
784
804
|
/* margin: ${({noMargin:e})=>e?"0":"5px 0 8px"}; */
|
|
785
|
-
border: 1px solid var(--
|
|
805
|
+
border: 1px solid var(--tab-border);
|
|
786
806
|
border-radius: ${e=>e.open?"0 0 var(--pn-border-radius) var(--pn-border-radius)":"0"};
|
|
787
807
|
background-color: var(--bs-body-bg);
|
|
788
808
|
//overflow: hidden;
|
|
@@ -792,7 +812,7 @@ function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
792
812
|
outline: 0;
|
|
793
813
|
border: none;
|
|
794
814
|
border-bottom: ${({open:e})=>e?"1":"0"}px solid
|
|
795
|
-
var(--
|
|
815
|
+
var(--tab-border);
|
|
796
816
|
border-left: 8px solid var(--bi-color-detail);
|
|
797
817
|
background-color: var(--bi-color-button);
|
|
798
818
|
color: var(--pn-color-font);
|
|
@@ -864,13 +884,13 @@ function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
864
884
|
}
|
|
865
885
|
}
|
|
866
886
|
}
|
|
867
|
-
`;function
|
|
887
|
+
`;function Ci(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _i={exports:{}};
|
|
868
888
|
/*!
|
|
869
889
|
localForage -- Offline Storage, Improved
|
|
870
890
|
Version 1.10.0
|
|
871
891
|
https://localforage.github.io/localForage
|
|
872
892
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
873
|
-
*/wi.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&_i)return _i(a);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var o=_i,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(c),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,n=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}function d(e){1!==u.push(e)||r||n()}t.exports=d}).call(this,void 0!==p?p:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(i){return o.reject(e,i)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}function a(){t(i,r)}var s=f(a);"error"===s.status&&r(s.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function m(e){return e instanceof this?e:o.resolve(new this(i),e)}function g(e){var t=new this(i);return o.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,u=new this(i);++l<n;)c(e[l],l);return u;function c(e,i){function l(e){a[i]=e,++s!==n||r||(r=!0,o.resolve(u,a))}t.resolve(e).then(l,function(e){r||(r=!0,o.reject(u,e))})}}function b(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=-1,s=new this(i);++a<n;)l(e[a]);return s;function l(e){t.resolve(e).then(function(e){r||(r=!0,o.resolve(s,e))},function(e){r||(r=!0,o.reject(s,e))})}}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=f(h,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=m,u.reject=g,u.all=v,u.race=b},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==p?p:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var a=o();function s(){try{if(!a||!a.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(n){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var u=Promise;function c(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function h(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function p(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,g={},v=Object.prototype.toString,b="readonly",x="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function k(e){return new u(function(t){var n=e.transaction(f,x),r=l([""]);n.objectStore(f).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function C(e){return"boolean"==typeof m?u.resolve(m):k(e).then(function(e){return m=e})}function _(e){var t=g[e.name],n={};n.promise=new u(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function w(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function j(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new u(function(n,r){if(g[e.name]=g[e.name]||M(),e.db){if(!t)return n(e.db);_(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var o=a.open.apply(a,i);t&&(o.onupgradeneeded=function(t){var n=o.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),r(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},n(t),w(e)}})}function E(e){return S(e,!1)}function N(e){return S(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function I(e){return new u(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function T(e){return l([y(atob(e.data))],{type:e.type})}function F(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function O(e){_(e);for(var t=g[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then(function(t){return e.db=t,A(e)?N(e):t}).then(function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r}).catch(function(t){throw j(e,t),t})}function R(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return u.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),N(e)}).then(function(){return O(e).then(function(){R(e,t,n,r-1)})}).catch(n);n(o)}}function M(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=M(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var o=[];function a(){return u.resolve()}for(var s=0;s<i.forages.length;s++){var l=i.forages[s];l!==t&&o.push(l._initReady().catch(a))}var c=i.forages.slice(0);return u.all(o).then(function(){return n.db=i.db,E(n)}).then(function(e){return n.db=e,A(n,t._defaultConfig.version)?N(n):e}).then(function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<c.length;r++){var o=c[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}})}function P(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),F(e)&&(e=T(e)),t(e)},a.onerror=function(){r(a.error)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function L(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;F(r)&&(r=T(r));var i=e(r,n.key,s++);void 0!==i?t(i):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(l){r(l)}})}).catch(r)});return c(r,t),r}function V(e,t,n){var r=this;e=h(e);var i=new u(function(n,i){var o;r.ready().then(function(){return o=r._dbInfo,"[object Blob]"===v.call(t)?C(o.db).then(function(e){return e?t:I(t)}):t}).then(function(t){R(r._dbInfo,x,function(o,a){if(o)return i(o);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;i(e)}}catch(u){i(u)}})}).catch(i)});return c(i,n),i}function z(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,x,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(a.error)},o.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function $(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,x,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function U(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function q(e,t){var n=this,r=new u(function(t,r){e<0?t(null):n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(u){r(u)}})}).catch(r)});return c(r,t),r}function H(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];o.onsuccess=function(){var t=o.result;t?(a.push(t.key),t.continue()):e(a)},o.onerror=function(){n(o.error)}}catch(s){n(s)}})}).catch(n)});return c(n,e),n}function W(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;if(e.name){var o=e.name===n.name&&i._dbInfo.db?u.resolve(i._dbInfo.db):E(e).then(function(t){var n=g[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t});r=e.storeName?o.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;_(e);var r=g[e.name],i=r.forages;t.close();for(var o=0;o<i.length;o++){var s=i[o];s._dbInfo.db=null,s._dbInfo.version=n}return new u(function(t,r){var i=a.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,w(n._dbInfo)}}).catch(function(t){throw(j(e,t)||u.resolve()).catch(function(){}),t})}}):o.then(function(t){_(e);var n=g[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;return new u(function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++)w(r[t]._dbInfo)}).catch(function(t){throw(j(e,t)||u.resolve()).catch(function(){}),t})})}else r=u.reject("Invalid arguments");return c(r,t),r}var Y={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:L,getItem:P,setItem:V,removeItem:z,clear:$,length:U,key:q,keys:H,dropInstance:W};function G(){return"function"==typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",Q=Z.length,ee="arbf",te="blob",ne="si08",re="ui08",ie="uic8",oe="si16",ae="si32",se="ur16",le="ui32",ue="fl32",ce="fl64",de=Q+ee.length,he=Object.prototype.toString;function pe(e){var t,n,r,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=K.indexOf(e[t]),r=K.indexOf(e[t+1]),i=K.indexOf(e[t+2]),o=K.indexOf(e[t+3]),c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&o;return u}function fe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=K[n[t]>>2],r+=K[(3&n[t])<<4|n[t+1]>>4],r+=K[(15&n[t+1])<<2|n[t+2]>>6],r+=K[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=he.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===he.call(e.buffer))){var r,i=Z;e instanceof ArrayBuffer?(r=e,i+=ee):(r=e.buffer,"[object Int8Array]"===n?i+=ne:"[object Uint8Array]"===n?i+=re:"[object Uint8ClampedArray]"===n?i+=ie:"[object Int16Array]"===n?i+=oe:"[object Uint16Array]"===n?i+=se:"[object Int32Array]"===n?i+=ae:"[object Uint32Array]"===n?i+=le:"[object Float32Array]"===n?i+=ue:"[object Float64Array]"===n?i+=ce:t(new Error("Failed to get type for BinaryArray"))),t(i+fe(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n=X+e.type+"~"+fe(this.result);t(Z+te+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Q)!==Z)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Q,de);if(r===te&&J.test(n)){var i=n.match(J);t=i[1],n=n.substring(i[0].length)}var o=pe(n);switch(r){case ee:return o;case te:return l([o],{type:t});case ne:return new Int8Array(o);case re:return new Uint8Array(o);case ie:return new Uint8ClampedArray(o);case oe:return new Int16Array(o);case se:return new Uint16Array(o);case ae:return new Int32Array(o);case le:return new Uint32Array(o);case ue:return new Float32Array(o);case ce:return new Float64Array(o);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:pe,bufferToString:fe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function xe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(i){return r(i)}n.db.transaction(function(i){be(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=ve,i}function ye(e,t,n,r,i,o){e.executeSql(n,r,i,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?o(e,a):be(e,t,function(){e.executeSql(n,r,i,o)},o)},o):o(e,a)},o)}function ke(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ce(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT * FROM "+i.storeName,[],function(n,r){for(var o=r.rows,a=o.length,s=0;s<a;s++){var l=o.item(s),u=l.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,l.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function _e(e,t,n,r){var i=this;e=h(e);var o=new u(function(o,a){i.ready().then(function(){void 0===t&&(t=null);var s=t,l=i._dbInfo;l.serializer.serialize(t,function(t,u){u?a(u):l.db.transaction(function(n){ye(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){o(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(_e.apply(i,[e,s,n,r-1]));a(t)}})})}).catch(a)});return c(o,n),o}function we(e,t,n){return _e.apply(this,[e,t,n,1])}function je(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Se(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ee(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ne(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ae(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ie(e){return new u(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})},function(e,t){n(t)})},function(e){n(e)})})}function Te(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return c(r=e.name?new u(function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Ie(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function i(e){return new u(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));u.all(o).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):u.reject("Invalid arguments"),t),r}var Fe={_driver:"webSQLStorage",_initStorage:xe,_support:G(),iterate:Ce,getItem:ke,setItem:we,removeItem:je,clear:Se,length:Ee,key:Ne,keys:Ae,dropInstance:Te};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Oe(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Re(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Me(){return!Re()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Oe(e,t._defaultConfig),Me()?(t._dbInfo=n,n.serializer=ve,u.resolve()):u.reject()}function Pe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return c(n,e),n}function Le(e,t){var n=this;e=h(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return c(r,t),r}function Ve(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,a=1,s=0;s<o;s++){var l=localStorage.key(s);if(0===l.indexOf(r)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,l.substring(i),a++)))return u}}});return c(r,t),r}function ze(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(i){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r});return c(n,e),n}function Ue(e){var t=this.keys().then(function(e){return e.length});return c(t,e),t}function qe(e,t){var n=this;e=h(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return c(r,t),r}function He(e,t,n){var r=this;e=h(e);var i=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(i,o){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)o(r);else try{localStorage.setItem(a.keyPrefix+e,t),i(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||o(s),o(s)}})})});return c(i,n),i}function We(e,t){if(t=p.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return c(r=e.name?new u(function(t){e.storeName?t(Oe(e,i._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):u.reject("Invalid arguments"),t),r}var Ye={_driver:"localStorageWrapper",_initStorage:Be,_support:De(),iterate:Ve,getItem:Le,setItem:He,removeItem:qe,clear:Pe,length:Ue,key:ze,keys:$e,dropInstance:We},Ge=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){for(var n=e.length,r=0;r<n;){if(Ge(e[r],t))return!0;r++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Je={},Ze={},Qe={INDEXEDDB:Y,WEBSQL:Fe,LOCALSTORAGE:Ye},et=[Qe.INDEXEDDB._driver,Qe.WEBSQL._driver,Qe.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function it(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function ot(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var at=function(){function e(t){for(var n in i(this,e),Qe)if(Qe.hasOwnProperty(n)){var r=Qe[n],o=r._driver;this[n]=o,Je[o]||this.defineDriver(r)}this._defaultConfig=ot({},rt),this._config=ot({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new u(function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=nt.concat("_initStorage"),a=0,s=o.length;a<s;a++){var l=o[a];if((!Ke(tt,l)||e[l])&&"function"!=typeof e[l])return void n(i)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=u.reject(t);return c(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var i=tt[n];e[i]||(e[i]=t(i))}};d();var h=function(n){Je[r]&&console.info("Redefining LocalForage driver: "+r),Je[r]=e,Ze[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(p){n(p)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Je[e]?u.resolve(Je[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(ve);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Xe(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function a(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(a).catch(n)}o();var s=new Error("No available storage method found.");return r._driverSet=u.reject(s),r._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch(function(){return u.resolve()}):u.resolve();return this._driverSet=l.then(function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(i)})}).catch(function(){o();var e=new Error("No available storage method found.");return r._driverSet=u.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Ze[e]},e.prototype._extend=function(e){ot(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)it(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),st=new at;t.exports=st},{3:3}]},{},[4])(4);const ji=f(wi.exports),Si=ji.createInstance({name:"report",storeName:"report"});function Ei(e,n){const[r,i]=t.useState(()=>{const t=localStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>localStorage.setItem(e,JSON.stringify(r)),[r]),[r,i]}function Ni(e){let t=e.url;if(e.params){t=t+"?"+new URLSearchParams(e.params).toString()}return t}ji.config({driver:ji.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const Ai={init:async e=>{let t=await ji.getItem(Ni(e));t&&(e.headers["x-tag"]=t.xtag,e.data=t.data)},save:async(e,t)=>{if(304==e.status)e.data=t.data;else if(e.status<400)try{let n={xtag:e.headers["x-tag"],data:e.data,create_at:new Date};await ji.setItem(Ni(t),n)}catch(n){console.info("Cache: ",n)}},clear:async(e=3)=>{const t=864e5*e,n=await ji.keys(),r=new Date;for(const i of n){const e=await ji.getItem(i);if(e&&e.create_at){r-new Date(e.create_at)>=t&&await ji.removeItem(i)}}},clearAll:()=>{ji.clear()}},Ii=i.div`
|
|
893
|
+
*/_i.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&Ci)return Ci(a);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var o=Ci,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,a=new i(c),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,n=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}function d(e){1!==u.push(e)||r||n()}t.exports=d}).call(this,void 0!==p?p:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(i){return o.reject(e,i)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)})}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}function a(){t(i,r)}var s=f(a);"error"===s.status&&r(s.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function m(e){return e instanceof this?e:o.resolve(new this(i),e)}function g(e){var t=new this(i);return o.reject(t,e)}function v(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,u=new this(i);++l<n;)c(e[l],l);return u;function c(e,i){function l(e){a[i]=e,++s!==n||r||(r=!0,o.resolve(u,a))}t.resolve(e).then(l,function(e){r||(r=!0,o.reject(u,e))})}}function b(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=-1,s=new this(i);++a<n;)l(e[a]);return s;function l(e){t.resolve(e).then(function(e){r||(r=!0,o.resolve(s,e))},function(e){r||(r=!0,o.reject(s,e))})}}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=f(h,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=m,u.reject=g,u.all=v,u.race=b},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==p?p:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var a=o();function s(){try{if(!a||!a.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(n){return!1}}function l(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var u=Promise;function c(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function h(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function p(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var f="local-forage-detect-blob-support",m=void 0,g={},v=Object.prototype.toString,b="readonly",x="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function k(e){return new u(function(t){var n=e.transaction(f,x),r=l([""]);n.objectStore(f).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function j(e){return"boolean"==typeof m?u.resolve(m):k(e).then(function(e){return m=e})}function C(e){var t=g[e.name],n={};n.promise=new u(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function _(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function w(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function S(e,t){return new u(function(n,r){if(g[e.name]=g[e.name]||M(),e.db){if(!t)return n(e.db);C(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var o=a.open.apply(a,i);t&&(o.onupgradeneeded=function(t){var n=o.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),o.onerror=function(e){e.preventDefault(),r(o.error)},o.onsuccess=function(){var t=o.result;t.onversionchange=function(e){e.target.close()},n(t),_(e)}})}function E(e){return S(e,!1)}function N(e){return S(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function I(e){return new u(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function T(e){return l([y(atob(e.data))],{type:e.type})}function F(e){return e&&e.__local_forage_encoded_blob}function D(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function O(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then(function(t){return e.db=t,A(e)?N(e):t}).then(function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r}).catch(function(t){throw w(e,t),t})}function R(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return u.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),N(e)}).then(function(){return O(e).then(function(){R(e,t,n,r-1)})}).catch(n);n(o)}}function M(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=M(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=D);var o=[];function a(){return u.resolve()}for(var s=0;s<i.forages.length;s++){var l=i.forages[s];l!==t&&o.push(l._initReady().catch(a))}var c=i.forages.slice(0);return u.all(o).then(function(){return n.db=i.db,E(n)}).then(function(e){return n.db=e,A(n,t._defaultConfig.version)?N(n):e}).then(function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<c.length;r++){var o=c[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}})}function P(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),F(e)&&(e=T(e)),t(e)},a.onerror=function(){r(a.error)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function L(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;F(r)&&(r=T(r));var i=e(r,n.key,s++);void 0!==i?t(i):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(l){r(l)}})}).catch(r)});return c(r,t),r}function V(e,t,n){var r=this;e=h(e);var i=new u(function(n,i){var o;r.ready().then(function(){return o=r._dbInfo,"[object Blob]"===v.call(t)?j(o.db).then(function(e){return e?t:I(t)}):t}).then(function(t){R(r._dbInfo,x,function(o,a){if(o)return i(o);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;i(e)}}catch(u){i(u)}})}).catch(i)});return c(i,n),i}function z(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){R(n._dbInfo,x,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(a.error)},o.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(s){r(s)}})}).catch(r)});return c(r,t),r}function $(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,x,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function U(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(a){n(a)}})}).catch(n)});return c(n,e),n}function q(e,t){var n=this,r=new u(function(t,r){e<0?t(null):n.ready().then(function(){R(n._dbInfo,b,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(u){r(u)}})}).catch(r)});return c(r,t),r}function H(e){var t=this,n=new u(function(e,n){t.ready().then(function(){R(t._dbInfo,b,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];o.onsuccess=function(){var t=o.result;t?(a.push(t.key),t.continue()):e(a)},o.onerror=function(){n(o.error)}}catch(s){n(s)}})}).catch(n)});return c(n,e),n}function W(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;if(e.name){var o=e.name===n.name&&i._dbInfo.db?u.resolve(i._dbInfo.db):E(e).then(function(t){var n=g[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t});r=e.storeName?o.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;C(e);var r=g[e.name],i=r.forages;t.close();for(var o=0;o<i.length;o++){var s=i[o];s._dbInfo.db=null,s._dbInfo.version=n}return new u(function(t,r){var i=a.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,_(n._dbInfo)}}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})}}):o.then(function(t){C(e);var n=g[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;return new u(function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<r.length;t++)_(r[t]._dbInfo)}).catch(function(t){throw(w(e,t)||u.resolve()).catch(function(){}),t})})}else r=u.reject("Invalid arguments");return c(r,t),r}var Y={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:L,getItem:P,setItem:V,removeItem:z,clear:$,length:U,key:q,keys:H,dropInstance:W};function G(){return"function"==typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,Z="__lfsc__:",Q=Z.length,ee="arbf",te="blob",ne="si08",re="ui08",ie="uic8",oe="si16",ae="si32",se="ur16",le="ui32",ue="fl32",ce="fl64",de=Q+ee.length,he=Object.prototype.toString;function pe(e){var t,n,r,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=K.indexOf(e[t]),r=K.indexOf(e[t+1]),i=K.indexOf(e[t+2]),o=K.indexOf(e[t+3]),c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&o;return u}function fe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=K[n[t]>>2],r+=K[(3&n[t])<<4|n[t+1]>>4],r+=K[(15&n[t+1])<<2|n[t+2]>>6],r+=K[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=he.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===he.call(e.buffer))){var r,i=Z;e instanceof ArrayBuffer?(r=e,i+=ee):(r=e.buffer,"[object Int8Array]"===n?i+=ne:"[object Uint8Array]"===n?i+=re:"[object Uint8ClampedArray]"===n?i+=ie:"[object Int16Array]"===n?i+=oe:"[object Uint16Array]"===n?i+=se:"[object Int32Array]"===n?i+=ae:"[object Uint32Array]"===n?i+=le:"[object Float32Array]"===n?i+=ue:"[object Float64Array]"===n?i+=ce:t(new Error("Failed to get type for BinaryArray"))),t(i+fe(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n=X+e.type+"~"+fe(this.result);t(Z+te+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Q)!==Z)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Q,de);if(r===te&&J.test(n)){var i=n.match(J);t=i[1],n=n.substring(i[0].length)}var o=pe(n);switch(r){case ee:return o;case te:return l([o],{type:t});case ne:return new Int8Array(o);case re:return new Uint8Array(o);case ie:return new Uint8ClampedArray(o);case oe:return new Int16Array(o);case se:return new Uint16Array(o);case ae:return new Int32Array(o);case le:return new Uint32Array(o);case ue:return new Float32Array(o);case ce:return new Float64Array(o);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:pe,bufferToString:fe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function xe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(i){return r(i)}n.db.transaction(function(i){be(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=ve,i}function ye(e,t,n,r,i,o){e.executeSql(n,r,i,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?o(e,a):be(e,t,function(){e.executeSql(n,r,i,o)},o)},o):o(e,a)},o)}function ke(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function je(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT * FROM "+i.storeName,[],function(n,r){for(var o=r.rows,a=o.length,s=0;s<a;s++){var l=o.item(s),u=l.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,l.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ce(e,t,n,r){var i=this;e=h(e);var o=new u(function(o,a){i.ready().then(function(){void 0===t&&(t=null);var s=t,l=i._dbInfo;l.serializer.serialize(t,function(t,u){u?a(u):l.db.transaction(function(n){ye(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){o(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(Ce.apply(i,[e,s,n,r-1]));a(t)}})})}).catch(a)});return c(o,n),o}function _e(e,t,n){return Ce.apply(this,[e,t,n,1])}function we(e,t){var n=this;e=h(e);var r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Se(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ee(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ne(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){ye(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return c(r,t),r}function Ae(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)},function(e,t){n(t)})})}).catch(n)});return c(n,e),n}function Ie(e){return new u(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})},function(e,t){n(t)})},function(e){n(e)})})}function Te(e,t){t=p.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return c(r=e.name?new u(function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Ie(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function i(e){return new u(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));u.all(o).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):u.reject("Invalid arguments"),t),r}var Fe={_driver:"webSQLStorage",_initStorage:xe,_support:G(),iterate:je,getItem:ke,setItem:_e,removeItem:we,clear:Se,length:Ee,key:Ne,keys:Ae,dropInstance:Te};function De(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Oe(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Re(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Me(){return!Re()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Oe(e,t._defaultConfig),Me()?(t._dbInfo=n,n.serializer=ve,u.resolve()):u.reject()}function Pe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return c(n,e),n}function Le(e,t){var n=this;e=h(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return c(r,t),r}function Ve(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,a=1,s=0;s<o;s++){var l=localStorage.key(s);if(0===l.indexOf(r)){var u=localStorage.getItem(l);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,l.substring(i),a++)))return u}}});return c(r,t),r}function ze(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(i){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return c(r,t),r}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r});return c(n,e),n}function Ue(e){var t=this.keys().then(function(e){return e.length});return c(t,e),t}function qe(e,t){var n=this;e=h(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return c(r,t),r}function He(e,t,n){var r=this;e=h(e);var i=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(i,o){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)o(r);else try{localStorage.setItem(a.keyPrefix+e,t),i(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||o(s),o(s)}})})});return c(i,n),i}function We(e,t){if(t=p.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return c(r=e.name?new u(function(t){e.storeName?t(Oe(e,i._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):u.reject("Invalid arguments"),t),r}var Ye={_driver:"localStorageWrapper",_initStorage:Be,_support:De(),iterate:Ve,getItem:Le,setItem:He,removeItem:qe,clear:Pe,length:Ue,key:ze,keys:$e,dropInstance:We},Ge=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){for(var n=e.length,r=0;r<n;){if(Ge(e[r],t))return!0;r++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Je={},Ze={},Qe={INDEXEDDB:Y,WEBSQL:Fe,LOCALSTORAGE:Ye},et=[Qe.INDEXEDDB._driver,Qe.WEBSQL._driver,Qe.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function it(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function ot(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var at=function(){function e(t){for(var n in i(this,e),Qe)if(Qe.hasOwnProperty(n)){var r=Qe[n],o=r._driver;this[n]=o,Je[o]||this.defineDriver(r)}this._defaultConfig=ot({},rt),this._config=ot({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new u(function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=nt.concat("_initStorage"),a=0,s=o.length;a<s;a++){var l=o[a];if((!Ke(tt,l)||e[l])&&"function"!=typeof e[l])return void n(i)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=u.reject(t);return c(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var i=tt[n];e[i]||(e[i]=t(i))}};d();var h=function(n){Je[r]&&console.info("Redefining LocalForage driver: "+r),Je[r]=e,Ze[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(p){n(p)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Je[e]?u.resolve(Je[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(ve);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Xe(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function a(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(a).catch(n)}o();var s=new Error("No available storage method found.");return r._driverSet=u.reject(s),r._driverSet}return n()}}var l=null!==this._driverSet?this._driverSet.catch(function(){return u.resolve()}):u.resolve();return this._driverSet=l.then(function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(i)})}).catch(function(){o();var e=new Error("No available storage method found.");return r._driverSet=u.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Ze[e]},e.prototype._extend=function(e){ot(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)it(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),st=new at;t.exports=st},{3:3}]},{},[4])(4);const wi=f(_i.exports),Si=wi.createInstance({name:"report",storeName:"report"});function Ei(e,n){const[r,i]=t.useState(()=>{const t=localStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>localStorage.setItem(e,JSON.stringify(r)),[r]),[r,i]}function Ni(e){let t=e.url;if(e.params){t=t+"?"+new URLSearchParams(e.params).toString()}return t}wi.config({driver:wi.INDEXEDDB,name:"cache",version:1,storeName:"requests",description:"local cache"});const Ai={init:async e=>{let t=await wi.getItem(Ni(e));t&&(e.headers["x-tag"]=t.xtag,e.data=t.data)},save:async(e,t)=>{if(304==e.status)e.data=t.data;else if(e.status<400)try{let n={xtag:e.headers["x-tag"],data:e.data,create_at:new Date};await wi.setItem(Ni(t),n)}catch(n){console.info("Cache: ",n)}},clear:async(e=3)=>{const t=864e5*e,n=await wi.keys(),r=new Date;for(const i of n){const e=await wi.getItem(i);if(e&&e.create_at){r-new Date(e.create_at)>=t&&await wi.removeItem(i)}}},clearAll:()=>{wi.clear()}},Ii=i.div`
|
|
874
894
|
display: flex;
|
|
875
895
|
align-items: center;
|
|
876
896
|
gap: 0 5px;
|
|
@@ -948,8 +968,8 @@ function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
948
968
|
|
|
949
969
|
.menu-new {
|
|
950
970
|
font-size: 0.7rem;
|
|
951
|
-
background-color:
|
|
952
|
-
color:
|
|
971
|
+
background-color: var(--jc-destaque);
|
|
972
|
+
color: var(--jc-destaque-contraste);
|
|
953
973
|
padding: 2px 4px 3px 9px;
|
|
954
974
|
line-height: 100%;
|
|
955
975
|
border-radius: 2px;
|
|
@@ -972,5 +992,5 @@ function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
|
|
|
972
992
|
}
|
|
973
993
|
`,Fi=i.hr`
|
|
974
994
|
margin: 4px 12px;
|
|
975
|
-
`;function Di(e){return n.retirarAcentuacao(e??"").toLowerCase()}function Oi(e,t){if(!t||"string"!=typeof e)return e;const n=Di(e),r=Di(t),i=[];let o=0,a=n.indexOf(r);for(;a>=0;)a>o&&i.push(e.substring(o,a)),i.push(y.jsx("mark",{className:"menu-highlight",children:e.substring(a,a+t.length)},a)),o=a+t.length,a=n.indexOf(r,o);return 0===i.length?e:(i.push(e.substring(o)),i)}function Ri({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:i,enabledFavorite:o,filter:a}){var s;const{versionApp:l}=A();if((null==(s=e.menus)?void 0:s.length)>0)return y.jsxs(y.Fragment,{children:[y.jsxs(Ii,{onClick:()=>n(e),isOpen:e.open,children:[y.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:Oi(e.caption,a)}),y.jsx("span",{className:"icon",children:y.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),y.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,s)=>y.jsx(Ri,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:i,enabledFavorite:o,filter:a},s))})]});if(e.route){let n=i(e.route),s=null==e?void 0:e.version;return s&&(s=Boolean(l.substring(0,s.length)===s)),y.jsxs(Ti,{to:e.route,onClick:t,children:[y.jsx("span",{className:"menu-icon",children:e.icon}),y.jsx("span",{className:"menu-caption",children:Oi(e.caption,a)}),y.jsxs("span",{className:"menu-fav-new",children:[s&&y.jsx("span",{className:"menu-new",children:"novo"}),o&&y.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:y.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?y.jsx(Fi,{}):null}const Mi="sys/nav/closed";const Bi=({routes:e,closeMenu:t,brand:n})=>y.jsx("div",{className:"navbar-mu--brand",children:y.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function Pi({isOpen:e,setIsOpen:t,menuClose:n}){return y.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?y.jsx("i",{className:"fa-solid fa-xmark icon-close"}):y.jsxs("div",{className:"icon-desk",children:[y.jsx("span",{}),y.jsx("span",{}),y.jsx("span",{})]})})}const Li="sys/nav/closed";e.Alerta=R,e.Aviso=function({onConfirm:e,text:t="",children:n}){return y.jsx(O,{type:T,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return y.jsx(o.Button,{size:"sm",color:"warning",title:e,children:y.jsx(G,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return y.jsx(o.Button,{size:"sm",color:"primary",title:e,children:y.jsx(Z,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return y.jsx(o.Button,{size:"sm",color:"danger",title:e,children:y.jsx(Q,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return y.jsxs(o.Button,{color:"success",title:"Incluir um novo registro",onClick:t,...n,children:[y.jsx(J,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:i,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return y.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(i),children:[y.jsxs(o.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:s&&1==s,children:[y.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),y.jsxs(o.Button,{type:"button",color:"outline-danger",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[y.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return y.jsxs("div",{className:"box-color--container",children:[y.jsx(oe,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),y.jsx(oe,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),y.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:i=!0,onChange:o,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&o&&o(e,u)},[u]),i?y.jsxs(ae,{open:u,noMargin:a,...l,children:[y.jsx("div",{className:"bi-btn-area",children:y.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",y.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),y.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=wn,e.ButtonBack=ce,e.ButtonClose=le,e.ButtonHelp=ue,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return y.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>y.jsx(o.Button,{active:r===e,color:"outline-info",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,i]=t.useState(!1);function o(){var e;i((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",o),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",o)}},[]),y.jsx(y.Fragment,{children:r&&y.jsx(de,{title:"Ir para o início da tela",visible:o,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),i(!1)},className:"pulsate-bck",center:n,children:y.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const i=r.disabled||!e;return y.jsx($e,{disabled:i,children:y.jsxs("label",{children:[y.jsx(o.Input,{type:"checkbox",disabled:i,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),y.jsx("span",{children:n})]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),y.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:y.jsxs("div",{ref:e,className:"update-box",children:[y.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:y.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[i,o]=t.useState(!1);return t.useEffect(()=>()=>{he&&clearTimeout(he)},[]),y.jsxs("div",{className:`clipboard-area--container ${i&&" clip-active"}`,children:[y.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),y.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),o(!0),he=setTimeout(()=>o(!1),r)},children:i?y.jsxs(y.Fragment,{children:[y.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):y.jsxs(y.Fragment,{children:[y.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:i}){return y.jsx(O,{type:F,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:i,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:i,minHeight:o=40,...a}){return y.jsxs("div",{className:"di-box "+(i||""),...a,style:{minHeight:o},children:[e&&y.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?y.jsx("input",{className:"form-control",value:r,readOnly:!0}):y.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=L,e.DynamicCounter=function({valor:e=0,time:r=25,format:i,currency:o}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let i=r+n;return i>e&&(i=e),i===e&&clearInterval(t),i})},r);return()=>clearInterval(t)},[e,r]),i?n.formatValor(a,o?2:0,Boolean(o)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:i="8px",...o}){return y.jsx(gi,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":i},sizeBreak:n,...o,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...i}){return y.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...i,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:i="",classNameCol:o="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),y.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[y.jsx("label",{className:`form-desk-label ${i}`,children:t}),y.jsx("div",{className:o,"data-is-line-short":String(n),children:e}),a&&y.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:i=1200,goBack:o,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),y.jsx("div",{className:"mx-auto",style:{maxWidth:i},children:y.jsx(xe,{title:e,count:n,codigo:r,goBack:o,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return y.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,i;if("Enter"===e.key){const o=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(i=null==n?void 0:n.current)?void 0:i.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===o&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,i;-1!==e.indexOf("T")?(r=e.split("T"),i=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(i=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),i&&t&&(r=r+" "+i),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>y.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ue(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>y.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ue(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>y.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ue(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return y.jsxs("div",{className:`group-box--container ${t}`,children:[y.jsx("div",{className:"group-box--label",children:e}),y.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return y.jsxs("div",{className:"hint--container",children:[y.jsx("i",{className:"fas fa-question"}),y.jsxs("div",{className:"hint-content",children:[y.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=fe,e.IconExitOutline=function(e){return y.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=me,e.IconUserGear=function(e){return y.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:y.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>y.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>y.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>y.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=Z,e.IconeEmail=()=>y.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>y.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=Q,e.IconeFechar=te,e.IconeFecharCircle=()=>y.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=ne,e.IconeIncluir=J,e.IconeLogin=()=>y.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=X,e.IconeMostrarSenha=({display:e})=>y.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=re,e.IconePassword=()=>y.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>y.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>y.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=ie,e.IconeSalvar=()=>y.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>y.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>y.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>y.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=ee,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return y.jsx(yn,{onClick:n,...t});case"cnpj":return y.jsx(pn,{onClick:n,...t});case"codigo":return y.jsx(bn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return y.jsx(Ye,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return y.jsx(kn,{onClick:n,...t});case"hora":return y.jsx(xn,{onClick:n,...t});case"percent":return y.jsx(vn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return y.jsx(gn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return y.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return y.jsx(jn,{onClick:n,...t});default:return y.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return y.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:i,autoFocus:o,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const i=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!i.erro&&e&&n&&n({...e,ende:i.logradouro,bairro:i.bairro,cida:i.localidade,uf:i.uf}),l(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(We,{visible:s,message:"Buscando CEP..."}),y.jsxs("div",{className:"input-group",children:[y.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:i,autoFocus:o}),y.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:i,children:y.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:i})=>y.jsx(En,{children:y.jsxs(Nn,{disabled:e,onClick:function(){if(!e&&i){i({target:{name:n,checked:!r}})}},children:[y.jsxs("span",{children:[r&&y.jsx(q,{color:e&&"silver"}),!r&&y.jsx(H,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=pn,e.InputCodigo=bn,e.InputColor=oe,e.InputCpf=yn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...i}){return y.jsx(dn,{className:`form-control ${Je(t)?"is-invalid":""} ${r||""}`,mask:hn,onAccept:function(t,r,i){i&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...i})},e.InputEstado=kn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...r,children:[y.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),y.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:t,children:y.jsx(Y,{})})]}),e.InputFone=Ye,e.InputHora=xn,e.InputMask=Un,e.InputOff=function({campo:e,dados:n,setDados:r,type:i,className:o,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,h]=t.useState(!1),p="password"==i;return t.useEffect(()=>{h(!1)},[a]),y.jsxs("div",{className:"input-off",children:[y.jsx("input",{className:`form-control ${o} ${p&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==i&&y.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||h(!d)},children:d?y.jsx("i",{className:"fa-solid fa-eye-slash"}):y.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[i,o]=t.useState(!1);return y.jsxs(Sn,{disabled:e,children:[y.jsx("input",{type:i?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),y.jsx("i",{className:i?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||o(!i)},title:e?"":(i?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=vn,e.InputPesquisa=Fe,e.InputQRCode=function({value:e,setValue:n}){const[r,i]=t.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"input-group",children:[y.jsx(o.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),y.jsx(o.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:y.jsx(K,{})}),y.jsx(o.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>i(!0),children:y.jsx(ie,{})}),e?y.jsx(_e,{className:"btn btn-info",title:"Abrir o link do documento",to:e,children:y.jsx(re,{})}):y.jsx(o.Button,{color:"info",disabled:!0,children:y.jsx(re,{})})]}),r&&y.jsx(ze,{setVisible:i,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=gn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...i})=>y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...i,children:[y.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>y.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),y.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:r,children:y.jsx(Y,{})})]}),e.InputValor=mn,e.LabelHint=function({label:e,hint:t}){return y.jsxs("div",{className:"label-hint--container",children:[y.jsx("label",{children:e}),y.jsx("div",{className:"label-hint--icon",children:y.jsx("i",{className:"fas fa-question"})}),y.jsxs("div",{className:"label-hint--box",children:[y.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:i,useTheme:o,testDomain:a})=>{const s="boolean"==typeof o&&o,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(E);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=Ei("sys/reportType",0),[h,p]=t.useState([]),[f,m]=t.useState(!1),g=t.useRef([]),v=t.useRef(new Map),b=t.useRef(new Map),x=t.useRef(0),k=e=>{const t=b.current.get(e);b.current.delete(e),p(t=>t.filter(t=>t.modalId!==e)),t&&t(!1)},C=e=>{let t=h.find(t=>t.modalId===e);t&&t.setVisible(!1),b.current.delete(e),(e=>{var t;v.current.has(e)&&(clearTimeout(v.current.get(e)),v.current.delete(e));const n=g.current,r=n.indexOf(e);r<0||(n.splice(r,1),(null==(t=window.history.state)?void 0:t.jcModal)===e&&(x.current++,window.history.back()))})(e),p(t=>t.filter(t=>t.modalId!==e))},_=t.useCallback(e=>{"Escape"===e.key&&0!=h.length&&C(h[h.length-1].modalId)},[h]);w();const A=j(a);return t.useEffect(()=>{s&&(localStorage.setItem(E,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",_,!1),()=>window.removeEventListener("keydown",_,!1)),[h]),t.useEffect(()=>{var e;function t(){var e;if(x.current>0)return void x.current--;const t=null==(e=window.history.state)?void 0:e.jcModal,n=g.current;for(;n.length&&n[n.length-1]!==t;)k(n.pop());t&&!n.includes(t)&&(x.current++,window.history.back())}return N||(N=!0,(null==(e=window.history.state)?void 0:e.jcModal)&&window.history.back()),window.addEventListener("popstate",t),()=>{window.removeEventListener("popstate",t),v.current.forEach(e=>clearTimeout(e)),v.current.clear()}},[]),y.jsxs(S.Provider,{value:{versionApp:i,addModal:(e,t)=>{b.current.set(e,t),(e=>{if(g.current.includes(e)||v.current.has(e))return;const t=setTimeout(()=>{v.current.delete(e),window.history.pushState({jcModal:e},""),g.current.push(e)},0);v.current.set(e,t)})(e),p(n=>{let r=[...n],i=r.findIndex(t=>t.modalId===e);return i>=0?r[i]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:C,clearModals:()=>{h.forEach(e=>{C(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[A,r]})},e.LinkToEmail=Ce,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let i="+";return(null==r?void 0:r.startsWith("+"))||(i="+55"),i+=r.replace(/\D/g,""),y.jsx("a",{href:`tel:${i}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),y.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=_e,e.LinkToWhatsApp=ke,e.Loading=We,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:i}){if(!r)return null;let[,o]=t.split("."),[a,s]=n.split(".");return s!=o&&(n=[a,o].join(".")),y.jsx(Te,{url:e,file:t,fileTo:n,setLoading:i})},e.Modal=Re,e.ModalBody=Me,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:i,alignTop:o,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?y.jsxs(Re,{alignTop:o,setVisible:t,visible:e,...u,children:[y.jsxs(Pe,{helpLink:s,setVisible:t,children:[r,null!=l&&y.jsxs(y.Fragment,{children:[" ",y.jsx(ve,{value:l,isCount:!0})]}),y.jsx(ve,{value:n})]}),y.jsx(Be,{children:y.jsx(Me,{style:{paddingBottom:a},children:i})})]}):null},e.ModalContent=Be,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:i,alignTop:a,helpLink:s}){return y.jsxs(Re,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[y.jsx(Pe,{helpLink:s,setVisible:t,children:e}),y.jsx(Be,{children:y.jsxs(Me,{className:"mod-filter--container",children:[i,y.jsxs("div",{className:"mod-filter--btn-area",children:[y.jsxs(o.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[y.jsx(W,{})," Aplicar filtros"]}),y.jsxs(o.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[y.jsx(te,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return y.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Pe,e.Navbar=function({menusConfig:{brand:e,company:r,menus:i,routes:o,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),h=t.useRef(),{theme:p,setTheme:f,canChangeTheme:m}=A(),[g,v]=t.useState(!1),[b,x]=t.useState(""),[k,C]=t.useState([]),[_,w]=t.useState([]);let j=[];const S=localStorage.getItem(Mi);S&&(j=JSON.parse(S));const[E]=Ae({url:o.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):w(e.data)}}),[N]=Ae({url:o.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function I(){v(!1)}function T(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Mi,JSON.stringify(n)),C(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),C(t),T(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=_.filter(e=>e.route!==t.route);var r;n.length===_.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,o.apiFavorites&&(N({data:r}),w(r))}function O(e){return _.some(t=>t.route===e)}return t.useEffect(()=>{o.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==_||_.forEach(t=>{i.forEach((n,r)=>{var i;if(r>0&&0!==(null==(i=null==n?void 0:n.menus)?void 0:i.length)){let i=n.menus.findIndex(e=>e.route===t.route);if(i>=0){let o=n.menus[i];e.push({...o,caption:t.caption,index:String(r).padStart(2,"0")+String(i).padStart(2,0)})}}})}),"Favoritos"===i[0].caption&&(i[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),C(function(e){let t=[];const n=Di(b);return e.forEach(e=>{let r={caption:e.caption,open:!j.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(Di(e.caption).includes(n)||Di(e.shortcut).includes(n))).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&r.menus.push({...e,prefix:null==r?void 0:r.prefix})}),b&&(r.open=!0),t.push(r)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(i))},[b,_]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"navbar--area",children:y.jsxs("div",{className:"navbar-content",children:[y.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?y.jsx(fe,{width:20,height:20}):y.jsx(me,{width:20,height:20})}),y.jsxs("div",{className:"content",children:[y.jsx(a.Link,{to:o.home,className:"brand",onClick:I,title:"Voltar para tela inicial",children:e}),y.jsxs("div",{className:"company",children:[y.jsx("div",{className:"name",children:r}),y.jsxs("div",{className:"doc",children:[y.jsxs("span",{children:[null==s?void 0:s.title," "]}),y.jsx("strong",{children:null==s?void 0:s.name})]})]}),y.jsxs("div",{className:"nav-btn-area",children:[y.jsx("div",{className:"btn-theme",children:m&&y.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:y.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&y.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:y.jsx(ne,{})}),y.jsxs("div",{className:"btn-atalho",children:[y.jsx(a.Link,{to:o.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:y.jsx("i",{className:"fa-solid fa-user-gear"})}),y.jsx(a.Link,{to:o.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:y.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&y.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&I()},children:y.jsxs("div",{className:"menu-content",children:[y.jsxs("div",{className:"search-area",children:[y.jsx("i",{className:"fas fa-search"}),y.jsx("input",{ref:d,placeholder:"Pesquisar...",value:b,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),b&&y.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>x(""),children:y.jsx("i",{className:"fas fa-times"})}),y.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:y.jsx("i",{className:"fas fa-minus"})}),y.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:y.jsx("i",{className:"fas fa-plus"})})]}),y.jsx("div",{className:"navbar--menu-area",ref:h,children:k.map((e,t)=>y.jsx(Ri,{opc:e,closeMenu:I,clickGroup:T,clickFavorite:D,isFavorite:O,enabledFavorite:o.apiFavorites,filter:b},t))}),y.jsx("div",{className:"menu-footer",children:y.jsx(a.Link,{to:o.exit,onClick:I,children:y.jsxs("div",{className:"user",children:[y.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),y.jsxs("span",{className:"sair",children:["Sair ",y.jsx(X,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:i,routes:o,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:h,setTheme:p,canChangeTheme:f}=A(),[m,g]=t.useState(!1),[v,b]=t.useState(""),[x,k]=t.useState([]),[C,_]=t.useState([]);let w=[];const j=localStorage.getItem(Li);j&&(w=JSON.parse(j));const[S]=Ae({url:o.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):_(e.data)}}),[E]=Ae({url:o.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function N(){g(!1)}function I(e){let t=[...x],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Li,JSON.stringify(n)),k(t)}function T(e){let t=[...x];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),I(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,o.apiFavorites&&(E({data:r}),_(r))}function D(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{o.apiFavorites&&S()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{i.forEach((n,r)=>{var i;if(r>0&&0!==(null==(i=null==n?void 0:n.menus)?void 0:i.length)){let i=n.menus.findIndex(e=>e.route===t.route);if(i>=0){let o=n.menus[i];e.push({...o,caption:t.caption,index:String(r).padStart(2,"0")+String(i).padStart(2,0)})}}})}),"Favoritos"===i[0].caption&&(i[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(i))},[v,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"navbar-mu-area",children:y.jsxs("div",{className:"mu--container",children:[y.jsx(Pi,{isOpen:m,setIsOpen:g}),y.jsxs("div",{className:"mu--content",children:[y.jsx(Bi,{isOpen:m,setIsOpen:g,brand:e,closeMenu:N,routes:o}),y.jsxs("div",{className:"mu--info",children:[y.jsx("div",{className:"info-line-1",children:r}),y.jsx("div",{className:"info-line-2",children:y.jsxs("span",{children:[null==s?void 0:s.title," ",y.jsx("strong",{children:null==s?void 0:s.name})]})})]}),y.jsxs("div",{className:"mu--buttons",children:[f&&y.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";p(e),document.body.dataset.bsTheme=e},children:y.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),y.jsx(a.Link,{to:o.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:y.jsx("i",{className:"fa-solid fa-user-gear"})}),y.jsx(a.Link,{to:o.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:y.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),y.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&N()},children:y.jsxs("div",{className:"nv-menu--content","data-open":m,children:[y.jsxs("div",{className:"nv-menu--brand",children:[y.jsx(Pi,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),y.jsx(Bi,{isOpen:m,setIsOpen:g,brand:e,closeMenu:N,routes:o,showButtonClose:!0})]}),y.jsxs("div",{className:"nv-menu--search",children:[y.jsx("i",{className:"fas fa-search"}),y.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>b(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of x)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&y.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;b(""),null==(e=null==u?void 0:u.current)||e.focus()},children:y.jsx("i",{className:"fas fa-times"})}),y.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:y.jsx("i",{className:"fas fa-minus"})}),y.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:y.jsx("i",{className:"fas fa-plus"})})]}),y.jsx("div",{className:"nv-menu--opcoes",ref:c,children:x.map((e,t)=>y.jsx(Ri,{opc:e,closeMenu:N,clickGroup:I,clickFavorite:F,isFavorite:D,enabledFavorite:o.apiFavorites},t))}),y.jsx("div",{className:"nv-menu--footer",children:y.jsx(a.Link,{to:o.exit,onClick:N,children:y.jsxs("div",{className:"foo-user",children:[y.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),y.jsxs("span",{className:"foo-sair",children:["Sair ",y.jsx(X,{})]})]})})}),y.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:i=16,limit:o=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(i)||e.push(i),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==o&&void 0!==i;function c(t){var i;t!==n&&t>=1&&t<=e&&(null==(i=document.querySelector("main"))||i.scrollTo(0,0),r(t))}return y.jsx("div",{className:"pgn-content","data-fixed":o>=30?"true":"false","data-align":s,children:y.jsxs("div",{className:"pgn-comps",children:[u&&y.jsxs("div",{className:"pgn-limit",children:[y.jsx("strong",{children:"Registros:"}),y.jsx("select",{className:"form-select form-select-sm",value:o,onChange:e=>a(Number(e.target.value)),children:l.map(e=>y.jsx("option",{value:e,children:e},e))})]}),y.jsxs("div",{className:"pgn-pages",children:[y.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:y.jsx("i",{className:"fas fa-angle-double-left"})}),y.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:y.jsx("i",{className:"fas fa-angle-left"})}),y.jsx("span",{className:"p-2 text-body",children:y.jsxs("div",{children:[y.jsx("span",{className:"fw-bold",children:n}),e?y.jsxs("span",{children:[" / ",e]}):null]})}),y.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:y.jsx("i",{className:"fas fa-angle-right"})}),y.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:y.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=xe,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:i,children:o,marginBottom:a=0,degrade:s=!1,...l}){return y.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:i,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":s?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":s?"0px":"6px"},...l,children:[s&&y.jsx("div",{className:"pd-top"}),y.jsxs("div",{className:"pd-body",children:[e&&y.jsx("h3",{className:"pd-title",children:e}),o]})]})},e.PanelHeader=ge,e.PrintButtonTypes=mi,e.PrintButtons=function({onClose:e,showTypes:n}){const{setReportType:r}=A();return t.useEffect(()=>{n||r(0)},[]),y.jsxs("div",{className:"print-btn--container",children:[n&&y.jsx(mi,{}),y.jsxs("div",{className:"print-btn--buttons",children:[y.jsxs("button",{className:"btn btn-primary",type:"submit",children:[y.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),y.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[y.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=ze,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:i,options:a=[],disabled:s,cols:l=1}){return y.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[y.jsx("div",{className:"group-radio--label",children:t}),y.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>y.jsxs("label",{children:[y.jsx(o.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>i(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return y.jsx(fi,{hasMaxWidth:t,children:y.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:i="",innerRef:o,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...vi,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?xi(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let i=n-1;i>=0;i-=1){const t=e[i];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||xi(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),h=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),p=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?xi(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(o,()=>({open(e){const t=p(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,p]),y.jsx(bi.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:p,selectTab:d,toggleTab:h},children:y.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[y.jsx(ki,{isMultine:n}),y.jsx("div",{className:`tab-control--content ${i}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:i,isVisible:o=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=yi(),h=t.useMemo(()=>e||n.random(999999),[]),p=l(h);return t.useEffect(()=>()=>c(h),[]),t.useEffect(()=>{d({id:h,caption:i,title:r,isVisible:o})},[d,r,i,o]),o?y.jsxs(Ci,{open:(null==p?void 0:p.isOpen)&&(null==p?void 0:p.isVisible),"data-in-tab-sheet":null!=p?"true":"false",...s,children:[y.jsx("div",{className:"bi-btn-area",children:y.jsxs("button",{type:"button",onClick:()=>u(h),children:[r," ",y.jsx("i",{className:"fas fa-chevron-down"})]})}),y.jsx("div",{className:`bi-body ${(null==p?void 0:p.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:i,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:h,onClick:p,fixedHeader:f,clickCanEdit:m,loading:g}){var v,b;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let x=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(b=null==r?void 0:r.acoes)?void 0:b.filter(e=>e.ativa??!0);r.acoes=e,x=r.acoes.length>0}function C(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?y.jsxs("div",{className:"py-2 hstack gap-2",children:[y.jsx(o.Spinner,{size:"sm",color:"info"})," ",y.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?y.jsx(B,{children:y.jsxs(P,{alignTop:s,sizeBreak:c,hasBorder:u,children:[y.jsx($,{fixedHeader:f,colunas:t,incColActions:x}),y.jsx(U,{colunas:t,acoes:r,dados:a,opcoes:i,colorir:l,getLineColor:h,onClick:p||m?function(e,t){if(p){if(C(null==t?void 0:t.currentTarget))return;p(e,t)}else if(m&&n.isDesktop()){if(C(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):y.jsxs("div",{className:"d-flex align-items-center gap-2 py-2 px-3 text-body-secondary bg-body-tertiary rounded-3",style:{border:"1px solid var(--bs-border-color)",borderLeft:"4px solid var(--bs-secondary-border-subtle)"},role:"status",children:[y.jsx("span",{className:"d-inline-flex align-items-center justify-content-center rounded-circle bg-secondary-subtle text-secondary-emphasis flex-shrink-0",style:{width:28,height:28},"aria-hidden":"true",children:y.jsx("i",{className:"fas fa-inbox small"})}),y.jsx("span",{className:"fw-medium",children:d})]})},e.TextHtml=hi,e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:i,toRight:o,className:a="",...s}){return y.jsx(pi,{checked:t,disabled:n,className:a,...s,children:y.jsxs("label",{style:{flexDirection:o?"row-reverse":"row",justifyContent:o?"space-between":"flex-start"},children:[y.jsx("div",{className:"form-switch",children:y.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),i&&y.jsx("span",{className:"title",children:i})]})})},e.cache=Ai,e.createApiConfig=function(e=M){const t={...M,...e};return t.auth={...M.auth,...e.auth},t},e.createDropdownItems=pe,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=z,e.getDataCol=V,e.setRouteMain=function(e){be=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Ae,e.useLibContext=A,e.useLocalForage=function(e,n,r=1){const[i,o]=t.useState(n);return t.useEffect(()=>{Si.getItem(e).then(t=>{t&&(t.versao==r?o(t.data):Si.removeItem(e))})},[]),t.useEffect(()=>{Si.setItem(e,{versao:r,data:i})},[i]),[i,o]},e.useLocalStorage=Ei,e.useLocalhostBadge=w,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,i]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,i]},e.useTestDomainBadge=j,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
995
|
+
`;function Di(e){return n.retirarAcentuacao(e??"").toLowerCase()}function Oi(e,t){if(!t||"string"!=typeof e)return e;const n=Di(e),r=Di(t),i=[];let o=0,a=n.indexOf(r);for(;a>=0;)a>o&&i.push(e.substring(o,a)),i.push(y.jsx("mark",{className:"menu-highlight",children:e.substring(a,a+t.length)},a)),o=a+t.length,a=n.indexOf(r,o);return 0===i.length?e:(i.push(e.substring(o)),i)}function Ri({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:i,enabledFavorite:o,filter:a}){var s;const{versionApp:l}=A();if((null==(s=e.menus)?void 0:s.length)>0)return y.jsxs(y.Fragment,{children:[y.jsxs(Ii,{onClick:()=>n(e),isOpen:e.open,children:[y.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:Oi(e.caption,a)}),y.jsx("span",{className:"icon",children:y.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),y.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,s)=>y.jsx(Ri,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:i,enabledFavorite:o,filter:a},s))})]});if(e.route){let n=i(e.route),s=null==e?void 0:e.version;return s&&(s=Boolean(l.substring(0,s.length)===s)),y.jsxs(Ti,{to:e.route,onClick:t,children:[y.jsx("span",{className:"menu-icon",children:e.icon}),y.jsx("span",{className:"menu-caption",children:Oi(e.caption,a)}),y.jsxs("span",{className:"menu-fav-new",children:[s&&y.jsx("span",{className:"menu-new",children:"novo"}),o&&y.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:y.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?y.jsx(Fi,{}):null}const Mi="sys/nav/closed";const Bi=({routes:e,closeMenu:t,brand:n})=>y.jsx("div",{className:"navbar-mu--brand",children:y.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function Pi({isOpen:e,setIsOpen:t,menuClose:n}){return y.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?y.jsx("i",{className:"fa-solid fa-xmark icon-close"}):y.jsxs("div",{className:"icon-desk",children:[y.jsx("span",{}),y.jsx("span",{}),y.jsx("span",{})]})})}const Li="sys/nav/closed";e.Alerta=R,e.Aviso=function({onConfirm:e,text:t="",children:n}){return y.jsx(O,{type:T,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return y.jsx(o.Button,{size:"sm",color:"warning",title:e,children:y.jsx(G,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return y.jsx(o.Button,{size:"sm",color:"outline-secundaria",title:e,children:y.jsx(Z,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return y.jsx(o.Button,{size:"sm",color:"outline-danger",title:e,children:y.jsx(Q,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return y.jsxs(o.Button,{color:"destaque",title:"Incluir um novo registro",onClick:t,...n,children:[y.jsx(J,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:i,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return y.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(i),children:[y.jsxs(o.Button,{type:u?"button":"submit",color:"destaque",onClick:u,disabled:s&&1==s,children:[y.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),y.jsxs(o.Button,{type:"button",color:"terciaria",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[y.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return y.jsxs("div",{className:"box-color--container",children:[y.jsx(oe,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),y.jsx(oe,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),y.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:i=!0,onChange:o,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&o&&o(e,u)},[u]),i?y.jsxs(ae,{open:u,noMargin:a,...l,children:[y.jsx("div",{className:"bi-btn-area",children:y.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",y.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),y.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=_n,e.ButtonBack=ce,e.ButtonClose=le,e.ButtonHelp=ue,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return y.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>y.jsx(o.Button,{active:r===e,color:"outline-secundaria",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,i]=t.useState(!1);function o(){var e;i((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",o),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",o)}},[]),y.jsx(y.Fragment,{children:r&&y.jsx(de,{title:"Ir para o início da tela",visible:o,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),i(!1)},className:"pulsate-bck",center:n,children:y.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const i=r.disabled||!e;return y.jsx($e,{disabled:i,children:y.jsxs("label",{children:[y.jsx(o.Input,{type:"checkbox",disabled:i,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),y.jsx("span",{children:n})]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),y.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:y.jsxs("div",{ref:e,className:"update-box",children:[y.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:y.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[i,o]=t.useState(!1);return t.useEffect(()=>()=>{he&&clearTimeout(he)},[]),y.jsxs("div",{className:`clipboard-area--container ${i&&" clip-active"}`,children:[y.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),y.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),o(!0),he=setTimeout(()=>o(!1),r)},children:i?y.jsxs(y.Fragment,{children:[y.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):y.jsxs(y.Fragment,{children:[y.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:i}){return y.jsx(O,{type:F,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:i,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:i,minHeight:o=40,...a}){return y.jsxs("div",{className:"di-box "+(i||""),...a,style:{minHeight:o},children:[e&&y.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?y.jsx("input",{className:"form-control",value:r,readOnly:!0}):y.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=L,e.DynamicCounter=function({valor:e=0,time:r=25,format:i,currency:o}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let i=r+n;return i>e&&(i=e),i===e&&clearInterval(t),i})},r);return()=>clearInterval(t)},[e,r]),i?n.formatValor(a,o?2:0,Boolean(o)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:i="8px",...o}){return y.jsx(gi,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":i},sizeBreak:n,...o,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...i}){return y.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...i,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:i="",classNameCol:o="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),y.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[y.jsx("label",{className:`form-desk-label ${i}`,children:t}),y.jsx("div",{className:o,"data-is-line-short":String(n),children:e}),a&&y.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:i=1200,goBack:o,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),y.jsx("div",{className:"mx-auto",style:{maxWidth:i},children:y.jsx(xe,{title:e,count:n,codigo:r,goBack:o,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return y.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,i;if("Enter"===e.key){const o=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(i=null==n?void 0:n.current)?void 0:i.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===o&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,i;-1!==e.indexOf("T")?(r=e.split("T"),i=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(i=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),i&&t&&(r=r+" "+i),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>y.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ue(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>y.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ue(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>y.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ue(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return y.jsxs("div",{className:`group-box--container ${t}`,children:[y.jsx("div",{className:"group-box--label",children:e}),y.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return y.jsxs("div",{className:"hint--container",children:[y.jsx("i",{className:"fas fa-question"}),y.jsxs("div",{className:"hint-content",children:[y.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=fe,e.IconExitOutline=function(e){return y.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=me,e.IconUserGear=function(e){return y.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:y.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>y.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>y.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>y.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=Z,e.IconeEmail=()=>y.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>y.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=Q,e.IconeFechar=te,e.IconeFecharCircle=()=>y.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=ne,e.IconeIncluir=J,e.IconeLogin=()=>y.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=X,e.IconeMostrarSenha=({display:e})=>y.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=re,e.IconePassword=()=>y.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>y.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>y.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=ie,e.IconeSalvar=()=>y.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>y.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>y.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>y.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=ee,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return y.jsx(yn,{onClick:n,...t});case"cnpj":return y.jsx(pn,{onClick:n,...t});case"codigo":return y.jsx(bn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return y.jsx(Ye,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return y.jsx(kn,{onClick:n,...t});case"hora":return y.jsx(xn,{onClick:n,...t});case"percent":return y.jsx(vn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return y.jsx(gn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return y.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return y.jsx(wn,{onClick:n,...t});default:return y.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return y.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:i,autoFocus:o,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const i=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!i.erro&&e&&n&&n({...e,ende:i.logradouro,bairro:i.bairro,cida:i.localidade,uf:i.uf}),l(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(We,{visible:s,message:"Buscando CEP..."}),y.jsxs("div",{className:"input-group",children:[y.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:i,autoFocus:o}),y.jsx("button",{type:"button",className:"btn btn-secundaria",onClick:()=>u(a.value),disabled:i,children:y.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:i})=>y.jsx(En,{children:y.jsxs(Nn,{disabled:e,onClick:function(){if(!e&&i){i({target:{name:n,checked:!r}})}},children:[y.jsxs("span",{children:[r&&y.jsx(q,{color:e&&"silver"}),!r&&y.jsx(H,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=pn,e.InputCodigo=bn,e.InputColor=oe,e.InputCpf=yn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...i}){return y.jsx(dn,{className:`form-control ${Je(t)?"is-invalid":""} ${r||""}`,mask:hn,onAccept:function(t,r,i){i&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...i})},e.InputEstado=kn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...r,children:[y.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),y.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-secundaria",onClick:t,children:y.jsx(Y,{})})]}),e.InputFone=Ye,e.InputHora=xn,e.InputMask=Un,e.InputOff=function({campo:e,dados:n,setDados:r,type:i,className:o,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,h]=t.useState(!1),p="password"==i;return t.useEffect(()=>{h(!1)},[a]),y.jsxs("div",{className:"input-off",children:[y.jsx("input",{className:`form-control ${o} ${p&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==i&&y.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||h(!d)},children:d?y.jsx("i",{className:"fa-solid fa-eye-slash"}):y.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[i,o]=t.useState(!1);return y.jsxs(Sn,{disabled:e,children:[y.jsx("input",{type:i?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),y.jsx("i",{className:i?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||o(!i)},title:e?"":(i?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=vn,e.InputPesquisa=Fe,e.InputQRCode=function({value:e,setValue:n}){const[r,i]=t.useState(!1);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"input-group",children:[y.jsx(o.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),y.jsx(o.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:y.jsx(K,{})}),y.jsx(o.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>i(!0),children:y.jsx(ie,{})}),e?y.jsx(Ce,{className:"btn btn-secundaria",title:"Abrir o link do documento",to:e,children:y.jsx(re,{})}):y.jsx(o.Button,{color:"secundaria",disabled:!0,children:y.jsx(re,{})})]}),r&&y.jsx(ze,{setVisible:i,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=gn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...i})=>y.jsxs("div",{className:"input-group",children:[y.jsxs("select",{className:"form-select",...i,children:[y.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>y.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),y.jsx("button",{type:"button",className:"btn btn-secundaria",title:"Abrir tela de pesquisa",onClick:r,children:y.jsx(Y,{})})]}),e.InputValor=mn,e.LabelHint=function({label:e,hint:t}){return y.jsxs("div",{className:"label-hint--container",children:[y.jsx("label",{children:e}),y.jsx("div",{className:"label-hint--icon",children:y.jsx("i",{className:"fas fa-question"})}),y.jsxs("div",{className:"label-hint--box",children:[y.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:i,useTheme:o,testDomain:a})=>{const s="boolean"==typeof o&&o,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(E);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=Ei("sys/reportType",0),[h,p]=t.useState([]),[f,m]=t.useState(!1),g=t.useRef([]),v=t.useRef(new Map),b=t.useRef(new Map),x=t.useRef(0),k=e=>{const t=b.current.get(e);b.current.delete(e),p(t=>t.filter(t=>t.modalId!==e)),t&&t(!1)},j=e=>{let t=h.find(t=>t.modalId===e);t&&t.setVisible(!1),b.current.delete(e),(e=>{var t;v.current.has(e)&&(clearTimeout(v.current.get(e)),v.current.delete(e));const n=g.current,r=n.indexOf(e);r<0||(n.splice(r,1),(null==(t=window.history.state)?void 0:t.jcModal)===e&&(x.current++,window.history.back()))})(e),p(t=>t.filter(t=>t.modalId!==e))},C=t.useCallback(e=>{"Escape"===e.key&&0!=h.length&&j(h[h.length-1].modalId)},[h]);_();const A=w(a);return t.useEffect(()=>{s&&(localStorage.setItem(E,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",C,!1),()=>window.removeEventListener("keydown",C,!1)),[h]),t.useEffect(()=>{var e;function t(){var e;if(x.current>0)return void x.current--;const t=null==(e=window.history.state)?void 0:e.jcModal,n=g.current;for(;n.length&&n[n.length-1]!==t;)k(n.pop());t&&!n.includes(t)&&(x.current++,window.history.back())}return N||(N=!0,(null==(e=window.history.state)?void 0:e.jcModal)&&window.history.back()),window.addEventListener("popstate",t),()=>{window.removeEventListener("popstate",t),v.current.forEach(e=>clearTimeout(e)),v.current.clear()}},[]),y.jsxs(S.Provider,{value:{versionApp:i,addModal:(e,t)=>{b.current.set(e,t),(e=>{if(g.current.includes(e)||v.current.has(e))return;const t=setTimeout(()=>{v.current.delete(e),window.history.pushState({jcModal:e},""),g.current.push(e)},0);v.current.set(e,t)})(e),p(n=>{let r=[...n],i=r.findIndex(t=>t.modalId===e);return i>=0?r[i]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:j,clearModals:()=>{h.forEach(e=>{j(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[A,r]})},e.LinkToEmail=je,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let i="+";return(null==r?void 0:r.startsWith("+"))||(i="+55"),i+=r.replace(/\D/g,""),y.jsx("a",{href:`tel:${i}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),y.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=Ce,e.LinkToWhatsApp=ke,e.Loading=We,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:i}){if(!r)return null;let[,o]=t.split("."),[a,s]=n.split(".");return s!=o&&(n=[a,o].join(".")),y.jsx(Te,{url:e,file:t,fileTo:n,setLoading:i})},e.Modal=Re,e.ModalBody=Me,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:i,alignTop:o,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?y.jsxs(Re,{alignTop:o,setVisible:t,visible:e,...u,children:[y.jsxs(Pe,{helpLink:s,setVisible:t,children:[r,null!=l&&y.jsxs(y.Fragment,{children:[" ",y.jsx(ve,{value:l,isCount:!0})]}),y.jsx(ve,{value:n})]}),y.jsx(Be,{children:y.jsx(Me,{style:{paddingBottom:a},children:i})})]}):null},e.ModalContent=Be,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:i,alignTop:a,helpLink:s}){return y.jsxs(Re,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[y.jsx(Pe,{helpLink:s,setVisible:t,children:e}),y.jsx(Be,{children:y.jsxs(Me,{className:"mod-filter--container",children:[i,y.jsxs("div",{className:"mod-filter--btn-area",children:[y.jsxs(o.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[y.jsx(W,{})," Aplicar filtros"]}),y.jsxs(o.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[y.jsx(te,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return y.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Pe,e.Navbar=function({menusConfig:{brand:e,company:r,menus:i,routes:o,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),h=t.useRef(),{theme:p,setTheme:f,canChangeTheme:m}=A(),[g,v]=t.useState(!1),[b,x]=t.useState(""),[k,j]=t.useState([]),[C,_]=t.useState([]);let w=[];const S=localStorage.getItem(Mi);S&&(w=JSON.parse(S));const[E]=Ae({url:o.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):_(e.data)}}),[N]=Ae({url:o.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function I(){v(!1)}function T(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Mi,JSON.stringify(n)),j(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),j(t),T(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,o.apiFavorites&&(N({data:r}),_(r))}function O(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{o.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{i.forEach((n,r)=>{var i;if(r>0&&0!==(null==(i=null==n?void 0:n.menus)?void 0:i.length)){let i=n.menus.findIndex(e=>e.route===t.route);if(i>=0){let o=n.menus[i];e.push({...o,caption:t.caption,index:String(r).padStart(2,"0")+String(i).padStart(2,0)})}}})}),"Favoritos"===i[0].caption&&(i[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),j(function(e){let t=[];const n=Di(b);return e.forEach(e=>{let r={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(Di(e.caption).includes(n)||Di(e.shortcut).includes(n))).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&r.menus.push({...e,prefix:null==r?void 0:r.prefix})}),b&&(r.open=!0),t.push(r)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(i))},[b,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"navbar--area",children:y.jsxs("div",{className:"navbar-content",children:[y.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?y.jsx(fe,{width:20,height:20}):y.jsx(me,{width:20,height:20})}),y.jsxs("div",{className:"content",children:[y.jsx(a.Link,{to:o.home,className:"brand",onClick:I,title:"Voltar para tela inicial",children:e}),y.jsxs("div",{className:"company",children:[y.jsx("div",{className:"name",children:r}),y.jsxs("div",{className:"doc",children:[y.jsxs("span",{children:[null==s?void 0:s.title," "]}),y.jsx("strong",{children:null==s?void 0:s.name})]})]}),y.jsxs("div",{className:"nav-btn-area",children:[y.jsx("div",{className:"btn-theme",children:m&&y.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:y.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&y.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:y.jsx(ne,{})}),y.jsxs("div",{className:"btn-atalho",children:[y.jsx(a.Link,{to:o.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:y.jsx("i",{className:"fa-solid fa-user-gear"})}),y.jsx(a.Link,{to:o.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:y.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&y.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&I()},children:y.jsxs("div",{className:"menu-content",children:[y.jsxs("div",{className:"search-area",children:[y.jsx("i",{className:"fas fa-search"}),y.jsx("input",{ref:d,placeholder:"Pesquisar...",value:b,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),b&&y.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>x(""),children:y.jsx("i",{className:"fas fa-times"})}),y.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:y.jsx("i",{className:"fas fa-minus"})}),y.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:y.jsx("i",{className:"fas fa-plus"})})]}),y.jsx("div",{className:"navbar--menu-area",ref:h,children:k.map((e,t)=>y.jsx(Ri,{opc:e,closeMenu:I,clickGroup:T,clickFavorite:D,isFavorite:O,enabledFavorite:o.apiFavorites,filter:b},t))}),y.jsx("div",{className:"menu-footer",children:y.jsx(a.Link,{to:o.exit,onClick:I,children:y.jsxs("div",{className:"user",children:[y.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),y.jsxs("span",{className:"sair",children:["Sair ",y.jsx(X,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:i,routes:o,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:h,setTheme:p,canChangeTheme:f}=A(),[m,g]=t.useState(!1),[v,b]=t.useState(""),[x,k]=t.useState([]),[j,C]=t.useState([]);let _=[];const w=localStorage.getItem(Li);w&&(_=JSON.parse(w));const[S]=Ae({url:o.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):C(e.data)}}),[E]=Ae({url:o.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function N(){g(!1)}function I(e){let t=[...x],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(Li,JSON.stringify(n)),k(t)}function T(e){let t=[...x];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),I(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=j.filter(e=>e.route!==t.route);var r;n.length===j.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,o.apiFavorites&&(E({data:r}),C(r))}function D(e){return j.some(t=>t.route===e)}return t.useEffect(()=>{o.apiFavorites&&S()},[]),t.useEffect(()=>{let e=[];null==j||j.forEach(t=>{i.forEach((n,r)=>{var i;if(r>0&&0!==(null==(i=null==n?void 0:n.menus)?void 0:i.length)){let i=n.menus.findIndex(e=>e.route===t.route);if(i>=0){let o=n.menus[i];e.push({...o,caption:t.caption,index:String(r).padStart(2,"0")+String(i).padStart(2,0)})}}})}),"Favoritos"===i[0].caption&&(i[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!_.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(i))},[v,j]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"navbar-mu-area",children:y.jsxs("div",{className:"mu--container",children:[y.jsx(Pi,{isOpen:m,setIsOpen:g}),y.jsxs("div",{className:"mu--content",children:[y.jsx(Bi,{isOpen:m,setIsOpen:g,brand:e,closeMenu:N,routes:o}),y.jsxs("div",{className:"mu--info",children:[y.jsx("div",{className:"info-line-1",children:r}),y.jsx("div",{className:"info-line-2",children:y.jsxs("span",{children:[null==s?void 0:s.title," ",y.jsx("strong",{children:null==s?void 0:s.name})]})})]}),y.jsxs("div",{className:"mu--buttons",children:[f&&y.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";p(e),document.body.dataset.bsTheme=e},children:y.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),y.jsx(a.Link,{to:o.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:y.jsx("i",{className:"fa-solid fa-user-gear"})}),y.jsx(a.Link,{to:o.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:y.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),y.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&N()},children:y.jsxs("div",{className:"nv-menu--content","data-open":m,children:[y.jsxs("div",{className:"nv-menu--brand",children:[y.jsx(Pi,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),y.jsx(Bi,{isOpen:m,setIsOpen:g,brand:e,closeMenu:N,routes:o,showButtonClose:!0})]}),y.jsxs("div",{className:"nv-menu--search",children:[y.jsx("i",{className:"fas fa-search"}),y.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>b(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of x)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&y.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;b(""),null==(e=null==u?void 0:u.current)||e.focus()},children:y.jsx("i",{className:"fas fa-times"})}),y.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>T(!1),children:y.jsx("i",{className:"fas fa-minus"})}),y.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>T(!0),children:y.jsx("i",{className:"fas fa-plus"})})]}),y.jsx("div",{className:"nv-menu--opcoes",ref:c,children:x.map((e,t)=>y.jsx(Ri,{opc:e,closeMenu:N,clickGroup:I,clickFavorite:F,isFavorite:D,enabledFavorite:o.apiFavorites},t))}),y.jsx("div",{className:"nv-menu--footer",children:y.jsx(a.Link,{to:o.exit,onClick:N,children:y.jsxs("div",{className:"foo-user",children:[y.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),y.jsxs("span",{className:"foo-sair",children:["Sair ",y.jsx(X,{})]})]})})}),y.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:i=16,limit:o=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(i)||e.push(i),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==o&&void 0!==i;function c(t){var i;t!==n&&t>=1&&t<=e&&(null==(i=document.querySelector("main"))||i.scrollTo(0,0),r(t))}return y.jsx("div",{className:"pgn-content","data-fixed":o>=30?"true":"false","data-align":s,children:y.jsxs("div",{className:"pgn-comps",children:[u&&y.jsxs("div",{className:"pgn-limit",children:[y.jsx("strong",{children:"Registros:"}),y.jsx("select",{className:"form-select form-select-sm",value:o,onChange:e=>a(Number(e.target.value)),children:l.map(e=>y.jsx("option",{value:e,children:e},e))})]}),y.jsxs("div",{className:"pgn-pages",children:[y.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"secundaria"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:y.jsx("i",{className:"fas fa-angle-double-left"})}),y.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"secundaria"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:y.jsx("i",{className:"fas fa-angle-left"})}),y.jsx("span",{className:"p-2 text-body",children:y.jsxs("div",{children:[y.jsx("span",{className:"fw-bold",children:n}),e?y.jsxs("span",{children:[" / ",e]}):null]})}),y.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"secundaria"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:y.jsx("i",{className:"fas fa-angle-right"})}),y.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"secundaria"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:y.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=xe,e.PanelDashboard=function({title:e,color:t="var(--dash-top)",backColor:n="var(--bs-body-bg)",className:r,minHeight:i,children:o,marginBottom:a=0,degrade:s=!1,...l}){return y.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:i,marginBottom:a,"--color":t,"--back-color":n,"--border-top-width":s?"1px":"3px"},...l,children:[s&&y.jsx("div",{className:"pd-top"}),y.jsxs("div",{className:"pd-body",children:[e&&y.jsx("h3",{className:"pd-title",children:e}),o]})]})},e.PanelHeader=ge,e.PrintButtonTypes=mi,e.PrintButtons=function({onClose:e,showTypes:n}){const{setReportType:r}=A();return t.useEffect(()=>{n||r(0)},[]),y.jsxs("div",{className:"print-btn--container",children:[n&&y.jsx(mi,{}),y.jsxs("div",{className:"print-btn--buttons",children:[y.jsxs("button",{className:"btn btn-primary",type:"submit",children:[y.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),y.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[y.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=ze,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:i,options:a=[],disabled:s,cols:l=1}){return y.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[y.jsx("div",{className:"group-radio--label",children:t}),y.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>y.jsxs("label",{children:[y.jsx(o.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>i(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return y.jsx(fi,{hasMaxWidth:t,children:y.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:i="",innerRef:o,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...vi,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?xi(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let i=n-1;i>=0;i-=1){const t=e[i];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||xi(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),h=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),p=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?xi(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(o,()=>({open(e){const t=p(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,p]),y.jsx(bi.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:p,selectTab:d,toggleTab:h},children:y.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[y.jsx(ki,{isMultine:n}),y.jsx("div",{className:`tab-control--content ${i}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:i,isVisible:o=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=yi(),h=t.useMemo(()=>e||n.random(999999),[]),p=l(h);return t.useEffect(()=>()=>c(h),[]),t.useEffect(()=>{d({id:h,caption:i,title:r,isVisible:o})},[d,r,i,o]),o?y.jsxs(ji,{open:(null==p?void 0:p.isOpen)&&(null==p?void 0:p.isVisible),"data-in-tab-sheet":null!=p?"true":"false",...s,children:[y.jsx("div",{className:"bi-btn-area",children:y.jsxs("button",{type:"button",onClick:()=>u(h),children:[r," ",y.jsx("i",{className:"fas fa-chevron-down"})]})}),y.jsx("div",{className:`bi-body ${(null==p?void 0:p.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:i,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:h,onClick:p,fixedHeader:f,clickCanEdit:m,loading:g}){var v,b;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let x=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(b=null==r?void 0:r.acoes)?void 0:b.filter(e=>e.ativa??!0);r.acoes=e,x=r.acoes.length>0}function j(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?y.jsxs("div",{className:"py-2 hstack gap-2",children:[y.jsx(o.Spinner,{size:"sm",color:"secundaria"})," ",y.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?y.jsx(B,{children:y.jsxs(P,{alignTop:s,sizeBreak:c,hasBorder:u,children:[y.jsx($,{fixedHeader:f,colunas:t,incColActions:x}),y.jsx(U,{colunas:t,acoes:r,dados:a,opcoes:i,colorir:l,getLineColor:h,onClick:p||m?function(e,t){if(p){if(j(null==t?void 0:t.currentTarget))return;p(e,t)}else if(m&&n.isDesktop()){if(j(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):y.jsxs("div",{className:"d-flex align-items-center gap-2 py-2 px-3 text-body-secondary bg-body-tertiary rounded-3",style:{border:"1px solid var(--bs-border-color)",borderLeft:"4px solid var(--bs-secondary-border-subtle)"},role:"status",children:[y.jsx("span",{className:"d-inline-flex align-items-center justify-content-center rounded-circle bg-secondary-subtle text-secondary-emphasis flex-shrink-0",style:{width:28,height:28},"aria-hidden":"true",children:y.jsx("i",{className:"fas fa-inbox small"})}),y.jsx("span",{className:"fw-medium",children:d})]})},e.TextHtml=hi,e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:i,toRight:o,className:a="",...s}){return y.jsx(pi,{checked:t,disabled:n,className:a,...s,children:y.jsxs("label",{style:{flexDirection:o?"row-reverse":"row",justifyContent:o?"space-between":"flex-start"},children:[y.jsx("div",{className:"form-switch",children:y.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),i&&y.jsx("span",{className:"title",children:i})]})})},e.cache=Ai,e.createApiConfig=function(e=M){const t={...M,...e};return t.auth={...M.auth,...e.auth},t},e.createDropdownItems=pe,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=z,e.getDataCol=V,e.setRouteMain=function(e){be=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Ae,e.useLibContext=A,e.useLocalForage=function(e,n,r=1){const[i,o]=t.useState(n);return t.useEffect(()=>{Si.getItem(e).then(t=>{t&&(t.versao==r?o(t.data):Si.removeItem(e))})},[]),t.useEffect(()=>{Si.setItem(e,{versao:r,data:i})},[i]),[i,o]},e.useLocalStorage=Ei,e.useLocalhostBadge=_,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,i]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,i]},e.useTestDomainBadge=w,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
976
996
|
//# sourceMappingURL=jclib-ui.umd.js.map
|