currency_contry_exchange 1.8.0 → 1.8.2
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/main.cjs +1 -1
- package/dist/main.iife.js +1 -1
- package/dist/main.js +3 -2
- package/dist/main.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var no=Object.defineProperty;var so=(e,t,o)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ne=(e,t,o)=>so(e,typeof t!="symbol"?t+"":t,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ro={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},Pe={euro:"EUR"},qe={thousandSeparator:",",decimalSeparator:"."},Ue={thousandSeparator:".",decimalSeparator:","},_e={pe:"pe",cl:"cl"},io={pe:"USD",cl:"","":""},P=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==_e.pe||t==_e.cl?t:""},ao={pe:({amount:e="",typeCurrenzy:t=""})=>t==Pe.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},lo={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===Pe.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},co=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},uo={pe:(e="")=>co(e),cl:(e="")=>e,"":(e="")=>e};function wo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function fo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function at(e,t){return e==="simple"?wo(t):e==="compuesto"?fo(t):0}function ge(e,t,o){return t.map(n=>({id:n.id,result:o(at(e,n))}))}function be(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(at(e,t))}function ee(e){return Number.isInteger(e)?e:Math.ceil(e)}function We(e){return Math.round(e*100)/100}const mo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,We):be(e,{tasa:o,plazo:n,anticipo:t},We),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,ee):be(e,{tasa:o,plazo:n,anticipo:t},ee),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,ee):be(e,{tasa:o,plazo:n,anticipo:t},ee)},ve={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...qe,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==Pe.euro?{...qe,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{...Ue,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({...Ue,decimalScale:e,fixedDecimalScale:t})},ho={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ye(e),"":e=>Ye(e)},Ye=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
1
|
+
"use strict";var no=Object.defineProperty;var so=(e,t,o)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ne=(e,t,o)=>so(e,typeof t!="symbol"?t+"":t,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ro={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC",pagador:"Gran Pagador"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},Pe={euro:"EUR"},qe={thousandSeparator:",",decimalSeparator:"."},Ue={thousandSeparator:".",decimalSeparator:","},_e={pe:"pe",cl:"cl"},io={pe:"USD",cl:"","":""},P=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==_e.pe||t==_e.cl?t:""},ao={pe:({amount:e="",typeCurrenzy:t=""})=>t==Pe.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},lo={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===Pe.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},co=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},uo={pe:(e="")=>co(e),cl:(e="")=>e,"":(e="")=>e};function wo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function fo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function at(e,t){return e==="simple"?wo(t):e==="compuesto"?fo(t):0}function ge(e,t,o){return t.map(n=>({id:n.id,result:o(at(e,n))}))}function be(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(at(e,t))}function ee(e){return Number.isInteger(e)?e:e-Math.floor(e)>=.5?Math.ceil(e):Math.floor(e)}function We(e){return Math.round(e*100)/100}const mo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,We):be(e,{tasa:o,plazo:n,anticipo:t},We),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,ee):be(e,{tasa:o,plazo:n,anticipo:t},ee),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ge(e,s,ee):be(e,{tasa:o,plazo:n,anticipo:t},ee)},ve={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...qe,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==Pe.euro?{...qe,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{...Ue,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({...Ue,decimalScale:e,fixedDecimalScale:t})},ho={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ye(e),"":e=>Ye(e)},Ye=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
2
2
|
* sweetalert2 v11.22.0
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/function lt(e,t,o){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function po(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ke(e,t){return e.get(lt(e,t))}function go(e,t,o){po(e,t),t.set(e,o)}function bo(e,t,o){return e.set(lt(e,t),o),o}const vo=100,l={},yo=()=>{l.previousActiveElement instanceof HTMLElement?(l.previousActiveElement.focus(),l.previousActiveElement=null):document.body&&document.body.focus()},ko=e=>new Promise(t=>{if(!e)return t();const o=window.scrollX,n=window.scrollY;l.restoreFocusTimeout=setTimeout(()=>{yo(),t()},vo),window.scrollTo(o,n)}),ct="swal2-",Co=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"],r=Co.reduce((e,t)=>(e[t]=ct+t,e),{}),xo=["success","warning","info","question","error"],oe=xo.reduce((e,t)=>(e[t]=ct+t,e),{}),dt="SweetAlert2:",Be=e=>e.charAt(0).toUpperCase()+e.slice(1),b=e=>{console.warn(`${dt} ${typeof e=="object"?e.join(" "):e}`)},F=e=>{console.error(`${dt} ${e}`)},Ze=[],Ao=e=>{Ze.includes(e)||(Ze.push(e),b(e))},ut=(e,t=null)=>{Ao(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},we=e=>typeof e=="function"?e():e,$e=e=>e&&typeof e.toPromise=="function",Y=e=>$e(e)?e.toPromise():Promise.resolve(e),Le=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${r.container}`),K=e=>{const t=v();return t?t.querySelector(e):null},C=e=>K(`.${e}`),d=()=>C(r.popup),q=()=>C(r.icon),Eo=()=>C(r["icon-content"]),wt=()=>C(r.title),Te=()=>C(r["html-container"]),ft=()=>C(r.image),Se=()=>C(r["progress-steps"]),fe=()=>C(r["validation-message"]),$=()=>K(`.${r.actions} .${r.confirm}`),U=()=>K(`.${r.actions} .${r.cancel}`),H=()=>K(`.${r.actions} .${r.deny}`),Po=()=>C(r["input-label"]),_=()=>K(`.${r.loader}`),Z=()=>C(r.actions),mt=()=>C(r.footer),me=()=>C(r["timer-progress-bar"]),Ie=()=>C(r.close),Bo=`
|
package/dist/main.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var MyLib=function(L){"use strict";var nr=Object.defineProperty;var sr=(L,T,I)=>T in L?nr(L,T,{enumerable:!0,configurable:!0,writable:!0,value:I}):L[T]=I;var no=(L,T,I)=>sr(L,typeof T!="symbol"?T+"":T,I);const T={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},I={euro:"EUR"},Ue={thousandSeparator:",",decimalSeparator:"."},_e={thousandSeparator:".",decimalSeparator:","},We={pe:"pe",cl:"cl"},so={pe:"USD",cl:"","":""},E=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==We.pe||t==We.cl?t:""},ro={pe:({amount:e="",typeCurrenzy:t=""})=>t==I.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},io={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===I.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},ao=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},lo={pe:(e="")=>ao(e),cl:(e="")=>e,"":(e="")=>e};function co({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function uo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function Ye(e,t){return e==="simple"?co(t):e==="compuesto"?uo(t):0}function ye(e,t,o){return t.map(n=>({id:n.id,result:o(Ye(e,n))}))}function ke(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(Ye(e,t))}function oe(e){return Number.isInteger(e)?e:Math.ceil(e)}function Ke(e){return Math.round(e*100)/100}const wo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,Ke):ke(e,{tasa:o,plazo:n,anticipo:t},Ke),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe)},Ce={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...Ue,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==I.euro?{...Ue,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{..._e,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({..._e,decimalScale:e,fixedDecimalScale:t})},fo={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ze(e),"":e=>Ze(e)},Ze=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
1
|
+
var MyLib=function(L){"use strict";var nr=Object.defineProperty;var sr=(L,T,I)=>T in L?nr(L,T,{enumerable:!0,configurable:!0,writable:!0,value:I}):L[T]=I;var no=(L,T,I)=>sr(L,typeof T!="symbol"?T+"":T,I);const T={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC",pagador:"Gran Pagador"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},I={euro:"EUR"},Ue={thousandSeparator:",",decimalSeparator:"."},_e={thousandSeparator:".",decimalSeparator:","},We={pe:"pe",cl:"cl"},so={pe:"USD",cl:"","":""},E=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==We.pe||t==We.cl?t:""},ro={pe:({amount:e="",typeCurrenzy:t=""})=>t==I.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},io={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===I.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},ao=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},lo={pe:(e="")=>ao(e),cl:(e="")=>e,"":(e="")=>e};function co({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function uo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function Ye(e,t){return e==="simple"?co(t):e==="compuesto"?uo(t):0}function ye(e,t,o){return t.map(n=>({id:n.id,result:o(Ye(e,n))}))}function ke(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(Ye(e,t))}function oe(e){return Number.isInteger(e)?e:e-Math.floor(e)>=.5?Math.ceil(e):Math.floor(e)}function Ke(e){return Math.round(e*100)/100}const wo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,Ke):ke(e,{tasa:o,plazo:n,anticipo:t},Ke),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe)},Ce={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...Ue,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==I.euro?{...Ue,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{..._e,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({..._e,decimalScale:e,fixedDecimalScale:t})},fo={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ze(e),"":e=>Ze(e)},Ze=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
2
2
|
* sweetalert2 v11.22.0
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/function Xe(e,t,o){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function mo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ge(e,t){return e.get(Xe(e,t))}function ho(e,t,o){mo(e,t),t.set(e,o)}function po(e,t,o){return e.set(Xe(e,t),o),o}const go=100,a={},bo=()=>{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},vo=e=>new Promise(t=>{if(!e)return t();const o=window.scrollX,n=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{bo(),t()},go),window.scrollTo(o,n)}),Je="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=Je+t,e),{}),ne=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=Je+t,e),{}),Qe="SweetAlert2:",xe=e=>e.charAt(0).toUpperCase()+e.slice(1),b=e=>{console.warn(`${Qe} ${typeof e=="object"?e.join(" "):e}`)},z=e=>{console.error(`${Qe} ${e}`)},et=[],yo=e=>{et.includes(e)||(et.push(e),b(e))},tt=(e,t=null)=>{yo(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},se=e=>typeof e=="function"?e():e,Ae=e=>e&&typeof e.toPromise=="function",X=e=>Ae(e)?e.toPromise():Promise.resolve(e),Ee=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${r.container}`),G=e=>{const t=v();return t?t.querySelector(e):null},k=e=>G(`.${e}`),d=()=>k(r.popup),N=()=>k(r.icon),ko=()=>k(r["icon-content"]),ot=()=>k(r.title),Pe=()=>k(r["html-container"]),nt=()=>k(r.image),Be=()=>k(r["progress-steps"]),re=()=>k(r["validation-message"]),B=()=>G(`.${r.actions} .${r.confirm}`),q=()=>G(`.${r.actions} .${r.cancel}`),F=()=>G(`.${r.actions} .${r.deny}`),Co=()=>k(r["input-label"]),U=()=>G(`.${r.loader}`),J=()=>k(r.actions),st=()=>k(r.footer),ie=()=>k(r["timer-progress-bar"]),$e=()=>k(r.close),xo=`
|
package/dist/main.js
CHANGED
|
@@ -16,7 +16,8 @@ const ro = {
|
|
|
16
16
|
documento: "Documento",
|
|
17
17
|
sii: "SUNAT",
|
|
18
18
|
anfac: "APEFAC",
|
|
19
|
-
sbif: "RCC"
|
|
19
|
+
sbif: "RCC",
|
|
20
|
+
pagador: "Gran Pagador"
|
|
20
21
|
},
|
|
21
22
|
cl: {
|
|
22
23
|
cliente: "Cliente",
|
|
@@ -137,7 +138,7 @@ function be(e, t, o) {
|
|
|
137
138
|
return e !== "simple" && e !== "compuesto" ? "" : o(at(e, t));
|
|
138
139
|
}
|
|
139
140
|
function ee(e) {
|
|
140
|
-
return Number.isInteger(e) ? e : Math.ceil(e);
|
|
141
|
+
return Number.isInteger(e) ? e : e - Math.floor(e) >= 0.5 ? Math.ceil(e) : Math.floor(e);
|
|
141
142
|
}
|
|
142
143
|
function We(e) {
|
|
143
144
|
return Math.round(e * 100) / 100;
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(E=typeof globalThis<"u"?globalThis:E||self,k(E.MyLib={}))})(this,function(E){"use strict";var nr=Object.defineProperty;var sr=(E,k,I)=>k in E?nr(E,k,{enumerable:!0,configurable:!0,writable:!0,value:I}):E[k]=I;var no=(E,k,I)=>sr(E,typeof k!="symbol"?k+"":k,I);const k={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},I={euro:"EUR"},Ue={thousandSeparator:",",decimalSeparator:"."},_e={thousandSeparator:".",decimalSeparator:","},We={pe:"pe",cl:"cl"},so={pe:"USD",cl:"","":""},B=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==We.pe||t==We.cl?t:""},ro={pe:({amount:e="",typeCurrenzy:t=""})=>t==I.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},io={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===I.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},ao=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},lo={pe:(e="")=>ao(e),cl:(e="")=>e,"":(e="")=>e};function co({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function uo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function Ye(e,t){return e==="simple"?co(t):e==="compuesto"?uo(t):0}function ye(e,t,o){return t.map(n=>({id:n.id,result:o(Ye(e,n))}))}function ke(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(Ye(e,t))}function oe(e){return Number.isInteger(e)?e:Math.ceil(e)}function Ke(e){return Math.round(e*100)/100}const wo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,Ke):ke(e,{tasa:o,plazo:n,anticipo:t},Ke),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe)},Ce={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...Ue,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==I.euro?{...Ue,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{..._e,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({..._e,decimalScale:e,fixedDecimalScale:t})},fo={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ze(e),"":e=>Ze(e)},Ze=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
1
|
+
(function(E,k){typeof exports=="object"&&typeof module<"u"?k(exports):typeof define=="function"&&define.amd?define(["exports"],k):(E=typeof globalThis<"u"?globalThis:E||self,k(E.MyLib={}))})(this,function(E){"use strict";var nr=Object.defineProperty;var sr=(E,k,I)=>k in E?nr(E,k,{enumerable:!0,configurable:!0,writable:!0,value:I}):E[k]=I;var no=(E,k,I)=>sr(E,typeof k!="symbol"?k+"":k,I);const k={pe:{cliente:"Cedente",clientes:"Cedentes",deudor:"Aceptante",deudores:"Aceptantes",rut:"RUC","rut cliente":"RUC Cedente",iva:"IGV",region:"Departamento",comuna:"Distrito",dicom:"Sentinel",documento:"Documento",sii:"SUNAT",anfac:"APEFAC",sbif:"RCC",pagador:"Gran Pagador"},cl:{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"},"":{cliente:"Cliente",deudor:"Deudor",clientes:"Clientes",deudores:"Deudores",rut:"RUT","rut cliente":"RUT Cliente",iva:"IVA",region:"Región",comuna:"Comuna",dicom:"Dicom",documento:"RUT",sii:"SII",anfac:"ANFAC",sbif:"SBIF"}},I={euro:"EUR"},Ue={thousandSeparator:",",decimalSeparator:"."},_e={thousandSeparator:".",decimalSeparator:","},We={pe:"pe",cl:"cl"},so={pe:"USD",cl:"","":""},B=e=>{const t=e==null?void 0:e.toLocaleLowerCase().trim();return t==We.pe||t==We.cl?t:""},ro={pe:({amount:e="",typeCurrenzy:t=""})=>t==I.euro?e==null?void 0:e.replaceAll(".","").replaceAll(",","."):e==null?void 0:e.replaceAll(",",""),cl:({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","."),"":({amount:e=""})=>e==null?void 0:e.replaceAll(".","").replaceAll(",","")},io={cl:({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)},pe:({currenzy:e="",typeCurrenzy:t=""})=>{const o=parseFloat(e.toString());return t===I.euro?new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o):new Intl.NumberFormat("es-PE",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(o)},"":({currenzy:e=""})=>{const t=parseFloat(e.toString());return new Intl.NumberFormat("es-CL",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}},ao=e=>{let t=e.toUpperCase().replace(/[^A-Z0-9-]/g,"");const o=t.split("-");o.length>1&&(t=`${o[0]}-${o.slice(1).join("")}`),t.length>4&&!t.includes("-")&&(t=`${t.substring(0,4)}-${t.substring(4)}`);const n=t.indexOf("-");if(n>-1&&n>4){const s=t.replace(/-/g,"");t=`${s.substring(0,4)}-${s.substring(4)}`}else n===-1&&t.length>4&&(t=`${t.substring(0,4)}-${t.substring(4)}`);return t},lo={pe:(e="")=>ao(e),cl:(e="")=>e,"":(e="")=>e};function co({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=(Number(e)||0)/100,s=Number(t)||0,i=Number(o)||0;return n*(s/30)*i}function uo({tasa:e=0,plazo:t=0,anticipo:o=0}){const n=Number(e)||0,s=Number(t)||0,i=Number(o)||0;return(Math.pow(1+n/100,s/30)-1)*i}function Ye(e,t){return e==="simple"?co(t):e==="compuesto"?uo(t):0}function ye(e,t,o){return t.map(n=>({id:n.id,result:o(Ye(e,n))}))}function ke(e,t,o){return e!=="simple"&&e!=="compuesto"?"":o(Ye(e,t))}function oe(e){return Number.isInteger(e)?e:e-Math.floor(e)>=.5?Math.ceil(e):Math.floor(e)}function Ke(e){return Math.round(e*100)/100}const wo={pe:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,Ke):ke(e,{tasa:o,plazo:n,anticipo:t},Ke),cl:({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe),"":({type:e,anticipo:t,tasa:o,plazo:n,array_interes:s})=>Array.isArray(s)&&s.length>0?ye(e,s,oe):ke(e,{tasa:o,plazo:n,anticipo:t},oe)},Ce={pe:({decimalScale:e=2,fixedDecimalScale:t=2})=>({...Ue,decimalScale:e,fixedDecimalScale:t}),cl:({typeCurrenzy:e="",decimalScale:t=0,fixedDecimalScale:o=0})=>e==I.euro?{...Ue,decimalScale:t!=0?t:2,fixedDecimalScale:o!=0?o:2}:{..._e,decimalScale:t,fixedDecimalScale:o},"":({decimalScale:e=0,fixedDecimalScale:t=0})=>({..._e,decimalScale:e,fixedDecimalScale:t})},fo={pe:e=>(e==null?void 0:e.replaceAll(".","").replaceAll("-",""))<2e10,cl:e=>Ze(e),"":e=>Ze(e)},Ze=(e="")=>{var o;return(e.includes(".")?Number((o=e.replace(/\./g,""))==null?void 0:o.split("-")[0]):Number(e==null?void 0:e.split("-")[0]))<3e7};/*!
|
|
2
2
|
* sweetalert2 v11.22.0
|
|
3
3
|
* Released under the MIT License.
|
|
4
4
|
*/function Xe(e,t,o){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function mo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ge(e,t){return e.get(Xe(e,t))}function ho(e,t,o){mo(e,t),t.set(e,o)}function po(e,t,o){return e.set(Xe(e,t),o),o}const go=100,a={},bo=()=>{a.previousActiveElement instanceof HTMLElement?(a.previousActiveElement.focus(),a.previousActiveElement=null):document.body&&document.body.focus()},vo=e=>new Promise(t=>{if(!e)return t();const o=window.scrollX,n=window.scrollY;a.restoreFocusTimeout=setTimeout(()=>{bo(),t()},go),window.scrollTo(o,n)}),Je="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=Je+t,e),{}),ne=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=Je+t,e),{}),Qe="SweetAlert2:",xe=e=>e.charAt(0).toUpperCase()+e.slice(1),b=e=>{console.warn(`${Qe} ${typeof e=="object"?e.join(" "):e}`)},z=e=>{console.error(`${Qe} ${e}`)},et=[],yo=e=>{et.includes(e)||(et.push(e),b(e))},tt=(e,t=null)=>{yo(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},se=e=>typeof e=="function"?e():e,Ae=e=>e&&typeof e.toPromise=="function",X=e=>Ae(e)?e.toPromise():Promise.resolve(e),Ee=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${r.container}`),G=e=>{const t=v();return t?t.querySelector(e):null},C=e=>G(`.${e}`),d=()=>C(r.popup),N=()=>C(r.icon),ko=()=>C(r["icon-content"]),ot=()=>C(r.title),Pe=()=>C(r["html-container"]),nt=()=>C(r.image),Be=()=>C(r["progress-steps"]),re=()=>C(r["validation-message"]),T=()=>G(`.${r.actions} .${r.confirm}`),q=()=>G(`.${r.actions} .${r.cancel}`),F=()=>G(`.${r.actions} .${r.deny}`),Co=()=>C(r["input-label"]),U=()=>G(`.${r.loader}`),J=()=>C(r.actions),st=()=>C(r.footer),ie=()=>C(r["timer-progress-bar"]),$e=()=>C(r.close),xo=`
|