vobi_lib 1.1.8 → 1.2.0
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/index.js +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";var Q=Object.create;var h=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var Z=(e,a)=>{for(var o in a)h(e,o,{get:a[o],enumerable:!0})},k=(e,a,o,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of W(a))!K.call(e,r)&&r!==o&&h(e,r,{get:()=>a[r],enumerable:!(n=J(a,r))||n.enumerable});return e};var y=(e,a,o)=>(o=e!=null?Q(H(e)):{},k(a||!e||!e.__esModule?h(o,"default",{value:e,enumerable:!0}):o,e)),X=e=>k(h({},"__esModule",{value:!0}),e);var ia={};Z(ia,{BAD_GATEWAY:()=>oe,BAD_REQUEST:()=>l,FORBIDDEN:()=>ae,INTERNAL_SERVER_ERROR:()=>R,IsJsonString:()=>re,METHOD_NOT_ALLOWED:()=>te,NOT_ALLOWED:()=>S,NOT_FOUND:()=>D,SERVICE_UNAVAILABLE:()=>ne,UNAUTHORIZED:()=>b,asArray:()=>N,asBrazilianDate:()=>P,asDate:()=>v,asyncForEach:()=>ie,brazilianDateTime:()=>q,brazilianDateToDate:()=>De,capitalize:()=>A,checkCnpj:()=>le,checkCpf:()=>ue,checkEmail:()=>de,containsEncodedComponents:()=>ce,currentDay:()=>L,curry:()=>pe,dateIsValid:()=>Oe,decodeToken:()=>Ve,decrypt:()=>me,diffObject:()=>fe,dynamici18nString:()=>ge,elasticTransformOr:()=>ye,encrypt:()=>he,enumHelper:()=>t,error:()=>f,eventBus:()=>be,extractMonthInfo:()=>sa,extractValueFromWhere:()=>Ce,filterAttributes:()=>Ee,filterEmpty:()=>xe,findValue:()=>B,firstMonthDay:()=>w,flatMapData:()=>na,flattenChildren:()=>O,formatCurrency:()=>I,formatDate:()=>M,formatNumber:()=>Ue,getExtension:()=>_e,getMonthNumber:()=>Pe,getNameWithoutExtension:()=>ve,getNextDay:()=>Se,getNextWeekday:()=>V,getPreviewsWeekday:()=>j,getToday:()=>Ae,getToken:()=>Y,getTomorrow:()=>Ie,getYesterday:()=>Be,imgSrcRegex:()=>Fe,isAfter:()=>Ne,isNumber:()=>qe,isOfAge:()=>we,isValidUrl:()=>Me,lastMonthDay:()=>T,makeRefurbishFileUrl:()=>je,maxDateToList:()=>Te,minDateToList:()=>Le,monthsBetween:()=>Re,normalizeString:()=>oa,nullIfEmpty:()=>Ge,padLeft:()=>ze,parseArrayAsObject:()=>Ye,parseRouteToModel:()=>$e,prepareDoc:()=>Qe,prepareSession:()=>Je,promiseAny:()=>We,promiseEach:()=>se,removeProperty:()=>He,removeSpecialChar:()=>Ke,replaceNumberOrPercentage:()=>ra,slugify:()=>Ze,splitList:()=>Xe,sum:()=>ea,sumByFunction:()=>aa,validateMobilePhoneNumber:()=>ta,valueReplacer:()=>E});module.exports=X(ia);var U={userNotFound:"Usu\xE1rio n\xE3o foi encontrado.",pageNotFound:"Desculpe. P\xE1gina n\xE3o encontrada.",notAuthorized:"N\xE3o autorizado.",tokenExpired:"Sess\xE3o expirada.",invalidToken:"Token inv\xE1lido.",notUpdated:"Nenhum registro foi alterado.",cantDelete:"Esse registro est\xE1 sendo usado, por isso n\xE3o \xE9 poss\xEDvel apaga-lo.",general:"Ocorreu um erro.",sentError:"Erro ao enviar proposta",noUser:"Usu\xE1rio n\xE3o encontrado.",noEmail:"E-mail n\xE3o foi informado",noPassword:"Senha n\xE3o foi informada.",invalidEmail:"O e-mail informado \xE9 inv\xE1lido.",uniqueEmail:"O e-mail informado j\xE1 est\xE1 cadastrado.",invalidCPF:"O CPF informado \xE9 inv\xE1lido.",invalidCNPJ:"O CNPJ informado \xE9 inv\xE1lido.",uniqueName:"Nome informado j\xE1 cadastrado.",noName:"Nome n\xE3o foi informado.",noData:"Dados n\xE3o informados.",noDate:"Data n\xE3o informada.",noModel:"Ocorreu um erro com a entidade",invalidId:"Id inv\xE1lido",invalidCredentials:"Usu\xE1rio e/ou senha inv\xE1lidos.",noPhone:"Telefone n\xE3o foi informado.",noCPF:"CPF n\xE3o foi informado.",noRG:"RG n\xE3o foi informado.",noZipcode:"CEP n\xE3o foi informado.",noStreet:"Endere\xE7o n\xE3o foi informado.",noNumber:"N\xFAmero n\xE3o foi informado.",noState:"Estado n\xE3o foi informado.",noCity:"Cidade n\xE3o foi informada.",noNeighborhood:"Bairro n\xE3o foi informado.",noCNPJ:"CNPJ n\xE3o foi informado.",noCompanyName:"Raz\xE3o social n\xE3o foi informada.",noTrademarkName:"Nome fantasia n\xE3o foi informado.",noCompanyZipcode:"CEP da empresa n\xE3o foi informado.",noCompanyStreet:"Endere\xE7o da empresa n\xE3o foi informado.",noCompanyNumber:"N\xFAmero da empresa n\xE3o foi informado.",noCompanyState:"Estado da empresa n\xE3o foi informado.",noCompanyCity:"Cidade da empresa n\xE3o foi informado.",noCompanyNeighborhood:"Bairro da empresa n\xE3o foi informado.",noBirthdate:"Data de nascimento n\xE3o foi informada.",noCompany:"Empresa n\xE3o informada.",invalidURL:"URL inv\xE1lida.",noPermissions:"Permiss\xF5es n\xE3o encontradas.",fileLimit50:"Os arquivos n\xE3o pode ter mais de 50 MB. Para arquivos maiores voc\xEA pode informar a url de um servidor externo.",fileLimit10:"Os arquivos n\xE3o pode ter mais de 10 MB. Para arquivos maiores voc\xEA pode informar a url de um servidor externo no corpo da mensagem.",maxLength:"O nome deve ter no m\xE1ximo 255 caracteres.",invalidData:"Dados inv\xE1lidos.",invalidDate:"Data inv\xE1lida.",invalidDates:"Data de in\xEDcio n\xE3o pode ser maior que data de fim.",invalidUUID:"A URL informada n\xE3o foi encontrada, verifique se est\xE1 correto o link desejado.",invalidValue:"Valor informado inv\xE1lido.",invalidDoc:"O documento informado (CNPJ/CPF) est\xE1 incorreto.",docAlreadyExists:"Documento j\xE1 cadastrado.",tokenPasswordError:"Link de recupera\xE7\xE3o de senha inv\xE1lido.",errPassword:"Senha est\xE1 inv\xE1lida.",noParameters:"Par\xE2metros n\xE3o informado.",uniqueCode:"C\xF3digo j\xE1 cadastrado."};var f={},_={en:U,"pt-br":"PT_BR_LOCALE"},s=_.en||_.en,l=400,S=405,b=401,ae=403,D=404,te=405,R=500,oe=502,ne=503;f.NOT_FOUND={userNotFound:{statusCode:D,code:"NF-00001",message:s.userNotFound},pageNotFound:{statusCode:D,code:"NF-00002",message:s.pageNotFound}};f.UNAUTHORIZED={notAuthorized:{statusCode:b,code:"UA-00001",message:s.notAuthorized},tokenExpired:{statusCode:b,code:"UA-00002",message:s.tokenExpired},invalidToken:{statusCode:b,code:"UA-00003",message:s.invalidToken}};f.NOT_ALLOWED={notUpdated:{statusCode:S,code:"NA-00001",message:s.notUpdated},cantDelete:{statusCode:S,code:"NA-00002",message:s.cantDelete}};f.INTERNAL_SERVER_ERROR={general:{statusCode:R,code:"ISE-00001",message:s.general},sentError:{statusCode:R,code:"ISE-00002",message:s.sentError}};f.BAD_REQUEST={noUser:{statusCode:l,code:"LIB-B-00001",message:s.noUser},noEmail:{statusCode:l,code:"LIB-B-00002",message:s.noEmail},noPassword:{statusCode:l,code:"LIB-B-00003",message:s.noPassword},invalidEmail:{statusCode:l,code:"LIB-B-00004",message:s.invalidEmail},uniqueEmail:{statusCode:l,code:"LIB-B-00005",message:s.uniqueEmail},invalidCPF:{statusCode:l,code:"LIB-B-00006",message:s.invalidCPF},invalidCNPJ:{statusCode:l,code:"LIB-B-00007",message:s.invalidCNPJ},uniqueName:{statusCode:l,code:"LIB-B-00008",message:s.uniqueName},noName:{statusCode:l,code:"LIB-B-00009",message:s.noName},noData:{statusCode:l,code:"LIB-B-00010",message:s.noData},invalidCredentials:{statusCode:l,code:"LIB-B-00011",message:s.invalidCredentials},tokenPasswordError:{statusCode:l,code:"LIB-B-00012",message:s.tokenPasswordError},errPassword:{statusCode:l,code:"LIB-B-00013",message:s.errPassword},noPhone:{statusCode:l,code:"LIB-B-00014",message:s.noPhone},noCPF:{statusCode:l,code:"LIB-B-00015",message:s.noCPF},noRG:{statusCode:l,code:"LIB-B-00016",message:s.noRG},noZipcode:{statusCode:l,code:"LIB-B-00017",message:s.noZipcode},noStreet:{statusCode:l,code:"LIB-B-00018",message:s.noStreet},noNumber:{statusCode:l,code:"LIB-B-00019",message:s.noNumber},noState:{statusCode:l,code:"LIB-B-00020",message:s.noState},noCity:{statusCode:l,code:"LIB-B-00021",message:s.noCity},noNeighborhood:{statusCode:l,code:"LIB-B-00022",message:s.noNeighborhood},noCNPJ:{statusCode:l,code:"LIB-B-00023",message:s.noCNPJ},noCompanyName:{statusCode:l,code:"LIB-B-00024",message:s.noCompanyName},noTrademarkName:{statusCode:l,code:"LIB-B-00025",message:s.noTrademarkName},noCompanyZipcode:{statusCode:l,code:"LIB-B-00026",message:s.noCompanyZipcode},noCompanyStreet:{statusCode:l,code:"LIB-B-00027",message:s.noCompanyStreet},noCompanyNumber:{statusCode:l,code:"LIB-B-00028",message:s.noCompanyNumber},noCompanyState:{statusCode:l,code:"LIB-B-00029",message:s.noCompanyState},noCompanyCity:{statusCode:l,code:"LIB-B-00030",message:s.noCompanyCity},noCompanyNeighborhood:{statusCode:l,code:"PRO-00031",message:s.noCompanyNeighborhood},noBirthdate:{statusCode:l,code:"LIB-B-00032",message:s.noBirthdate},noCompany:{statusCode:l,code:"LIB-B-00033",message:s.noCompany},noParameters:{statusCode:l,code:"LIB-B-00034",message:s.noParameters},invalidDoc:{statusCode:l,code:"LIB-B-00035",message:s.invalidDoc},docAlreadyExists:{statusCode:l,code:"LIB-B-00036",message:s.docAlreadyExists},invalidURL:{statusCode:l,code:"LIB-B-00037",message:s.invalidURL},noPermissions:{statusCode:l,code:"LIB-B-00038",message:s.noPermissions},fileLimit50:{statusCode:l,code:"LIB-B-00039",message:s.fileLimit50},fileLimit10:{statusCode:l,code:"LIB-B-00040",message:s.fileLimit10},invalidDates:{statusCode:l,code:"LIB-B-00041",message:s.invalidDates},maxLength:{statusCode:l,code:"LIB-B-00042",message:s.maxLength},uniqueCode:{statusCode:l,code:"LIB-B-00043",message:s.uniqueCode},invalidValue:{statusCode:l,code:"LIB-B-00044",message:s.invalidValue},invalidData:{statusCode:l,code:"LIB-B-00045",message:s.invalidData},invalidUUID:{statusCode:l,code:"LIB-B-00046",message:s.invalidUUID},noDate:{statusCode:l,code:"LIB-B-00047",message:s.noDate},invalidDate:{statusCode:l,code:"LIB-B-00048",message:s.invalidDate},invalidId:{statusCode:l,code:"LIB-B-00049",message:s.invalidId},noModel:{statusCode:l,code:"LIB-B-00050",message:s.noModel},sequelizeValidation:{statusCode:l,code:"LIB-B-00999"}};var re=e=>{try{JSON.parse(e)}catch{return!1}return JSON.parse(e)};var se=async(e,a)=>{for(let o of e)await a(o,e.indexOf(o))};var N=e=>e==null?[]:Array.isArray(e)?e:[e];var ie=async(e,a)=>{await Promise.all(e.map((o,n)=>a(o,n,e)))};var A=e=>{if(typeof e!="string")return"";let a=e.trim();return a.charAt(0).toUpperCase()+a.slice(1)};var le=e=>{let a,o,n,r,u,d,p=!0;if(e.length<14)return!1;for(let c=1;c<e.length;c++)if(e.charAt(c-1)!==e.charAt(c)){p=!1;break}if(!p){d=e.length-2,a=e.substring(0,d),o=e.substring(d),n=0,u=d-7;for(let c=0;c<d;c++)n+=parseInt(a.charAt(c))*u--,u<2&&(u=9);if(r=n%11<2?0:11-n%11,r!==parseInt(o.charAt(0)))return!1;d+=1,a=e.substring(0,d),n=0,u=d-7;for(let c=0;c<d;c++)n+=parseInt(a.charAt(c))*u--,u<2&&(u=9);return r=n%11<2?0:11-n%11,r===parseInt(o.charAt(1))}return!1};var ue=(e,a=!1)=>{let o,n;return o=0,e.length<11||!a&&e.split("").every(r=>r===e[0])||(Array.from({length:9}).forEach((r,u)=>{o+=parseInt(e.substring(u,u+1),10)*(11-(u+1))}),n=o*10%11,(n===10||n===11)&&(n=0),n!==parseInt(e.substring(9,10),10))?!1:(o=0,Array.from({length:10}).forEach((r,u)=>{o+=parseInt(e.substring(u,u+1),10)*(12-(u+1))}),n=o*10%11,(n===10||n===11)&&(n=0),n===parseInt(e.substring(10,11),10))};var de=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);var ce=e=>decodeURI(e)!==decodeURIComponent(e);var pe=e=>(...a)=>e.length>a.length?e.bind(null,...a):e(...a);var C=y(require("crypto-js")),me=(e,a)=>C.AES.decrypt(e,a).toString(C.enc.Utf8);var fe=(e,a)=>Object.keys(a).reduce((o,n)=>{if(e[n]===a[n]||n==="lastModifiedBy"||n==="createdAt")return o;let{oldData:r,newData:u}=o;return{oldData:{...r,[n]:e[n]},newData:{...u,[n]:a[n]}}},{});var ge=(e,a)=>e&&typeof e=="string"?e.search(/[a-z]\.[a-z]/i)>=0?a.__(e):e:"";var ye=e=>{let a={};return e==null||e.forEach(o=>{Object.keys(o).forEach(r=>{typeof o[r]=="string"&&(o[r].toLowerCase()==="true"||o[r].toLowerCase()==="false")?a[r]=o[r].toLowerCase()==="true":a[r]=o[r]})}),a};var F=y(require("crypto-js")),he=(e,a)=>(typeof e=="object"&&(e=JSON.stringify(e)),F.AES.encrypt(e,a).toString());var t={};t.fileType={receipt:"receipt",paymentVoucher:"paymentVoucher",quote:"quote",others:"others",project:"project",proposal:"proposal",bankBillet:"bankBillet",refund:"refund"};t.refurbishItemStatus={approved:{label:"Aprovado",value:"approved"},rejected:{label:"N\xE3o aprovado",value:"rejected"},pending:{label:"Para aprovar",value:"pending"},activeStatus:["approved","pending"]};t.workReportStatus={preparing:{label:"Em prepara\xE7\xE3o",value:"preparing",color:"warning70"},finished:{label:"Conclu\xEDdo",value:"finished",color:"success40"}};t.refurbishGroup={noGroup:"Sem grupo"};t.proposalStatus={waiting:{id:1,name:"Aguardando envio"},sent:{id:2,name:"Proposta enviada"},accept:{id:3,name:"Proposta aceita"},inactive:{id:4,name:"Arquivada"},allowCustomer:[2,3]};t.companyStatus={created:{id:1,name:"Cadastro iniciado"},onBoarding:{id:2,name:"Aguardando libera\xE7\xE3o"},active:{id:3,name:"Ativo"},blocked:{id:4,name:"Bloqueado"},cancelled:{id:5,name:"Cancelada"}};t.companyType={architect:{id:1,name:"Arquitetura e design de interiores",roles:["architect"]},service:{id:2,name:"Execu\xE7\xE3o de obra"},store:{id:3,name:"Loja de produtos e materiais"},factory:{id:4,name:"Fabricante"},other:{id:10,name:"Outros"}};t.refurbishStatus={new:{id:1,name:"Novo"},contact:{id:2,name:"Em contato"},proposalSent:{id:3,name:"Proposta enviada"},archived:{id:4,name:"Arquivada"},winner:{id:5,name:"Ganha",winner:!0},execution:{id:5,name:"Em andamento"},finished:{id:6,name:"Finalizado"},cancelled:{id:7,name:"Cancelado"},activeOpportunity:[1,2,3],opportunity:[1,2,3,4],project:[5,6,7],end:[4,5,6,7]};t.fixedRefurbishNewStatus={finished:{id:9999999,name:"Finalizado"},cancelled:{id:9999998,name:"Cancelado"},closed:[9999998,9999999]};t.refurbishStage={1:{id:1,name:"Oportunidade"},2:{id:2,name:"Projeto"}};t.roles={admin:{id:"admin",name:"Administrador"},sales:{id:"sales",name:"Venda"},arch:{id:"architect",name:"Arquitetura"},plan:{id:"plan",name:"Planejamento"},work:{id:"work",name:"Obra"},quality:{id:"quality",name:"Qualidade"},supply:{id:"supply",name:"Suprimentos"},contractor:{id:"contractor",name:"Empreiteiro"},beta:{id:"beta",name:"Beta user"}};t.supplierType={1:{value:1,label:"Loja"},2:{value:2,label:"Prestador de servi\xE7o"}};t.userType={guest:{name:"Visitante",value:"guest"},operator:{name:"Operador",value:"operator"},customer:{name:"Cliente",value:"customer"},provider:{name:"Profissional",value:"provider"},system:{name:"Sistema",value:"system"},anonymous:{name:"An\xF4nimo",value:"anonymous"},realTypes:["guest","operator","customer","provider"]};t.userTypesMap={guest:{userType:"guest",type:"visitante",name:"Visitante"},operador:{userType:"operator",type:"operador",name:"Operador"},cliente:{userType:"customer",type:"cliente",name:"Cliente"},profissional:{userType:"provider",type:"profissional",name:"Profissional"},sistema:{userType:"system",type:"sistema",name:"sistema"}};t.dashboardGuideMap={immersion:{label:"Agende sua imers\xE3o",buttonLabel:"Reserve seu hor\xE1rio",link:"webinar-agendamento",bubble:!0},config:{label:"Adicione sua logo e descri\xE7\xE3o",buttonLabel:"Ir para configura\xE7\xF5es",link:"profissional/configuracoes/meu-negocio"},project:{label:"Crie seu primeiro projeto",buttonLabel:"Adicionar projeto",permission:"project"},task:{label:"Adicione suas primeiras tarefas",buttonLabel:"Criar tarefa",permission:"tasks",link:"profissional/produtividade/gestao-tarefas"}};t.subItemsInitialValue={hasSchedule:{checked:!0,label:"Etapas do Cronograma",tooltip:`Aplique as etapas do cronograma, sem as tarefas.
|
|
2
|
-
Para aplicar tamb\xE9m as tarefas desse template, selecione Tarefas logo abaixo`},hasTasks:{checked:!0,label:"Tarefas",parent:"hasSchedule"},hasBudget:{checked:!0,label:"Or\xE7amento"},hasFolders:{checked:!0,label:"Pastas"},hasNotes:{checked:!0,label:"Anota\xE7\xF5es"}};t.catalogFilterType={default:"default",range:"range"};t.specificationGroupBy={refurbishGroup:{model:"refurbishGroup",key:"id",name:"name"},category:"category",costCenter:{model:"costCenter",key:"id",name:"name"}};t.paymentStatus={waitingOrder:1,analyzing:2,waitingRelease:3,released:4,transferred:5,markAsPaid:6,allowTransfer:[3,4],allowChange:[1,6],sendEmail:[4,5]};t.purchaseStatus={waitingOrder:1,analyzing:2,pending:3,waitingPurchase:4,delivered:5,markAsPurchased:6,allowChange:[1,6]};t.actions={cancel:"cancel"};t.orderType={pay:"pay",shop:"shop"};t.personTypes={pf:"pf",pj:"pj"};t.asaasPersonTypes={pf:"FISICA",pj:"JURIDICA"};t.stepAccount={personal:0,address:1,documents:2};t.statusVobiPay={PENDING:{color:"#FF8E1B",label:"Em an\xE1lise"}};t.refurbishItemType={product:1,labor:2,parent:3,composition:4,notParent:[1,2,4],productLabor:[1,2]};t.notificationChannel={system:"system",email:"email",whatsApp:"whatsApp"};t.taskStatus={planned:{id:1,name:"planejado"},execution:{id:2,name:"em andamento"},finished:{id:4,name:"conclu\xEDdo"},cancelled:{id:5,name:"cancelado"},notFinished:[1,2],pending:[1,2],all:[1,2,4,5]};t.priority={low:{id:1,name:"baixa",color:"primary50"},average:{id:2,name:"m\xE9dia",color:"warningSecondary70"},high:{id:3,name:"alta",color:"error50"},all:[1,2,3]};t.companyProgress={0:{name:"B\xE1sico",value:25},1:{name:"Intermedi\xE1rio",value:50},2:{name:"Avan\xE7ado",value:75},3:{name:"Expert",value:100}};t.templateType={construction:{value:"construction",label:"Obra"},project:{value:"project",label:"Projeto"},opportunity:{value:"opportunity",label:"Oportunidade"}};t.templateModule={all:{value:"all",label:"Completo"},budget:{value:"budget",label:"Or\xE7amento"}};t.templateCategory={residential:{value:"residential",label:"Residencial"},commercial:{value:"commercial",label:"Comercial"},others:{value:"others",label:"Outros"}};t.propertyTypes={residential:{value:"residential",label:"Residencial"},commercial:{value:"commercial",label:"Comercial"},others:{value:"others",label:"Outros"}};t.planType={free:{value:"free",label:"freemium"},starter:{value:"starter",label:"Starter"},essential:{value:"essential",label:"Essential"}};t.projectTab={step:"step",list:"list"};t.installmentStatuses={pendingPayment:1,paid:2,confirm:3,paidManually:4,inAnalysis:5,refunded:6,refundRequested:7,onGoingRefund:8,chargebackRequested:9,onGoingChargeback:10,waitingChargeback:11,cancelled:12,all:[1,2,3,4,5,6,7,8,9,10],paidVobiPay:[2,3,7,8,9,10,11],bankStatement:[2,4,6,7,8,9,10,11],allPaid:[2,3,4,7,8,9,10,11],allPaidBalance:[2,4,7,8,9,10,11],allPending:[1,5]};t.paymentStatuses={draft:1,open:2,paid:3,cancelled:4,realValues:[2,3],allStatus:[1,2,3,4]};t.billType={income:"receita",expense:"despesa",transfer:"transferencia",balance:"saldo inicial"};t.paymentTypeValues={expense:{value:"expense",label:"despesa"},income:{value:"income",label:"receita"},transfer:{value:"transfer",label:"transfer\xEAncia"},payment:{value:"payment",label:"pagamento"},balance:{value:"balance",label:"saldo inicial"}};t.financialCategories={serviceSelling:1,productsSelling:2,fee:3,investimentIncome:4,others:5,advanceFutureCapital:6,capitalIncrease:7,bankLoan:8,institutionLoan:9,partnerLoan:10,paymentShareCapital:11};t.getEnumValue=(e,a,o=["id","name"])=>{let n=null;return!e||!a||Object.keys(e).some(r=>e[r][o[0]]===a?(n=e[r][o[1]],!0):!1),n};t.typePrefix={1:"P",2:"S",4:"C"};t.schemaBusinessCustomError={service:"onboarding.services",description:"onboarding.servicesDescription"};t.stepPayAccount={step1:"step1",step2:"step2",finished:"finished"};t.asaasPixType={CPF:"CPF",CNPJ:"CNPJ",EMAIL:"E-mail",PHONE:"Celular",EVP:"Aleat\xF3ria"};t.paymentTypes={pix:1,bankSlip:2,creditCard:3,debitCard:4,transfer:5,money:6,other:7};t.paymentTypesDesc={1:"Pix",2:"Boleto",3:"Cart\xE3o de cr\xE9dito",4:"Cart\xE3o de d\xE9bito",5:"Transfer\xEAncia",6:"Dinheiro",7:"Outro"};t.vobiPayPaymentType={pix:1,bankSlip:2,creditCard:3,all:[1,2,3],1:"pix",2:"bankSlip",3:"creditCard"};t.asaasPaymentStatus={PENDING:{label:"PENDING",value:t.installmentStatuses.pendingPayment},RECEIVED:{label:"RECEIVED",value:t.installmentStatuses.paid},CONFIRMED:{label:"CONFIRMED",value:t.installmentStatuses.confirm},OVERDUE:{label:"OVERDUE",value:null},REFUNDED:{label:"REFUNDED",value:t.installmentStatuses.refunded},RECEIVED_IN_CASH:{label:"RECEIVED_IN_CASH",value:t.installmentStatuses.paidManually},REFUND_REQUESTED:{label:"REFUND_REQUESTED",value:t.installmentStatuses.refundRequested},REFUND_IN_PROGRESS:{label:"REFUND_IN_PROGRESS",value:t.installmentStatuses.onGoingRefund},CHARGEBACK_REQUESTED:{label:"CHARGEBACK_REQUESTED",value:t.installmentStatuses.chargebackRequested},CHARGEBACK_DISPUTE:{label:"CHARGEBACK_DISPUTE",value:t.installmentStatuses.onGoingChargeback},AWAITING_CHARGEBACK_REVERSAL:{label:"AWAITING_CHARGEBACK_REVERSAL",value:t.installmentStatuses.waitingChargeback},DUNNING_REQUESTED:{label:"DUNNING_REQUESTED",value:null},DUNNING_RECEIVED:{label:"DUNNING_RECEIVED",value:null},AWAITING_RISK_ANALYSIS:{label:"AWAITING_RISK_ANALYSIS",value:t.installmentStatuses.inAnalysis}};t.maxLimitPayment={credit:{value:2e4,label:"20.000,00"},installment:{value:15e4,label:"150.000,00"},minimumInstallmentValue:{value:10,label:"10,00"},maximumInstallments:{value:12}};t.asaasWithdrawStatus={PENDING:"PENDING",PROCESSING:"PROCESSING",DONE:"DONE",FAILED:"FAILED",CANCELLED:"CANCELLED",BLOCKED:"BLOCKED"};t.withdrawStatuses={DONE:"Efetuada",PENDING:"Pendente",BANK_PROCESSING:"Processando",CANCELLED:"Cancelada",FAILED:"Falhou",BLOCKED:"Bloqueado",group:{done:["DONE"],open:["PENDING","BANK_PROCESSING"],error:["CANCELLED","FAILED","BLOCKED"]}};t.vobiPayBankAccountType={corrente:"CONTA_CORRENTE",poupanca:"CONTA_POUPANCA",salario:"CONTA_SALARIO",pagamento:"CONTA_DE_PAGAMENTO"};t.withdrawSteps={list:1,fillData:2,confirmData:3};t.billingManagerStatus={pending:1,send:2,error:3,discarded:4,notSent:5,sending:6};t.billingManagerStatusDesc={1:"Aguardando",2:"Enviado",3:"Erro",4:"Descartado",5:"N\xE3o enviado",6:"Enviando"};t.billingManagerChannels={allChannels:["email","sms","whatsapp"],email:{value:"email",label:"E-mail"},sms:{value:"sms",label:"SMS"},whatsapp:{value:"whatsapp",label:"WhatsApp"}};t.billingManagerType={allTypes:["DC","D-3","D0","D+1","D+3","D+6"],billingRulerType:["D-3","D0","D+1","D+3","D+6"],DC:{label:"Cria\xE7\xE3o da cobran\xE7a",value:"DC",tooltip:"Ao criar a cobran\xE7a",message:"de cobran\xE7a criada para {customerName} {value}"},"D-3":{label:"3 dias antes do vencimento",value:"D-3",tooltip:"3 dias antes do vencimento das parcelas",message:"de aviso de vencimento em 3 dias para {customerName} {value}"},D0:{label:"Dia do vencimento",value:"D0",tooltip:"No dia do vencimento da parcela",message:"de aviso de cobran\xE7a vencendo hoje para {customerName} {value}"},"D+1":{label:"1 dia ap\xF3s o vencimento",value:"D+1",tooltip:"1 dia ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 1 dia para {customerName} {value}"},"D+3":{label:"3 dias ap\xF3s o vencimento",value:"D+3",tooltip:"3 dias ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 3 dias para {customerName} {value}"},"D+6":{label:"6 dias ap\xF3s o vencimento",value:"D+6",tooltip:"6 dias ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 6 dias para {customerName} {value}"}};t.paymentCreditPermission={allowed:2e4,blocked:0};t.withdrawLimit={pj:{daytime:2e4,nightly:5e3},pf:{daytime:2e4,nightly:5e3}};t.sinapiCostOriginTranslate=[{sinapi:"CR",platform:"Coeficiente de Representatividade"},{sinapi:"C",platform:"Calculado"},{sinapi:"AS",platform:"Custo atribu\xEDdo S\xE3o Paulo"}];t.externalBase={sinapi:"SINAPI",all:["SINAPI"]};t.purchaseSolicitationStatus={draft:1,open:2,quote:3,buy:4,closed:5,canceled:6,editable:[1,2,3],ongoing:[2,3,4]};t.purchaseSolicitationStatusColor={[t.purchaseSolicitationStatus.draft]:"warningSecondary70",[t.purchaseSolicitationStatus.open]:"warningSecondary70",[t.purchaseSolicitationStatus.quote]:"primary50",[t.purchaseSolicitationStatus.buy]:"success30",[t.purchaseSolicitationStatus.canceled]:"danger50",[t.purchaseSolicitationStatus.closed]:"neutral40"};t.purchaseOrderStatus={draft:7,open:8,sent:9,accepted:10,refused:11,closed:12,requestableRefund:[10,12],chargeableAdministrationFee:[10,12],editable:[7,8,9],ongoing:[8,9],finished:[10,12]};t.purchaseOrderStatusColor={[t.purchaseOrderStatus.open]:"warningSecondary70",[t.purchaseOrderStatus.sent]:"primary40",[t.purchaseOrderStatus.accepted]:"success30",[t.purchaseOrderStatus.refused]:"error50",[t.purchaseOrderStatus.closed]:"neutral40"};t.paymentOrderType={fee:"fee",refund:"refund",order:"order"};t.purchaseItemsStatus={all:"all",notPurchased:"not-purchased",notBudgeted:"not-budgeted",requested:"requested",purchased:"purchased"};t.optionsRefurbishReport={financialPhysical:"financialPhysics",budgeted:"budgeted",financial:"financial",physic:"physic",financialPhysicBudgeted:{value:"financialPhysics.budgeted"},physicBudgeted:{value:"physic.budgeted"},physicAccomplished:{value:"physic.accomplished"},financialBudgeted:{value:"financial.budgeted"},financialAccomplished:{value:"financial.accomplished"},financialBudAcp:{value:"financial.budgetedAccomplished"},physicBudAcp:{value:"physic.budgetedAccomplished"}};t.refurbishReportType={budgeted:[t.optionsRefurbishReport.financialPhysicBudgeted.value,t.optionsRefurbishReport.physicBudgeted.value,t.optionsRefurbishReport.financialBudgeted.value],accomplished:[t.optionsRefurbishReport.physicAccomplished.value,t.optionsRefurbishReport.financialAccomplished.value],budgetedAccomplished:[t.optionsRefurbishReport.financialBudAcp.value,t.optionsRefurbishReport.physicBudAcp.value],common:[t.optionsRefurbishReport.financialPhysicBudgeted.value,t.optionsRefurbishReport.physicBudgeted.value,t.optionsRefurbishReport.physicBudAcp.value,t.optionsRefurbishReport.financialBudgeted.value,t.optionsRefurbishReport.financialBudAcp.value],measurement:[t.optionsRefurbishReport.physicAccomplished.value],financial:[t.optionsRefurbishReport.financialAccomplished.value],customColumns:[t.optionsRefurbishReport.physicBudAcp.value,t.optionsRefurbishReport.financialBudAcp.value],simpleExport:[t.optionsRefurbishReport.physicAccomplished.value,t.optionsRefurbishReport.financialAccomplished.value,t.optionsRefurbishReport.physicBudgeted.value,t.optionsRefurbishReport.financialBudgeted.value]};t.purchaseQuoteStatus={draft:13,open:14,pendingResponse:15,quoted:16,buy:17,finished:18,editable:[13,14,15],ongoing:[14,15,16,17]};t.purchaseQuoteStatusColor={[t.purchaseQuoteStatus.draft]:"warningSecondary70",[t.purchaseQuoteStatus.open]:"warningSecondary70",[t.purchaseQuoteStatus.pendingResponse]:"warningSecondary70",[t.purchaseQuoteStatus.quoted]:"primary40",[t.purchaseQuoteStatus.buy]:"success30",[t.purchaseQuoteStatus.finished]:"neutral40"};t.quoteSupplierStatus={pending:{id:1,name:"N\xE3o enviado",color:"neutral40"},waitingResponse:{id:2,name:"Aguardando resposta",color:"warningSecondary70"},refused:{id:3,name:"Recusado",color:"error40"},answered:{id:4,name:"Respondido",color:"primary50"},analyzed:{id:5,name:"Analisado",color:"primary50"},buy:{id:6,name:"Compra e contrata\xE7\xE3o",color:"success30"},finished:{id:7,name:"Finalizado",color:"success30"},withoutResponse:[1,2],answeredOptions:[4,5,6,7],canApprove:[4,5],canCreateOrder:[4,5,6]};t.quoteSupplierMoveStatus={[t.quoteSupplierStatus.pending.id]:{forward:[t.quoteSupplierStatus.waitingResponse],back:[]},[t.quoteSupplierStatus.waitingResponse.id]:{forward:[t.quoteSupplierStatus.answered,t.quoteSupplierStatus.refused],back:[t.quoteSupplierStatus.pending]},[t.quoteSupplierStatus.refused.id]:{forward:[],back:[t.quoteSupplierStatus.pending,t.quoteSupplierStatus.waitingResponse]},[t.quoteSupplierStatus.answered.id]:{forward:[t.quoteSupplierStatus.analyzed,t.quoteSupplierStatus.refused],back:[t.quoteSupplierStatus.waitingResponse]},[t.quoteSupplierStatus.analyzed.id]:{forward:[t.quoteSupplierStatus.refused],back:[t.quoteSupplierStatus.answered]},[t.quoteSupplierStatus.buy.id]:{forward:[],back:[]},[t.quoteSupplierStatus.finished.id]:{forward:[],back:[]}};t.extraValuesPayment={taxes:"taxes",discount:"discount",shipping:"shipping",dueDateDiscount:"dueDateDiscount",dueDateDiscountType:"dueDateDiscountType",dueDateLimitDays:"dueDateLimitDays",fine:"fine",fineType:"fineType",interest:"interest"};t.extraValuesPaymentType={simple:[t.extraValuesPayment.taxes,t.extraValuesPayment.discount,t.extraValuesPayment.shipping],asaas:[t.extraValuesPayment.dueDateDiscount,t.extraValuesPayment.dueDateDiscountType,t.extraValuesPayment.dueDateLimitDays,t.extraValuesPayment.fine,t.extraValuesPayment.fineType,t.extraValuesPayment.interest]};t.fineInterestDiscountType={percentage:{value:"PERCENTAGE",label:"Percentual"},fixed:{value:"FIXED",label:"Valor fixo"}};t.paymentPermissions={financialResume:"financialResume",financialSupplier:"financialSupplier",financialOwnBusiness:"financialOwnBusiness",financialIncome:"financialIncome",financialExpense:"financialExpense",financialTransfer:"financialTransfer",financialResults:"financialResults",financialBankStatement:"financialBankStatement",financialReport:"financialReport",projectResume:"projectResume",projectSupplier:"projectSupplier",projectOwnBusiness:"projectOwnBusiness",projectIncome:"projectIncome",projectExpense:"projectExpense",projectResults:"projectResults",projectBudgetedAccomplished:"projectBudgetedAccomplished"};t.mapOrderField={r:"idRefurbishItem",i:"idItem",e:"externalBaseCode"};var be={on(e,a){document.addEventListener(e,a)},dispatch(e,a){document.dispatchEvent(new CustomEvent(e,{detail:a}))},remove(e,a){document.removeEventListener(e,a)}};var B=(e,a)=>{if(Array.isArray(e)===!1)return null;let o=null;return e.some(n=>(o=a(n),!!o)),o};var Ce=(e,a)=>e?e[a]?e[a]:B(e.or,o=>o[a]):null;var ve=e=>{let a=e.lastIndexOf(".");return a===-1?e:e.substring(0,a)};var Ee=(e,a)=>e&&e.length&&a&&a.length?e.map(o=>Object.entries(o).filter(([n])=>a.includes(n)).reduce((n,[r,u])=>Object.assign(n,{[r]:u}),{})):[];var xe=e=>e.filter(a=>N(a).length>0&&a);var I=(e,a={})=>{let o={decimalCount:2,decimal:",",thousands:".",...a},{decimal:n,thousands:r,currencySymbol:u}=o,{decimalCount:d}=o;try{d=Math.abs(d),d=isNaN(d)?2:d;let p=e<0?"-":"",c=parseInt(e=Math.abs(Number(e)||0).toFixed(d),10).toString(),g=c.length>3?c.length%3:0;return(u?`${p}${u}`:p)+(g?c.substr(0,g)+r:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,`$1${r}`)+(d?n+Math.abs(e-parseInt(c,10)).toFixed(d).slice(2):"")}catch(p){return console.log(p),""}};var m=y(require("moment-timezone")),q=e=>{let a=e?new Date(e):new Date,o={timeZone:"America/Sao_Paulo"},n=a.toLocaleString("en-US",o);return new Date(n)},M=(e,a,o,n,r)=>{if(!e)return null;if(r)return(0,m.default)(e,a);let u=m.default.utc(e);return n||u.local(),o&&u.locale(o),u.format(a)},Se=(e,a="YYYY-MM-DD")=>{let o=(0,m.default)(e,a).add(1,"days");return typeof e=="string"?o.format(a):o.toDate()},V=(e=new Date,a=1)=>{let o=new Date(e.setDate(e.getDate()+a));return o.getDay()%6?o:V(o)},j=(e=new Date,a=1)=>{let o=new Date(e.setDate(e.getDate()-a));return o.getDay()%6?o:j(o)},v=e=>e?m.default.utc(e).local():null,P=e=>e&&m.default.tz(new Date(e),"America/Sao_Paulo"),De=(e,a)=>{let o=P(e);return o&&o.format(a||"YYYY-MM-DDTHH:mm:ssZ")},Re=(e,a)=>{if(!e||!a)return null;let o=v(e),n=v(a);return!o||!n?null:n.diff(o,"months")},Ne=(e,a)=>{var o;return!e||!a?null:(o=v(e))==null?void 0:o.isAfter(a)},Ae=(e=!0)=>{let a=new Date;return e?new Date(a.getFullYear(),a.getMonth(),a.getDate()):a},Be=(e=!0)=>{let a=new Date;return e?new Date(a.getFullYear(),a.getMonth(),a.getDate()-1):a},Ie=(e=!0)=>{let a=new Date;return e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+1):a},Pe=e=>{let a=q(e);return`${a.getFullYear()}${a.getMonth().toString().padStart(2,"0")}`},we=(e,a)=>{let o=new Date(e),n=new Date;return new Date(n.getFullYear()-a,n.getMonth(),n.getDate()).getTime()>o.getTime()},Te=e=>m.default.max(e),Le=e=>m.default.min(e),Oe=e=>(0,m.default)(e).isValid(),w=(e,a)=>new Date(e,a-1,1).toISOString().split("T")[0],T=(e,a)=>new Date(e,a,0).toISOString().split("T")[0],L=()=>{let e=new Date(P(new Date));return M(e,"YYYY-MM-DD")};var ke=y(require("dayjs"));var E=e=>e.length===2?[e[0].replace(/\./g,""),e[1].replace(/\./g,"")]:e;var G=e=>{let a=E(e.toString().replace("%","").replace("R$","").replace(/\s/g,"").trim().split(","));if(a.length===2)return a.join(".");let o=E(a[0].split("."));return o.length===2?o.join("."):a[0].replace(/\./g,"")},Ue=e=>{if(e==null)return e;if(!G(e))return null;let a=Number(G(e));return a>=Number.MAX_SAFE_INTEGER||Number.isNaN(a)?null:a};var _e=e=>{let a=e.indexOf("."),o=e.length;return a&&o?e.substr(a,o):""};var Fe=new RegExp('<img[^>]+src="(https://vobi-storage[^">]+)"',"gm");var qe=e=>!isNaN(parseFloat(e))&&!isNaN(e-0);var Me=e=>{try{return!!new URL(e)}catch{return!1}};var z=y(require("jwt-decode")),Y=e=>{var a,o;return(a=e.headers)!=null&&a.authorization&&((o=e.headers)==null?void 0:o.authorization.split(" ")[0])==="Bearer"?e.headers.authorization.split(" ")[1]:e.query&&e.query.token?e.query.token:null},Ve=(e,a,o)=>{try{let n=Y(e);if(n){let{user:r,isCustomerView:u,accessedBy:d,vaultToken:p}=(0,z.default)(n);e.user={...r,isCustomerView:u,accessedBy:d,vaultToken:p}}return o()}catch(n){console.log("err",n);let r=new Error("Invalid token");return o(r)}};var je=(e,a,o,n)=>{let r=e.idStatus>=5?"projetos":"oportunidades",u=a==="customer"?"cliente":"profissional",d=`/${u}/${r}/perfil/${e.id}`,p=`/${u}`;return`${{operator:d,provider:d,customer:p}}/arquivos?arquivo=${o.id}${n?"&visualizar":""}`};var Ge=e=>(e==null?void 0:e.length)===0?null:e;var ze=(e,a="0000")=>(a+e).slice(a.length*-1);var Ye=(e,a=!1)=>{let o={};for(let n=0;n<e.length;n++){let r=e[n];o[r.value]=a?{...r}:r.label}return o};var $e=e=>e.replace(/ /g,"").split("-").reduce((a,o)=>a+A(o),"");var Qe=e=>e==null?void 0:e.replace(/[,-./]/g,"");var Je=({id:e,name:a,email:o,idCompany:n,userType:r,type:u,isOwner:d,MGMCode:p,groupPermission:c,isActive:g,limitAccess:$,company:x})=>({id:e,name:a,email:o,idCompany:n,userType:r,type:u,isOwner:d,MGMCode:p,groupPermission:c,isActive:g,limitAccess:$,idPlan:x==null?void 0:x.idPlan});var We=e=>{let a=new Array(e.length),o=0;return new Promise((n,r)=>{e.forEach((u,d)=>{Promise.resolve(u).then(n).catch(p=>{a[d]=p,o+=1,o===e.length&&r(a)})})})};var He=(e,a)=>Object.keys(a).filter(o=>o!==e).reduce((o,n)=>({...o,[n]:a[n]}),{});var Ke=(e,a,o=!0)=>{if(!e)return e;let n=e.toLowerCase();return o&&(n=n.replace(new RegExp("\\s","g"),"")),n=n.replace(new RegExp("[\xE0\xE1\xE2\xE3\xE4\xE5]","g"),"a"),n=n.replace(new RegExp("\xE6","g"),"ae"),n=n.replace(new RegExp("\xE7","g"),"c"),n=n.replace(new RegExp("[\xE8\xE9\xEA\xEB]","g"),"e"),n=n.replace(new RegExp("[\xEC\xED\xEE\xEF]","g"),"i"),n=n.replace(new RegExp("\xF1","g"),"n"),n=n.replace(new RegExp("[\xF2\xF3\xF4\xF5\xF6]","g"),"o"),n=n.replace(new RegExp("\u0153","g"),"oe"),n=n.replace(new RegExp("[\xF9\xFA\xFB\xFC]","g"),"u"),n=n.replace(new RegExp("[\xFD\xFF]","g"),"y"),n=n.replace("'",""),n=n.replace("\xB4",""),n=n.replace("`",""),a&&(n=n.replace(new RegExp("\\W","g"),"")),n};var Ze=e=>e==null?void 0:e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9-/\s]/g,"").replace(/\//g,"").replace(/\s+/g,"-").toLowerCase();var Xe=(e,a)=>e.reduce((o,n,r)=>{let u=Math.floor(r/a),d=[...o];return o[u]||(d[u]=[]),d[u].push(n),d},[]);var ea=(e,a,o)=>{let n=o||a;return(e==null?void 0:e.map(r=>n?r[o]||r[a]:r).reduce((r,u)=>r+(Number(u||0)||0),0))||0};var aa=(e,a)=>(e==null?void 0:e.map(o=>a(o)).reduce((o,n)=>o+(Number(n||0)||0),0))||0;var ta=e=>{let a=e.replace(/\D/g,"");return/^(?:\+?55 ?)?(?:0?[1-9]{2})?9\d{8}$/.test(a)};var oa=e=>typeof e!="string"||!e?"":e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim();var O=(e,a="")=>!e||e.length<=0?[]:e.flatMap((o,n)=>{let r=a?`${a}.${n+1}`:`${n+1}`,{children:u,...d}=o;return[{...d,index:r},...O(u||[],r)]}),na=e=>O(e).reduce((o,n)=>n.id?{...o,[n.id]:n}:o,{});var ra=(e,a)=>{var n;let o=e?(n=Number(e).toFixed(2))==null?void 0:n.replace(".",","):0;return a?`${I(e*100)}%`:o};var sa=e=>{if(!e)return{};let[a,o]=e.split("-").map(Number),n=L(),r=w(a,o),u=T(a,o);return{startDate:r,endDate:u,actualDate:n}};0&&(module.exports={BAD_GATEWAY,BAD_REQUEST,FORBIDDEN,INTERNAL_SERVER_ERROR,IsJsonString,METHOD_NOT_ALLOWED,NOT_ALLOWED,NOT_FOUND,SERVICE_UNAVAILABLE,UNAUTHORIZED,asArray,asBrazilianDate,asDate,asyncForEach,brazilianDateTime,brazilianDateToDate,capitalize,checkCnpj,checkCpf,checkEmail,containsEncodedComponents,currentDay,curry,dateIsValid,decodeToken,decrypt,diffObject,dynamici18nString,elasticTransformOr,encrypt,enumHelper,error,eventBus,extractMonthInfo,extractValueFromWhere,filterAttributes,filterEmpty,findValue,firstMonthDay,flatMapData,flattenChildren,formatCurrency,formatDate,formatNumber,getExtension,getMonthNumber,getNameWithoutExtension,getNextDay,getNextWeekday,getPreviewsWeekday,getToday,getToken,getTomorrow,getYesterday,imgSrcRegex,isAfter,isNumber,isOfAge,isValidUrl,lastMonthDay,makeRefurbishFileUrl,maxDateToList,minDateToList,monthsBetween,normalizeString,nullIfEmpty,padLeft,parseArrayAsObject,parseRouteToModel,prepareDoc,prepareSession,promiseAny,promiseEach,removeProperty,removeSpecialChar,replaceNumberOrPercentage,slugify,splitList,sum,sumByFunction,validateMobilePhoneNumber,valueReplacer});
|
|
1
|
+
"use strict";var $=Object.create;var h=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var Z=(e,a)=>{for(var t in a)h(e,t,{get:a[t],enumerable:!0})},k=(e,a,t,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of H(a))!Q.call(e,r)&&r!==t&&h(e,r,{get:()=>a[r],enumerable:!(o=J(a,r))||o.enumerable});return e};var g=(e,a,t)=>(t=e!=null?$(K(e)):{},k(a||!e||!e.__esModule?h(t,"default",{value:e,enumerable:!0}):t,e)),X=e=>k(h({},"__esModule",{value:!0}),e);var ia={};Z(ia,{BAD_GATEWAY:()=>oe,BAD_REQUEST:()=>l,FORBIDDEN:()=>ae,INTERNAL_SERVER_ERROR:()=>I,IsJsonString:()=>re,METHOD_NOT_ALLOWED:()=>te,NOT_ALLOWED:()=>v,NOT_FOUND:()=>B,SERVICE_UNAVAILABLE:()=>ne,UNAUTHORIZED:()=>E,asArray:()=>R,asBrazilianDate:()=>S,asDate:()=>D,asyncForEach:()=>ie,brazilianDateTime:()=>M,brazilianDateToDate:()=>Be,capitalize:()=>N,checkCnpj:()=>le,checkCpf:()=>de,checkEmail:()=>ce,containsEncodedComponents:()=>ue,currentDay:()=>w,curry:()=>pe,dateIsValid:()=>Oe,decodeToken:()=>je,decrypt:()=>me,diffObject:()=>fe,dynamici18nString:()=>ye,elasticTransformOr:()=>ge,encrypt:()=>he,enumHelper:()=>n,error:()=>f,eventBus:()=>Ee,extractMonthInfo:()=>sa,extractValueFromWhere:()=>xe,filterAttributes:()=>Ce,filterEmpty:()=>be,findValue:()=>A,firstMonthDay:()=>T,flatMapData:()=>na,flattenChildren:()=>O,formatCurrency:()=>P,formatDate:()=>V,formatNumber:()=>Fe,getExtension:()=>Ue,getMonthNumber:()=>Se,getNameWithoutExtension:()=>De,getNextDay:()=>ve,getNextWeekday:()=>j,getPreviewsWeekday:()=>G,getToday:()=>Ne,getToken:()=>W,getTomorrow:()=>Pe,getYesterday:()=>Ae,imgSrcRegex:()=>_e,isAfter:()=>Re,isNumber:()=>Me,isOfAge:()=>Te,isValidUrl:()=>Ve,lastMonthDay:()=>L,makeRefurbishFileUrl:()=>Ge,maxDateToList:()=>Le,minDateToList:()=>we,monthsBetween:()=>Ie,normalizeString:()=>oa,nullIfEmpty:()=>ze,padLeft:()=>qe,parseArrayAsObject:()=>We,parseRouteToModel:()=>Ye,prepareDoc:()=>$e,prepareSession:()=>Je,promiseAny:()=>He,promiseEach:()=>se,removeProperty:()=>Ke,removeSpecialChar:()=>Qe,replaceNumberOrPercentage:()=>ra,slugify:()=>Ze,splitList:()=>Xe,sum:()=>ea,sumByFunction:()=>aa,validateMobilePhoneNumber:()=>ta,valueReplacer:()=>C});module.exports=X(ia);var F={userNotFound:"Usu\xE1rio n\xE3o foi encontrado.",pageNotFound:"Desculpe. P\xE1gina n\xE3o encontrada.",notAuthorized:"N\xE3o autorizado.",tokenExpired:"Sess\xE3o expirada.",invalidToken:"Token inv\xE1lido.",notUpdated:"Nenhum registro foi alterado.",cantDelete:"Esse registro est\xE1 sendo usado, por isso n\xE3o \xE9 poss\xEDvel apaga-lo.",general:"Ocorreu um erro.",sentError:"Erro ao enviar proposta",noUser:"Usu\xE1rio n\xE3o encontrado.",noEmail:"E-mail n\xE3o foi informado",noPassword:"Senha n\xE3o foi informada.",invalidEmail:"O e-mail informado \xE9 inv\xE1lido.",uniqueEmail:"O e-mail informado j\xE1 est\xE1 cadastrado.",invalidCPF:"O CPF informado \xE9 inv\xE1lido.",invalidCNPJ:"O CNPJ informado \xE9 inv\xE1lido.",uniqueName:"Nome informado j\xE1 cadastrado.",noName:"Nome n\xE3o foi informado.",noData:"Dados n\xE3o informados.",noDate:"Data n\xE3o informada.",noModel:"Ocorreu um erro com a entidade",invalidId:"Id inv\xE1lido",invalidCredentials:"Usu\xE1rio e/ou senha inv\xE1lidos.",noPhone:"Telefone n\xE3o foi informado.",noCPF:"CPF n\xE3o foi informado.",noRG:"RG n\xE3o foi informado.",noZipcode:"CEP n\xE3o foi informado.",noStreet:"Endere\xE7o n\xE3o foi informado.",noNumber:"N\xFAmero n\xE3o foi informado.",noState:"Estado n\xE3o foi informado.",noCity:"Cidade n\xE3o foi informada.",noNeighborhood:"Bairro n\xE3o foi informado.",noCNPJ:"CNPJ n\xE3o foi informado.",noCompanyName:"Raz\xE3o social n\xE3o foi informada.",noTrademarkName:"Nome fantasia n\xE3o foi informado.",noCompanyZipcode:"CEP da empresa n\xE3o foi informado.",noCompanyStreet:"Endere\xE7o da empresa n\xE3o foi informado.",noCompanyNumber:"N\xFAmero da empresa n\xE3o foi informado.",noCompanyState:"Estado da empresa n\xE3o foi informado.",noCompanyCity:"Cidade da empresa n\xE3o foi informado.",noCompanyNeighborhood:"Bairro da empresa n\xE3o foi informado.",noBirthdate:"Data de nascimento n\xE3o foi informada.",noCompany:"Empresa n\xE3o informada.",invalidURL:"URL inv\xE1lida.",noPermissions:"Permiss\xF5es n\xE3o encontradas.",fileLimit50:"Os arquivos n\xE3o pode ter mais de 50 MB. Para arquivos maiores voc\xEA pode informar a url de um servidor externo.",fileLimit10:"Os arquivos n\xE3o pode ter mais de 10 MB. Para arquivos maiores voc\xEA pode informar a url de um servidor externo no corpo da mensagem.",maxLength:"O nome deve ter no m\xE1ximo 255 caracteres.",invalidData:"Dados inv\xE1lidos.",invalidDate:"Data inv\xE1lida.",invalidDates:"Data de in\xEDcio n\xE3o pode ser maior que data de fim.",invalidUUID:"A URL informada n\xE3o foi encontrada, verifique se est\xE1 correto o link desejado.",invalidValue:"Valor informado inv\xE1lido.",invalidDoc:"O documento informado (CNPJ/CPF) est\xE1 incorreto.",docAlreadyExists:"Documento j\xE1 cadastrado.",tokenPasswordError:"Link de recupera\xE7\xE3o de senha inv\xE1lido.",errPassword:"Senha est\xE1 inv\xE1lida.",noParameters:"Par\xE2metros n\xE3o informado.",uniqueCode:"C\xF3digo j\xE1 cadastrado."};var f={},U={en:F,"pt-br":"PT_BR_LOCALE"},s=U.en||U.en,l=400,v=405,E=401,ae=403,B=404,te=405,I=500,oe=502,ne=503;f.NOT_FOUND={userNotFound:{statusCode:B,code:"NF-00001",message:s.userNotFound},pageNotFound:{statusCode:B,code:"NF-00002",message:s.pageNotFound}};f.UNAUTHORIZED={notAuthorized:{statusCode:E,code:"UA-00001",message:s.notAuthorized},tokenExpired:{statusCode:E,code:"UA-00002",message:s.tokenExpired},invalidToken:{statusCode:E,code:"UA-00003",message:s.invalidToken}};f.NOT_ALLOWED={notUpdated:{statusCode:v,code:"NA-00001",message:s.notUpdated},cantDelete:{statusCode:v,code:"NA-00002",message:s.cantDelete}};f.INTERNAL_SERVER_ERROR={general:{statusCode:I,code:"ISE-00001",message:s.general},sentError:{statusCode:I,code:"ISE-00002",message:s.sentError}};f.BAD_REQUEST={noUser:{statusCode:l,code:"LIB-B-00001",message:s.noUser},noEmail:{statusCode:l,code:"LIB-B-00002",message:s.noEmail},noPassword:{statusCode:l,code:"LIB-B-00003",message:s.noPassword},invalidEmail:{statusCode:l,code:"LIB-B-00004",message:s.invalidEmail},uniqueEmail:{statusCode:l,code:"LIB-B-00005",message:s.uniqueEmail},invalidCPF:{statusCode:l,code:"LIB-B-00006",message:s.invalidCPF},invalidCNPJ:{statusCode:l,code:"LIB-B-00007",message:s.invalidCNPJ},uniqueName:{statusCode:l,code:"LIB-B-00008",message:s.uniqueName},noName:{statusCode:l,code:"LIB-B-00009",message:s.noName},noData:{statusCode:l,code:"LIB-B-00010",message:s.noData},invalidCredentials:{statusCode:l,code:"LIB-B-00011",message:s.invalidCredentials},tokenPasswordError:{statusCode:l,code:"LIB-B-00012",message:s.tokenPasswordError},errPassword:{statusCode:l,code:"LIB-B-00013",message:s.errPassword},noPhone:{statusCode:l,code:"LIB-B-00014",message:s.noPhone},noCPF:{statusCode:l,code:"LIB-B-00015",message:s.noCPF},noRG:{statusCode:l,code:"LIB-B-00016",message:s.noRG},noZipcode:{statusCode:l,code:"LIB-B-00017",message:s.noZipcode},noStreet:{statusCode:l,code:"LIB-B-00018",message:s.noStreet},noNumber:{statusCode:l,code:"LIB-B-00019",message:s.noNumber},noState:{statusCode:l,code:"LIB-B-00020",message:s.noState},noCity:{statusCode:l,code:"LIB-B-00021",message:s.noCity},noNeighborhood:{statusCode:l,code:"LIB-B-00022",message:s.noNeighborhood},noCNPJ:{statusCode:l,code:"LIB-B-00023",message:s.noCNPJ},noCompanyName:{statusCode:l,code:"LIB-B-00024",message:s.noCompanyName},noTrademarkName:{statusCode:l,code:"LIB-B-00025",message:s.noTrademarkName},noCompanyZipcode:{statusCode:l,code:"LIB-B-00026",message:s.noCompanyZipcode},noCompanyStreet:{statusCode:l,code:"LIB-B-00027",message:s.noCompanyStreet},noCompanyNumber:{statusCode:l,code:"LIB-B-00028",message:s.noCompanyNumber},noCompanyState:{statusCode:l,code:"LIB-B-00029",message:s.noCompanyState},noCompanyCity:{statusCode:l,code:"LIB-B-00030",message:s.noCompanyCity},noCompanyNeighborhood:{statusCode:l,code:"PRO-00031",message:s.noCompanyNeighborhood},noBirthdate:{statusCode:l,code:"LIB-B-00032",message:s.noBirthdate},noCompany:{statusCode:l,code:"LIB-B-00033",message:s.noCompany},noParameters:{statusCode:l,code:"LIB-B-00034",message:s.noParameters},invalidDoc:{statusCode:l,code:"LIB-B-00035",message:s.invalidDoc},docAlreadyExists:{statusCode:l,code:"LIB-B-00036",message:s.docAlreadyExists},invalidURL:{statusCode:l,code:"LIB-B-00037",message:s.invalidURL},noPermissions:{statusCode:l,code:"LIB-B-00038",message:s.noPermissions},fileLimit50:{statusCode:l,code:"LIB-B-00039",message:s.fileLimit50},fileLimit10:{statusCode:l,code:"LIB-B-00040",message:s.fileLimit10},invalidDates:{statusCode:l,code:"LIB-B-00041",message:s.invalidDates},maxLength:{statusCode:l,code:"LIB-B-00042",message:s.maxLength},uniqueCode:{statusCode:l,code:"LIB-B-00043",message:s.uniqueCode},invalidValue:{statusCode:l,code:"LIB-B-00044",message:s.invalidValue},invalidData:{statusCode:l,code:"LIB-B-00045",message:s.invalidData},invalidUUID:{statusCode:l,code:"LIB-B-00046",message:s.invalidUUID},noDate:{statusCode:l,code:"LIB-B-00047",message:s.noDate},invalidDate:{statusCode:l,code:"LIB-B-00048",message:s.invalidDate},invalidId:{statusCode:l,code:"LIB-B-00049",message:s.invalidId},noModel:{statusCode:l,code:"LIB-B-00050",message:s.noModel},sequelizeValidation:{statusCode:l,code:"LIB-B-00999"}};var re=e=>{try{JSON.parse(e)}catch{return!1}return JSON.parse(e)};var se=async(e,a)=>{for(let t of e)await a(t,e.indexOf(t))};var R=e=>e==null?[]:Array.isArray(e)?e:[e];var ie=async(e,a)=>{await Promise.all(e.map((t,o)=>a(t,o,e)))};var N=e=>{if(typeof e!="string")return"";let a=e.trim();return a.charAt(0).toUpperCase()+a.slice(1)};var le=e=>{let a,t,o,r,d,c,p=!0;if(e.length<14)return!1;for(let u=1;u<e.length;u++)if(e.charAt(u-1)!==e.charAt(u)){p=!1;break}if(!p){c=e.length-2,a=e.substring(0,c),t=e.substring(c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(a.charAt(u))*d--,d<2&&(d=9);if(r=o%11<2?0:11-o%11,r!==parseInt(t.charAt(0)))return!1;c+=1,a=e.substring(0,c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(a.charAt(u))*d--,d<2&&(d=9);return r=o%11<2?0:11-o%11,r===parseInt(t.charAt(1))}return!1};var de=(e,a=!1)=>{let t,o;return t=0,e.length<11||!a&&e.split("").every(r=>r===e[0])||(Array.from({length:9}).forEach((r,d)=>{t+=parseInt(e.substring(d,d+1),10)*(11-(d+1))}),o=t*10%11,(o===10||o===11)&&(o=0),o!==parseInt(e.substring(9,10),10))?!1:(t=0,Array.from({length:10}).forEach((r,d)=>{t+=parseInt(e.substring(d,d+1),10)*(12-(d+1))}),o=t*10%11,(o===10||o===11)&&(o=0),o===parseInt(e.substring(10,11),10))};var ce=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);var ue=e=>decodeURI(e)!==decodeURIComponent(e);var pe=e=>(...a)=>e.length>a.length?e.bind(null,...a):e(...a);var x=g(require("crypto-js")),me=(e,a)=>x.AES.decrypt(e,a).toString(x.enc.Utf8);var fe=(e,a)=>Object.keys(a).reduce((t,o)=>{if(e[o]===a[o]||o==="lastModifiedBy"||o==="createdAt")return t;let{oldData:r,newData:d}=t;return{oldData:{...r,[o]:e[o]},newData:{...d,[o]:a[o]}}},{});var ye=(e,a)=>e&&typeof e=="string"?e.search(/[a-z]\.[a-z]/i)>=0?a.__(e):e:"";var ge=e=>{let a={};return e==null||e.forEach(t=>{Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].toLowerCase()==="true"||t[r].toLowerCase()==="false")?a[r]=t[r].toLowerCase()==="true":a[r]=t[r]})}),a};var _=g(require("crypto-js")),he=(e,a)=>(typeof e=="object"&&(e=JSON.stringify(e)),_.AES.encrypt(e,a).toString());var n={};n.fileType={receipt:"receipt",paymentVoucher:"paymentVoucher",quote:"quote",others:"others",project:"project",proposal:"proposal",bankBillet:"bankBillet",refund:"refund"};n.refurbishItemStatus={approved:{label:"Aprovado",value:"approved"},rejected:{label:"N\xE3o aprovado",value:"rejected"},pending:{label:"Para aprovar",value:"pending"},activeStatus:["approved","pending"]};n.companyStatus={created:{id:1,name:"Cadastro iniciado"},onBoarding:{id:2,name:"Aguardando libera\xE7\xE3o"},active:{id:3,name:"Ativo"},blocked:{id:4,name:"Bloqueado"},cancelled:{id:5,name:"Cancelada"}};n.companyType={architect:{id:1,name:"Arquitetura e design de interiores",roles:["architect"]},service:{id:2,name:"Execu\xE7\xE3o de obra"},store:{id:3,name:"Loja de produtos e materiais"},factory:{id:4,name:"Fabricante"},other:{id:10,name:"Outros"}};n.refurbishStatus={new:{id:1,name:"Novo"},contact:{id:2,name:"Em contato"},proposalSent:{id:3,name:"Proposta enviada"},archived:{id:4,name:"Arquivada"},winner:{id:5,name:"Ganha",winner:!0},execution:{id:5,name:"Em andamento"},finished:{id:6,name:"Finalizado"},cancelled:{id:7,name:"Cancelado"},activeOpportunity:[1,2,3],opportunity:[1,2,3,4],project:[5,6,7],end:[4,5,6,7]};n.refurbishStage={1:{id:1,name:"Oportunidade"},2:{id:2,name:"Projeto"}};n.roles={admin:{id:"admin",name:"Administrador"},sales:{id:"sales",name:"Venda"},arch:{id:"architect",name:"Arquitetura"},plan:{id:"plan",name:"Planejamento"},work:{id:"work",name:"Obra"},quality:{id:"quality",name:"Qualidade"},supply:{id:"supply",name:"Suprimentos"},contractor:{id:"contractor",name:"Empreiteiro"},beta:{id:"beta",name:"Beta user"}};n.userType={guest:{name:"Visitante",value:"guest",type:"visitante"},operator:{name:"Operador",value:"operator",type:"operador"},customer:{name:"Cliente",value:"customer",type:"cliente"},provider:{name:"Profissional",value:"provider",type:"profissional"},system:{name:"Sistema",value:"system",type:"sistema"},anonymous:{name:"An\xF4nimo",value:"anonymous"},realTypes:["guest","operator","customer","provider"]};n.paymentStatus={waitingOrder:1,analyzing:2,waitingRelease:3,released:4,transferred:5,markAsPaid:6,allowTransfer:[3,4],allowChange:[1,6],sendEmail:[4,5]};n.personTypes={pf:"pf",pj:"pj"};n.asaasPersonTypes={pf:"FISICA",pj:"JURIDICA"};n.stepAccount={personal:0,address:1,documents:2};n.statusVobiPay={PENDING:{color:"#FF8E1B",label:"Em an\xE1lise"}};n.refurbishItemType={product:1,labor:2,parent:3,composition:4,notParent:[1,2,4],productLabor:[1,2]};n.notificationChannel={system:"system",email:"email",whatsApp:"whatsApp"};n.planType={free:{value:"free",label:"freemium"},paid:{value:"paid",label:"Pago"}};n.installmentStatuses={pendingPayment:1,paid:2,confirm:3,paidManually:4,inAnalysis:5,refunded:6,refundRequested:7,onGoingRefund:8,chargebackRequested:9,onGoingChargeback:10,waitingChargeback:11,cancelled:12,all:[1,2,3,4,5,6,7,8,9,10],paidVobiPay:[2,3,7,8,9,10,11],bankStatement:[2,4,6,7,8,9,10,11],allPaid:[2,3,4,7,8,9,10,11],allPaidBalance:[2,4,7,8,9,10,11],allPending:[1,5]};n.paymentStatuses={draft:1,open:2,paid:3,cancelled:4,realValues:[2,3],allStatus:[1,2,3,4]};n.billType={income:"receita",expense:"despesa",transfer:"transferencia",balance:"saldo inicial"};n.paymentTypeValues={expense:{value:"expense",label:"despesa"},income:{value:"income",label:"receita"},transfer:{value:"transfer",label:"transfer\xEAncia"},payment:{value:"payment",label:"pagamento"},balance:{value:"balance",label:"saldo inicial"}};n.financialCategories={serviceSelling:1,productsSelling:2,fee:3,investimentIncome:4,others:5,advanceFutureCapital:6,capitalIncrease:7,bankLoan:8,institutionLoan:9,partnerLoan:10,paymentShareCapital:11};n.getEnumValue=(e,a,t=["id","name"])=>{let o=null;return!e||!a||Object.keys(e).some(r=>e[r][t[0]]===a?(o=e[r][t[1]],!0):!1),o};n.asaasPixType={CPF:"CPF",CNPJ:"CNPJ",EMAIL:"E-mail",PHONE:"Celular",EVP:"Aleat\xF3ria"};n.paymentTypes={pix:1,bankSlip:2,creditCard:3,debitCard:4,transfer:5,money:6,other:7};n.paymentTypesDesc={1:"Pix",2:"Boleto",3:"Cart\xE3o de cr\xE9dito",4:"Cart\xE3o de d\xE9bito",5:"Transfer\xEAncia",6:"Dinheiro",7:"Outro"};n.vobiPayPaymentType={pix:1,bankSlip:2,creditCard:3,all:[1,2,3],1:"pix",2:"bankSlip",3:"creditCard"};n.asaasPaymentStatus={PENDING:{label:"PENDING",value:n.installmentStatuses.pendingPayment},RECEIVED:{label:"RECEIVED",value:n.installmentStatuses.paid},CONFIRMED:{label:"CONFIRMED",value:n.installmentStatuses.confirm},OVERDUE:{label:"OVERDUE",value:null},REFUNDED:{label:"REFUNDED",value:n.installmentStatuses.refunded},RECEIVED_IN_CASH:{label:"RECEIVED_IN_CASH",value:n.installmentStatuses.paidManually},REFUND_REQUESTED:{label:"REFUND_REQUESTED",value:n.installmentStatuses.refundRequested},REFUND_IN_PROGRESS:{label:"REFUND_IN_PROGRESS",value:n.installmentStatuses.onGoingRefund},CHARGEBACK_REQUESTED:{label:"CHARGEBACK_REQUESTED",value:n.installmentStatuses.chargebackRequested},CHARGEBACK_DISPUTE:{label:"CHARGEBACK_DISPUTE",value:n.installmentStatuses.onGoingChargeback},AWAITING_CHARGEBACK_REVERSAL:{label:"AWAITING_CHARGEBACK_REVERSAL",value:n.installmentStatuses.waitingChargeback},DUNNING_REQUESTED:{label:"DUNNING_REQUESTED",value:null},DUNNING_RECEIVED:{label:"DUNNING_RECEIVED",value:null},AWAITING_RISK_ANALYSIS:{label:"AWAITING_RISK_ANALYSIS",value:n.installmentStatuses.inAnalysis}};n.maxLimitPayment={credit:{value:2e4,label:"20.000,00"},installment:{value:15e4,label:"150.000,00"},minimumInstallmentValue:{value:10,label:"10,00"},maximumInstallments:{value:12}};n.asaasWithdrawStatus={PENDING:"PENDING",PROCESSING:"PROCESSING",DONE:"DONE",FAILED:"FAILED",CANCELLED:"CANCELLED",BLOCKED:"BLOCKED"};n.withdrawStatuses={DONE:"Efetuada",PENDING:"Pendente",BANK_PROCESSING:"Processando",CANCELLED:"Cancelada",FAILED:"Falhou",BLOCKED:"Bloqueado",group:{done:["DONE"],open:["PENDING","BANK_PROCESSING"],error:["CANCELLED","FAILED","BLOCKED"]}};n.vobiPayBankAccountType={corrente:"CONTA_CORRENTE",poupanca:"CONTA_POUPANCA",salario:"CONTA_SALARIO",pagamento:"CONTA_DE_PAGAMENTO"};n.withdrawSteps={list:1,fillData:2,confirmData:3};n.billingManagerStatus={pending:1,send:2,error:3,discarded:4,notSent:5,sending:6};n.billingManagerStatusDesc={1:"Aguardando",2:"Enviado",3:"Erro",4:"Descartado",5:"N\xE3o enviado",6:"Enviando"};n.billingManagerChannels={allChannels:["email","sms","whatsapp"],email:{value:"email",label:"E-mail"},sms:{value:"sms",label:"SMS"},whatsapp:{value:"whatsapp",label:"WhatsApp"}};n.billingManagerType={allTypes:["DC","D-3","D0","D+1","D+3","D+6"],billingRulerType:["D-3","D0","D+1","D+3","D+6"],DC:{label:"Cria\xE7\xE3o da cobran\xE7a",value:"DC",tooltip:"Ao criar a cobran\xE7a",message:"de cobran\xE7a criada para {customerName} {value}"},"D-3":{label:"3 dias antes do vencimento",value:"D-3",tooltip:"3 dias antes do vencimento das parcelas",message:"de aviso de vencimento em 3 dias para {customerName} {value}"},D0:{label:"Dia do vencimento",value:"D0",tooltip:"No dia do vencimento da parcela",message:"de aviso de cobran\xE7a vencendo hoje para {customerName} {value}"},"D+1":{label:"1 dia ap\xF3s o vencimento",value:"D+1",tooltip:"1 dia ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 1 dia para {customerName} {value}"},"D+3":{label:"3 dias ap\xF3s o vencimento",value:"D+3",tooltip:"3 dias ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 3 dias para {customerName} {value}"},"D+6":{label:"6 dias ap\xF3s o vencimento",value:"D+6",tooltip:"6 dias ap\xF3s o vencimento de cada parcela",message:"de aviso de cobran\xE7a vencida h\xE1 6 dias para {customerName} {value}"}};n.paymentCreditPermission={allowed:2e4,blocked:0};n.withdrawLimit={pj:{daytime:2e4,nightly:5e3},pf:{daytime:2e4,nightly:5e3}};n.optionsRefurbishReport={financialPhysical:"financialPhysics",budgeted:"budgeted",financial:"financial",physic:"physic",financialPhysicBudgeted:{value:"financialPhysics.budgeted"},physicBudgeted:{value:"physic.budgeted"},physicAccomplished:{value:"physic.accomplished"},financialBudgeted:{value:"financial.budgeted"},financialAccomplished:{value:"financial.accomplished"},financialBudAcp:{value:"financial.budgetedAccomplished"},physicBudAcp:{value:"physic.budgetedAccomplished"}};n.refurbishReportType={budgeted:[n.optionsRefurbishReport.financialPhysicBudgeted.value,n.optionsRefurbishReport.physicBudgeted.value,n.optionsRefurbishReport.financialBudgeted.value],accomplished:[n.optionsRefurbishReport.physicAccomplished.value,n.optionsRefurbishReport.financialAccomplished.value],budgetedAccomplished:[n.optionsRefurbishReport.financialBudAcp.value,n.optionsRefurbishReport.physicBudAcp.value],common:[n.optionsRefurbishReport.financialPhysicBudgeted.value,n.optionsRefurbishReport.physicBudgeted.value,n.optionsRefurbishReport.physicBudAcp.value,n.optionsRefurbishReport.financialBudgeted.value,n.optionsRefurbishReport.financialBudAcp.value],measurement:[n.optionsRefurbishReport.physicAccomplished.value],financial:[n.optionsRefurbishReport.financialAccomplished.value],customColumns:[n.optionsRefurbishReport.physicBudAcp.value,n.optionsRefurbishReport.financialBudAcp.value],simpleExport:[n.optionsRefurbishReport.physicAccomplished.value,n.optionsRefurbishReport.financialAccomplished.value,n.optionsRefurbishReport.physicBudgeted.value,n.optionsRefurbishReport.financialBudgeted.value]};n.reportTypeActions={consolidatedByProject:{model:"refurbishes",clickRow:!1,groupBy:"refurbishes",rangeField:"paidDate",idInstallmentStatus:n.installmentStatuses.allPaid,howDoesItsWorksId:"howFinancialReportByProjectStatusPaid",tableTitle:"Resultado de projetos",tableTitleTooltip:"S\xE3o contabilizadas apenas parcelas que j\xE1 foram marcadas como pago das receitas e despesas.",withResultChart:!0,filters:{dateRangePicker:!0,selectDateFieldTofilter:!0,yearPicker:!1,columns:!0},showLegend:!0,exportCsvModel:"financial/report",exportEntity:"consolidatedByProject"},foreseenByProject:{model:"refurbishes",clickRow:!1,groupBy:"refurbishes",rangeField:"dueDate",howDoesItsWorksId:"howFinancialReportByProjectAllStatus",tableTitle:"Previs\xE3o de resultado dos projetos",tableTitleTooltip:"S\xE3o contabilizadas todas as receitas e despesas, que j\xE1 foram pagas ou ainda em aberto.",withResultChart:!0,filters:{dateRangePicker:!0,selectDateFieldTofilter:!0,yearPicker:!1,columns:!0},showLegend:!0,exportCsvModel:"financial/report",exportEntity:"foreseenByProject"},resultsByInstallment:{model:"installments",clickRow:!0,groupBy:"months",rangeField:"paidDate",idInstallmentStatus:n.installmentStatuses.allPaid,howDoesItsWorksId:"howResultsWork",tableTitle:"Transa\xE7\xF5es realizadas",tableTitleTooltip:"S\xE3o contabilizadas apenas parcelas que j\xE1 foram marcadas como pago das receitas e despesas",withResultChart:!0,filters:{dateRangePicker:!0,selectDateFieldTofilter:!0,yearPicker:!1,columns:!0},showLegend:!0,exportCsvModel:"financial",exportEntity:"resultsByInstallment"},"cashFlow-monthly":{model:"cashFlow",idInstallmentStatus:n.installmentStatuses.allPaid,howDoesItsWorksId:"howCashFlowWork",tableTitle:"Fluxo de caixa",tableTitleTooltip:"",withResultChart:!1,filters:{dateRangePicker:!1,selectDateFieldTofilter:!1,yearPicker:!0,columns:!0},showLegend:!1,exportCsvModel:"financial/cashFlow",exportEntity:"cashFlow"},dre:{model:"dre",howDoesItsWorksId:"howDREWorks",filters:{dateRangePicker:!1,selectDateFieldTofilter:!1,yearPicker:!0,columns:!1},showLegend:!1,exportCsvModel:"financial/dre",exportEntity:"dre"},"cashFlow-daily":{model:"cashFlow",howDoesItsWorksId:"howDailyCashFlowWorks",tableTitleTooltip:"",filters:{dateRangePicker:!1,selectDateFieldTofilter:!1,monthPicker:!0,columns:!1,paymentBankAccount:!0},showLegend:!1,exportCsvModel:"financial/dailyCashFlow",exportEntity:"dailyCashFlow"}};n.extraValuesPayment={taxes:"taxes",discount:"discount",shipping:"shipping",dueDateDiscount:"dueDateDiscount",dueDateDiscountType:"dueDateDiscountType",dueDateLimitDays:"dueDateLimitDays",fine:"fine",fineType:"fineType",interest:"interest"};n.extraValuesPaymentType={simple:[n.extraValuesPayment.taxes,n.extraValuesPayment.discount,n.extraValuesPayment.shipping],asaas:[n.extraValuesPayment.dueDateDiscount,n.extraValuesPayment.dueDateDiscountType,n.extraValuesPayment.dueDateLimitDays,n.extraValuesPayment.fine,n.extraValuesPayment.fineType,n.extraValuesPayment.interest]};n.fineInterestDiscountType={percentage:{value:"PERCENTAGE",label:"Percentual"},fixed:{value:"FIXED",label:"Valor fixo"}};n.paymentPermissions={financialResume:"financialResume",financialSupplier:"financialSupplier",financialOwnBusiness:"financialOwnBusiness",financialIncome:"financialIncome",financialExpense:"financialExpense",financialTransfer:"financialTransfer",financialResults:"financialResults",financialBankStatement:"financialBankStatement",financialReport:"financialReport",projectResume:"projectResume",projectSupplier:"projectSupplier",projectOwnBusiness:"projectOwnBusiness",projectIncome:"projectIncome",projectExpense:"projectExpense",projectResults:"projectResults",projectBudgetedAccomplished:"projectBudgetedAccomplished"};n.colors={primary400:"#4F8EFA",primary500:"#2F74DE",teal500:"#00a296",teal600:"#009389",green500:"#46a22e",green600:"#40932A",yellow400:"#e0a819",yellow500:"#BA8A12",orange500:"#de7400",orange600:"#CA6A00",red500:"#ef4134",red600:"#D93B2F",pink500:"#e547a6",pink600:"#D04197",violet500:"#a145de",violet600:"#933FCA",neutral500:"#6F778B",neutral600:"#565E71"};n.maxInstallmentLength=60;var Ee={on(e,a){document.addEventListener(e,a)},dispatch(e,a){document.dispatchEvent(new CustomEvent(e,{detail:a}))},remove(e,a){document.removeEventListener(e,a)}};var A=(e,a)=>{if(Array.isArray(e)===!1)return null;let t=null;return e.some(o=>(t=a(o),!!t)),t};var xe=(e,a)=>e?e[a]?e[a]:A(e.or,t=>t[a]):null;var De=e=>{let a=e.lastIndexOf(".");return a===-1?e:e.substring(0,a)};var Ce=(e,a)=>e&&e.length&&a&&a.length?e.map(t=>Object.entries(t).filter(([o])=>a.includes(o)).reduce((o,[r,d])=>Object.assign(o,{[r]:d}),{})):[];var be=e=>e.filter(a=>R(a).length>0&&a);var P=(e,a={})=>{let t={decimalCount:2,decimal:",",thousands:".",...a},{decimal:o,thousands:r,currencySymbol:d}=t,{decimalCount:c}=t;try{c=Math.abs(c),c=isNaN(c)?2:c;let p=e<0?"-":"",u=parseInt(e=Math.abs(Number(e)||0).toFixed(c),10).toString(),y=u.length>3?u.length%3:0;return(d?`${p}${d}`:p)+(y?u.substr(0,y)+r:"")+u.substr(y).replace(/(\d{3})(?=\d)/g,`$1${r}`)+(c?o+Math.abs(e-parseInt(u,10)).toFixed(c).slice(2):"")}catch(p){return console.log(p),""}};var m=g(require("moment-timezone")),M=e=>{let a=e?new Date(e):new Date,t={timeZone:"America/Sao_Paulo"},o=a.toLocaleString("en-US",t);return new Date(o)},V=(e,a,t,o,r)=>{if(!e)return null;if(r)return(0,m.default)(e,a);let d=m.default.utc(e);return o||d.local(),t&&d.locale(t),d.format(a)},ve=(e,a="YYYY-MM-DD")=>{let t=(0,m.default)(e,a).add(1,"days");return typeof e=="string"?t.format(a):t.toDate()},j=(e=new Date,a=1)=>{let t=new Date(e.setDate(e.getDate()+a));return t.getDay()%6?t:j(t)},G=(e=new Date,a=1)=>{let t=new Date(e.setDate(e.getDate()-a));return t.getDay()%6?t:G(t)},D=e=>e?m.default.utc(e).local():null,S=e=>e&&m.default.tz(new Date(e),"America/Sao_Paulo"),Be=(e,a)=>{let t=S(e);return t&&t.format(a||"YYYY-MM-DDTHH:mm:ssZ")},Ie=(e,a)=>{if(!e||!a)return null;let t=D(e),o=D(a);return!t||!o?null:o.diff(t,"months")},Re=(e,a)=>{var t;return!e||!a?null:(t=D(e))==null?void 0:t.isAfter(a)},Ne=(e=!0)=>{let a=m.default.tz("America/Sao_Paulo");return e?a.startOf("day").toDate():a.toDate()},Ae=(e=!0)=>{let a=m.default.tz("America/Sao_Paulo").subtract(1,"day");return e?a.startOf("day").toDate():a.toDate()},Pe=(e=!0)=>{let a=m.default.tz("America/Sao_Paulo").add(1,"day");return e?a.startOf("day").toDate():a.toDate()},Se=e=>{let a=M(e);return`${a.getFullYear()}${a.getMonth().toString().padStart(2,"0")}`},Te=(e,a)=>{let t=new Date(e),o=new Date;return new Date(o.getFullYear()-a,o.getMonth(),o.getDate()).getTime()>t.getTime()},Le=e=>m.default.max(e),we=e=>m.default.min(e),Oe=e=>(0,m.default)(e).isValid(),T=(e,a)=>new Date(e,a-1,1).toISOString().split("T")[0],L=(e,a)=>new Date(e,a,0).toISOString().split("T")[0],w=()=>{let e=new Date(S(new Date));return V(e,"YYYY-MM-DD")};var ke=g(require("dayjs"));var C=e=>e.length===2?[e[0].replace(/\./g,""),e[1].replace(/\./g,"")]:e;var z=e=>{let a=C(e.toString().replace("%","").replace("R$","").replace(/\s/g,"").trim().split(","));if(a.length===2)return a.join(".");let t=C(a[0].split("."));return t.length===2?t.join("."):a[0].replace(/\./g,"")},Fe=e=>{if(e==null)return e;if(!z(e))return null;let a=Number(z(e));return a>=Number.MAX_SAFE_INTEGER||Number.isNaN(a)?null:a};var Ue=e=>{let a=e.indexOf("."),t=e.length;return a&&t?e.substr(a,t):""};var _e=new RegExp('<img[^>]+src="(https://vobi-storage[^">]+)"',"gm");var Me=e=>!isNaN(parseFloat(e))&&!isNaN(e-0);var Ve=e=>{try{return!!new URL(e)}catch{return!1}};var q=g(require("jwt-decode")),W=e=>{var a,t;return(a=e.headers)!=null&&a.authorization&&((t=e.headers)==null?void 0:t.authorization.split(" ")[0])==="Bearer"?e.headers.authorization.split(" ")[1]:e.query&&e.query.token?e.query.token:null},je=(e,a,t)=>{try{let o=W(e);if(o){let{user:r,isCustomerView:d,accessedBy:c,vaultToken:p}=(0,q.default)(o);e.user={...r,isCustomerView:d,accessedBy:c,vaultToken:p}}return t()}catch(o){console.log("err",o);let r=new Error("Invalid token");return t(r)}};var Ge=(e,a,t,o)=>{let r=e.idStatus>=5?"projetos":"oportunidades",d=a==="customer"?"cliente":"profissional",c=`/${d}/${r}/perfil/${e.id}`,p=`/${d}`;return`${{operator:c,provider:c,customer:p}}/arquivos?arquivo=${t.id}${o?"&visualizar":""}`};var ze=e=>(e==null?void 0:e.length)===0?null:e;var qe=(e,a="0000")=>(a+e).slice(a.length*-1);var We=(e,a=!1)=>{let t={};for(let o=0;o<e.length;o++){let r=e[o];t[r.value]=a?{...r}:r.label}return t};var Ye=e=>e.replace(/ /g,"").split("-").reduce((a,t)=>a+N(t),"");var $e=e=>e==null?void 0:e.replace(/[,-./]/g,"");var Je=({id:e,name:a,email:t,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:y,limitAccess:Y,company:b})=>({id:e,name:a,email:t,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:y,limitAccess:Y,idPlan:b==null?void 0:b.idPlan});var He=e=>{let a=new Array(e.length),t=0;return new Promise((o,r)=>{e.forEach((d,c)=>{Promise.resolve(d).then(o).catch(p=>{a[c]=p,t+=1,t===e.length&&r(a)})})})};var Ke=(e,a)=>Object.keys(a).filter(t=>t!==e).reduce((t,o)=>({...t,[o]:a[o]}),{});var Qe=(e,a,t=!0)=>{if(!e)return e;let o=e.toLowerCase();return t&&(o=o.replace(new RegExp("\\s","g"),"")),o=o.replace(new RegExp("[\xE0\xE1\xE2\xE3\xE4\xE5]","g"),"a"),o=o.replace(new RegExp("\xE6","g"),"ae"),o=o.replace(new RegExp("\xE7","g"),"c"),o=o.replace(new RegExp("[\xE8\xE9\xEA\xEB]","g"),"e"),o=o.replace(new RegExp("[\xEC\xED\xEE\xEF]","g"),"i"),o=o.replace(new RegExp("\xF1","g"),"n"),o=o.replace(new RegExp("[\xF2\xF3\xF4\xF5\xF6]","g"),"o"),o=o.replace(new RegExp("\u0153","g"),"oe"),o=o.replace(new RegExp("[\xF9\xFA\xFB\xFC]","g"),"u"),o=o.replace(new RegExp("[\xFD\xFF]","g"),"y"),o=o.replace("'",""),o=o.replace("\xB4",""),o=o.replace("`",""),a&&(o=o.replace(new RegExp("\\W","g"),"")),o};var Ze=e=>e==null?void 0:e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9-/\s]/g,"").replace(/\//g,"").replace(/\s+/g,"-").toLowerCase();var Xe=(e,a)=>e.reduce((t,o,r)=>{let d=Math.floor(r/a),c=[...t];return t[d]||(c[d]=[]),c[d].push(o),c},[]);var ea=(e,a,t)=>{let o=t||a;return(e==null?void 0:e.map(r=>o?r[t]||r[a]:r).reduce((r,d)=>r+(Number(d||0)||0),0))||0};var aa=(e,a)=>(e==null?void 0:e.map(t=>a(t)).reduce((t,o)=>t+(Number(o||0)||0),0))||0;var ta=e=>{let a=e.replace(/\D/g,"");return/^(?:\+?55 ?)?(?:0?[1-9]{2})?9\d{8}$/.test(a)};var oa=e=>typeof e!="string"||!e?"":e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim();var O=(e,a="")=>!e||e.length<=0?[]:e.flatMap((t,o)=>{let r=a?`${a}.${o+1}`:`${o+1}`,{children:d,...c}=t;return[{...c,index:r},...O(d||[],r)]}),na=e=>O(e).reduce((t,o)=>o.id?{...t,[o.id]:o}:t,{});var ra=(e,a)=>{var o;let t=e?(o=Number(e).toFixed(2))==null?void 0:o.replace(".",","):0;return a?`${P(e*100)}%`:t};var sa=e=>{if(!e)return{};let[a,t]=e.split("-").map(Number),o=w(),r=T(a,t),d=L(a,t);return{startDate:r,endDate:d,actualDate:o}};0&&(module.exports={BAD_GATEWAY,BAD_REQUEST,FORBIDDEN,INTERNAL_SERVER_ERROR,IsJsonString,METHOD_NOT_ALLOWED,NOT_ALLOWED,NOT_FOUND,SERVICE_UNAVAILABLE,UNAUTHORIZED,asArray,asBrazilianDate,asDate,asyncForEach,brazilianDateTime,brazilianDateToDate,capitalize,checkCnpj,checkCpf,checkEmail,containsEncodedComponents,currentDay,curry,dateIsValid,decodeToken,decrypt,diffObject,dynamici18nString,elasticTransformOr,encrypt,enumHelper,error,eventBus,extractMonthInfo,extractValueFromWhere,filterAttributes,filterEmpty,findValue,firstMonthDay,flatMapData,flattenChildren,formatCurrency,formatDate,formatNumber,getExtension,getMonthNumber,getNameWithoutExtension,getNextDay,getNextWeekday,getPreviewsWeekday,getToday,getToken,getTomorrow,getYesterday,imgSrcRegex,isAfter,isNumber,isOfAge,isValidUrl,lastMonthDay,makeRefurbishFileUrl,maxDateToList,minDateToList,monthsBetween,normalizeString,nullIfEmpty,padLeft,parseArrayAsObject,parseRouteToModel,prepareDoc,prepareSession,promiseAny,promiseEach,removeProperty,removeSpecialChar,replaceNumberOrPercentage,slugify,splitList,sum,sumByFunction,validateMobilePhoneNumber,valueReplacer});
|