jclib-ui 1.0.287 → 1.0.290
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.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?Yt.exports=function(){if($t)return qt;$t=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(t,e,n){var s,u={},l=null,c=null;for(s in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)o.call(e,s)&&!a.hasOwnProperty(s)&&(u[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===u[s]&&(u[s]=e[s]);return{$$typeof:r,type:t,key:l,ref:c,props:u,_owner:i.current}}return qt.Fragment=n,qt.jsx=s,qt.jsxs=s,qt}():Yt.exports=(Kt||(Kt=1,"production"!==process.env.NODE_ENV&&function(){var t,r=e,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),m=Symbol.iterator,v=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];!function(t,e,r){var n=v.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(e+="%s",r=r.concat([n]));var o=r.map(function(t){return String(t)});o.unshift("Warning: "+e),Function.prototype.apply.call(console[t],console,o)}("error",t,r)}function _(t){return t.displayName||"Context"}function w(t){if(null==t)return null;if("number"==typeof t.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case i:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case l:return _(t)+".Consumer";case u:return _(t._context)+".Provider";case c:return function(t,e,r){var n=t.displayName;if(n)return n;var o=e.displayName||e.name||"";return""!==o?r+"("+o+")":r}(t,t.render,"ForwardRef");case d:var e=t.displayName||null;return null!==e?e:w(t.type)||"Memo";case p:var r=t,n=r._payload,g=r._init;try{return w(g(n))}catch(m){return null}}return null}t=Symbol.for("react.module.reference");var b,C,A,E,I,S,x,T=Object.assign,O=0;function N(){}N.__reactDisabledLog=!0;var k,R=v.ReactCurrentDispatcher;function D(t,e,r){if(void 0===k)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);k=n&&n[1]||""}return"\n"+k+t}var P,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function L(t,e){if(!t||M)return"";var r,n=P.get(t);if(void 0!==n)return n;M=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=R.current,R.current=null,function(){if(0===O){b=console.log,C=console.info,A=console.warn,E=console.error,I=console.group,S=console.groupCollapsed,x=console.groupEnd;var t={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}O++}();try{if(e){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(p){r=p}Reflect.construct(t,[],a)}else{try{a.call()}catch(p){r=p}t.call(a.prototype)}}else{try{throw Error()}catch(p){r=p}t()}}catch(g){if(g&&r&&"string"==typeof g.stack){for(var s=g.stack.split("\n"),u=r.stack.split("\n"),l=s.length-1,c=u.length-1;l>=1&&c>=0&&s[l]!==u[c];)c--;for(;l>=1&&c>=0;l--,c--)if(s[l]!==u[c]){if(1!==l||1!==c)do{if(l--,--c<0||s[l]!==u[c]){var h="\n"+s[l].replace(" at new "," at ");return t.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",t.displayName)),"function"==typeof t&&P.set(t,h),h}}while(l>=1&&c>=0);break}}}finally{M=!1,R.current=o,function(){if(0===--O){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},t,{value:b}),info:T({},t,{value:C}),warn:T({},t,{value:A}),error:T({},t,{value:E}),group:T({},t,{value:I}),groupCollapsed:T({},t,{value:S}),groupEnd:T({},t,{value:x})})}O<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var f=t?t.displayName||t.name:"",d=f?D(f):"";return"function"==typeof t&&P.set(t,d),d}function F(t,e,r){if(null==t)return"";if("function"==typeof t)return L(t,!(!(n=t.prototype)||!n.isReactComponent));var n;if("string"==typeof t)return D(t);switch(t){case h:return D("Suspense");case f:return D("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case c:return L(t.render,!1);case d:return F(t.type,e,r);case p:var o=t,i=o._payload,a=o._init;try{return F(a(i),e,r)}catch(s){}}return""}P=new B;var j=Object.prototype.hasOwnProperty,V={},U=v.ReactDebugCurrentFrame;function H(t){if(t){var e=t._owner,r=F(t.type,t._source,e?e.type:null);U.setExtraStackFrame(r)}else U.setExtraStackFrame(null)}var z=Array.isArray;function W(t){return z(t)}function G(t){return""+t}function X(t){if(function(t){try{return G(t),!1}catch(e){return!0}}(t))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(t){return"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}(t)),G(t)}var $,Y,q=v.ReactCurrentOwner,K={key:!0,ref:!0,__self:!0,__source:!0};function Z(t,e,r,o,i){var a,s={},u=null,l=null;for(a in void 0!==r&&(X(r),u=""+r),function(t){if(j.call(t,"key")){var e=Object.getOwnPropertyDescriptor(t,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==t.key}(e)&&(X(e.key),u=""+e.key),function(t){if(j.call(t,"ref")){var e=Object.getOwnPropertyDescriptor(t,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==t.ref}(e)&&(l=e.ref,function(t){"string"==typeof t.ref&&q.current}(e)),e)j.call(e,a)&&!K.hasOwnProperty(a)&&(s[a]=e[a]);if(t&&t.defaultProps){var c=t.defaultProps;for(a in c)void 0===s[a]&&(s[a]=c[a])}if(u||l){var h="function"==typeof t?t.displayName||t.name||"Unknown":t;u&&function(t,e){var r=function(){$||($=!0,y("%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)",e))};r.isReactWarning=!0,Object.defineProperty(t,"key",{get:r,configurable:!0})}(s,h),l&&function(t,e){var r=function(){Y||(Y=!0,y("%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)",e))};r.isReactWarning=!0,Object.defineProperty(t,"ref",{get:r,configurable:!0})}(s,h)}return function(t,e,r,o,i,a,s){var u={$$typeof:n,type:t,key:e,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}(t,u,l,i,o,q.current,s)}var Q,J=v.ReactCurrentOwner,tt=v.ReactDebugCurrentFrame;function et(t){if(t){var e=t._owner,r=F(t.type,t._source,e?e.type:null);tt.setExtraStackFrame(r)}else tt.setExtraStackFrame(null)}function rt(t){return"object"==typeof t&&null!==t&&t.$$typeof===n}function nt(){if(J.current){var t=w(J.current.type);if(t)return"\n\nCheck the render method of `"+t+"`."}return""}Q=!1;var ot={};function it(t,e){if(t._store&&!t._store.validated&&null==t.key){t._store.validated=!0;var r=function(t){var e=nt();if(!e){var r="string"==typeof t?t:t.displayName||t.name;r&&(e="\n\nCheck the top-level render call using <"+r+">.")}return e}(e);if(!ot[r]){ot[r]=!0;var n="";t&&t._owner&&t._owner!==J.current&&(n=" It was passed a child from "+w(t._owner.type)+"."),et(t),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),et(null)}}}function at(t,e){if("object"==typeof t)if(W(t))for(var r=0;r<t.length;r++){var n=t[r];rt(n)&&it(n,e)}else if(rt(t))t._store&&(t._store.validated=!0);else if(t){var o=function(t){if(null===t||"object"!=typeof t)return null;var e=m&&t[m]||t["@@iterator"];return"function"==typeof e?e:null}(t);if("function"==typeof o&&o!==t.entries)for(var i,a=o.call(t);!(i=a.next()).done;)rt(i.value)&&it(i.value,e)}}function st(t){var e,r=t.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)e=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==d)return;e=r.propTypes}if(e){var n=w(r);!function(t,e,r,n,o){var i=Function.call.bind(j);for(var a in t)if(i(t,a)){var s=void 0;try{if("function"!=typeof t[a]){var u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}s=t[a](e,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){s=l}!s||s instanceof Error||(H(o),y("%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).",n||"React class",r,a,typeof s),H(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,H(o),y("Failed %s type: %s",r,s.message),H(null))}}(e,t.props,"prop",n,t)}else void 0===r.PropTypes||Q||(Q=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown"));"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ut={};function lt(e,r,o,m,v,_){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===h||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===u||e.$$typeof===l||e.$$typeof===c||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!b){var C,A="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),A+=nt(),null===e?C="null":W(e)?C="array":void 0!==e&&e.$$typeof===n?(C="<"+(w(e.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):C=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,A)}var E=Z(e,r,o,v,_);if(null==E)return E;if(b){var I=r.children;if(void 0!==I)if(m)if(W(I)){for(var S=0;S<I.length;S++)at(I[S],e);Object.freeze&&Object.freeze(I)}else y("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 at(I,e)}if(j.call(r,"key")){var x=w(e),T=Object.keys(r).filter(function(t){return"key"!==t}),O=T.length>0?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}";ut[x+O]||(y('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} />',O,x,T.length>0?"{"+T.join(": ..., ")+": ...}":"{}",x),ut[x+O]=!0)}return e===i?function(t){for(var e=Object.keys(t.props),r=0;r<e.length;r++){var n=e[r];if("children"!==n&&"key"!==n){et(t),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),et(null);break}}null!==t.ref&&(et(t),y("Invalid attribute `ref` supplied to `React.Fragment`."),et(null))}(E):st(E),E}var ct=function(t,e,r){return lt(t,e,r,!1)},ht=function(t,e,r){return lt(t,e,r,!0)};Zt.Fragment=i,Zt.jsx=ct,Zt.jsxs=ht}()),Zt);var Qt=Yt.exports;const Jt=e.createContext({modalList:[],theme:"light",toggleTheme:()=>{},versionApp:"",addModal:(t,e)=>{},removeModal:t=>{},clearModals:()=>{},showBtnTop:!1,setShowBtnTop:()=>{},globalApiConfig:null,setTheme:()=>{},canChangeTheme:!1,reportType:0,setReportType:t=>{}}),te="sys/theme";function ee(){const t=e.useContext(Jt);if(!(null==t?void 0:t.addModal))throw new Error("'ModalProvider' não encontrado!");return t}const re=1,ne=2,oe=3,ie="jc-alert-hide-sb";function ae({type:t=ne,onConfirm:o,onCancel:i,title:a,text:s="",children:u,defaultBtn:l=2}){const c=e.useRef(),h=e.useRef(),{addModal:f,removeModal:d}=ee(),[p]=e.useState("alert-"+r.random()),g=n.useDragControls();let m="jc-erro";switch(t){case ne:m="jc-aviso";break;case oe:m="jc-conf"}const v=e.useCallback(e=>{t===oe&&("KeyS"===e.code&&o&&o(),"KeyN"===e.code&&i&&i())},[i,o,t]);return e.useEffect(()=>(f(p,t===oe?i:o),()=>d(p)),[]),e.useEffect(()=>{var t;null==(t=null==c?void 0:c.current)||t.focus()},[c]),e.useEffect(()=>(document.addEventListener("keydown",v,!1),document.body.classList.add(ie),()=>{document.removeEventListener("keydown",v,!1),document.body.classList.remove(ie)}),[v]),Qt.jsx(n.motion.div,{className:"jc-alert--container",ref:h,children:Qt.jsxs(n.motion.div,{className:"jc-alert "+m,drag:!0,dragConstraints:h,dragElastic:.1,dragMomentum:!1,dragControls:g,dragListener:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[Qt.jsx("div",{className:"jc-close-button",onClick:function(){t===oe?i():o()},children:Qt.jsx("i",{className:"fa-solid fa-xmark"})}),Qt.jsxs("div",{className:"jc-alert-header",onPointerDown:function(t){r.isMobile()||g.start(t)},children:[Qt.jsxs("div",{className:"icon",children:[t===ne&&Qt.jsx("i",{className:"fa-solid fa-check"}),t===re&&Qt.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),t===oe&&Qt.jsx("i",{className:"fas fa-question"})]}),Qt.jsx("div",{className:"jc-alert-title",children:a})]}),Qt.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?Qt.jsx("span",{dangerouslySetInnerHTML:{__html:s.replaceAll("\n","<br/>")}}):Qt.jsx(Qt.Fragment,{children:s||u})}),Qt.jsxs("div",{className:"jc-alert-buttons",children:[(t===re||t===ne)&&Qt.jsx("button",{ref:c,type:"button",className:"btn btn-confirm",onClick:o,children:"OK"}),t===oe&&Qt.jsxs(Qt.Fragment,{children:[Qt.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:o,tabIndex:99,ref:1===l?c:null,children:[Qt.jsx("u",{children:"S"}),"im"]}),Qt.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:i,tabIndex:98,ref:2===l?c:null,children:[Qt.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function se({onConfirm:t,text:e="",children:r}){return Qt.jsx(ae,{type:re,title:"Atenção!",text:e,onConfirm:t,children:r})}const ue={baseURL:"",timeout:3e4,auth:{username:"",password:"",header:"x-auth",prefix:"Bearer"},version:"",ident:"",loginRoute:"/",isProductionMode:!0,getToken:()=>"",setToken:t=>console.error("*** setToken() is not defined ***",t),afterRequest:t=>{}};const le=o.div`
|
|
10
|
+
*/"production"===process.env.NODE_ENV?Yt.exports=function(){if($t)return qt;$t=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(t,e,n){var s,u={},l=null,c=null;for(s in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)o.call(e,s)&&!a.hasOwnProperty(s)&&(u[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps)void 0===u[s]&&(u[s]=e[s]);return{$$typeof:r,type:t,key:l,ref:c,props:u,_owner:i.current}}return qt.Fragment=n,qt.jsx=s,qt.jsxs=s,qt}():Yt.exports=(Kt||(Kt=1,"production"!==process.env.NODE_ENV&&function(){var t,r=e,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),m=Symbol.iterator,v=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];!function(t,e,r){var n=v.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(e+="%s",r=r.concat([n]));var o=r.map(function(t){return String(t)});o.unshift("Warning: "+e),Function.prototype.apply.call(console[t],console,o)}("error",t,r)}function _(t){return t.displayName||"Context"}function w(t){if(null==t)return null;if("number"==typeof t.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case i:return"Fragment";case o:return"Portal";case s:return"Profiler";case a:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case l:return _(t)+".Consumer";case u:return _(t._context)+".Provider";case c:return function(t,e,r){var n=t.displayName;if(n)return n;var o=e.displayName||e.name||"";return""!==o?r+"("+o+")":r}(t,t.render,"ForwardRef");case d:var e=t.displayName||null;return null!==e?e:w(t.type)||"Memo";case p:var r=t,n=r._payload,g=r._init;try{return w(g(n))}catch(m){return null}}return null}t=Symbol.for("react.module.reference");var b,C,A,E,I,S,x,T=Object.assign,O=0;function N(){}N.__reactDisabledLog=!0;var k,R=v.ReactCurrentDispatcher;function D(t,e,r){if(void 0===k)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);k=n&&n[1]||""}return"\n"+k+t}var P,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function L(t,e){if(!t||M)return"";var r,n=P.get(t);if(void 0!==n)return n;M=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=R.current,R.current=null,function(){if(0===O){b=console.log,C=console.info,A=console.warn,E=console.error,I=console.group,S=console.groupCollapsed,x=console.groupEnd;var t={configurable:!0,enumerable:!0,value:N,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}O++}();try{if(e){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(p){r=p}Reflect.construct(t,[],a)}else{try{a.call()}catch(p){r=p}t.call(a.prototype)}}else{try{throw Error()}catch(p){r=p}t()}}catch(g){if(g&&r&&"string"==typeof g.stack){for(var s=g.stack.split("\n"),u=r.stack.split("\n"),l=s.length-1,c=u.length-1;l>=1&&c>=0&&s[l]!==u[c];)c--;for(;l>=1&&c>=0;l--,c--)if(s[l]!==u[c]){if(1!==l||1!==c)do{if(l--,--c<0||s[l]!==u[c]){var h="\n"+s[l].replace(" at new "," at ");return t.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",t.displayName)),"function"==typeof t&&P.set(t,h),h}}while(l>=1&&c>=0);break}}}finally{M=!1,R.current=o,function(){if(0===--O){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},t,{value:b}),info:T({},t,{value:C}),warn:T({},t,{value:A}),error:T({},t,{value:E}),group:T({},t,{value:I}),groupCollapsed:T({},t,{value:S}),groupEnd:T({},t,{value:x})})}O<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var f=t?t.displayName||t.name:"",d=f?D(f):"";return"function"==typeof t&&P.set(t,d),d}function F(t,e,r){if(null==t)return"";if("function"==typeof t)return L(t,!(!(n=t.prototype)||!n.isReactComponent));var n;if("string"==typeof t)return D(t);switch(t){case h:return D("Suspense");case f:return D("SuspenseList")}if("object"==typeof t)switch(t.$$typeof){case c:return L(t.render,!1);case d:return F(t.type,e,r);case p:var o=t,i=o._payload,a=o._init;try{return F(a(i),e,r)}catch(s){}}return""}P=new B;var j=Object.prototype.hasOwnProperty,V={},U=v.ReactDebugCurrentFrame;function H(t){if(t){var e=t._owner,r=F(t.type,t._source,e?e.type:null);U.setExtraStackFrame(r)}else U.setExtraStackFrame(null)}var z=Array.isArray;function W(t){return z(t)}function G(t){return""+t}function X(t){if(function(t){try{return G(t),!1}catch(e){return!0}}(t))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(t){return"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}(t)),G(t)}var $,Y,q=v.ReactCurrentOwner,K={key:!0,ref:!0,__self:!0,__source:!0};function Z(t,e,r,o,i){var a,s={},u=null,l=null;for(a in void 0!==r&&(X(r),u=""+r),function(t){if(j.call(t,"key")){var e=Object.getOwnPropertyDescriptor(t,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==t.key}(e)&&(X(e.key),u=""+e.key),function(t){if(j.call(t,"ref")){var e=Object.getOwnPropertyDescriptor(t,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==t.ref}(e)&&(l=e.ref,function(t){"string"==typeof t.ref&&q.current}(e)),e)j.call(e,a)&&!K.hasOwnProperty(a)&&(s[a]=e[a]);if(t&&t.defaultProps){var c=t.defaultProps;for(a in c)void 0===s[a]&&(s[a]=c[a])}if(u||l){var h="function"==typeof t?t.displayName||t.name||"Unknown":t;u&&function(t,e){var r=function(){$||($=!0,y("%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)",e))};r.isReactWarning=!0,Object.defineProperty(t,"key",{get:r,configurable:!0})}(s,h),l&&function(t,e){var r=function(){Y||(Y=!0,y("%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)",e))};r.isReactWarning=!0,Object.defineProperty(t,"ref",{get:r,configurable:!0})}(s,h)}return function(t,e,r,o,i,a,s){var u={$$typeof:n,type:t,key:e,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}(t,u,l,i,o,q.current,s)}var Q,J=v.ReactCurrentOwner,tt=v.ReactDebugCurrentFrame;function et(t){if(t){var e=t._owner,r=F(t.type,t._source,e?e.type:null);tt.setExtraStackFrame(r)}else tt.setExtraStackFrame(null)}function rt(t){return"object"==typeof t&&null!==t&&t.$$typeof===n}function nt(){if(J.current){var t=w(J.current.type);if(t)return"\n\nCheck the render method of `"+t+"`."}return""}Q=!1;var ot={};function it(t,e){if(t._store&&!t._store.validated&&null==t.key){t._store.validated=!0;var r=function(t){var e=nt();if(!e){var r="string"==typeof t?t:t.displayName||t.name;r&&(e="\n\nCheck the top-level render call using <"+r+">.")}return e}(e);if(!ot[r]){ot[r]=!0;var n="";t&&t._owner&&t._owner!==J.current&&(n=" It was passed a child from "+w(t._owner.type)+"."),et(t),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),et(null)}}}function at(t,e){if("object"==typeof t)if(W(t))for(var r=0;r<t.length;r++){var n=t[r];rt(n)&&it(n,e)}else if(rt(t))t._store&&(t._store.validated=!0);else if(t){var o=function(t){if(null===t||"object"!=typeof t)return null;var e=m&&t[m]||t["@@iterator"];return"function"==typeof e?e:null}(t);if("function"==typeof o&&o!==t.entries)for(var i,a=o.call(t);!(i=a.next()).done;)rt(i.value)&&it(i.value,e)}}function st(t){var e,r=t.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)e=r.propTypes;else{if("object"!=typeof r||r.$$typeof!==c&&r.$$typeof!==d)return;e=r.propTypes}if(e){var n=w(r);!function(t,e,r,n,o){var i=Function.call.bind(j);for(var a in t)if(i(t,a)){var s=void 0;try{if("function"!=typeof t[a]){var u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}s=t[a](e,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){s=l}!s||s instanceof Error||(H(o),y("%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).",n||"React class",r,a,typeof s),H(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,H(o),y("Failed %s type: %s",r,s.message),H(null))}}(e,t.props,"prop",n,t)}else void 0===r.PropTypes||Q||(Q=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown"));"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ut={};function lt(e,r,o,m,v,_){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===a||e===h||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===u||e.$$typeof===l||e.$$typeof===c||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!b){var C,A="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),A+=nt(),null===e?C="null":W(e)?C="array":void 0!==e&&e.$$typeof===n?(C="<"+(w(e.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):C=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,A)}var E=Z(e,r,o,v,_);if(null==E)return E;if(b){var I=r.children;if(void 0!==I)if(m)if(W(I)){for(var S=0;S<I.length;S++)at(I[S],e);Object.freeze&&Object.freeze(I)}else y("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 at(I,e)}if(j.call(r,"key")){var x=w(e),T=Object.keys(r).filter(function(t){return"key"!==t}),O=T.length>0?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}";ut[x+O]||(y('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} />',O,x,T.length>0?"{"+T.join(": ..., ")+": ...}":"{}",x),ut[x+O]=!0)}return e===i?function(t){for(var e=Object.keys(t.props),r=0;r<e.length;r++){var n=e[r];if("children"!==n&&"key"!==n){et(t),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),et(null);break}}null!==t.ref&&(et(t),y("Invalid attribute `ref` supplied to `React.Fragment`."),et(null))}(E):st(E),E}var ct=function(t,e,r){return lt(t,e,r,!1)},ht=function(t,e,r){return lt(t,e,r,!0)};Zt.Fragment=i,Zt.jsx=ct,Zt.jsxs=ht}()),Zt);var Qt=Yt.exports;const Jt=e.createContext({modalList:[],theme:"light",toggleTheme:()=>{},versionApp:"",addModal:(t,e)=>{},removeModal:t=>{},clearModals:()=>{},showBtnTop:!1,setShowBtnTop:()=>{},globalApiConfig:null,setTheme:()=>{},canChangeTheme:!1,reportType:0,setReportType:t=>{}}),te="sys/theme";function ee(){const t=e.useContext(Jt);if(!(null==t?void 0:t.addModal))throw new Error("'ModalProvider' não encontrado!");return t}const re=1,ne=2,oe=3,ie="jc-alert-hide-sb";function ae({type:t=ne,onConfirm:o,onCancel:i,title:a,text:s="",children:u,defaultBtn:l=2}){const c=e.useRef(),h=e.useRef(),{addModal:f,removeModal:d}=ee(),[p]=e.useState("alert-"+r.random()),g=n.useDragControls();let m="jc-erro";switch(t){case ne:m="jc-aviso";break;case oe:m="jc-conf"}const v=e.useCallback(e=>{t===oe&&("KeyS"===e.code&&o&&o(),"KeyN"===e.code&&i&&i())},[i,o,t]);return e.useEffect(()=>(f(p,t===oe?i:o),()=>d(p)),[]),e.useEffect(()=>{var t;null==(t=null==c?void 0:c.current)||t.focus()},[c]),e.useEffect(()=>(document.addEventListener("keydown",v,!1),document.body.classList.add(ie),()=>{document.removeEventListener("keydown",v,!1),document.body.classList.remove(ie)}),[v]),Qt.jsx(n.motion.div,{className:"jc-alert--container",ref:h,children:Qt.jsxs(n.motion.div,{className:"jc-alert "+m,drag:!0,dragConstraints:h,dragElastic:.1,dragMomentum:!1,dragControls:g,dragListener:!1,animate:{scale:1},transition:{ease:"easeOut",duration:.3},children:[Qt.jsx("div",{className:"jc-close-button",onClick:function(){t===oe?i():o()},children:Qt.jsx("i",{className:"fa-solid fa-xmark"})}),Qt.jsxs("div",{className:"jc-alert-header",onPointerDown:function(t){r.isMobile()||g.start(t)},children:[Qt.jsxs("div",{className:"icon",children:[t===ne&&Qt.jsx("i",{className:"fa-solid fa-check"}),t===re&&Qt.jsx("i",{className:"fa-solid fa-triangle-exclamation"}),t===oe&&Qt.jsx("i",{className:"fas fa-question"})]}),Qt.jsx("div",{className:"jc-alert-title",children:a})]}),Qt.jsx("div",{className:"jc-alert-body",children:s&&"string"==typeof s?Qt.jsx("span",{dangerouslySetInnerHTML:{__html:s.replaceAll("\n","<br/>")}}):Qt.jsx(Qt.Fragment,{children:s||u})}),Qt.jsxs("div",{className:"jc-alert-buttons",children:[(t===re||t===ne)&&Qt.jsx("button",{ref:c,type:"button",className:"btn btn-confirm",onClick:o,children:"OK"}),t===oe&&Qt.jsxs(Qt.Fragment,{children:[Qt.jsxs("button",{type:"button",className:"btn btn-confirm",onClick:o,tabIndex:99,ref:1===l?c:null,children:[Qt.jsx("u",{children:"S"}),"im"]}),Qt.jsxs("button",{type:"button",className:"btn btn-confirm btn-nao",onClick:i,tabIndex:98,ref:2===l?c:null,children:[Qt.jsx("u",{children:"N"}),"ão"]})]})]})]})})}function se({onConfirm:t,text:e="",children:r}){return Qt.jsx(ae,{type:re,title:"Atenção!",text:e,onConfirm:t,children:r})}const ue={baseURL:"",timeout:3e4,auth:{username:"",password:"",header:"x-auth",prefix:"Bearer"},version:"",ident:"",loginRoute:"/",isProductionMode:!0,withCredentials:!1,getToken:()=>"",setToken:t=>console.error("*** setToken() is not defined ***",t),afterRequest:t=>{}};const le=o.div`
|
|
11
11
|
@media (max-width: 767px) {
|
|
12
12
|
overflow-x: auto;
|
|
13
13
|
}
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
padding-top: 8px;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function Ze(){return Qt.jsxs(Ke,{children:[Qt.jsx("div",{className:"alert alert-danger",children:"Falha na conexão!"}),Qt.jsxs("div",{children:["Possíveis causas:",Qt.jsx("ul",{children:navigator.onLine?Qt.jsxs(Qt.Fragment,{children:[Qt.jsx("li",{children:"Você está sem conexão com a internet;"}),Qt.jsx("li",{children:"O servidor pode estar passando por uma atualização. Por favor, tente novamente em alguns instantes."}),Qt.jsx("li",{children:"O servidor pode estar temporariamente indisponível."})]}):Qt.jsx("li",{children:"Você está sem conexão com a internet;"})}),Qt.jsxs("div",{children:["Se o erro persistir, por favor, entre em contato com nosso suporte técnico:",Qt.jsxs("ul",{children:[Qt.jsxs("li",{children:["Fone e WhatsApp:"," ",Qt.jsx($e,{className:"numeros",children:"(27) 9 9774-2904"})]}),Qt.jsxs("li",{children:["E-mail:"," ",Qt.jsx(Ye,{href:"suporte@jcinfoes.com.br?subject="+encodeURI("SIPAR - Sem conexão com o servidor!"),children:"suporte@jcinfoes.com.br"})]})]})]})]})]})}const Qe={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Je(t={}){const r=a.useHistory(),n=new AbortController,{globalApiConfig:o}=ee(),[i,s]=e.useState(Qe);return"string"==typeof t&&(t={url:t}),[async function(e){var i,a,l,c
|
|
461
|
+
`;function Ze(){return Qt.jsxs(Ke,{children:[Qt.jsx("div",{className:"alert alert-danger",children:"Falha na conexão!"}),Qt.jsxs("div",{children:["Possíveis causas:",Qt.jsx("ul",{children:navigator.onLine?Qt.jsxs(Qt.Fragment,{children:[Qt.jsx("li",{children:"Você está sem conexão com a internet;"}),Qt.jsx("li",{children:"O servidor pode estar passando por uma atualização. Por favor, tente novamente em alguns instantes."}),Qt.jsx("li",{children:"O servidor pode estar temporariamente indisponível."})]}):Qt.jsx("li",{children:"Você está sem conexão com a internet;"})}),Qt.jsxs("div",{children:["Se o erro persistir, por favor, entre em contato com nosso suporte técnico:",Qt.jsxs("ul",{children:[Qt.jsxs("li",{children:["Fone e WhatsApp:"," ",Qt.jsx($e,{className:"numeros",children:"(27) 9 9774-2904"})]}),Qt.jsxs("li",{children:["E-mail:"," ",Qt.jsx(Ye,{href:"suporte@jcinfoes.com.br?subject="+encodeURI("SIPAR - Sem conexão com o servidor!"),children:"suporte@jcinfoes.com.br"})]})]})]})]})]})}const Qe={isError:!1,message:null,loading:!1,headers:null,data:null,error:null,code:0,status:503,report:!1,onBefore:null};function Je(t={}){const r=a.useHistory(),n=new AbortController,{globalApiConfig:o}=ee(),[i,s]=e.useState(Qe);return"string"==typeof t&&(t={url:t}),[async function(e){var i,a,l,c;let h,f=(null==(i=o.auth)?void 0:i.username)?{username:o.auth.username,password:o.auth.password}:void 0;if(t.headers={...t.headers,...null==e?void 0:e.headers},o.getToken){let e=o.getToken();e&&(o.auth.prefix&&(e=`${o.auth.prefix} ${e}`),t.headers[o.auth.header]=e)}o.version&&(t.headers["x-ver"]=encodeURIComponent(o.version)),o.ident&&(t.headers["x-identify"]=encodeURIComponent(o.ident));let d={baseURL:o.baseURL,timeout:o.timeout,auth:f,withCredentials:o.withCredentials,validateStatus:t=>t>=200&&t<400,...t,...e,headers:t.headers};d.report&&(d={...d,responseType:"blob",timeout:0}),s({...Qe,loading:!0}),d.onBefore&&d.onBefore(d);try{const t=await u({...d,signal:n.signal});o.afterRequest&&o.afterRequest(t),h={...Qe,data:t.data,message:t.statusText,status:t.status,headers:t.headers}}catch(g){const{ERR_NETWORK:t,ECONNABORTED:e,ETIMEDOUT:n}=u.AxiosError;if([t,e,n].includes(null==g?void 0:g.code))h={...Qe,isError:!0,status:400,message:Qt.jsx(Ze,{})};else if(g.response)switch(h={...Qe,isError:!0,status:g.response.status,message:(null==(a=g.response.data)?void 0:a.error)||g.response.data,code:null==(l=g.response.data)?void 0:l.code},g.response.status){case 400:case 500:if("blob"==(null==d?void 0:d.responseType)){let t=await g.response.data.text();t=JSON.parse(t),h.message=t.error||"Ocorreu um erro ao consultar o servidor!"}break;case 401:h.message="Servidor requer autenticação!",o.setToken&&o.setToken(""),r.push(o.loginRoute);break;case 404:h.message="Servidor não possui este recurso!";break;case 405:h.message=`Método [${(null==(c=d.method)?void 0:c.toUpperCase())||"GET"}] indisponível!`;break;case 429:h.message="Muitos acessos. Tente novamente mais tarde!"}else h={...Qe,isError:!0,message:g.message}}const p=`timeout of ${o.timeout}ms exceeded`;return h.message!=p&&"Network Error"!=h.message||(h.message="Sem conexão com o servidor!"),h.isError?h.error=h.message:h.error=null,h={...h,loading:!1},s(h),(null==t?void 0:t.onTerminated)&&t.onTerminated(h),h},i,function(){n&&n.abort("Cancelado pelo usuário!")}]}let tr=null;function er({url:t,file:n,fileTo:o,setLoading:i}){const[a,u]=e.useState(""),[l,c]=e.useState(!1),[h,f]=e.useState(0),[d,p]=e.useState(n),[g,m]=e.useState(""),[v,,y]=Je({url:t,method:"post",data:{file:d},report:!0,onDownloadProgress:t=>{c(t.loaded>0),f(t.loaded/t.total*100)},onTerminated:t=>{if(204===t.status)return w(3);if(t.error)u(t.error),_();else{const[,n]=o.split(".");r.isDesktop()&&"pdf"==n.toLowerCase()?(e=t.data,m(URL.createObjectURL(e))):(s(t.data,function(){let t=o.split("."),e=`-${r.getDateTimeStr().replace(/\D/g,"")}-${r.getHash(o)}`;return t[0]+=e,t=t.join("."),t}()),p(""))}var e}});function _(){tr&&clearTimeout(tr)}function w(t){_(),tr=setTimeout(()=>v(),1e3*t)}return e.useEffect(()=>()=>_(),[]),e.useEffect(()=>()=>g&&URL.revokeObjectURL(g),[g]),e.useEffect(()=>{d?(i(!0),w(2)):i(!1)},[d]),Qt.jsxs(Qt.Fragment,{children:[Qt.jsxs("div",{className:"loading-report--area",children:[Qt.jsxs("div",{className:"loading-box",style:{display:g?"none":"block"},children:[Qt.jsx("button",{className:"btn-loading-close",title:"Cancelar",onClick:function(){l?y():u(""),i(!1)},children:Qt.jsx("i",{className:"fas fa-times"})}),Qt.jsxs("div",{className:"line",children:[l?Qt.jsx("i",{className:"fa-solid fa-file-arrow-down pulse"}):Qt.jsx("div",{className:"spinner"}),Qt.jsx("span",{children:l?"Baixando relatório...":"Gerando relatório..."})]}),Qt.jsx("div",{className:"pbar",children:Qt.jsx("div",{style:{width:`${h}%`}})})]}),g&&Qt.jsx(Xe,{fileTo:o,previewUrl:g,setVisible:()=>p(""),visible:!0})]}),a&&Qt.jsx(se,{onConfirm:()=>i(!1),children:a})]})}function rr({search:t,setSearch:n,fnSearch:o,fnFilter:a,fnValidateFilter:s,placeHolder:u,...l}){const c=e.useRef();return Qt.jsxs("div",{className:"inp-pesq--input-area",children:[Qt.jsxs(i.InputGroup,{children:[Qt.jsx(i.Input,{innerRef:c,value:t,onChange:t=>n(t.target.value),placeholder:u,...l}),Qt.jsx(i.Button,{color:"outline-secondary",type:"button",onClick:()=>{n(""),r.isDesktop()&&(null==c?void 0:c.current)&&c.current.focus()},title:"Limpar campo de pesquisa",children:Qt.jsx(xe,{})}),Qt.jsx(i.Button,{color:"info",title:"Pesquisar",onClick:o,type:o?"button":"submit",children:Qt.jsx(Se,{})})]}),a&&Qt.jsxs(i.Button,{type:"button",color:"outline-filter",className:"position-relative ip--btn-filter",title:"Filtros avançados",onClick:a,children:[Qt.jsx("i",{className:"fas fa-filter"}),Qt.jsx("span",{className:"ip--btn-caption",children:" Filtros"}),s&&s()&&Qt.jsx("span",{className:"position-absolute top-0 start-100 translate-middle \r\n p-2 bg-danger border border-light rounded-circle",children:Qt.jsx("span",{className:"visually-hidden",children:"Filtro ativo"})})]})]})}const nr=o.div`
|
|
462
462
|
position: fixed;
|
|
463
463
|
inset: 0 0 0;
|
|
464
464
|
background-color: var(--jc-overlay-bg);
|