{"version":3,"sources":["webpack:///./src/components/mixins/inputHelper.js","webpack:///./src/views/supplier/AgentsPage.vue","webpack:///./src/components/supplier/AgentsList.vue","webpack:///src/components/supplier/AgentsList.vue","webpack:///./src/components/supplier/AgentsList.vue?816f","webpack:///./src/components/supplier/AgentsList.vue?12fb","webpack:///src/views/supplier/AgentsPage.vue","webpack:///./src/views/supplier/AgentsPage.vue?976d","webpack:///./src/views/supplier/AgentsPage.vue?28eb","webpack:///./src/components/mixins/formatHelper.js"],"names":["methods","reg","value","caps","trim","this","upper","trimSpaces","cleanTildes","toUpperCase","s","r","toLowerCase","replace","RegExp","uppercase","render","_vm","_c","_self","attrs","staticClass","_v","staticRenderFns","ref","itemsPerPage","agents","scopedSlots","_u","key","fn","data","_l","tr","indextr","_s","name","email","phoneModel","country_calling_code","phoneFormat","phone","last","on","$event","sendEmail","stopPropagation","editAgentRequest","deleteAgentRequest","slot","addAgentRequest","currentPage","length","queriedItems","itemsPerPageDefinitions","it","columns","col","idx","sortable","title","formPromptTitle","showFormPrompt","onSaveError","formMssg","formPromptIndication","_g","directives","rawName","expression","hasError","errorText","isSuccess","model","formAgent","callback","$$v","$set","input","e","preferredCountries","onSelect","formMode","invalidEmail","_e","saveFormAgent","closeFormPrompt","showAssignAgentPrompt","deletingAgentName","getAgentsList","noDataPlaceholder","selectPlaceholder","agent_id","item","index","text","assignAgent","closeAgentPrompt","failed","columnDefinitions","props","mixins","components","allAgents","orderKey","projectIdToDelete","filtersSelected","isMounted","loading","resolutionClientCause","resolutionCause","deletingAgent","agentSelectedToEdit","id","dialCode","computed","watch","axios","then","response","catch","error","deleting_agent_id","new_agent_id","timeout","mssg","type","color","acceptText","cancelText","accept","openSelectAgentPrompt","ok","resetFormAgent","component","AgentsList","format_price","decimales","val","toFixed","toString","costFormat","costFormatNoCents","prcgFormat","decimalsFormat","explicitMoneyFormat","mxnFormat","parseInt","moneyFormat","decimalPercentFormat","roundedFormat","c","cd","Math","round","substr","phoneFormatV2","visibleLastNChars","chars","valueString","phoneLength","firstChars","repeat","last4Digits","slice","visibleOnlyLastNChars","capitalizeFirstLetter","arr","split","i","charAt","join","isValidRfcFormat","rfc","patternPM","patternPF","match","isValidRfcFormatByPersonType","isMoral","pattern","genericRFC1","genericRFC2","isValidCurpFormat","curp","isValid","diccionario","lngSuma","lngDigito","indexOf","verifierDigit","anonymousFormatPhone","genderTranslate","getLoanTypeIcon","loanType","loanTypeIcons","url","filename","icon","find","lt","getAmountWithNoCommissionTax","amount","processingAdministrationCommission","mexicoTaxIva","commissionWithTaxPercentage","percentage","amountNoCommision"],"mappings":"kHAAe,QACbA,QAAS,CACPC,IAAIC,EAAOC,GAAO,EAAOC,GAAO,GAC9B,OAAY,MAATF,GAA0B,IAATA,EACX,GAGNC,EACME,KAAKC,MAAMJ,EAAOE,GAEnBA,EACCC,KAAKE,WAAWL,GAGhBA,GAGXI,MAAMJ,EAAOE,GAAO,GAClB,OAAa,MAATF,GAA0B,IAATA,EACZ,GAEFG,KAAKG,YAAYN,EAAOE,GAAMK,eAEvCD,YAAYE,EAAGN,GAAO,GACpB,IAAIO,EAAID,EAAEE,cAiBV,OAhBAD,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,WAAY,KAAK,KAC1CH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,IAAK,KAAK,MACnCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,IAAK,KAAK,KACnCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,SAAU,KAAK,KACxCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,SAAU,KAAK,KAExCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,UAAW,KAAK,KACzCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,IAAK,KAAK,MAEnCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,QAAS,KAAK,KACvCH,EAAIA,EAAEE,QAAQ,IAAIC,OAAO,OAAQ,KAAK,KAEnCV,IACDO,EAAIA,EAAEE,QAAQ,M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kEAEAI,uBACA,sFAGAmD,OACAR,mBACA,aACA,mBAGA,2BAIA5G,SACAiF,mBAAAiC,IACA,+BAEArE,aACA,gBACAwE,yCACAJ,UACAK,KAAAC,IACA,gBACA,kCACA,+CACAC,MAAAC,IACA,4BACA,mBAGAxB,mBACA,+BAEA,oBACA,gBACA,IACA,OAAAyB,wCAAAC,kCACA,gEAEA,8BACA,kBACA,wBAEA,SACA,aACA,4BAEA,iBAEA,mBACA,kBACA,gBACA,eAEA,IACA,8CACA,kCACA,SACA,eAEA,kBACA,iBAEAC,WACA,wCAEA5E,sBACA,qBACA,sBACA,2DACA,uCACA6E,gMAGA,2BACA,6BACA,yBAAA3H,WAAA6F,iBAIA8B,yDAEA,yFACA,+CAEA,iBACAC,eACAC,eACAnE,0BACAmC,OACAiC,sBACAC,sBACAC,YAGAnF,oBAEA,2BACA,6DACA,qFACA,6BACA,uBAEA,2BACA,qBACA,uBACA,sBAEAG,kBACA,oBACA,sBACA,uBACA,sBAEA,sBACA,gBACA,UACA,6DACA,4BACA,kBACA,oFACA,SACA,6HAEA,iBAEAiF,wBACA,+BAEA7D,YACA,2BAEAC,aACA,6BAEAC,aACA,qBACA,+BAEA,sBACA,qBACA,oBACA,0CACA,MAGA,OAFA,yBACA,8CAIA,gBACA,IACA,yBAEA,OAAAnC,4BACA,8DAEA,mBAKA,CACA,+BACA,SAKA,kBACA,qFACA,yBANA,oBACA,+EARA,oBACA,0FACA,yBAeA,CAEA,+BACA,SAKA,kBACA,qFACA,yBANA,oBACA,2EASA,SACA,oBACA,yEAEA,iBAEA,oBACA,OACAD,yBACAC,2BACAI,2BACAF,8CAEA,KAEA,UACA,qCACA6F,KACA,SACAA,KAGA,UAEA,oBACA,OACAnB,qBACA7E,yBACAK,2BACAF,8CAEA,KAEA,UACA,0CACA6F,KACA,SACAA,KAGA,UAEA9C,kBACA,mBACA,oBACA,mBACA,uBACA,qBACA,uBAEA+C,iBACA,uBACA,yBACA,0BACA,6BClemW,I,YCO/VC,E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ent":["export default {\n methods: {\n reg(value, caps = false, trim = false){\n if(value == null || value == ''){\n return \"\";\n }\n\n if(caps){\n return this.upper(value, trim);\n }\n else if(trim) {\n return this.trimSpaces(value);\n }\n else {\n return value;\n }\n },\n upper(value, trim = false) {\n if (value == null || value == '') {\n return \"\";\n }\n return this.cleanTildes(value, trim).toUpperCase();\n },\n cleanTildes(s, trim = false){\n var r = s.toLowerCase();\n r = r.replace(new RegExp(\"[àáâãäå]\", 'g'),\"a\");\n r = r.replace(new RegExp(\"æ\", 'g'),\"ae\");\n r = r.replace(new RegExp(\"ç\", 'g'),\"c\");\n r = r.replace(new RegExp(\"[èéêë]\", 'g'),\"e\");\n r = r.replace(new RegExp(\"[ìíîï]\", 'g'),\"i\");\n //r = r.replace(new RegExp(\"ñ\", 'g'),\"n\"); \n r = r.replace(new RegExp(\"[òóôõö]\", 'g'),\"o\");\n r = r.replace(new RegExp(\"œ\", 'g'),\"oe\");\n //r = r.replace(new RegExp(\"[ùúûü]\", 'g'),\"u\");\n r = r.replace(new RegExp(\"[ùúû]\", 'g'),\"u\");\n r = r.replace(new RegExp(\"[ýÿ]\", 'g'),\"y\");\n \n if(trim){\n r = r.replace(/\\s/g,'');\n }\n\n return r;\n },\n trimSpaces(s){\n return s.replace(/\\s/g,'');\n },\n uppercase(value){\n if (value == null || value == '') {\n return \"\";\n }\n return value.toUpperCase();\n }\n }\n}","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{\"id\":\"proveedor\"}},[_c('vx-card',{staticClass:\"mb-6\"},[_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full\"},[_c('h1',{staticClass:\"rg-big-title extrabold rg-title\"},[_vm._v(\"Vendedores \"),_c('span',{staticClass:\"orange\"},[_vm._v(\"registrados\")]),_vm._v(\".\")])])])]),_c('vx-card',[[_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full\"},[_c('p',{staticClass:\"bold mb-4\"},[_vm._v(\" Aquí encontrarás la lista de vendedores que has registrado en tu perfil. Puedes dar de alta nuevos vendedores, o bien, editar o eliminar los ya existentes. \")])])])],_c('agents-list')],2)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{attrs:{\"id\":\"main-div\"}},[_c('vs-table',{ref:\"table\",attrs:{\"stripe\":\"\",\"pagination\":\"\",\"max-items\":_vm.itemsPerPage,\"search\":\"\",\"data\":_vm.agents,\"noDataText\":\"No hay datos disponibles\"},scopedSlots:_vm._u([{key:\"default\",fn:function({data}){return _vm._l((data),function(tr,indextr){return _c('vs-tr',{key:indextr,attrs:{\"data\":tr}},[_c('vs-td',[_vm._v(_vm._s(tr.name))]),_c('vs-td',[_vm._v(_vm._s(tr.email))]),_c('vs-td',[_vm._v(_vm._s(tr.phoneModel ? `${tr.phoneModel.country_calling_code} ${_vm.phoneFormat(tr.phoneModel.phone)}` : _vm.phoneFormat(tr.phone)))]),(tr.last != false)?_c('vs-td',[_vm._v(_vm._s(tr.last))]):_c('vs-td',[_vm._v(\"Inactivo \"),_c('a',{staticClass:\"link\",on:{\"click\":function($event){return _vm.sendEmail(tr)}}},[_vm._v(\"reenviar correo\")])]),_c('vs-td',{staticClass:\"whitespace-no-wrap\"},[_c('feather-icon',{attrs:{\"icon\":\"EditIcon\",\"svgClasses\":\"w-5 h-5 hover:text-primary stroke-current\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.editAgentRequest(tr)}}}),_c('feather-icon',{staticClass:\"ml-6\",attrs:{\"icon\":\"TrashIcon\",\"svgClasses\":\"w-5 h-5 hover:text-primary stroke-current\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.deleteAgentRequest(tr)}}})],1)],1)})}}])},[_c('div',{staticClass:\"flex flex-wrap-reverse items-center flex-grow justify-between\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('div',{staticClass:\"flex flex-wrap-reverse items-center data-list-btn-container mr-4\"},[_c('vs-button',{attrs:{\"color\":\"primary\",\"type\":\"border\",\"icon-pack\":\"feather\",\"icon\":\"icon-add\"},on:{\"click\":_vm.addAgentRequest}},[_vm._v(\" Agregar vendedor \")])],1),_c('vs-dropdown',{staticClass:\"cursor-pointer mr-4 items-per-page-handler\",attrs:{\"vs-trigger-click\":\"\"}},[_c('div',{staticClass:\"p-3 border border-solid d-theme-border-grey-light rounded-full d-theme-dark-bg cursor-pointer flex items-center justify-between font-medium\"},[_c('span',{staticClass:\"mr-2\"},[_vm._v(_vm._s(_vm.currentPage * _vm.itemsPerPage - (_vm.itemsPerPage - 1))+\" - \"+_vm._s(_vm.agents.length - _vm.currentPage * _vm.itemsPerPage > 0 ? _vm.currentPage * _vm.itemsPerPage : _vm.agents.length)+\" de \"+_vm._s(_vm.queriedItems))]),_c('feather-icon',{attrs:{\"icon\":\"ChevronDownIcon\",\"svgClasses\":\"h-4 w-4\"}})],1),_c('vs-dropdown-menu',_vm._l((_vm.itemsPerPageDefinitions),function(it){return _c('vs-dropdown-item',{key:it,on:{\"click\":function($event){_vm.itemsPerPage=it}}},[_c('span',[_vm._v(_vm._s(it))])])}),1)],1)],1),_c('template',{slot:\"thead\"},_vm._l((_vm.columns),function(col,idx){return _c('vs-th',{key:idx,staticClass:\"bold\",attrs:{\"sort-key\":col.sortable ? col.key : null}},[_vm._v(_vm._s(col.title))])}),1)],2),_c('vs-popup',{attrs:{\"title\":_vm.formPromptTitle,\"active\":_vm.showFormPrompt},on:{\"update:active\":function($event){_vm.showFormPrompt=$event}}},[_c('div',{staticClass:\"con-exemple-prompt\"},[_c('vs-alert',{staticClass:\"h-full mb-5\",attrs:{\"color\":_vm.onSaveError ? 'danger' : 'warning'}},[_c('span',[_vm._v(_vm._s(this.onSaveError ? _vm.formMssg : _vm.formPromptIndication))])]),_c('vs-input',_vm._g({directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],staticClass:\"w-full mb-4\",attrs:{\"label\":\"Nombre completo\",\"placeholder\":\"Requerido\",\"data-vv-name\":\"name\",\"danger\":_vm.hasError('name'),\"danger-text\":_vm.errorText('name'),\"success\":_vm.isSuccess('name')},model:{value:(_vm.formAgent.name),callback:function ($$v) {_vm.$set(_vm.formAgent, \"name\", $$v)},expression:\"formAgent.name\"}},{input: e => {_vm.formAgent.name = _vm.upper(e) }})),_c('div',{staticClass:\"flex\"},[_c('vue-country-code',{staticClass:\"vs-custom dial-code\",attrs:{\"name\":\"dialCode\",\"data-vv-name\":\"phone\",\"enableSearchField\":true,\"searchPlaceholderText\":\"Buscar código de país\",\"enabledCountryCode\":true,\"defaultCountry\":_vm.formAgent.preferredCountries,\"preferredCountries\":['MX'],\"danger\":_vm.hasError('dialCode'),\"danger-text\":_vm.errorText('dialCode'),\"success\":_vm.isSuccess('dialCode')},on:{\"onSelect\":_vm.onSelect}}),_c('vs-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|digits:10'),expression:\"'required|digits:10'\"}],staticClass:\"w-full mb-4\",attrs:{\"label\":\"Celular\",\"type\":\"tel\",\"placeholder\":\"Requerido\",\"data-vv-name\":\"phone\",\"icon-pack\":\"feather\",\"icon\":\"icon-phone\",\"danger\":_vm.hasError('phone'),\"danger-text\":_vm.errorText('phone'),\"success\":_vm.isSuccess('phone')},model:{value:(_vm.formAgent.phone),callback:function ($$v) {_vm.$set(_vm.formAgent, \"phone\", $$v)},expression:\"formAgent.phone\"}})],1),(_vm.formMode == 'new')?_c('vs-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|email'),expression:\"'required|email'\"}],staticClass:\"w-full mb-4\",attrs:{\"label\":\"Correo electrónico\",\"placeholder\":\"Requerido\",\"data-vv-name\":\"email\",\"danger\":_vm.invalidEmail || _vm.hasError('email'),\"danger-text\":_vm.invalidEmail ? 'El correo está siendo utilizado por otro usuario' : _vm.errorText('email'),\"success\":_vm.isSuccess('email') && !_vm.invalidEmail},model:{value:(_vm.formAgent.email),callback:function ($$v) {_vm.$set(_vm.formAgent, \"email\", $$v)},expression:\"formAgent.email\"}}):_vm._e(),_c('vs-button',{staticClass:\"mr-5 mt-2\",attrs:{\"color\":\"primary\"},on:{\"click\":_vm.saveFormAgent}},[_vm._v(\" \"+_vm._s(this.formMode == 'edit' ? 'Actualizar' : 'Agregar')+\" \")]),_c('vs-button',{attrs:{\"type\":\"flat\",\"color\":\"primary\"},on:{\"click\":_vm.closeFormPrompt}},[_vm._v(\"Cancelar\")])],1)]),_c('vs-popup',{attrs:{\"title\":\"Selección de otro vendedor para asignar proyectos\",\"active\":_vm.showAssignAgentPrompt},on:{\"update:active\":function($event){_vm.showAssignAgentPrompt=$event}}},[_c('div',{staticClass:\"con-exemple-prompt\"},[_c('p',{staticClass:\"mb-5 bold\"},[_vm._v(\"Seleccione al vendedor que tendrá asignados los proyectos del vendedor \"+_vm._s(_vm.deletingAgentName)+\".\")]),_c('vx-select',{staticClass:\"w-full mb-5\",attrs:{\"label\":\"Lista de vendedores disponibles\",\"name\":\"agent_id\",\"disabled\":_vm.getAgentsList.length < 1,\"placeholder\":_vm.getAgentsList.length < 1 ? _vm.noDataPlaceholder : _vm.selectPlaceholder},model:{value:(_vm.agent_id),callback:function ($$v) {_vm.agent_id=$$v},expression:\"agent_id\"}},_vm._l((_vm.getAgentsList),function(item,index){return _c('vx-select-item',{key:index,staticClass:\"w-full\",attrs:{\"value\":item.value,\"text\":item.text}})}),1),_c('vs-button',{staticClass:\"mr-5 mt-2\",attrs:{\"disabled\":!_vm.agent_id,\"color\":\"primary\"},on:{\"click\":_vm.assignAgent}},[_vm._v(\"Aceptar y eliminar\")]),_c('vs-button',{attrs:{\"type\":\"flat\",\"color\":\"primary\"},on:{\"click\":_vm.closeAgentPrompt}},[_vm._v(\"Cerrar\")])],1)])],1),(_vm.failed)?_c('load-error'):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentsList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentsList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AgentsList.vue?vue&type=template&id=ed1ee94a&\"\nimport script from \"./AgentsList.vue?vue&type=script&lang=js&\"\nexport * from \"./AgentsList.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentsPage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentsPage.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AgentsPage.vue?vue&type=template&id=206e9bf6&\"\nimport script from \"./AgentsPage.vue?vue&type=script&lang=js&\"\nexport * from \"./AgentsPage.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export default {\n methods: {\n format_price(value, decimales = 0) {\n let val = (value / 1).toFixed(decimales).replace(\",\", \".\");\n return val.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n },\n costFormat(value) {\n if (!value) { return \"$0\"; }\n if (value == \"Pendiente\") { return value; }\n else {\n return \"$\" + this.format_price(value, 2);\n }\n },\n costFormatNoCents(value) {\n if (!value) { return \"$0\"; }\n if (value === \"Pendiente\") { return value; }\n else return \"$\" + this.format_price(value);\n },\n prcgFormat(value, decimales = 0) {\n if (!value) { return \"0%\"; }\n if (value == \"Pendiente\") { return value; }\n else { return value.toFixed(decimales) + \"%\"; }\n },\n decimalsFormat(value, decimales = 0) {\n if (!value) { return 0; }\n if (value == \"Pendiente\") { return 0; }\n else { return value.toFixed(decimales); }\n },\n explicitMoneyFormat(value, decimales = 2) {\n if (value == null) return \"\";\n else {\n return \"$\" + this.format_price(value, decimales);\n }\n },\n mxnFormat(value, decimales = 0) {\n if (!value) { return \"$0MXN\"; }\n else {\n return \"$\" + this.format_price(parseInt(value), decimales) + \" MXN\";\n }\n },\n moneyFormat(value) {\n if (!value) { return \"$0\"; }\n else {\n return \"$\" + this.format_price(parseInt(value), 0);\n }\n },\n decimalPercentFormat(value, decimales = 2) {\n if (!value) return \"0%\";\n else {\n return (value * 100).toFixed(decimales) + \"%\";\n }\n },\n roundedFormat(value, decimales = 2) {\n if (!value) { return 0; }\n else {\n let c = value.toFixed(decimales);\n let cd = Math.round(c);\n return cd.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }\n },\n phoneFormat(value) {\n if (!value) return value\n else {\n return '(' + value.substr(0, 2) + ') ' + value.substr(2, 4) + '-' + value.substr(6, 4)\n }\n },\n phoneFormatV2(value) {\n if (!value) return value\n else {\n return '(' + value.substr(0, 3) + ') ' + value.substr(2, 3) + ' ' + value.substr(6, 4)\n }\n },\n visibleLastNChars(value, chars = 4) {\n if (!value) return value\n else {\n let valueString = value.toString();\n if (chars > valueString.length || chars < 0) return value\n else {\n let phoneLength = valueString.length;\n const firstChars = \"*\".repeat(phoneLength - chars);\n const last4Digits = valueString.slice(firstChars.length);\n return firstChars + last4Digits;\n }\n }\n },\n visibleOnlyLastNChars(value, chars = 4) {\n if (!value) return value\n else {\n let valueString = value.toString();\n if (chars > valueString.length || chars < 0) return value\n else {\n return valueString.slice(-4);\n }\n }\n },\n capitalizeFirstLetter(value) {\n if (!value) return value\n else {\n const arr = value.split(\" \");\n for (let i = 0; i < arr.length; i++) {\n arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].slice(1);\n\n }\n\n return arr.join(\" \");\n }\n },\n //Función para validar un RFC\n isValidRfcFormat(rfc) {\n if(rfc) {\n const patternPM = \"^(([A-ZÑ&]{3})([0-9]{2})([0][13578]|[1][02])(([0][1-9]|[12][\\\\d])|[3][01])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{3})([0-9]{2})([0][13456789]|[1][012])(([0][1-9]|[12][\\\\d])|[3][0])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{3})([02468][048]|[13579][26])[0][2]([0][1-9]|[12][\\\\d])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{3})([0-9]{2})[0][2]([0][1-9]|[1][0-9]|[2][0-8])([A-Z0-9]{3}))$\";\n const patternPF = \"^(([A-ZÑ&]{4})([0-9]{2})([0][13578]|[1][02])(([0][1-9]|[12][\\\\d])|[3][01])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{4})([0-9]{2})([0][13456789]|[1][012])(([0][1-9]|[12][\\\\d])|[3][0])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{4})([02468][048]|[13579][26])[0][2]([0][1-9]|[12][\\\\d])([A-Z0-9]{3}))|\" +\n \"(([A-ZÑ&]{4})([0-9]{2})[0][2]([0][1-9]|[1][0-9]|[2][0-8])([A-Z0-9]{3}))$\";\n return rfc.match(patternPM) || rfc.match(patternPF);\n } else {\n return false;\n }\n },\n //Función para validar un RFC por tipo de persona\n isValidRfcFormatByPersonType(rfc, isMoral) {\n if(rfc) {\n // Formato para PF\n let pattern = /^[A-Z]{4}(\\d{2})((0[13578]|1[02])([0-2]\\d|3[01])|(0[469]|11)([0-2]\\d|30)|(02)([0-2]\\d))([A-Z0-9]{3})$/;\n let genericRFC1 = \"XAXX010101000\";\n let genericRFC2 = \"XEXX010101000\";\n if(isMoral) {\n // Formato para PM\n pattern = /^[A-Z]{3}(\\d{2})((0[13578]|1[02])([0-2]\\d|3[01])|(0[469]|11)([0-2]\\d|30)|(02)([0-2]\\d))([A-Z0-9]{3})$/;\n }\n\n return rfc.match(pattern) && rfc != genericRFC1 && rfc != genericRFC2;\n } else {\n return false;\n }\n },\n //Función para validar una CURP\n isValidCurpFormat(curp) {\n if(curp) {\n const pattern = /^([A-Z][AEIOUX][A-Z]{2}\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])[HM](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\\d])(\\d)$/;\n let isValid = curp.match(pattern);\n if (!isValid) //Coincide con el formato general?\n return false;\n //Fuente https://consultas.curp.gob.mx/CurpSP/\n let diccionario = \"0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZ\";\n let lngSuma = 0.0;\n let lngDigito = 0.0;\n for (let i = 0; i < 17; i++) {\n lngSuma = lngSuma + diccionario.indexOf(isValid[1].charAt(i)) * (18 - i);\n }\n lngDigito = 10 - lngSuma % 10;\n let verifierDigit = (lngDigito != 10) ? lngDigito : 0;\n return isValid[2] == verifierDigit;\n } else {\n return false;\n }\n },\n anonymousFormatPhone(value){\n if (value === \"\") return value\n else {\n return value.replace(/^(?:\\D*\\d){8}/g, \"********\");\n }\n },\n genderTranslate(value) {\n return value == 1 ? \"Hombre\" : \"Mujer\";\n },\n //Función para obtener el icono del tipo de proyecto o todos con el param 'all'\n getLoanTypeIcon(loanType) {\n const loanTypeIcons = [\n {\n id: 1,\n url: \"https://cdn.redgirasol.com/nuevo_portal/icons/icon-inv-solar.png\",\n filename: \"Crédito Solar\"\n },\n {\n id: 4,\n url: \"https://cdn.redgirasol.com/nuevo_portal/icons/icon-inv-pyme.png\",\n filename: \"Crédito PyME\"\n },\n {\n id: 5,\n url: \"https://cdn.redgirasol.com/nuevo_portal/icons/icon-inv-pers.png\",\n filename: \"Crédito Personal\"\n },\n {\n id: 6,\n url: \"https://cdn.redgirasol.com/nuevo_portal/icons/icon-inv-auto.png\",\n filename: \"Crédito Automotriz\"\n }\n ];\n\n if (loanType == \"all\") {\n return loanTypeIcons;\n } else {\n let icon = loanTypeIcons.find(lt => lt.id === loanType);\n let url = \"https://cdn.redgirasol.com/nuevo_portal/icons/icon-inv-solar.png\";\n if (icon) {\n url = icon.url;\n }\n return url;\n }\n },\n getAmountWithNoCommissionTax(amount){\n if (amount <= 0) {\n return 0;\n }\n const processingAdministrationCommission = .02;\n const mexicoTaxIva = .16;\n let commissionWithTaxPercentage = processingAdministrationCommission*mexicoTaxIva;\n let percentage = (1+processingAdministrationCommission+commissionWithTaxPercentage);\n let amountNoCommision = amount/percentage;\n return amountNoCommision;\n }\n }\n}"],"sourceRoot":""}