upconta.frontend-utils 1.0.12 → 1.0.14
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/cjs/index.d.ts +1 -0
- package/.dist/cjs/index.js +1 -1
- package/.dist/cjs/index.js.map +1 -1
- package/.dist/cjs/types.d.ts +29 -0
- package/.dist/esm/index.js +2 -2
- package/.dist/esm/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ApiResponse<T> {
|
|
2
|
+
data: T[];
|
|
3
|
+
total: number;
|
|
4
|
+
page: number;
|
|
5
|
+
}
|
|
6
|
+
export type Option = {
|
|
7
|
+
id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
value?: number;
|
|
10
|
+
stringValue?: string;
|
|
11
|
+
show?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type Options = Record<string, Option[]>;
|
|
14
|
+
export interface Params {
|
|
15
|
+
q?: string;
|
|
16
|
+
fields?: string;
|
|
17
|
+
sort?: string;
|
|
18
|
+
page?: string;
|
|
19
|
+
total?: string;
|
|
20
|
+
$getAllFields?: 'true';
|
|
21
|
+
[key: string]: string | number | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface Movement {
|
|
24
|
+
type: string;
|
|
25
|
+
date: string;
|
|
26
|
+
user?: string;
|
|
27
|
+
nota?: string;
|
|
28
|
+
mostrarBadge?: boolean;
|
|
29
|
+
}
|
package/.dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as r,useEffect as n,useRef as t,useMemo as o,createContext as a,useContext as i,forwardRef as s,useImperativeHandle as l}from"react";import c from"next/link";import{useRouter as u,Router as d}from"next/router";import{ReloadOutlined as f,QuestionCircleOutlined as p,CheckCircleTwoTone as m,LoadingOutlined as v,LoginOutlined as h,LogoutOutlined as y,HourglassOutlined as g,DeleteOutlined as b,MailOutlined as x,EditOutlined as j,StopOutlined as w,CloudUploadOutlined as S,CheckCircleOutlined as k,CloseCircleOutlined as I,SaveOutlined as C,HistoryOutlined as N,ExclamationCircleOutlined as
|
|
1
|
+
import e,{useState as r,useEffect as n,useRef as t,useMemo as o,createContext as a,useContext as i,forwardRef as s,useImperativeHandle as l}from"react";import c from"next/link";import{useRouter as u,Router as d}from"next/router";import{ReloadOutlined as f,QuestionCircleOutlined as p,CheckCircleTwoTone as m,LoadingOutlined as v,LoginOutlined as h,LogoutOutlined as y,HourglassOutlined as g,DeleteOutlined as b,MailOutlined as x,EditOutlined as j,StopOutlined as w,CloudUploadOutlined as S,CheckCircleOutlined as k,CloseCircleOutlined as I,SaveOutlined as C,HistoryOutlined as N,ExclamationCircleOutlined as P,MenuUnfoldOutlined as E,MenuFoldOutlined as O}from"@ant-design/icons";import{Input as T,Button as F,Typography as R,Breadcrumb as _,App as D,Form as L,Space as q,Skeleton as $,AutoComplete as A,Drawer as U,Timeline as M,ConfigProvider as B,Layout as z,Badge as W,Tooltip as Y,Table as V,Select as H,InputNumber as J,Empty as Q,Checkbox as K}from"antd";import X from"swr/immutable";import G from"axios";import{getCookie as Z,setCookie as ee,deleteCookie as re}from"cookies-next";import ne from"dayjs";import{debounce as te}from"ts-debounce";import oe,{useSWRConfig as ae}from"swr";import ie from"antd/locale/es_ES";var se=function(){return se=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},se.apply(this,arguments)};function le(e,r,n,t){return new(n||(n=Promise))((function(o,a){function i(e){try{l(t.next(e))}catch(e){a(e)}}function s(e){try{l(t.throw(e))}catch(e){a(e)}}function l(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,s)}l((t=t.apply(e,r||[])).next())}))}function ce(e,r){var n,t,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,t&&(o=2&s[0]?t.return:s[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,s[1])).done)return o;switch(t=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,t=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=r.call(e,a)}catch(e){s=[6,e],t=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function ue(e,r,n){if(n||2===arguments.length)for(var t,o=0,a=r.length;o<a;o++)!t&&o in r||(t||(t=Array.prototype.slice.call(r,0,o)),t[o]=r[o]);return e.concat(t||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var de,fe={exports:{}},pe={};var me,ve={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,5 +7,5 @@ import e,{useState as r,useEffect as n,useRef as t,useMemo as o,createContext as
|
|
|
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?fe.exports=function(){if(de)return pe;de=1;var r=e,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var s,l={},c=null,u=null;for(s in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)o.call(r,s)&&!i.hasOwnProperty(s)&&(l[s]=r[s]);if(e&&e.defaultProps)for(s in r=e.defaultProps)void 0===l[s]&&(l[s]=r[s]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:a.current}}return pe.Fragment=t,pe.jsx=s,pe.jsxs=s,pe}():fe.exports=(me||(me=1,"production"!==process.env.NODE_ENV&&function(){var r=e,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator",y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];!function(e,r,n){var t=y.ReactDebugCurrentFrame.getStackAddendum();""!==t&&(r+="%s",n=n.concat([t]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}var b,x=!1,j=!1,w=!1,S=!1,k=!1;function I(e){return e.displayName||"Context"}function C(e){if(null==e)return null;if("number"==typeof e.tag&&g("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 t:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return I(e)+".Consumer";case s:return I(e._context)+".Provider";case c:return function(e,r,n){var t=e.displayName;if(t)return t;var o=r.displayName||r.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case f:var r=e.displayName||null;return null!==r?r:C(e.type)||"Memo";case p:var n=e,m=n._payload,v=n._init;try{return C(v(m))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var N,E,O,P,T,F,R,_=Object.assign,D=0;function L(){}L.__reactDisabledLog=!0;var q,$=y.ReactCurrentDispatcher;function A(e,r,n){if(void 0===q)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);q=t&&t[1]||""}return"\n"+q+e}var U,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function z(e,r){if(!e||M)return"";var n,t=U.get(e);if(void 0!==t)return t;M=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===D){N=console.log,E=console.info,O=console.warn,P=console.error,T=console.group,F=console.groupCollapsed,R=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){n=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){n=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(r){if(r&&n&&"string"==typeof r.stack){for(var s=r.stack.split("\n"),l=n.stack.split("\n"),c=s.length-1,u=l.length-1;c>=1&&u>=0&&s[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(s[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||s[c]!==l[u]){var d="\n"+s[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&U.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{M=!1,$.current=o,function(){if(0==--D){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:N}),info:_({},e,{value:E}),warn:_({},e,{value:O}),error:_({},e,{value:P}),group:_({},e,{value:T}),groupCollapsed:_({},e,{value:F}),groupEnd:_({},e,{value:R})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var f=e?e.displayName||e.name:"",p=f?A(f):"";return"function"==typeof e&&U.set(e,p),p}function W(e,r,n){if(null==e)return"";if("function"==typeof e)return z(e,!(!(t=e.prototype)||!t.isReactComponent));var t;if("string"==typeof e)return A(e);switch(e){case u:return A("Suspense");case d:return A("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return z(e.render,!1);case f:return W(e.type,r,n);case p:var o=e,a=o._payload,i=o._init;try{return W(i(a),r,n)}catch(e){}}return""}U=new B;var Y=Object.prototype.hasOwnProperty,V={},H=y.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,n=W(e.type,e._source,r?r.type:null);H.setExtraStackFrame(n)}else H.setExtraStackFrame(null)}var Q=Array.isArray;function K(e){return Q(e)}function X(e){return""+e}function G(e){if(function(e){try{return X(e),!1}catch(e){return!0}}(e))return g("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)),X(e)}var Z,ee,re,ne=y.ReactCurrentOwner,te={key:!0,ref:!0,__self:!0,__source:!0};re={};var oe=function(e,r,t,o,a,i,s){var l={$$typeof:n,type:e,key:r,ref:t,props:s,_owner:i,_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:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ae(e,r,n,t,o){var a,i={},s=null,l=null;for(a in void 0!==n&&(G(n),s=""+n),function(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(G(r.key),s=""+r.key),function(e){if(Y.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(l=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var n=C(ne.current.type);re[n]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(ne.current.type),e.ref),re[n]=!0)}}(r,o)),r)Y.call(r,a)&&!te.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===i[a]&&(i[a]=c[a])}if(s||l){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,r){var n=function(){Z||(Z=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,u),l&&function(e,r){var n=function(){ee||(ee=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,u)}return oe(e,s,l,o,t,ne.current,i)}var ie,se=y.ReactCurrentOwner,le=y.ReactDebugCurrentFrame;function ce(e){if(e){var r=e._owner,n=W(e.type,e._source,r?r.type:null);le.setExtraStackFrame(n)}else le.setExtraStackFrame(null)}function ue(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function de(){if(se.current){var e=C(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ie=!1;var fe={};function pe(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var r=de();if(!r){var n="string"==typeof e?e:e.displayName||e.name;n&&(r="\n\nCheck the top-level render call using <"+n+">.")}return r}(r);if(!fe[n]){fe[n]=!0;var t="";e&&e._owner&&e._owner!==se.current&&(t=" It was passed a child from "+C(e._owner.type)+"."),ce(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,t),ce(null)}}}function me(e,r){if("object"==typeof e)if(K(e))for(var n=0;n<e.length;n++){var t=e[n];ue(t)&&pe(t,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=v&&e[v]||e[h];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)ue(a.value)&&pe(a.value,r)}}function he(e){var r,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)r=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==f)return;r=n.propTypes}if(r){var t=C(n);!function(e,r,n,t,o){var a=Function.call.bind(Y);for(var i in e)if(a(e,i)){var s=void 0;try{if("function"!=typeof e[i]){var l=Error((t||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[i](r,i,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(J(o),g("%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).",t||"React class",n,i,typeof s),J(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,J(o),g("Failed %s type: %s",n,s.message),J(null))}}(r,e.props,"prop",t,e)}else void 0===n.PropTypes||ie||(ie=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ye={};function ge(e,r,t,v,h,y){var I=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||k||e===a||e===u||e===d||S||e===m||x||j||w)||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===l||e.$$typeof===c||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!I){var N,E="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),E+=de(),null===e?N="null":K(e)?N="array":void 0!==e&&e.$$typeof===n?(N="<"+(C(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):N=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,E)}var O=ae(e,r,t,h,y);if(null==O)return O;if(I){var P=r.children;if(void 0!==P)if(v)if(K(P)){for(var T=0;T<P.length;T++)me(P[T],e);Object.freeze&&Object.freeze(P)}else g("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 me(P,e)}if(Y.call(r,"key")){var F=C(e),R=Object.keys(r).filter((function(e){return"key"!==e})),_=R.length>0?"{key: someKey, "+R.join(": ..., ")+": ...}":"{key: someKey}";ye[F+_]||(g('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} />',_,F,R.length>0?"{"+R.join(": ..., ")+": ...}":"{}",F),ye[F+_]=!0)}return e===o?function(e){for(var r=Object.keys(e.props),n=0;n<r.length;n++){var t=r[n];if("children"!==t&&"key"!==t){ce(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),ce(null);break}}null!==e.ref&&(ce(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),ce(null))}(O):he(O),O}var be=function(e,r,n){return ge(e,r,n,!1)},xe=function(e,r,n){return ge(e,r,n,!0)};ve.Fragment=o,ve.jsx=be,ve.jsxs=xe}()),ve);var he=fe.exports,ye=function(e){return e.paths?he.jsx(_,{items:e.paths.map((function(e){var r=e.to,n=e.label;return{title:r?he.jsx(c,{href:r,children:n}):n}}))}):null},ge=function(e){var t,o=e.defaultInsert,a=void 0!==o&&o,i=e.loading,s=void 0!==i&&i,l=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}(e,["defaultInsert","loading"]),d=u(),p=d.pathname,m=r(""),v=m[0],h=m[1],y=new URLSearchParams(d.query),g=function(){var e=new URLSearchParams(y.toString());(e.get("q")||"")!==v&&(v?e.set("q",v):e.delete("q"),e.delete("page"),d.push({query:Object.fromEntries(e)}))},b=he.jsxs("div",{className:"flex w-full md:w-auto flex-wrap md:flex-nowrap gap-2 justify-end",children:[!0!==l.ocultarBuscador?he.jsx(T.Search,{value:v,placeholder:"Ingresar búsqueda",onChange:function(e){return h(e.target.value||"")},onSearch:g,onPressEnter:g}):null,null!==a?a||he.jsx(c,{href:(t=p,t.endsWith("/")&&(t=t.slice(0,-1)),t+"/insert"),children:he.jsx(F,{type:"primary",children:"Insertar"})}):null,l.onRefrescar?he.jsx("div",{children:he.jsx(F,{loading:s,title:"Refrescar datos",icon:he.jsx(f,{}),onClick:l.onRefrescar})}):null,l.children]});return n((function(){d.isReady&&h(y.get("q")||"")}),[d.isReady]),he.jsxs("div",{className:"flex md:flex-row flex-col md:items-end items-start justify-between gap-6 mb-6",children:[he.jsxs("div",{children:[he.jsx(ye,{paths:l.paths}),he.jsx(R.Title,{className:"!mb-0 mt-4",children:l.title}),l.subtitle&&he.jsx(R.Title,{level:3,type:"secondary",className:"!font-normal !m-0",children:l.subtitle})]}),null!==l.column?l.column||b:null]})},be={hostUtils:"https://utils.upconta.com",hostFastify:"",hostRestify:"",userTokenName:"",adminTokenName:"",cookieDominio:"",cookiePath:void 0},xe=function(e){be=se(se({},be),e)},je=function(e){return le(void 0,void 0,void 0,(function(){var r,n,t,o,a,i;return ce(this,(function(s){switch(s.label){case 0:if(!((r=(null===(a=e.response)||void 0===a?void 0:a.data)?(null===(i=e.response.data)||void 0===i?void 0:i.message)||e.response.data:e.message)instanceof Blob))return[3,5];s.label=1;case 1:return s.trys.push([1,3,,5]),t=(n=JSON).parse,[4,r.text()];case 2:return[2,t.apply(n,[s.sent()]).message];case 3:return s.sent(),o={},[4,r.text()];case 4:return[2,(o.message=s.sent(),o.tipo="error",o)];case 5:return[2,{message:r,tipo:"error"}]}}))}))},we=function(){var e=D.useApp(),r=e.modal,n=e.message,t=e.notification;return{showError:function(e,n){return le(void 0,void 0,void 0,(function(){var t;return ce(this,(function(o){switch(o.label){case 0:return[4,je(e)];case 1:return t=o.sent(),r[t.tipo]({title:(null==n?void 0:n.title)||"Proceso fallido",width:450,content:he.jsxs(he.Fragment,{children:[t.message,null==n?void 0:n.cuerpoAdicional]}),okType:"danger"}),[2]}}))}))},modal:r,message:n,notification:t}},Se=function(e){return"administrador"===e?be.adminTokenName:be.userTokenName},ke=function(e,r){var n="";n=!e||"fastify"===e||e.includes("/v4")?be.hostFastify:"utils"===e?be.hostUtils:be.hostRestify;var t=G.create({baseURL:n});return"utils"!==e&&(t.defaults.headers.common.Authorization=Z(Se(null==r?void 0:r.tipo),{domain:be.cookieDominio,path:be.cookiePath})),t},Ie=function(e,r){ee(Se(r.usuario),e,{domain:be.cookieDominio,maxAge:604800,path:be.cookiePath})},Ce=function(e){re(Se(e),{domain:be.cookieDominio,path:be.cookiePath})},Ne=function(e,r){var n=new URL(e,e.includes("/v4")?be.hostFastify:be.hostRestify),t="";return r&&(t=new URLSearchParams(r).toString()),n.href+(t?"?"+t:"")},Ee=function(e,r){for(var n=(r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),t=0,o=n.length;t<o;++t){var a=n[t];if(!e||!(a in e))return;e=e[a]}return e},Oe=function(e){var r,n=0;if(0===e.length)return n;for(r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return n},Pe=function(e,r){void 0===r&&(r="/login");var n=r.includes("://"),t=new URL(n?r:window.location.origin+r);("/"!==e.asPath||n)&&t.searchParams.append("redirect",n?window.location.href:e.asPath),n?window.location.href=t.href:e.push(t.pathname+t.search)};function Te(e,r){void 0===r&&(r=2);var n=Math.pow(10,r);return Math.round(+(e*n).toFixed(2))/n}var Fe={empresa:function(e,r){return le(void 0,void 0,void 0,(function(){return ce(this,(function(e){switch(e.label){case 0:return r?[4,ke("restify").get("/v3/auth/business/"+r)]:[2];case 1:if(e.sent().data)throw new Error("La empresa ya se encuentra registrada");return[2]}}))}))}},Re={required:function(e){return void 0===e&&(e="El campo es requerido"),{required:!0,message:e}},min:function(e,r){return void 0===r&&(r="Debe tener mínimo ".concat(e.toString()," caracteres")),{min:e,message:r}},max:function(e,r){return void 0===r&&(r="Debe tener máximo ".concat(e.toString()," caracteres")),{max:e,message:r}},email:function(e){return void 0===e&&(e="El correo electrónico no es válido"),{type:"email",message:e}},pattern:function(e,r){return void 0===r&&(r="No cumple el formato requerido"),{pattern:e,message:r}},unico:function(e){return{validator:te(Fe[e],300)}},correos:function(){return{validator:function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return le(void 0,ue([e],r,!0),void 0,(function(e,r){return void 0===r&&(r=[]),ce(this,(function(e){if(r.some((function(e){return!e.includes("@")})))throw new Error("Alguno de los correos no es válido");return[2]}))}))}}},diasDiferencia:function(e,r){return void 0===r&&(r="La fecha ingresada no es válido"),{validator:function(n,t){return le(void 0,void 0,void 0,(function(){var n;return ce(this,(function(o){if(n=ne(t).startOf("day").diff(ne().startOf("day"),"day"),e<0?n<e:n>e)throw new Error(r);return[2]}))}))}}}},_e="es-EC",De={currency:function(e,r){return void 0===r&&(r=2),e||(e=0),new Intl.NumberFormat(_e,{style:"currency",currency:"USD",minimumFractionDigits:r}).format("number"==typeof e?e:parseFloat(e))},date:function(e,r){return void 0===r&&(r="DD/MM/YYYY"),ne(e).format(r)},completeDate:function(e){return ne(e).format("DD/MM/YYYY HH:mm:ss")},month:function(e){return ne(e).format("MM/YYYY")},percent:function(e,r){return void 0===r&&(r=2),e||(e=0),new Intl.NumberFormat(_e,{style:"percent",minimumFractionDigits:r}).format("number"==typeof e?e:parseFloat(e))}},Le=function(e){var r=ke(e.endpoint,{tipo:e.tipoUsuario||"usuario"}),n=u(),t=we().showError,o=ae().mutate,a=X(e.sinOptions?null:(e.optionsPath||e.endpoint)+"/get-options",(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(n){switch(n.label){case 0:return[4,r.get(e)];case 1:return[2,n.sent().data]}}))}))})).data,i=void 0===a?{}:a,s=new URLSearchParams(se(se({},e.params),n.query)).toString(),l=e.endpoint+(s?"?"+s:""),c=oe(n.isReady?l:null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(n){switch(n.label){case 0:return[4,r.get(e)];case 1:return[2,n.sent().data]}}))}))})),d=c.data,f=c.error,p=c.isLoading,m=(null==d?void 0:d.data)||[],v=(null==d?void 0:d.total)||0,h=new URLSearchParams(n.query),y=h.get("page"),g=y?parseInt(y):1,b=h.get("limit"),x=b?parseInt(b):20,j={loading:p,dataSource:m,rowKey:"_id",bordered:!0,pagination:{current:g,defaultPageSize:x,total:v},onChange:function(e,r,t){return le(void 0,void 0,void 0,(function(){var r,o,a,i;return ce(this,(function(s){return r=h.toString(),o=new URLSearchParams(r),e.current!==g&&("1"===(a=e.current.toString())?o.delete("page"):o.set("page",a)),e.pageSize!==x&&("20"===(i=e.pageSize.toString())?o.delete("limit"):o.set("limit",i)),Array.isArray(t)||("ascend"===t.order?o.set("sort",t.field):"descend"===t.order?o.set("sort","-"+t.field):o.delete("sort")),r!==o.toString()&&n.push({query:Object.fromEntries(o)}),[2]}))}))}},w=function(){o(l)};return{data:m,isLoading:p,error:f,options:i,endpoint:e.endpoint,endpointWithHost:Ne(e.endpoint),mainroute:n.route,tableProps:j,axios:r,init:w,getOpt:function(e,r){var n,t=null===(n=i[e])||void 0===n?void 0:n.find((function(e){return e.id===r}));return t?t.description:""},remove:function(n){return le(void 0,void 0,void 0,(function(){var o;return ce(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.delete("string"==typeof n?e.endpoint+"/"+n:n.endpoint)];case 1:return a.sent(),w(),[3,3];case 2:return o=a.sent(),t(o),[3,3];case 3:return[2]}}))}))},cancel:function(n){return le(void 0,void 0,void 0,(function(){var o;return ce(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.delete("string"==typeof n?e.endpoint+"/"+n+"/cancel":n.endpoint)];case 1:return a.sent(),w(),[3,3];case 2:return o=a.sent(),t(o),[3,3];case 3:return[2]}}))}))}}},qe=function(e){var o=ke(e.endpoint,{tipo:e.tipoUsuario||"usuario"}),a=L.useForm()[0],i=r(!1),s=i[0],l=i[1],f=r(!1),m=f[0],v=f[1],h=u(),y=we(),g=y.showError,b=y.message,x=function(e){var o=t(!1),a=we().modal,i=t(0),s=r(0),l=s[0],c=s[1],u=function(){if(!window.confirm("¿Estás seguro que quieres salir?"))throw"Route Canceled";m(),localStorage.removeItem(e)},f=function(e){e.preventDefault()},m=function(){o.current=!1,window.removeEventListener("beforeunload",f),d.events.off("routeChangeStart",u),localStorage.removeItem(e),c(0)};return n((function(){if(o.current)return i.current!==l&&(window.addEventListener("beforeunload",f),d.events.on("routeChangeStart",u)),function(){window.removeEventListener("beforeunload",f),d.events.off("routeChangeStart",u)}}),[i.current,l]),{cambiarHashInicial:function(e){var r=Oe(JSON.stringify(e));c(r),i.current=r},cambiarDatosFormulario:function(r){if(o.current&&0!==i.current){var n=JSON.stringify(r),t=Oe(n);c(t),t===i.current?localStorage.removeItem(e):localStorage.setItem(e,n)}},limpiar:m,reanudar:function(){o.current=!0},obtenerDataEmergencia:function(){return le(void 0,void 0,void 0,(function(){var r,n;return ce(this,(function(t){switch(t.label){case 0:return r=localStorage.getItem(e),[4,new Promise((function(e){if(!r)return e(void 0);a.confirm({title:"Existen datos guardados",icon:he.jsx(p,{}),content:"Hubo un cierre inesperado pero los datos fueron guardados temporalmente ¿Deseas recuperarlos?",onOk:function(){return e(JSON.parse(r))},onCancel:function(){return e(void 0)}})}))];case 1:return n=t.sent(),o.current=!0,[2,n]}}))}))}}}(h.asPath),j=t("emitir"),w=t(h.query.id),S=X(e.sinOptions?null:e.endpoint+"/get-options",(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,o.get(e)];case 1:return[2,r.sent().data]}}))}))}),{revalidateOnFocus:!1}).data,k=void 0===S?{}:S;n((function(){w.current=e.registroId,w.current||(w.current=e.soloParaInsertar?void 0:h.query.id)}),[null==e?void 0:e.registroId,e.soloParaInsertar]);var I=h.asPath.replace(/\/(insert|[\w]*\/edit$)/g,"")||"/",C=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return le(void 0,ue([r],n,!0),void 0,(function(r,n){var t,a,i,c,u,d,f,p;return void 0===n&&(n={}),ce(this,(function(m){switch(m.label){case 0:if(!0===s)return[2];l(!0),x.limpiar(),t=n.endpoint||e.endpoint,a=n.params||void 0,m.label=1;case 1:return m.trys.push([1,6,,7]),i=void 0,w.current?[4,o.put(t+"/"+w.current,r,{params:a})]:[3,3];case 2:return i=m.sent().data,[3,5];case 3:return[4,o.post(t,r,{params:a})];case 4:i=m.sent().data,m.label=5;case 5:return!0!==n.noRedirect?(b.success("Guardado correctamente"),h.push(I)):l(!1),[2,i];case 6:if(c=m.sent(),l(!1),n.noShowError)throw c;return g(c),u=null===(p=null===(f=null==c?void 0:c.response)||void 0===f?void 0:f.data)||void 0===p?void 0:p.comprobante,d="pruebas",["Hostname/IP does not match certificate's altnames:","El servidor del SRI no ha respondido en un largo tiempo por lo que se ha cerrado la conexión."].some((function(e){return d.includes(e)}))?h.push(I):!n.noRedirect&&u&&u!==w.current?(w.current=u,h.push(I+"/"+u+"/edit")):x.reanudar(),[3,7];case 7:return[2]}}))}))},N=he.jsxs(q,{children:[he.jsx(F,{type:"primary",loading:s,onClick:function(){return a.submit()},children:"Guardar"}),he.jsx(c,{href:I,children:he.jsx(F,{children:"Cancelar"})})]}),E=he.jsxs(he.Fragment,{children:[he.jsx($,{paragraph:{rows:3,width:"100%"},className:"mb-4"}),he.jsx($,{paragraph:{rows:4,width:"100%"},className:"mb-4"}),he.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[he.jsx($,{paragraph:{rows:4,width:"100%"}}),he.jsx($,{paragraph:{rows:4,width:"100%"}})]}),he.jsxs(q,{children:[he.jsx($.Button,{}),he.jsx($.Button,{})]})]}),O=function(){return b.warning("Revisa los errores del formulario")},P={form:a,autoComplete:"off",initialValues:e.data,onFinish:C,layout:"vertical",onFinishFailed:O};return n((function(){if(e.recuperacionEmergencia){var r=setInterval((function(){if(m){var e=a.getFieldsValue();x.cambiarDatosFormulario(e)}}),1e3);return function(){return clearInterval(r)}}}),[m]),n((function(){var r=setTimeout((function(){e.soloParaInsertar||le(void 0,void 0,void 0,(function(){var r,n,t;return ce(this,(function(i){switch(i.label){case 0:return r=!1,[4,x.obtenerDataEmergencia()];case 1:return(n=i.sent())?(w.current=n._id,r=!0,[3,4]):[3,2];case 2:return w.current?[4,o.get("".concat(e.endpoint,"/").concat(w.current),{params:e.params})]:[3,4];case 3:n=i.sent().data,i.label=4;case 4:return n?[4,null===(t=e.formatearDataInicial)||void 0===t?void 0:t.call(e,n)]:[3,6];case 5:i.sent(),a.setFieldsValue(n),i.label=6;case 6:return[2,r?e.data:n||e.data]}}))})).then((function(r){var n;return Promise.all([x.cambiarHashInicial(r),null===(n=e.onMounted)||void 0===n?void 0:n.call(e)])})).then((function(){return v(!0)}))}),200);return function(){return clearTimeout(r)}}),[h.query.id]),{form:a,router:h,options:k,tipoEmision:j,objectId:w.current,mainroute:I,isLoading:s,isReady:m,data:e.data,endpoint:e.endpoint,axios:o,onSubmit:C,onMainRouter:function(){return h.push(I)},setIsLoading:l,preventor:x,ModoCarga:E,BotonesPorDefecto:N,onMensajeValidacion:O,getOption:function(e,r){var n,t;return(null===(t=null===(n=k[e])||void 0===n?void 0:n.find((function(e){return e.id===r})))||void 0===t?void 0:t.description)||""},formProps:P}},$e=function(e){var a=e.values.customDocumentId||"_id",i=ke(e.values.endpoint),s=r(!1),l=s[0],c=s[1],u=r(),d=u[0],f=u[1],p=t(!1),h=r(""),y=h[0],g=h[1],b=o((function(){console.log("useMemo searchParams","valorInput:",y,"props.value:",e.value);var r=new URLSearchParams(se(se(se({limit:"50"},e.values.params),e.params),e.value?{_id:e.value}:y?{q:y}:{})).toString();return r?"?"+r:""}),[e.value,y]),x=r(),j=x[0],w=x[1],S=X(l?e.values.endpoint+b:null,(function(r){return le(void 0,void 0,void 0,(function(){var n;return ce(this,(function(t){switch(t.label){case 0:return[4,i.get(r)];case 1:return n=t.sent().data,console.log("useSWRImmutable",e.values.endpoint+b,n.total),[2,n]}}))}))})),k=S.data,I=S.isLoading;n((function(){console.log("useEffect [dataSwr]"),k&&w(k)}),[k]),n((function(){if(console.log("useEffect [valorQ]",!!p.current),!p.current&&void 0!==d){var e=setTimeout((function(){g(d),c(!0)}),500);return function(){return clearTimeout(e)}}}),[d]);var C=t(!1),N=o((function(){return console.log("useMemo: items [data, idSeleccionado]",j,""),(null==j?void 0:j.data.map((function(r){var n,t,o=Ee(r,a),i=e.values.title(r),s=null===(t=(n=e.values).subtitle)||void 0===t?void 0:t.call(n,r);return{key:o,disabled:""===o,value:o,texto:s,item:r,label:he.jsxs("div",{children:[he.jsxs("div",{children:[he.jsx("b",{className:"mr-1",children:i}),e.value===o?he.jsx(m,{twoToneColor:"#52c41a"}):void 0]}),s?he.jsx("div",{className:"text-wrap",children:s}):null]})}})))||[]}),[e.value,j,""]),E=o((function(){if(console.log("useMemo seleccionado [props.value, data]",e.value,j),e.value)return null==j?void 0:j.data.find((function(r){return Ee(r,a)===e.value}))}),[e.value,j]);n((function(){console.log("useEffect [props.value]",e.value),e.value&&c(!0)}),[e.value]);var O=o((function(){return!0===I?he.jsx(v,{}):E&&!e.llenarCuandoTipea?he.jsx(m,{twoToneColor:"#52c41a"}):he.jsx("span",{})}),[I,E]);return n((function(){var r,n,t;if(console.log("useEffect [seleccionado]",E),E){var o=Ee(E,e.values.field),a=null===(r=e.values.formItemTexto||e.values.subtitle)||void 0===r?void 0:r(E);e.onSetTextoExtra(a||""),p.current=!0,!0===C.current&&(null===(n=e.onSelect)||void 0===n||n.call(e,E)),f(o),c(!1)}else e.onSetTextoExtra(""),null===(t=e.onSelect)||void 0===t||t.call(e,null)}),[E]),he.jsx(A,{options:N,value:d,onFocus:function(){e.value||c(!0)},onSelect:function(r){var n;console.log("onSelect",r),c(!1),null===(n=e.onChange)||void 0===n||n.call(e,r)},onSearch:function(r){var n,t;console.log("onSearch",r),e.llenarCuandoTipea?null===(n=e.onChange)||void 0===n||n.call(e,r):e.value&&(null===(t=e.onChange)||void 0===t||t.call(e,null)),p.current=!1,f(r)},disabled:e.disabled,onChange:function(e){console.log("onChange",e)},children:he.jsx(T,{placeholder:e.values.placeholder,suffix:O})})};$e.displayName="BuscadorSeeker";var Ae=function(e){var n,a,i,s,l=r(""),c=l[0],u=l[1],d=(n={tipo:e.type,options:void 0},a=t(n.options),i=o((function(){return function(e){switch(e.tipo){case"mesas":return{label:"Mesa",endpoint:"/v3/restaurantes/mesas",params:{fields:"codigo estado descripcion ordenActual lugar"},field:"codigo",placeholder:"Ingresa el código de mesas",title:function(e){return e.codigo},subtitle:function(e){return e.lugar}};case"meseros":return{label:"Mesero",endpoint:"/v3/restaurantes/meseros",params:{fields:"name codigo"},field:"name",placeholder:"Ingresa un mesero",title:function(e){return e.name},subtitle:function(e){return e.codigo}};case"cuentas-contables":return{label:"Cuenta contable",endpoint:"/v3/contability/chart-of-accounts",params:{fields:"codigo descripcion tipoDeCuenta auxiliar signo",tipoDeCuenta:"D"},field:"codigo",placeholder:"Ingrese el código de la cuenta",title:function(e){return e.codigo},subtitle:function(e){return e.descripcion},preBusquedaQ:function(e){return/^\d+\./.test(e)?"^"+e:e}};default:return{withOptions:!0,label:"Cliente",endpoint:"/v3/administrative/clients",params:{fields:"idType id name phone email address",estado:"activo"},field:"id",placeholder:"Ingresar la identificación del cliente",title:function(e){return"".concat(e.id)},subtitle:function(e){return e.name},preBusquedaQ:function(e){return void 0===e&&(e=""),e=e.trim(),/^\d+/.test(e)?"^"+e:e}}}}({opciones:a,tipo:n.tipo})}),[n.tipo]),s=X(i.withOptions&&!n.options?i.endpoint+"/get-options":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(i.endpoint).get(e)];case 1:return[2,r.sent().data]}}))}))}),{revalidateOnFocus:!1}).data,s&&(a.current=s),i);return d?he.jsx(L.Item,{name:e.name,label:null===e.label?void 0:e.label||d.label,extra:e.hideMessage?void 0:c,rules:e.required?[Re.required()]:[{}],className:e.classNameFormItem,children:he.jsx($e,{type:e.type,canCreate:e.canCreate,values:d,params:e.params,onSetTextoExtra:function(r){e.hideMessage||u(r)},onSelect:e.onSelect,llenarCuandoTipea:e.llenarCuandoTipea,disabled:e.disabled,cuerpoCrear:e.cuerpoCrear,initialValue:e.initialValue})}):null};Ae.displayName="Seeker";var Ue=a(null);function Me(){return i(Ue)}var Be=function(e){var n=r([]),t=n[0],o=n[1];return he.jsxs(Ue.Provider,{value:{setBitacora:o},children:[he.jsx(ze,{bitacora:t,setBitacora:o}),e.children]})},ze=function(e){return he.jsx(U,{title:"Bitácora",placement:"right",closable:!1,open:0!==e.bitacora.length,onClose:function(){return e.setBitacora([])},children:he.jsx(M,{items:e.bitacora.map((function(e,r){var n=function(e){switch(e){case"created":case"creacion-masiva":return{color:"green"};case"draft":return{color:"orange",icon:he.jsx(C,{})};case"failed":return{color:"red",icon:he.jsx(I,{})};case"issued":case"used":return{color:"green",icon:he.jsx(k,{})};case"sent":return{color:"#1890FF",icon:he.jsx(S,{})};case"pre-canceled":return{color:"#FFA500",icon:he.jsx(p,{})};case"canceled":case"reversado":return{color:"red",icon:he.jsx(w,{})};case"edit":return{color:"#1890FF",icon:he.jsx(j,{})};case"email":return{color:"#00CCFF",icon:he.jsx(x,{})};case"deleted":return{color:"red",icon:he.jsx(b,{})};case"intermitencia":return{color:"red",icon:he.jsx(g,{})};case"exit-notice":return{color:"red",icon:he.jsx(y,{})};case"exit-notice-deleted":return{color:"green",icon:he.jsx(h,{})}}}(e.type);return{color:null==n?void 0:n.color,key:"movimiento"+r,dot:null==n?void 0:n.icon,children:he.jsxs(he.Fragment,{children:[e.nota," ",he.jsx("br",{}),De.completeDate(e.date)]})}}))})})},We="#F34D24",Ye="#FFFFFF",Ve=function(e){var t=r(!1),o=t[0],a=t[1];return n((function(){a(!0)}),[]),o?he.jsx(Be,{children:he.jsx(B,{locale:ie,theme:{token:{colorPrimary:We,colorLink:We,colorTextDisabled:"#00000080"},components:{Layout:{bodyBg:Ye,headerBg:Ye},Tag:{marginXS:0}}},children:he.jsx(D,{children:he.jsx(z,{className:(e.className||"")+" min-h-screen w-full",style:e.style,children:e.children})})})}):null},He=function(e){var t=Me().setBitacora,a=r(!1),i=a[0],s=a[1],l=o((function(){return Array.isArray(e.movimientos)&&0!==e.movimientos.length}),[e.movimientos]),c=function(){l&&t(e.movimientos)};return n((function(){var r;s(null===(r=e.movimientos)||void 0===r?void 0:r.some((function(e){return!!e.mostrarBadge})))}),[e.movimientos]),he.jsx(W,{dot:i,children:e.usarIcono?he.jsx(N,{title:"Ver historial",className:l?"":"text-gray-300 cursor-not-allowed",onClick:c}):he.jsx(F,{icon:he.jsx(N,{}),title:"Ver historial",disabled:!l,onClick:c})})},Je=function(e){var n=L.useFormInstance(),t=r([]),a=t[0],i=t[1],s=o((function(){var r=e.rules||[];switch(e.type){case"ruc":return{label:"RUC",placeholder:"Ingresar el RUC",max:13,rules:ue(ue([],r,!0),[Re.pattern(/^[0-9]{13}$/,"El ruc debe tener 13 caracteres numéricos")],!1)};case"ci":return{label:"Cédula",placeholder:"Ingresar la cédula",max:10,rules:ue(ue([],r,!0),[Re.pattern(/^[0-9]{10}$/,"La cédula debe tener 10 caracteres numéricos")],!1)};default:return{label:"Nº identificación",placeholder:"Ingresar el número de identificación",rules:r}}}),[e.type]),l=te((function(r){return le(void 0,void 0,void 0,(function(){var n,t,o;return ce(this,(function(s){switch(s.label){case 0:if(n=ke("utils"),!e.campoNombre||r.length<6||!["ci","ruc"].includes(e.type))return 0!==a.length&&i([]),[2];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n.get("/clientes/buscar",{params:{identificador:r,tipo:"ci"===e.type?"cedula":"ruc"}})];case 2:return t=s.sent().data,i(t.map((function(e){return{value:e.identificador,nombre:e.nombre,label:he.jsxs(he.Fragment,{children:[he.jsx("b",{children:e.identificador}),he.jsx("br",{}),e.nombre]})}}))),[3,4];case 3:return o=s.sent(),console.error(o),[3,4];case 4:return[2]}}))}))}),500);return he.jsx(L.Item,se({name:e.name,rules:s.rules,normalize:function(e){return e.trim().toUpperCase()},className:e.className,dependencies:e.dependencies},e.hiddenLabel?{}:{label:e.label||s.label},{children:he.jsx(A,{options:a,onSelect:function(r,t){n.setFieldValue(e.campoNombre,t.nombre)},onSearch:l,placeholder:e.placeholder||s.placeholder,maxLength:s.max,disabled:e.disabled,onChange:function(r){var n;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,r)}})}))},Qe=function(e){var n=r(),t=n[0],o=n[1];return he.jsx(Y,{title:"Click para confirmar",open:!!t,children:he.jsx(F,{title:e.title,disabled:e.disabled,danger:!!t,icon:t?he.jsx(E,{}):he.jsx(b,{}),onClick:function(){if(t)e.onConfirm(),o(void 0),clearTimeout(t);else{var r=setTimeout((function(){return o(void 0)}),1500);o(r)}}})})},Ke=function(e){var n=r(!0),t=n[0],o=n[1],a=r(!1),i=a[0],s=a[1];return he.jsxs(he.Fragment,{children:[e.sidebar?he.jsxs(z.Sider,{style:{overflow:"auto",height:"100vh",position:"fixed",insetInlineStart:0,top:0,bottom:0,scrollbarWidth:"thin",scrollbarColor:"unset",zIndex:10},breakpoint:"md",collapsedWidth:0,trigger:null,collapsed:t,collapsible:!0,width:"230px",onBreakpoint:function(e){o(e),s(e)},children:[he.jsx(c,{href:e.sidebar.title.href,children:he.jsx("div",{className:"flex justify-center items-center h-16 text-lg text-white font-bold",children:he.jsx("div",{children:e.sidebar.title.label})})}),e.sidebar.menu]}):null,he.jsxs(z,{className:i||t?"ml-0":"ml-[230px]",onClick:!t&&i?function(e){e.stopPropagation(),e.preventDefault(),o(!0)}:void 0,children:[e.navbar?he.jsx(z.Header,{className:"border-b top-0 !z-[2] sticky !px-4",children:he.jsxs("div",{className:"flex justify-between items-center h-full",children:[he.jsx("div",{children:he.jsx(F,{type:"text",icon:t?he.jsx(O,{}):he.jsx(P,{}),onClick:function(){return o(!t)},children:e.navbar.title})}),e.navbar.options?he.jsx("div",{children:e.navbar.options}):he.jsx("div",{})]})}):null,he.jsx(z.Content,{className:"m-4 md:m-8 xl:mx-16 xl:my-8",children:e.children}),e.footer?he.jsx(z.Footer,{className:"!text-gray-500",children:e.footer}):null]})]})},Xe=a(null);function Ge(){return i(Xe)}var Ze=function(e){var t=u(),o=r(!1),a=o[0],i=o[1],s=r(),l=s[0],c=s[1];n((function(){le(void 0,void 0,void 0,(function(){var e,r,n,t;return ce(this,(function(o){switch(o.label){case 0:e=ke("restify"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Promise.all([e.get("/v3/auth/user"),e.get("/v3/businesses/me/configurations",{params:{fields:"comprobantes nDecimals invoice"}})])];case 2:return r=o.sent(),n=r[0].data,t=r[1].data,n.configuraciones=t,[2,n];case 3:return o.sent(),[2,null];case 4:return[2]}}))})).then((function(r){r?(i(!0),c(r)):Pe(t,e.pathLogin)}))}),[]);return a?he.jsx(Xe.Provider,{value:{business:l,nombreEmpresa:l.business,nombreUsuario:l.user,testEnviroment:l.configs.useTestEnviroment,usuarioEsAdmin:"admin"===l.userType,hasModule:function(e,r){var n=null==l?void 0:l.modules.find((function(r){return r.key===e}));return!!n&&ne(r).isAfter(n.operationDate)}},children:e.children}):he.jsx("div",{className:"w-full h-screen flex items-center justify-center",children:"Cargando..."})},er=function(e){var n=r(!1),t=n[0],o=n[1],a=X(t&&e.autocompletar?"/v4/administrative/clients/nombres-info-adicional":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.map((function(e){return{label:e,value:e}}))]}}))}))})).data,i=void 0===a?[]:a;return he.jsx(L.List,{name:e.name,children:function(r,n){return he.jsxs("div",{children:[he.jsxs("div",{className:"flex items-center justify-between mb-4",children:[he.jsx("div",{className:"text-base font-bold",children:"Información adicional"}),he.jsx(F,{type:"dashed",onClick:function(){return n.add({})},children:"Agregar"})]}),he.jsxs(V,{dataSource:r,rowClassName:"align-top",bordered:!0,children:[he.jsx(V.Column,{title:"Nombre",render:function(r){var n=r.name;return he.jsx(L.Item,{className:"m-0 p-0",name:[n,"nombre"],rules:[Re.required()],children:e.autocompletar?he.jsx(A,{options:i,maxLength:300,placeholder:"Ingresar el nombre",onFocus:function(){return o(!0)}}):he.jsx(T,{maxLength:300,placeholder:"Ingresar el nombre"})})}},"name"),he.jsx(V.Column,{title:"Descripción",render:function(e){var r=e.name;return he.jsx(L.Item,{className:"m-0 p-0",name:[r,"valor"],rules:[Re.required()],children:he.jsx(T,{placeholder:"Ingresar la descripción"})})}},"description"),he.jsx(V.Column,{align:"center",width:1,render:function(e){var r=e.name;return he.jsx(Qe,{title:"¿Eliminar información adicional?",onConfirm:function(){return n.remove(r)}})}},"opciones")]})]})}})},rr=function(e){var r=e.form,t=L.useWatch("address",r),o=L.useWatch("direcciones",r);return n((function(){var e=setTimeout((function(){1===o.length&&r.setFieldValue("address",o[0])}),500);return function(){return clearTimeout(e)}}),[o]),he.jsx(L.List,{name:"direcciones",children:function(e,n){var a,i=n.add,s=n.remove;return he.jsxs(he.Fragment,{children:[he.jsxs("div",{className:"flex items-center justify-between mb-6",children:[he.jsx(R.Title,{level:3,className:"!m-0",children:"Direcciones"}),he.jsx(F,{type:"dashed",onClick:function(){return i(null)},children:"Agregar"})]}),0===(null===(a=o||[])||void 0===a?void 0:a.length)?he.jsx(Q,{className:"my-8",description:"No hay direcciones"}):e.map((function(e){return he.jsxs("div",{className:"flex flex-wrap md:flex-nowrap items-center gap-y-2 gap-x-6 mb-6 last:mb-0",children:[he.jsx(L.Item,{name:e.name,rules:[Re.required()],className:"mb-0 w-full",children:he.jsx(T,{placeholder:"Ingresar la dirección"})}),o&&he.jsx(K,{checked:t===o[e.name],className:"whitespace-nowrap",onChange:function(n){return t=n.target.checked,a=e.name,void(t&&r.setFieldValue("address",o[a]));var t,a},children:"Por defecto"}),he.jsx(R.Link,{className:"whitespace-nowrap",onClick:function(){o[e.name]===t&&r.setFieldValue("address",""),s(e.name)},children:"Eliminar"})]},"direcciones"+e.key)}))]})}})},nr=function(){var e=r(!1),n=e[0],t=e[1],o=X(n?"/v4/administrative/clients/etiquetas":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.etiquetas]}}))}))})).data,a=void 0===o?[]:o;return he.jsx(L.Item,{name:"etiquetas",label:"Etiqueta",children:he.jsx(A,{options:a.map((function(e){return{label:e,value:e}})),placeholder:"Ingresar o seleccionar una etiqueta",onFocus:function(){return t(!0)}})})},tr=s((function(e,r){var t,a,i=u(),s=Ge().hasModule,c=qe({endpoint:"/v3/administrative/"+e.type+"s",soloParaInsertar:!0===e.ocultarBotones,params:{$getAllFields:"true"},data:{id:"",idType:"04",subjectType:"01",direcciones:[],address:"",name:void 0}}),d=L.useWatch("idType",c.form),f="client"===e.type,p="provider"===e.type,m="transporter"===e.type,v=X("08"===d?"/v3/administrative/retenciones-v2/get-options":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.PaisesParaisosFiscales.map((function(e){return{label:e.description,value:parseInt(e.id)}}))]}}))}))})).data,h=o((function(){switch(d){case"04":return"ruc";case"05":return"ci";default:return"other"}}),[d]);l(r,(function(){return{insertar:c}}));var y="grid grid-cols-1 md:grid-cols-2 gap-x-6";return n((function(){var r=JSON.parse(JSON.stringify(i.query)),n=r.name,t=r.idType,o=r.identificador;t&&o&&n&&e.type}),[i.query]),c.isReady?he.jsxs(L,se({},c.formProps,{layout:"vertical",children:[he.jsxs("div",{className:y,children:[he.jsx(L.Item,{name:"idType",label:"Tipo de identificación",rules:[Re.required()],children:he.jsx(H,{options:null===(t=c.options.TiposDeIdentificacion)||void 0===t?void 0:t.map((function(e){return{label:e.description,value:e.id}}))})}),he.jsx(Je,{name:"id",campoNombre:"name",type:h,rules:[Re.required()]}),he.jsx(L.Item,{name:"name",label:"Nombres / Razón social",rules:[Re.required()],children:he.jsx(T,{placeholder:"Ingresar la razón social"})}),he.jsx(L.Item,{name:"subjectType",label:"Tipo de sujeto",rules:[Re.required()],children:he.jsx(H,{options:null===(a=c.options.TiposDePersona)||void 0===a?void 0:a.map((function(e){return{label:e.description,value:e.id}}))})})]}),he.jsx(R.Title,{level:3,children:"Información de contacto"}),he.jsxs("div",{className:y,children:[he.jsx(L.Item,{name:"phone",label:"Télefono 1",children:he.jsx(T,{type:"phone",placeholder:"Ingresar el teléfono 1"})}),f?he.jsx(L.Item,{name:"cellphone",label:"Télefono 2",children:he.jsx(T,{type:"phone",placeholder:"Ingresar el teléfono 2"})}):null,he.jsx(L.Item,{name:"email",label:"Correo electrónico",rules:[Re.email()],normalize:function(e){return e.trim()},children:he.jsx(T,{placeholder:"Ingresar el correo electrónico"})}),!m&&he.jsx(L.Item,{name:"optionalEmail",label:"Correos electrónicos alternativos",rules:[Re.correos()],children:he.jsx(H,{mode:"tags",placeholder:"Ingresar uno o varios correos alternativos",open:!1,suffixIcon:null})})]}),he.jsx(L.Item,{name:"address",noStyle:!0,children:he.jsx(T,{type:"hidden"})}),!m&&he.jsx(rr,{form:c.form}),he.jsx(R.Title,{level:3,children:"Otra información"}),he.jsxs("div",{className:y,children:[f&&s("treasury")&&he.jsx(L.Item,{name:"creditQuotaDollars",label:"Cupo de crédito en dólares",children:he.jsx(J,{className:"w-full",precision:2,min:0,placeholder:"Ingresar el cupo de crédito en dólares"})}),f&&s("treasury")&&he.jsx(L.Item,{name:"creditQuotaDays",label:"Cupo de crédito en días",children:he.jsx(J,{className:"w-full",precision:0,min:0,placeholder:"Ingresar el cupo de crédito en días"})}),p&&s("contability")&&he.jsx(Ae,{name:"accountingAccount",type:"cuentas-contables"}),p&&s("treasury")&&he.jsx(L.Item,{name:"diasPlazo",label:"Días plazo",children:he.jsx(J,{className:"w-full",precision:0,min:0,placeholder:"Ingresar los días plazo"})}),m?he.jsx(L.Item,{name:"licensePlate",label:"Placa",rules:[Re.required()],children:he.jsx(H,{mode:"tags",placeholder:"Ingresar una o varias placas",open:!1,suffixIcon:null})}):null,f&&he.jsx(L.Item,{name:"descuento",label:"Descuento adicional para facturas (%)",children:he.jsx(J,{className:"w-full",precision:2,max:100,suffix:"%",placeholder:"Ingresar el descuento"})}),f&&"08"===d&&he.jsx(L.Item,{name:"paisExportacion",label:"País de exportación",children:he.jsx(H,{allowClear:!0,showSearch:!0,placeholder:"Seleccionar el país de exportación",optionFilterProp:"children",filterOption:function(e,r){var n;return(null!==(n=null==r?void 0:r.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())},options:v})}),f&&he.jsx(nr,{})]}),he.jsx("div",{className:"mb-5",children:he.jsx(er,{name:"informacionAdicional",autocompletar:!0})}),e.ocultarBotones?null:c.BotonesPorDefecto]})):c.ModoCarga}));export{De as $filtros,Re as $reglas,Qe as BotonConfirmacion,He as BotonMovimientos,Ze as ContextoEmpresa,tr as FormularioPersonas,ge as Header,Je as IdentificadorPersona,Ke as LayoutBase,Ae as Seeker,Ve as TemaPrincipal,xe as configurarUtils,Ie as crearToken,Ce as destruirToken,Ne as getApiEndpoint,ke as getAxios,Ee as getNestedPath,Oe as hashear,Te as nDecimals,Pe as redireccionarLogin,Ge as useContextoEmpresa,Me as useFrontendUtils,we as useUtils,qe as useVistaInsertar,Le as useVistaPrincipal};
|
|
10
|
+
*/"production"===process.env.NODE_ENV?fe.exports=function(){if(de)return pe;de=1;var r=e,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var s,l={},c=null,u=null;for(s in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)o.call(r,s)&&!i.hasOwnProperty(s)&&(l[s]=r[s]);if(e&&e.defaultProps)for(s in r=e.defaultProps)void 0===l[s]&&(l[s]=r[s]);return{$$typeof:n,type:e,key:c,ref:u,props:l,_owner:a.current}}return pe.Fragment=t,pe.jsx=s,pe.jsxs=s,pe}():fe.exports=(me||(me=1,"production"!==process.env.NODE_ENV&&function(){var r=e,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator",y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];!function(e,r,n){var t=y.ReactDebugCurrentFrame.getStackAddendum();""!==t&&(r+="%s",n=n.concat([t]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}var b,x=!1,j=!1,w=!1,S=!1,k=!1;function I(e){return e.displayName||"Context"}function C(e){if(null==e)return null;if("number"==typeof e.tag&&g("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 t:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return I(e)+".Consumer";case s:return I(e._context)+".Provider";case c:return function(e,r,n){var t=e.displayName;if(t)return t;var o=r.displayName||r.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case f:var r=e.displayName||null;return null!==r?r:C(e.type)||"Memo";case p:var n=e,m=n._payload,v=n._init;try{return C(v(m))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var N,P,E,O,T,F,R,_=Object.assign,D=0;function L(){}L.__reactDisabledLog=!0;var q,$=y.ReactCurrentDispatcher;function A(e,r,n){if(void 0===q)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);q=t&&t[1]||""}return"\n"+q+e}var U,M=!1,B="function"==typeof WeakMap?WeakMap:Map;function z(e,r){if(!e||M)return"";var n,t=U.get(e);if(void 0!==t)return t;M=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===D){N=console.log,P=console.info,E=console.warn,O=console.error,T=console.group,F=console.groupCollapsed,R=console.groupEnd;var e={configurable:!0,enumerable:!0,value:L,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){n=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){n=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(r){if(r&&n&&"string"==typeof r.stack){for(var s=r.stack.split("\n"),l=n.stack.split("\n"),c=s.length-1,u=l.length-1;c>=1&&u>=0&&s[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(s[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||s[c]!==l[u]){var d="\n"+s[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&U.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{M=!1,$.current=o,function(){if(0==--D){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:N}),info:_({},e,{value:P}),warn:_({},e,{value:E}),error:_({},e,{value:O}),group:_({},e,{value:T}),groupCollapsed:_({},e,{value:F}),groupEnd:_({},e,{value:R})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var f=e?e.displayName||e.name:"",p=f?A(f):"";return"function"==typeof e&&U.set(e,p),p}function W(e,r,n){if(null==e)return"";if("function"==typeof e)return z(e,!(!(t=e.prototype)||!t.isReactComponent));var t;if("string"==typeof e)return A(e);switch(e){case u:return A("Suspense");case d:return A("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return z(e.render,!1);case f:return W(e.type,r,n);case p:var o=e,a=o._payload,i=o._init;try{return W(i(a),r,n)}catch(e){}}return""}U=new B;var Y=Object.prototype.hasOwnProperty,V={},H=y.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,n=W(e.type,e._source,r?r.type:null);H.setExtraStackFrame(n)}else H.setExtraStackFrame(null)}var Q=Array.isArray;function K(e){return Q(e)}function X(e){return""+e}function G(e){if(function(e){try{return X(e),!1}catch(e){return!0}}(e))return g("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)),X(e)}var Z,ee,re,ne=y.ReactCurrentOwner,te={key:!0,ref:!0,__self:!0,__source:!0};re={};var oe=function(e,r,t,o,a,i,s){var l={$$typeof:n,type:e,key:r,ref:t,props:s,_owner:i,_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:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ae(e,r,n,t,o){var a,i={},s=null,l=null;for(a in void 0!==n&&(G(n),s=""+n),function(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(r)&&(G(r.key),s=""+r.key),function(e){if(Y.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return void 0!==e.ref}(r)&&(l=r.ref,function(e,r){if("string"==typeof e.ref&&ne.current&&r&&ne.current.stateNode!==r){var n=C(ne.current.type);re[n]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(ne.current.type),e.ref),re[n]=!0)}}(r,o)),r)Y.call(r,a)&&!te.hasOwnProperty(a)&&(i[a]=r[a]);if(e&&e.defaultProps){var c=e.defaultProps;for(a in c)void 0===i[a]&&(i[a]=c[a])}if(s||l){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,r){var n=function(){Z||(Z=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,u),l&&function(e,r){var n=function(){ee||(ee=!0,g("%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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,u)}return oe(e,s,l,o,t,ne.current,i)}var ie,se=y.ReactCurrentOwner,le=y.ReactDebugCurrentFrame;function ce(e){if(e){var r=e._owner,n=W(e.type,e._source,r?r.type:null);le.setExtraStackFrame(n)}else le.setExtraStackFrame(null)}function ue(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function de(){if(se.current){var e=C(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ie=!1;var fe={};function pe(e,r){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var r=de();if(!r){var n="string"==typeof e?e:e.displayName||e.name;n&&(r="\n\nCheck the top-level render call using <"+n+">.")}return r}(r);if(!fe[n]){fe[n]=!0;var t="";e&&e._owner&&e._owner!==se.current&&(t=" It was passed a child from "+C(e._owner.type)+"."),ce(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,t),ce(null)}}}function me(e,r){if("object"==typeof e)if(K(e))for(var n=0;n<e.length;n++){var t=e[n];ue(t)&&pe(t,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var r=v&&e[v]||e[h];return"function"==typeof r?r:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)ue(a.value)&&pe(a.value,r)}}function he(e){var r,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)r=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==f)return;r=n.propTypes}if(r){var t=C(n);!function(e,r,n,t,o){var a=Function.call.bind(Y);for(var i in e)if(a(e,i)){var s=void 0;try{if("function"!=typeof e[i]){var l=Error((t||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[i](r,i,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}!s||s instanceof Error||(J(o),g("%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).",t||"React class",n,i,typeof s),J(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,J(o),g("Failed %s type: %s",n,s.message),J(null))}}(r,e.props,"prop",t,e)}else void 0===n.PropTypes||ie||(ie=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ye={};function ge(e,r,t,v,h,y){var I=function(e){return"string"==typeof e||"function"==typeof e||!!(e===o||e===i||k||e===a||e===u||e===d||S||e===m||x||j||w)||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===l||e.$$typeof===c||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!I){var N,P="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),P+=de(),null===e?N="null":K(e)?N="array":void 0!==e&&e.$$typeof===n?(N="<"+(C(e.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):N=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,P)}var E=ae(e,r,t,h,y);if(null==E)return E;if(I){var O=r.children;if(void 0!==O)if(v)if(K(O)){for(var T=0;T<O.length;T++)me(O[T],e);Object.freeze&&Object.freeze(O)}else g("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 me(O,e)}if(Y.call(r,"key")){var F=C(e),R=Object.keys(r).filter((function(e){return"key"!==e})),_=R.length>0?"{key: someKey, "+R.join(": ..., ")+": ...}":"{key: someKey}";ye[F+_]||(g('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} />',_,F,R.length>0?"{"+R.join(": ..., ")+": ...}":"{}",F),ye[F+_]=!0)}return e===o?function(e){for(var r=Object.keys(e.props),n=0;n<r.length;n++){var t=r[n];if("children"!==t&&"key"!==t){ce(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),ce(null);break}}null!==e.ref&&(ce(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),ce(null))}(E):he(E),E}var be=function(e,r,n){return ge(e,r,n,!1)},xe=function(e,r,n){return ge(e,r,n,!0)};ve.Fragment=o,ve.jsx=be,ve.jsxs=xe}()),ve);var he=fe.exports,ye=function(e){return e.paths?he.jsx(_,{items:e.paths.map((function(e){var r=e.to,n=e.label;return{title:r?he.jsx(c,{href:r,children:n}):n}}))}):null},ge=function(e){var t,o=e.defaultInsert,a=void 0!==o&&o,i=e.loading,s=void 0!==i&&i,l=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}(e,["defaultInsert","loading"]),d=u(),p=d.pathname,m=r(""),v=m[0],h=m[1],y=new URLSearchParams(d.query),g=function(){var e=new URLSearchParams(y.toString());(e.get("q")||"")!==v&&(v?e.set("q",v):e.delete("q"),e.delete("page"),d.push({query:Object.fromEntries(e)}))},b=he.jsxs("div",{className:"flex w-full md:w-auto flex-wrap md:flex-nowrap gap-2 justify-end",children:[!0!==l.ocultarBuscador?he.jsx(T.Search,{value:v,placeholder:"Ingresar búsqueda",onChange:function(e){return h(e.target.value||"")},onSearch:g,onPressEnter:g}):null,null!==a?a||he.jsx(c,{href:(t=p,t.endsWith("/")&&(t=t.slice(0,-1)),t+"/insert"),children:he.jsx(F,{type:"primary",children:"Insertar"})}):null,l.onRefrescar?he.jsx("div",{children:he.jsx(F,{loading:s,title:"Refrescar datos",icon:he.jsx(f,{}),onClick:l.onRefrescar})}):null,l.children]});return n((function(){d.isReady&&h(y.get("q")||"")}),[d.isReady]),he.jsxs("div",{className:"flex md:flex-row flex-col md:items-end items-start justify-between gap-6 mb-6",children:[he.jsxs("div",{children:[he.jsx(ye,{paths:l.paths}),he.jsx(R.Title,{className:"!mb-0 mt-4",children:l.title}),l.subtitle&&he.jsx(R.Title,{level:3,type:"secondary",className:"!font-normal !m-0",children:l.subtitle})]}),null!==l.column?l.column||b:null]})},be={hostUtils:"https://utils.upconta.com",hostFastify:"",hostRestify:"",userTokenName:"",adminTokenName:"",cookieDominio:"",cookiePath:void 0},xe=function(e){be=se(se({},be),e)},je=function(e){return le(void 0,void 0,void 0,(function(){var r,n,t,o,a,i;return ce(this,(function(s){switch(s.label){case 0:if(!((r=(null===(a=e.response)||void 0===a?void 0:a.data)?(null===(i=e.response.data)||void 0===i?void 0:i.message)||e.response.data:e.message)instanceof Blob))return[3,5];s.label=1;case 1:return s.trys.push([1,3,,5]),t=(n=JSON).parse,[4,r.text()];case 2:return[2,t.apply(n,[s.sent()]).message];case 3:return s.sent(),o={},[4,r.text()];case 4:return[2,(o.message=s.sent(),o.tipo="error",o)];case 5:return[2,{message:r,tipo:"error"}]}}))}))},we=function(){var e=D.useApp(),r=e.modal,n=e.message,t=e.notification;return{showError:function(e,n){return le(void 0,void 0,void 0,(function(){var t;return ce(this,(function(o){switch(o.label){case 0:return[4,je(e)];case 1:return t=o.sent(),r[t.tipo]({title:(null==n?void 0:n.title)||"Proceso fallido",width:450,content:he.jsxs(he.Fragment,{children:[t.message,null==n?void 0:n.cuerpoAdicional]}),okType:"danger"}),[2]}}))}))},modal:r,message:n,notification:t}},Se=function(e){return"administrador"===e?be.adminTokenName:be.userTokenName},ke=function(e,r){var n="";n=!e||"fastify"===e||e.includes("/v4")?be.hostFastify:"utils"===e?be.hostUtils:be.hostRestify;var t=G.create({baseURL:n});return"utils"!==e&&(t.defaults.headers.common.Authorization=Z(Se(null==r?void 0:r.tipo),{domain:be.cookieDominio,path:be.cookiePath})),t},Ie=function(e,r){ee(Se(r.usuario),e,{domain:be.cookieDominio,maxAge:604800,path:be.cookiePath})},Ce=function(e){re(Se(e),{domain:be.cookieDominio,path:be.cookiePath})},Ne=function(e,r){var n=new URL(e,e.includes("/v4")?be.hostFastify:be.hostRestify),t="";return r&&(t=new URLSearchParams(r).toString()),n.href+(t?"?"+t:"")},Pe=function(e,r){for(var n=(r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),t=0,o=n.length;t<o;++t){var a=n[t];if(!e||!(a in e))return;e=e[a]}return e},Ee=function(e){var r,n=0;if(0===e.length)return n;for(r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return n},Oe=function(e,r){void 0===r&&(r="/login");var n=r.includes("://"),t=new URL(n?r:window.location.origin+r);("/"!==e.asPath||n)&&t.searchParams.append("redirect",n?window.location.href:e.asPath),n?window.location.href=t.href:e.push(t.pathname+t.search)};function Te(e,r){void 0===r&&(r=2);var n=Math.pow(10,r);return Math.round(+(e*n).toFixed(2))/n}var Fe={empresa:function(e,r){return le(void 0,void 0,void 0,(function(){return ce(this,(function(e){switch(e.label){case 0:return r?[4,ke("restify").get("/v3/auth/business/"+r)]:[2];case 1:if(e.sent().data)throw new Error("La empresa ya se encuentra registrada");return[2]}}))}))}},Re={required:function(e){return void 0===e&&(e="El campo es requerido"),{required:!0,message:e}},min:function(e,r){return void 0===r&&(r="Debe tener mínimo ".concat(e.toString()," caracteres")),{min:e,message:r}},max:function(e,r){return void 0===r&&(r="Debe tener máximo ".concat(e.toString()," caracteres")),{max:e,message:r}},email:function(e){return void 0===e&&(e="El correo electrónico no es válido"),{type:"email",message:e}},pattern:function(e,r){return void 0===r&&(r="No cumple el formato requerido"),{pattern:e,message:r}},unico:function(e){return{validator:te(Fe[e],300)}},correos:function(){return{validator:function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return le(void 0,ue([e],r,!0),void 0,(function(e,r){return void 0===r&&(r=[]),ce(this,(function(e){if(r.some((function(e){return!e.includes("@")})))throw new Error("Alguno de los correos no es válido");return[2]}))}))}}},diasDiferencia:function(e,r){return void 0===r&&(r="La fecha ingresada no es válido"),{validator:function(n,t){return le(void 0,void 0,void 0,(function(){var n;return ce(this,(function(o){if(n=ne(t).startOf("day").diff(ne().startOf("day"),"day"),e<0?n<e:n>e)throw new Error(r);return[2]}))}))}}}},_e="es-EC",De={currency:function(e,r){return void 0===r&&(r=2),e||(e=0),new Intl.NumberFormat(_e,{style:"currency",currency:"USD",minimumFractionDigits:r}).format("number"==typeof e?e:parseFloat(e))},date:function(e,r){return void 0===r&&(r="DD/MM/YYYY"),ne(e).format(r)},completeDate:function(e){return ne(e).format("DD/MM/YYYY HH:mm:ss")},month:function(e){return ne(e).format("MM/YYYY")},percent:function(e,r){return void 0===r&&(r=2),e||(e=0),new Intl.NumberFormat(_e,{style:"percent",minimumFractionDigits:r}).format("number"==typeof e?e:parseFloat(e))}},Le=function(e){var r=ke(e.endpoint,{tipo:e.tipoUsuario||"usuario"}),n=u(),t=we().showError,o=ae().mutate,a=X(e.sinOptions?null:(e.optionsPath||e.endpoint)+"/get-options",(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(n){switch(n.label){case 0:return[4,r.get(e)];case 1:return[2,n.sent().data]}}))}))})).data,i=void 0===a?{}:a,s=new URLSearchParams(se(se({},e.params),n.query)).toString(),l=e.endpoint+(s?"?"+s:""),c=oe(n.isReady?l:null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(n){switch(n.label){case 0:return[4,r.get(e)];case 1:return[2,n.sent().data]}}))}))}),{keepPreviousData:!0}),d=c.data,f=c.error,p=c.isLoading,m=(null==d?void 0:d.data)||[],v=(null==d?void 0:d.total)||0,h=new URLSearchParams(n.query),y=h.get("page"),g=y?parseInt(y):1,b=h.get("limit"),x=b?parseInt(b):20,j={loading:p,dataSource:m,rowKey:"_id",bordered:!0,pagination:{current:g,defaultPageSize:x,total:v},onChange:function(e,r,t){return le(void 0,void 0,void 0,(function(){var r,o,a,i;return ce(this,(function(s){return r=h.toString(),o=new URLSearchParams(r),e.current!==g&&("1"===(a=e.current.toString())?o.delete("page"):o.set("page",a)),e.pageSize!==x&&("20"===(i=e.pageSize.toString())?o.delete("limit"):o.set("limit",i)),Array.isArray(t)||("ascend"===t.order?o.set("sort",t.field):"descend"===t.order?o.set("sort","-"+t.field):o.delete("sort")),r!==o.toString()&&n.push({query:Object.fromEntries(o)}),[2]}))}))}},w=function(){o(l)};return{data:m,isLoading:p,error:f,options:i,endpoint:e.endpoint,endpointWithHost:Ne(e.endpoint),mainroute:n.route,tableProps:j,axios:r,init:w,getOpt:function(e,r){var n,t=null===(n=i[e])||void 0===n?void 0:n.find((function(e){return e.id===r}));return t?t.description:""},remove:function(n){return le(void 0,void 0,void 0,(function(){var o;return ce(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.delete("string"==typeof n?e.endpoint+"/"+n:n.endpoint)];case 1:return a.sent(),w(),[3,3];case 2:return o=a.sent(),t(o),[3,3];case 3:return[2]}}))}))},cancel:function(n){return le(void 0,void 0,void 0,(function(){var o;return ce(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.delete("string"==typeof n?e.endpoint+"/"+n+"/cancel":n.endpoint)];case 1:return a.sent(),w(),[3,3];case 2:return o=a.sent(),t(o),[3,3];case 3:return[2]}}))}))}}},qe=function(e){var o=ke(e.endpoint,{tipo:e.tipoUsuario||"usuario"}),a=L.useForm()[0],i=r(!1),s=i[0],l=i[1],f=r(!1),m=f[0],v=f[1],h=u(),y=we(),g=y.showError,b=y.message,x=function(e){var o=t(!1),a=we().modal,i=t(0),s=r(0),l=s[0],c=s[1],u=function(){if(!window.confirm("¿Estás seguro que quieres salir?"))throw"Route Canceled";m(),localStorage.removeItem(e)},f=function(e){e.preventDefault()},m=function(){o.current=!1,window.removeEventListener("beforeunload",f),d.events.off("routeChangeStart",u),localStorage.removeItem(e),c(0)};return n((function(){if(o.current)return i.current!==l&&(window.addEventListener("beforeunload",f),d.events.on("routeChangeStart",u)),function(){window.removeEventListener("beforeunload",f),d.events.off("routeChangeStart",u)}}),[i.current,l]),{cambiarHashInicial:function(e){var r=Ee(JSON.stringify(e));c(r),i.current=r},cambiarDatosFormulario:function(r){if(o.current&&0!==i.current){var n=JSON.stringify(r),t=Ee(n);c(t),t===i.current?localStorage.removeItem(e):localStorage.setItem(e,n)}},limpiar:m,reanudar:function(){o.current=!0},obtenerDataEmergencia:function(){return le(void 0,void 0,void 0,(function(){var r,n;return ce(this,(function(t){switch(t.label){case 0:return r=localStorage.getItem(e),[4,new Promise((function(e){if(!r)return e(void 0);a.confirm({title:"Existen datos guardados",icon:he.jsx(p,{}),content:"Hubo un cierre inesperado pero los datos fueron guardados temporalmente ¿Deseas recuperarlos?",onOk:function(){return e(JSON.parse(r))},onCancel:function(){return e(void 0)}})}))];case 1:return n=t.sent(),o.current=!0,[2,n]}}))}))}}}(h.asPath),j=t("emitir"),w=t(h.query.id),S=X(e.sinOptions?null:e.endpoint+"/get-options",(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,o.get(e)];case 1:return[2,r.sent().data]}}))}))}),{revalidateOnFocus:!1}).data,k=void 0===S?{}:S;n((function(){w.current=e.registroId,w.current||(w.current=e.soloParaInsertar?void 0:h.query.id)}),[null==e?void 0:e.registroId,e.soloParaInsertar]);var I=h.asPath.replace(/\/(insert|[\w]*\/edit$)/g,"")||"/",C=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return le(void 0,ue([r],n,!0),void 0,(function(r,n){var t,a,i,c,u,d,f,p;return void 0===n&&(n={}),ce(this,(function(m){switch(m.label){case 0:if(!0===s)return[2];l(!0),x.limpiar(),t=n.endpoint||e.endpoint,a=n.params||void 0,m.label=1;case 1:return m.trys.push([1,6,,7]),i=void 0,w.current?[4,o.put(t+"/"+w.current,r,{params:a})]:[3,3];case 2:return i=m.sent().data,[3,5];case 3:return[4,o.post(t,r,{params:a})];case 4:i=m.sent().data,m.label=5;case 5:return!0!==n.noRedirect?(b.success("Guardado correctamente"),h.push(I)):l(!1),[2,i];case 6:if(c=m.sent(),l(!1),n.noShowError)throw c;return g(c),u=null===(p=null===(f=null==c?void 0:c.response)||void 0===f?void 0:f.data)||void 0===p?void 0:p.comprobante,d="pruebas",["Hostname/IP does not match certificate's altnames:","El servidor del SRI no ha respondido en un largo tiempo por lo que se ha cerrado la conexión."].some((function(e){return d.includes(e)}))?h.push(I):!n.noRedirect&&u&&u!==w.current?(w.current=u,h.push(I+"/"+u+"/edit")):x.reanudar(),[3,7];case 7:return[2]}}))}))},N=he.jsxs(q,{children:[he.jsx(F,{type:"primary",loading:s,onClick:function(){return a.submit()},children:"Guardar"}),he.jsx(c,{href:I,children:he.jsx(F,{children:"Cancelar"})})]}),P=he.jsxs(he.Fragment,{children:[he.jsx($,{paragraph:{rows:3,width:"100%"},className:"mb-4"}),he.jsx($,{paragraph:{rows:4,width:"100%"},className:"mb-4"}),he.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[he.jsx($,{paragraph:{rows:4,width:"100%"}}),he.jsx($,{paragraph:{rows:4,width:"100%"}})]}),he.jsxs(q,{children:[he.jsx($.Button,{}),he.jsx($.Button,{})]})]}),E=function(){return b.warning("Revisa los errores del formulario")},O={form:a,autoComplete:"off",initialValues:e.data,onFinish:C,layout:"vertical",onFinishFailed:E};return n((function(){if(e.recuperacionEmergencia){var r=setInterval((function(){if(m){var e=a.getFieldsValue();x.cambiarDatosFormulario(e)}}),1e3);return function(){return clearInterval(r)}}}),[m]),n((function(){var r=setTimeout((function(){e.soloParaInsertar||le(void 0,void 0,void 0,(function(){var r,n,t;return ce(this,(function(i){switch(i.label){case 0:return r=!1,[4,x.obtenerDataEmergencia()];case 1:return(n=i.sent())?(w.current=n._id,r=!0,[3,4]):[3,2];case 2:return w.current?[4,o.get("".concat(e.endpoint,"/").concat(w.current),{params:e.params})]:[3,4];case 3:n=i.sent().data,i.label=4;case 4:return n?[4,null===(t=e.formatearDataInicial)||void 0===t?void 0:t.call(e,n)]:[3,6];case 5:i.sent(),a.setFieldsValue(n),i.label=6;case 6:return[2,r?e.data:n||e.data]}}))})).then((function(r){var n;return Promise.all([x.cambiarHashInicial(r),null===(n=e.onMounted)||void 0===n?void 0:n.call(e)])})).then((function(){return v(!0)}))}),200);return function(){return clearTimeout(r)}}),[h.query.id]),{form:a,router:h,options:k,tipoEmision:j,objectId:w.current,mainroute:I,isLoading:s,isReady:m,data:e.data,endpoint:e.endpoint,axios:o,onSubmit:C,onMainRouter:function(){return h.push(I)},setIsLoading:l,preventor:x,ModoCarga:P,BotonesPorDefecto:N,onMensajeValidacion:E,getOption:function(e,r){var n,t;return(null===(t=null===(n=k[e])||void 0===n?void 0:n.find((function(e){return e.id===r})))||void 0===t?void 0:t.description)||""},formProps:O}},$e=function(e){var a=e.values.customDocumentId||"_id",i=ke(e.values.endpoint),s=r(!1),l=s[0],c=s[1],u=r(),d=u[0],f=u[1],p=t(!1),h=r(""),y=h[0],g=h[1],b=o((function(){console.log("useMemo searchParams","valorInput:",y,"props.value:",e.value);var r=new URLSearchParams(se(se(se({limit:"50"},e.values.params),e.params),e.value?{_id:e.value}:y?{q:y}:{})).toString();return r?"?"+r:""}),[e.value,y]),x=r(),j=x[0],w=x[1],S=X(l?e.values.endpoint+b:null,(function(r){return le(void 0,void 0,void 0,(function(){var n;return ce(this,(function(t){switch(t.label){case 0:return[4,i.get(r)];case 1:return n=t.sent().data,console.log("useSWRImmutable",e.values.endpoint+b,n.total),[2,n]}}))}))})),k=S.data,I=S.isLoading;n((function(){console.log("useEffect [dataSwr]"),k&&w(k)}),[k]),n((function(){if(console.log("useEffect [valorQ]",!!p.current),!p.current&&void 0!==d){var e=setTimeout((function(){g(d),c(!0)}),500);return function(){return clearTimeout(e)}}}),[d]);var C=t(!1),N=o((function(){return console.log("useMemo: items [data, idSeleccionado]",j,""),(null==j?void 0:j.data.map((function(r){var n,t,o=Pe(r,a),i=e.values.title(r),s=null===(t=(n=e.values).subtitle)||void 0===t?void 0:t.call(n,r);return{key:o,disabled:""===o,value:o,texto:s,item:r,label:he.jsxs("div",{children:[he.jsxs("div",{children:[he.jsx("b",{className:"mr-1",children:i}),e.value===o?he.jsx(m,{twoToneColor:"#52c41a"}):void 0]}),s?he.jsx("div",{className:"text-wrap",children:s}):null]})}})))||[]}),[e.value,j,""]),P=o((function(){if(console.log("useMemo seleccionado [props.value, data]",e.value,j),e.value)return null==j?void 0:j.data.find((function(r){return Pe(r,a)===e.value}))}),[e.value,j]);n((function(){console.log("useEffect [props.value]",e.value),e.value&&c(!0)}),[e.value]);var E=o((function(){return!0===I?he.jsx(v,{}):P&&!e.llenarCuandoTipea?he.jsx(m,{twoToneColor:"#52c41a"}):he.jsx("span",{})}),[I,P]);return n((function(){var r,n,t;if(console.log("useEffect [seleccionado]",P),P){var o=Pe(P,e.values.field),a=null===(r=e.values.formItemTexto||e.values.subtitle)||void 0===r?void 0:r(P);e.onSetTextoExtra(a||""),p.current=!0,!0===C.current&&(null===(n=e.onSelect)||void 0===n||n.call(e,P)),f(o),c(!1)}else e.onSetTextoExtra(""),null===(t=e.onSelect)||void 0===t||t.call(e,null)}),[P]),he.jsx(A,{options:N,value:d,onFocus:function(){e.value||c(!0)},onSelect:function(r){var n;console.log("onSelect",r),c(!1),null===(n=e.onChange)||void 0===n||n.call(e,r)},onSearch:function(r){var n,t;console.log("onSearch",r),e.llenarCuandoTipea?null===(n=e.onChange)||void 0===n||n.call(e,r):e.value&&(null===(t=e.onChange)||void 0===t||t.call(e,null)),p.current=!1,f(r)},disabled:e.disabled,onChange:function(e){console.log("onChange",e)},children:he.jsx(T,{placeholder:e.values.placeholder,suffix:E})})};$e.displayName="BuscadorSeeker";var Ae=function(e){var n,a,i,s,l=r(""),c=l[0],u=l[1],d=(n={tipo:e.type,options:void 0},a=t(n.options),i=o((function(){return function(e){switch(e.tipo){case"mesas":return{label:"Mesa",endpoint:"/v3/restaurantes/mesas",params:{fields:"codigo estado descripcion ordenActual lugar"},field:"codigo",placeholder:"Ingresa el código de mesas",title:function(e){return e.codigo},subtitle:function(e){return e.lugar}};case"meseros":return{label:"Mesero",endpoint:"/v3/restaurantes/meseros",params:{fields:"name codigo"},field:"name",placeholder:"Ingresa un mesero",title:function(e){return e.name},subtitle:function(e){return e.codigo}};case"cuentas-contables":return{label:"Cuenta contable",endpoint:"/v3/contability/chart-of-accounts",params:{fields:"codigo descripcion tipoDeCuenta auxiliar signo",tipoDeCuenta:"D"},field:"codigo",placeholder:"Ingrese el código de la cuenta",title:function(e){return e.codigo},subtitle:function(e){return e.descripcion},preBusquedaQ:function(e){return/^\d+\./.test(e)?"^"+e:e}};default:return{withOptions:!0,label:"Cliente",endpoint:"/v3/administrative/clients",params:{fields:"idType id name phone email address",estado:"activo"},field:"id",placeholder:"Ingresar la identificación del cliente",title:function(e){return"".concat(e.id)},subtitle:function(e){return e.name},preBusquedaQ:function(e){return void 0===e&&(e=""),e=e.trim(),/^\d+/.test(e)?"^"+e:e}}}}({opciones:a,tipo:n.tipo})}),[n.tipo]),s=X(i.withOptions&&!n.options?i.endpoint+"/get-options":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(i.endpoint).get(e)];case 1:return[2,r.sent().data]}}))}))}),{revalidateOnFocus:!1}).data,s&&(a.current=s),i);return d?he.jsx(L.Item,{name:e.name,label:null===e.label?void 0:e.label||d.label,extra:e.hideMessage?void 0:c,rules:e.required?[Re.required()]:[{}],className:e.classNameFormItem,children:he.jsx($e,{type:e.type,canCreate:e.canCreate,values:d,params:e.params,onSetTextoExtra:function(r){e.hideMessage||u(r)},onSelect:e.onSelect,llenarCuandoTipea:e.llenarCuandoTipea,disabled:e.disabled,cuerpoCrear:e.cuerpoCrear,initialValue:e.initialValue})}):null};Ae.displayName="Seeker";var Ue=a(null);function Me(){return i(Ue)}var Be=function(e){var n=r([]),t=n[0],o=n[1];return he.jsxs(Ue.Provider,{value:{setBitacora:o},children:[he.jsx(ze,{bitacora:t,setBitacora:o}),e.children]})},ze=function(e){return he.jsx(U,{title:"Bitácora",placement:"right",closable:!1,open:0!==e.bitacora.length,onClose:function(){return e.setBitacora([])},children:he.jsx(M,{items:e.bitacora.map((function(e,r){var n=function(e){switch(e){case"created":case"creacion-masiva":return{color:"green"};case"draft":return{color:"orange",icon:he.jsx(C,{})};case"failed":return{color:"red",icon:he.jsx(I,{})};case"issued":case"used":return{color:"green",icon:he.jsx(k,{})};case"sent":return{color:"#1890FF",icon:he.jsx(S,{})};case"pre-canceled":return{color:"#FFA500",icon:he.jsx(p,{})};case"canceled":case"reversado":return{color:"red",icon:he.jsx(w,{})};case"edit":return{color:"#1890FF",icon:he.jsx(j,{})};case"email":return{color:"#00CCFF",icon:he.jsx(x,{})};case"deleted":return{color:"red",icon:he.jsx(b,{})};case"intermitencia":return{color:"red",icon:he.jsx(g,{})};case"exit-notice":return{color:"red",icon:he.jsx(y,{})};case"exit-notice-deleted":return{color:"green",icon:he.jsx(h,{})}}}(e.type);return{color:null==n?void 0:n.color,key:"movimiento"+r,dot:null==n?void 0:n.icon,children:he.jsxs(he.Fragment,{children:[e.nota," ",he.jsx("br",{}),De.completeDate(e.date)]})}}))})})},We="#F34D24",Ye="#FFFFFF",Ve=function(e){var t=r(!1),o=t[0],a=t[1];return n((function(){a(!0)}),[]),o?he.jsx(Be,{children:he.jsx(B,{locale:ie,theme:{token:{colorPrimary:We,colorLink:We,colorTextDisabled:"#00000080"},components:{Layout:{bodyBg:Ye,headerBg:Ye},Tag:{marginXS:0}}},children:he.jsx(D,{children:he.jsx(z,{className:(e.className||"")+" min-h-screen w-full",style:e.style,children:e.children})})})}):null},He=function(e){var t=Me().setBitacora,a=r(!1),i=a[0],s=a[1],l=o((function(){return Array.isArray(e.movimientos)&&0!==e.movimientos.length}),[e.movimientos]),c=function(){l&&t(e.movimientos)};return n((function(){var r;s(null===(r=e.movimientos)||void 0===r?void 0:r.some((function(e){return!!e.mostrarBadge})))}),[e.movimientos]),he.jsx(W,{dot:i,children:e.usarIcono?he.jsx(N,{title:"Ver historial",className:l?"":"text-gray-300 cursor-not-allowed",onClick:c}):he.jsx(F,{icon:he.jsx(N,{}),title:"Ver historial",disabled:!l,onClick:c})})},Je=function(e){var n=L.useFormInstance(),t=r([]),a=t[0],i=t[1],s=o((function(){var r=e.rules||[];switch(e.type){case"ruc":return{label:"RUC",placeholder:"Ingresar el RUC",max:13,rules:ue(ue([],r,!0),[Re.pattern(/^[0-9]{13}$/,"El ruc debe tener 13 caracteres numéricos")],!1)};case"ci":return{label:"Cédula",placeholder:"Ingresar la cédula",max:10,rules:ue(ue([],r,!0),[Re.pattern(/^[0-9]{10}$/,"La cédula debe tener 10 caracteres numéricos")],!1)};default:return{label:"Nº identificación",placeholder:"Ingresar el número de identificación",rules:r}}}),[e.type]),l=te((function(r){return le(void 0,void 0,void 0,(function(){var n,t,o;return ce(this,(function(s){switch(s.label){case 0:if(n=ke("utils"),!e.campoNombre||r.length<6||!["ci","ruc"].includes(e.type))return 0!==a.length&&i([]),[2];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n.get("/clientes/buscar",{params:{identificador:r,tipo:"ci"===e.type?"cedula":"ruc"}})];case 2:return t=s.sent().data,i(t.map((function(e){return{value:e.identificador,nombre:e.nombre,label:he.jsxs(he.Fragment,{children:[he.jsx("b",{children:e.identificador}),he.jsx("br",{}),e.nombre]})}}))),[3,4];case 3:return o=s.sent(),console.error(o),[3,4];case 4:return[2]}}))}))}),500);return he.jsx(L.Item,se({name:e.name,rules:s.rules,normalize:function(e){return e.trim().toUpperCase()},className:e.className,dependencies:e.dependencies},e.hiddenLabel?{}:{label:e.label||s.label},{children:he.jsx(A,{options:a,onSelect:function(r,t){n.setFieldValue(e.campoNombre,t.nombre)},onSearch:l,placeholder:e.placeholder||s.placeholder,maxLength:s.max,disabled:e.disabled,onChange:function(r){var n;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,r)}})}))},Qe=function(e){var n=r(),t=n[0],o=n[1];return he.jsx(Y,{title:"Click para confirmar",open:!!t,children:he.jsx(F,{title:e.title,disabled:e.disabled,danger:!!t,icon:t?he.jsx(P,{}):he.jsx(b,{}),onClick:function(){if(t)e.onConfirm(),o(void 0),clearTimeout(t);else{var r=setTimeout((function(){return o(void 0)}),1500);o(r)}}})})},Ke=function(e){var n=r(!0),t=n[0],o=n[1],a=r(!1),i=a[0],s=a[1];return he.jsxs(he.Fragment,{children:[e.sidebar?he.jsxs(z.Sider,{style:{overflow:"auto",height:"100vh",position:"fixed",insetInlineStart:0,top:0,bottom:0,scrollbarWidth:"thin",scrollbarColor:"unset",zIndex:10},breakpoint:"md",collapsedWidth:0,trigger:null,collapsed:t,collapsible:!0,width:"230px",onBreakpoint:function(e){o(e),s(e)},children:[he.jsx(c,{href:e.sidebar.title.href,children:he.jsx("div",{className:"flex justify-center items-center h-16 text-lg text-white font-bold",children:he.jsx("div",{children:e.sidebar.title.label})})}),e.sidebar.menu]}):null,he.jsxs(z,{className:i||t?"ml-0":"ml-[230px]",onClick:!t&&i?function(e){e.stopPropagation(),e.preventDefault(),o(!0)}:void 0,children:[e.navbar?he.jsx(z.Header,{className:"border-b top-0 !z-[2] sticky !px-4",children:he.jsxs("div",{className:"flex justify-between items-center h-full",children:[he.jsx("div",{children:he.jsx(F,{type:"text",icon:t?he.jsx(E,{}):he.jsx(O,{}),onClick:function(){return o(!t)},children:e.navbar.title})}),e.navbar.options?he.jsx("div",{children:e.navbar.options}):he.jsx("div",{})]})}):null,he.jsx(z.Content,{className:"m-4 md:m-8 xl:mx-16 xl:my-8",children:e.children}),e.footer?he.jsx(z.Footer,{className:"!text-gray-500",children:e.footer}):null]})]})},Xe=a(null);function Ge(){return i(Xe)}var Ze=function(e){var t=u(),o=r(!1),a=o[0],i=o[1],s=r(),l=s[0],c=s[1];n((function(){le(void 0,void 0,void 0,(function(){var e,r,n,t;return ce(this,(function(o){switch(o.label){case 0:e=ke("restify"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Promise.all([e.get("/v3/auth/user"),e.get("/v3/businesses/me/configurations",{params:{fields:"comprobantes nDecimals invoice"}})])];case 2:return r=o.sent(),n=r[0].data,t=r[1].data,n.configuraciones=t,[2,n];case 3:return o.sent(),[2,null];case 4:return[2]}}))})).then((function(r){r?(i(!0),c(r)):Oe(t,e.pathLogin)}))}),[]);return a?he.jsx(Xe.Provider,{value:{business:l,nombreEmpresa:l.business,nombreUsuario:l.user,testEnviroment:l.configs.useTestEnviroment,usuarioEsAdmin:"admin"===l.userType,hasModule:function(e,r){var n=null==l?void 0:l.modules.find((function(r){return r.key===e}));return!!n&&ne(r).isAfter(n.operationDate)}},children:e.children}):he.jsx("div",{className:"w-full h-screen flex items-center justify-center",children:"Cargando..."})},er=function(e){var n=r(!1),t=n[0],o=n[1],a=X(t&&e.autocompletar?"/v4/administrative/clients/nombres-info-adicional":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.map((function(e){return{label:e,value:e}}))]}}))}))})).data,i=void 0===a?[]:a;return he.jsx(L.List,{name:e.name,children:function(r,n){return he.jsxs("div",{children:[he.jsxs("div",{className:"flex items-center justify-between mb-4",children:[he.jsx("div",{className:"text-base font-bold",children:"Información adicional"}),he.jsx(F,{type:"dashed",onClick:function(){return n.add({})},children:"Agregar"})]}),he.jsxs(V,{dataSource:r,rowClassName:"align-top",bordered:!0,children:[he.jsx(V.Column,{title:"Nombre",render:function(r){var n=r.name;return he.jsx(L.Item,{className:"m-0 p-0",name:[n,"nombre"],rules:[Re.required()],children:e.autocompletar?he.jsx(A,{options:i,maxLength:300,placeholder:"Ingresar el nombre",onFocus:function(){return o(!0)}}):he.jsx(T,{maxLength:300,placeholder:"Ingresar el nombre"})})}},"name"),he.jsx(V.Column,{title:"Descripción",render:function(e){var r=e.name;return he.jsx(L.Item,{className:"m-0 p-0",name:[r,"valor"],rules:[Re.required()],children:he.jsx(T,{placeholder:"Ingresar la descripción"})})}},"description"),he.jsx(V.Column,{align:"center",width:1,render:function(e){var r=e.name;return he.jsx(Qe,{title:"¿Eliminar información adicional?",onConfirm:function(){return n.remove(r)}})}},"opciones")]})]})}})},rr=function(e){var r=e.form,t=L.useWatch("address",r),o=L.useWatch("direcciones",r);return n((function(){var e=setTimeout((function(){1===o.length&&r.setFieldValue("address",o[0])}),500);return function(){return clearTimeout(e)}}),[o]),he.jsx(L.List,{name:"direcciones",children:function(e,n){var a,i=n.add,s=n.remove;return he.jsxs(he.Fragment,{children:[he.jsxs("div",{className:"flex items-center justify-between mb-6",children:[he.jsx(R.Title,{level:3,className:"!m-0",children:"Direcciones"}),he.jsx(F,{type:"dashed",onClick:function(){return i(null)},children:"Agregar"})]}),0===(null===(a=o||[])||void 0===a?void 0:a.length)?he.jsx(Q,{className:"my-8",description:"No hay direcciones"}):e.map((function(e){return he.jsxs("div",{className:"flex flex-wrap md:flex-nowrap items-center gap-y-2 gap-x-6 mb-6 last:mb-0",children:[he.jsx(L.Item,{name:e.name,rules:[Re.required()],className:"mb-0 w-full",children:he.jsx(T,{placeholder:"Ingresar la dirección"})}),o&&he.jsx(K,{checked:t===o[e.name],className:"whitespace-nowrap",onChange:function(n){return t=n.target.checked,a=e.name,void(t&&r.setFieldValue("address",o[a]));var t,a},children:"Por defecto"}),he.jsx(R.Link,{className:"whitespace-nowrap",onClick:function(){o[e.name]===t&&r.setFieldValue("address",""),s(e.name)},children:"Eliminar"})]},"direcciones"+e.key)}))]})}})},nr=function(){var e=r(!1),n=e[0],t=e[1],o=X(n?"/v4/administrative/clients/etiquetas":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.etiquetas]}}))}))})).data,a=void 0===o?[]:o;return he.jsx(L.Item,{name:"etiquetas",label:"Etiqueta",children:he.jsx(A,{options:a.map((function(e){return{label:e,value:e}})),placeholder:"Ingresar o seleccionar una etiqueta",onFocus:function(){return t(!0)}})})},tr=s((function(e,r){var t,a,i=u(),s=Ge().hasModule,c=qe({endpoint:"/v3/administrative/"+e.type+"s",soloParaInsertar:!0===e.ocultarBotones,params:{$getAllFields:"true"},data:{id:"",idType:"04",subjectType:"01",direcciones:[],address:"",name:void 0}}),d=L.useWatch("idType",c.form),f="client"===e.type,p="provider"===e.type,m="transporter"===e.type,v=X("08"===d?"/v3/administrative/retenciones-v2/get-options":null,(function(e){return le(void 0,void 0,void 0,(function(){return ce(this,(function(r){switch(r.label){case 0:return[4,ke(e).get(e)];case 1:return[2,r.sent().data.PaisesParaisosFiscales.map((function(e){return{label:e.description,value:parseInt(e.id)}}))]}}))}))})).data,h=o((function(){switch(d){case"04":return"ruc";case"05":return"ci";default:return"other"}}),[d]);l(r,(function(){return{insertar:c}}));var y="grid grid-cols-1 md:grid-cols-2 gap-x-6";return n((function(){var r=JSON.parse(JSON.stringify(i.query)),n=r.name,t=r.idType,o=r.identificador;t&&o&&n&&e.type}),[i.query]),c.isReady?he.jsxs(L,se({},c.formProps,{layout:"vertical",children:[he.jsxs("div",{className:y,children:[he.jsx(L.Item,{name:"idType",label:"Tipo de identificación",rules:[Re.required()],children:he.jsx(H,{options:null===(t=c.options.TiposDeIdentificacion)||void 0===t?void 0:t.map((function(e){return{label:e.description,value:e.id}}))})}),he.jsx(Je,{name:"id",campoNombre:"name",type:h,rules:[Re.required()]}),he.jsx(L.Item,{name:"name",label:"Nombres / Razón social",rules:[Re.required()],children:he.jsx(T,{placeholder:"Ingresar la razón social"})}),he.jsx(L.Item,{name:"subjectType",label:"Tipo de sujeto",rules:[Re.required()],children:he.jsx(H,{options:null===(a=c.options.TiposDePersona)||void 0===a?void 0:a.map((function(e){return{label:e.description,value:e.id}}))})})]}),he.jsx(R.Title,{level:3,children:"Información de contacto"}),he.jsxs("div",{className:y,children:[he.jsx(L.Item,{name:"phone",label:"Télefono 1",children:he.jsx(T,{type:"phone",placeholder:"Ingresar el teléfono 1"})}),f?he.jsx(L.Item,{name:"cellphone",label:"Télefono 2",children:he.jsx(T,{type:"phone",placeholder:"Ingresar el teléfono 2"})}):null,he.jsx(L.Item,{name:"email",label:"Correo electrónico",rules:[Re.email()],normalize:function(e){return e.trim()},children:he.jsx(T,{placeholder:"Ingresar el correo electrónico"})}),!m&&he.jsx(L.Item,{name:"optionalEmail",label:"Correos electrónicos alternativos",rules:[Re.correos()],children:he.jsx(H,{mode:"tags",placeholder:"Ingresar uno o varios correos alternativos",open:!1,suffixIcon:null})})]}),he.jsx(L.Item,{name:"address",noStyle:!0,children:he.jsx(T,{type:"hidden"})}),!m&&he.jsx(rr,{form:c.form}),he.jsx(R.Title,{level:3,children:"Otra información"}),he.jsxs("div",{className:y,children:[f&&s("treasury")&&he.jsx(L.Item,{name:"creditQuotaDollars",label:"Cupo de crédito en dólares",children:he.jsx(J,{className:"w-full",precision:2,min:0,placeholder:"Ingresar el cupo de crédito en dólares"})}),f&&s("treasury")&&he.jsx(L.Item,{name:"creditQuotaDays",label:"Cupo de crédito en días",children:he.jsx(J,{className:"w-full",precision:0,min:0,placeholder:"Ingresar el cupo de crédito en días"})}),p&&s("contability")&&he.jsx(Ae,{name:"accountingAccount",type:"cuentas-contables"}),p&&s("treasury")&&he.jsx(L.Item,{name:"diasPlazo",label:"Días plazo",children:he.jsx(J,{className:"w-full",precision:0,min:0,placeholder:"Ingresar los días plazo"})}),m?he.jsx(L.Item,{name:"licensePlate",label:"Placa",rules:[Re.required()],children:he.jsx(H,{mode:"tags",placeholder:"Ingresar una o varias placas",open:!1,suffixIcon:null})}):null,f&&he.jsx(L.Item,{name:"descuento",label:"Descuento adicional para facturas (%)",children:he.jsx(J,{className:"w-full",precision:2,max:100,suffix:"%",placeholder:"Ingresar el descuento"})}),f&&"08"===d&&he.jsx(L.Item,{name:"paisExportacion",label:"País de exportación",children:he.jsx(H,{allowClear:!0,showSearch:!0,placeholder:"Seleccionar el país de exportación",optionFilterProp:"children",filterOption:function(e,r){var n;return(null!==(n=null==r?void 0:r.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())},options:v})}),f&&he.jsx(nr,{})]}),he.jsx("div",{className:"mb-5",children:he.jsx(er,{name:"informacionAdicional",autocompletar:!0})}),e.ocultarBotones?null:c.BotonesPorDefecto]})):c.ModoCarga}));export{De as $filtros,Re as $reglas,Qe as BotonConfirmacion,He as BotonMovimientos,Ze as ContextoEmpresa,tr as FormularioPersonas,ge as Header,Je as IdentificadorPersona,Ke as LayoutBase,Ae as Seeker,Ve as TemaPrincipal,xe as configurarUtils,Ie as crearToken,Ce as destruirToken,Ne as getApiEndpoint,ke as getAxios,Pe as getNestedPath,Ee as hashear,Te as nDecimals,Oe as redireccionarLogin,Ge as useContextoEmpresa,Me as useFrontendUtils,we as useUtils,qe as useVistaInsertar,Le as useVistaPrincipal};
|
|
11
11
|
//# sourceMappingURL=index.js.map
|