vobi_lib 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Y=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,t)=>{for(var a in t)h(e,a,{get:t[a],enumerable:!0})},k=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of H(t))!Q.call(e,r)&&r!==a&&h(e,r,{get:()=>t[r],enumerable:!(o=J(t,r))||o.enumerable});return e};var y=(e,t,a)=>(a=e!=null?Y(K(e)):{},k(t||!e||!e.__esModule?h(a,"default",{value:e,enumerable:!0}):a,e)),X=e=>k(h({},"__esModule",{value:!0}),e);var dt={};Z(dt,{BAD_GATEWAY:()=>oe,BAD_REQUEST:()=>l,FORBIDDEN:()=>te,INTERNAL_SERVER_ERROR:()=>I,IsJsonString:()=>re,METHOD_NOT_ALLOWED:()=>ae,NOT_ALLOWED:()=>v,NOT_FOUND:()=>B,SERVICE_UNAVAILABLE:()=>ne,UNAUTHORIZED:()=>x,asArray:()=>R,asBrazilianDate:()=>S,asDate:()=>E,asyncForEach:()=>ie,brazilianDateTime:()=>M,brazilianDateToDate:()=>Be,capitalize:()=>N,checkCnpj:()=>le,checkCpf:()=>de,checkEmail:()=>ce,containsEncodedComponents:()=>ue,currentDay:()=>w,curry:()=>pe,dateIsValid:()=>Oe,decodeToken:()=>ze,decrypt:()=>me,diffObject:()=>fe,dynamici18nString:()=>ge,elasticTransformOr:()=>ye,encrypt:()=>he,enumHelper:()=>n,error:()=>f,eventBus:()=>xe,extractMonthInfo:()=>lt,extractValueFromWhere:()=>De,filterAttributes:()=>be,filterEmpty:()=>Ce,findValue:()=>A,firstMonthDay:()=>T,flatMapData:()=>st,flattenChildren:()=>O,formatCurrency:()=>P,formatDate:()=>V,formatNumber:()=>Fe,formatNumberAnyFormat:()=>Ue,getExtension:()=>_e,getMonthNumber:()=>Se,getNameWithoutExtension:()=>Ee,getNextDay:()=>ve,getNextWeekday:()=>j,getPreviewsWeekday:()=>G,getToday:()=>Ne,getToken:()=>W,getTomorrow:()=>Pe,getYesterday:()=>Ae,imgSrcRegex:()=>Me,isAfter:()=>Re,isDateValid:()=>Ve,isNumber:()=>je,isOfAge:()=>Te,isValidUrl:()=>Ge,lastMonthDay:()=>L,makeRefurbishFileUrl:()=>qe,maxDateToList:()=>Le,minDateToList:()=>we,monthsBetween:()=>Ie,normalizeString:()=>rt,nullIfEmpty:()=>We,padLeft:()=>$e,parseArrayAsObject:()=>Ye,parseRouteToModel:()=>Je,prepareDoc:()=>He,prepareSession:()=>Ke,promiseAny:()=>Qe,promiseEach:()=>se,removeProperty:()=>Ze,removeSpecialChar:()=>Xe,replaceNumberOrPercentage:()=>it,slugify:()=>et,splitList:()=>tt,sum:()=>at,sumByFunction:()=>ot,validateMobilePhoneNumber:()=>nt,valueReplacer:()=>b});module.exports=X(dt);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,x=401,te=403,B=404,ae=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:x,code:"UA-00001",message:s.notAuthorized},tokenExpired:{statusCode:x,code:"UA-00002",message:s.tokenExpired},invalidToken:{statusCode:x,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,t)=>{for(let a of e)await t(a,e.indexOf(a))};var R=e=>e==null?[]:Array.isArray(e)?e:[e];var ie=async(e,t)=>{await Promise.all(e.map((a,o)=>t(a,o,e)))};var N=e=>{if(typeof e!="string")return"";let t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1)};var le=e=>{let t,a,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,t=e.substring(0,c),a=e.substring(c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(t.charAt(u))*d--,d<2&&(d=9);if(r=o%11<2?0:11-o%11,r!==parseInt(a.charAt(0)))return!1;c+=1,t=e.substring(0,c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(t.charAt(u))*d--,d<2&&(d=9);return r=o%11<2?0:11-o%11,r===parseInt(a.charAt(1))}return!1};var de=(e,t=!1)=>{let a,o;return a=0,e.length<11||!t&&e.split("").every(r=>r===e[0])||(Array.from({length:9}).forEach((r,d)=>{a+=parseInt(e.substring(d,d+1),10)*(11-(d+1))}),o=a*10%11,(o===10||o===11)&&(o=0),o!==parseInt(e.substring(9,10),10))?!1:(a=0,Array.from({length:10}).forEach((r,d)=>{a+=parseInt(e.substring(d,d+1),10)*(12-(d+1))}),o=a*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=>(...t)=>e.length>t.length?e.bind(null,...t):e(...t);var D=y(require("crypto-js")),me=(e,t)=>D.AES.decrypt(e,t).toString(D.enc.Utf8);var fe=(e,t)=>Object.keys(t).reduce((a,o)=>{if(e[o]===t[o]||o==="lastModifiedBy"||o==="createdAt")return a;let{oldData:r,newData:d}=a;return{oldData:{...r,[o]:e[o]},newData:{...d,[o]:t[o]}}},{});var ge=(e,t)=>e&&typeof e=="string"?e.search(/[a-z]\.[a-z]/i)>=0?t.__(e):e:"";var ye=e=>{let t={};return e==null||e.forEach(a=>{Object.keys(a).forEach(r=>{typeof a[r]=="string"&&(a[r].toLowerCase()==="true"||a[r].toLowerCase()==="false")?t[r]=a[r].toLowerCase()==="true":t[r]=a[r]})}),t};var _=y(require("crypto-js")),he=(e,t)=>(typeof e=="object"&&(e=JSON.stringify(e)),_.AES.encrypt(e,t).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,t,a=["id","name"])=>{let o=null;return!e||!t||Object.keys(e).some(r=>e[r][a[0]]===t?(o=e[r][a[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 xe={on(e,t){document.addEventListener(e,t)},dispatch(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},remove(e,t){document.removeEventListener(e,t)}};var A=(e,t)=>{if(Array.isArray(e)===!1)return null;let a=null;return e.some(o=>(a=t(o),!!a)),a};var De=(e,t)=>e?e[t]?e[t]:A(e.or,a=>a[t]):null;var Ee=e=>{let t=e.lastIndexOf(".");return t===-1?e:e.substring(0,t)};var be=(e,t)=>e&&e.length&&t&&t.length?e.map(a=>Object.entries(a).filter(([o])=>t.includes(o)).reduce((o,[r,d])=>Object.assign(o,{[r]:d}),{})):[];var Ce=e=>e.filter(t=>R(t).length>0&&t);var P=(e,t={})=>{let a={decimalCount:2,decimal:",",thousands:".",...t},{decimal:o,thousands:r,currencySymbol:d}=a,{decimalCount:c}=a;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(),g=u.length>3?u.length%3:0;return(d?`${p}${d}`:p)+(g?u.substr(0,g)+r:"")+u.substr(g).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=y(require("moment-timezone")),M=e=>{let t=e?new Date(e):new Date,a={timeZone:"America/Sao_Paulo"},o=t.toLocaleString("en-US",a);return new Date(o)},V=(e,t,a,o,r)=>{if(!e)return null;if(r)return(0,m.default)(e,t);let d=m.default.utc(e);return o||d.local(),a&&d.locale(a),d.format(t)},ve=(e,t="YYYY-MM-DD")=>{let a=(0,m.default)(e,t).add(1,"days");return typeof e=="string"?a.format(t):a.toDate()},j=(e=new Date,t=1)=>{let a=new Date(e.setDate(e.getDate()+t));return a.getDay()%6?a:j(a)},G=(e=new Date,t=1)=>{let a=new Date(e.setDate(e.getDate()-t));return a.getDay()%6?a:G(a)},E=e=>e?m.default.utc(e).local():null,S=e=>e&&m.default.tz(new Date(e),"America/Sao_Paulo"),Be=(e,t)=>{let a=S(e);return a&&a.format(t||"YYYY-MM-DDTHH:mm:ssZ")},Ie=(e,t)=>{if(!e||!t)return null;let a=E(e),o=E(t);return!a||!o?null:o.diff(a,"months")},Re=(e,t)=>{var a;return!e||!t?null:(a=E(e))==null?void 0:a.isAfter(t)},Ne=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo");return e?t.startOf("day").toDate():t.toDate()},Ae=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo").subtract(1,"day");return e?t.startOf("day").toDate():t.toDate()},Pe=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo").add(1,"day");return e?t.startOf("day").toDate():t.toDate()},Se=e=>{let t=M(e);return`${t.getFullYear()}${t.getMonth().toString().padStart(2,"0")}`},Te=(e,t)=>{let a=new Date(e),o=new Date;return new Date(o.getFullYear()-t,o.getMonth(),o.getDate()).getTime()>a.getTime()},Le=e=>m.default.max(e),we=e=>m.default.min(e),Oe=e=>(0,m.default)(e).isValid(),T=(e,t)=>new Date(e,t-1,1).toISOString().split("T")[0],L=(e,t)=>new Date(e,t,0).toISOString().split("T")[0],w=()=>{let e=new Date(S(new Date));return V(e,"YYYY-MM-DD")};var ke=y(require("dayjs"));var b=e=>e.length===2?[e[0].replace(/\./g,""),e[1].replace(/\./g,"")]:e;var z=e=>{let t=b(e.toString().replace("%","").replace("R$","").replace(/\s/g,"").trim().split(","));if(t.length===2)return t.join(".");let a=b(t[0].split("."));return a.length===2?a.join("."):t[0].replace(/\./g,"")},Fe=e=>{if(e==null)return e;if(!z(e))return null;let t=Number(z(e));return t>=Number.MAX_SAFE_INTEGER||Number.isNaN(t)?null:t},Ue=e=>{if(!e)return null;e=e==null?void 0:e.replace(/[^0-9,.-]/g,"");let t=e.includes(",")&&e.lastIndexOf(",")>e.lastIndexOf(".")?",":".",a=t==="."?/(?<=\d),(?=\d{3})/g:/(?<=\d)\.(?=\d{3})/g;e=e.replace(a,"");let[o,r=0]=e.split(t);return+`${o}.${r}`};var _e=e=>{let t=e.indexOf("."),a=e.length;return t&&a?e.substr(t,a):""};var Me=new RegExp('<img[^>]+src="(https://vobi-storage[^">]+)"',"gm");var Ve=e=>{if(!e)return!1;let t=new Date(e);return!isNaN(t.getTime())};var je=e=>!isNaN(parseFloat(e))&&!isNaN(e-0);var Ge=e=>{try{return!!new URL(e)}catch{return!1}};var q=y(require("jwt-decode")),W=e=>{var t,a;return(t=e.headers)!=null&&t.authorization&&((a=e.headers)==null?void 0:a.authorization.split(" ")[0])==="Bearer"?e.headers.authorization.split(" ")[1]:e.query&&e.query.token?e.query.token:null},ze=(e,t,a)=>{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 a()}catch(o){console.log("err",o);let r=new Error("Invalid token");return a(r)}};var qe=(e,t,a,o)=>{let r=e.idStatus>=5?"projetos":"oportunidades",d=t==="customer"?"cliente":"profissional",c=`/${d}/${r}/perfil/${e.id}`,p=`/${d}`;return`${{operator:c,provider:c,customer:p}}/arquivos?arquivo=${a.id}${o?"&visualizar":""}`};var We=e=>(e==null?void 0:e.length)===0?null:e;var $e=(e,t="0000")=>(t+e).slice(t.length*-1);var Ye=(e,t=!1)=>{let a={};for(let o=0;o<e.length;o++){let r=e[o];a[r.value]=t?{...r}:r.label}return a};var Je=e=>e.replace(/ /g,"").split("-").reduce((t,a)=>t+N(a),"");var He=e=>e==null?void 0:e.replace(/[,-./]/g,"");var Ke=({id:e,name:t,email:a,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:g,limitAccess:$,company:C})=>({id:e,name:t,email:a,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:g,limitAccess:$,idPlan:C==null?void 0:C.idPlan});var Qe=e=>{let t=new Array(e.length),a=0;return new Promise((o,r)=>{e.forEach((d,c)=>{Promise.resolve(d).then(o).catch(p=>{t[c]=p,a+=1,a===e.length&&r(t)})})})};var Ze=(e,t)=>Object.keys(t).filter(a=>a!==e).reduce((a,o)=>({...a,[o]:t[o]}),{});var Xe=(e,t,a=!0)=>{if(!e)return e;let o=e.toLowerCase();return a&&(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("`",""),t&&(o=o.replace(new RegExp("\\W","g"),"")),o};var et=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 tt=(e,t)=>e.reduce((a,o,r)=>{let d=Math.floor(r/t),c=[...a];return a[d]||(c[d]=[]),c[d].push(o),c},[]);var at=(e,t,a)=>{let o=a||t;return(e==null?void 0:e.map(r=>o?r[a]||r[t]:r).reduce((r,d)=>r+(Number(d||0)||0),0))||0};var ot=(e,t)=>(e==null?void 0:e.map(a=>t(a)).reduce((a,o)=>a+(Number(o||0)||0),0))||0;var nt=e=>{let t=e.replace(/\D/g,"");return/^(?:\+?55 ?)?(?:0?[1-9]{2})?9\d{8}$/.test(t)};var rt=e=>typeof e!="string"||!e?"":e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim();var O=(e,t="")=>!e||e.length<=0?[]:e.flatMap((a,o)=>{let r=t?`${t}.${o+1}`:`${o+1}`,{children:d,...c}=a;return[{...c,index:r},...O(d||[],r)]}),st=e=>O(e).reduce((a,o)=>o.id?{...a,[o.id]:o}:a,{});var it=(e,t)=>{var o;let a=e?(o=Number(e).toFixed(2))==null?void 0:o.replace(".",","):0;return t?`${P(e*100)}%`:a};var lt=e=>{if(!e)return{};let[t,a]=e.split("-").map(Number),o=w(),r=T(t,a),d=L(t,a);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,formatNumberAnyFormat,getExtension,getMonthNumber,getNameWithoutExtension,getNextDay,getNextWeekday,getPreviewsWeekday,getToday,getToken,getTomorrow,getYesterday,imgSrcRegex,isAfter,isDateValid,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 Y=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,t)=>{for(var a in t)h(e,a,{get:t[a],enumerable:!0})},k=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of H(t))!Q.call(e,r)&&r!==a&&h(e,r,{get:()=>t[r],enumerable:!(o=J(t,r))||o.enumerable});return e};var y=(e,t,a)=>(a=e!=null?Y(K(e)):{},k(t||!e||!e.__esModule?h(a,"default",{value:e,enumerable:!0}):a,e)),X=e=>k(h({},"__esModule",{value:!0}),e);var dt={};Z(dt,{BAD_GATEWAY:()=>oe,BAD_REQUEST:()=>l,FORBIDDEN:()=>te,INTERNAL_SERVER_ERROR:()=>I,IsJsonString:()=>re,METHOD_NOT_ALLOWED:()=>ae,NOT_ALLOWED:()=>v,NOT_FOUND:()=>B,SERVICE_UNAVAILABLE:()=>ne,UNAUTHORIZED:()=>x,asArray:()=>R,asBrazilianDate:()=>S,asDate:()=>E,asyncForEach:()=>ie,brazilianDateTime:()=>M,brazilianDateToDate:()=>Be,capitalize:()=>N,checkCnpj:()=>le,checkCpf:()=>de,checkEmail:()=>ce,containsEncodedComponents:()=>ue,currentDay:()=>w,curry:()=>pe,dateIsValid:()=>Oe,decodeToken:()=>ze,decrypt:()=>me,diffObject:()=>fe,dynamici18nString:()=>ge,elasticTransformOr:()=>ye,encrypt:()=>he,enumHelper:()=>n,error:()=>f,eventBus:()=>xe,extractMonthInfo:()=>lt,extractValueFromWhere:()=>De,filterAttributes:()=>be,filterEmpty:()=>Ce,findValue:()=>A,firstMonthDay:()=>T,flatMapData:()=>st,flattenChildren:()=>O,formatCurrency:()=>P,formatDate:()=>V,formatNumber:()=>Fe,formatNumberAnyFormat:()=>Ue,getExtension:()=>_e,getMonthNumber:()=>Se,getNameWithoutExtension:()=>Ee,getNextDay:()=>ve,getNextWeekday:()=>j,getPreviewsWeekday:()=>G,getToday:()=>Ne,getToken:()=>W,getTomorrow:()=>Pe,getYesterday:()=>Ae,imgSrcRegex:()=>Me,isAfter:()=>Re,isDateValid:()=>Ve,isNumber:()=>je,isOfAge:()=>Te,isValidUrl:()=>Ge,lastMonthDay:()=>L,makeRefurbishFileUrl:()=>qe,maxDateToList:()=>Le,minDateToList:()=>we,monthsBetween:()=>Ie,normalizeString:()=>rt,nullIfEmpty:()=>We,padLeft:()=>$e,parseArrayAsObject:()=>Ye,parseRouteToModel:()=>Je,prepareDoc:()=>He,prepareSession:()=>Ke,promiseAny:()=>Qe,promiseEach:()=>se,removeProperty:()=>Ze,removeSpecialChar:()=>Xe,replaceNumberOrPercentage:()=>it,slugify:()=>et,splitList:()=>tt,sum:()=>at,sumByFunction:()=>ot,validateMobilePhoneNumber:()=>nt,valueReplacer:()=>b});module.exports=X(dt);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,x=401,te=403,B=404,ae=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:x,code:"UA-00001",message:s.notAuthorized},tokenExpired:{statusCode:x,code:"UA-00002",message:s.tokenExpired},invalidToken:{statusCode:x,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,t)=>{for(let a of e)await t(a,e.indexOf(a))};var R=e=>e==null?[]:Array.isArray(e)?e:[e];var ie=async(e,t)=>{await Promise.all(e.map((a,o)=>t(a,o,e)))};var N=e=>{if(typeof e!="string")return"";let t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1)};var le=e=>{let t,a,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,t=e.substring(0,c),a=e.substring(c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(t.charAt(u))*d--,d<2&&(d=9);if(r=o%11<2?0:11-o%11,r!==parseInt(a.charAt(0)))return!1;c+=1,t=e.substring(0,c),o=0,d=c-7;for(let u=0;u<c;u++)o+=parseInt(t.charAt(u))*d--,d<2&&(d=9);return r=o%11<2?0:11-o%11,r===parseInt(a.charAt(1))}return!1};var de=(e,t=!1)=>{let a,o;return a=0,e.length<11||!t&&e.split("").every(r=>r===e[0])||(Array.from({length:9}).forEach((r,d)=>{a+=parseInt(e.substring(d,d+1),10)*(11-(d+1))}),o=a*10%11,(o===10||o===11)&&(o=0),o!==parseInt(e.substring(9,10),10))?!1:(a=0,Array.from({length:10}).forEach((r,d)=>{a+=parseInt(e.substring(d,d+1),10)*(12-(d+1))}),o=a*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=>(...t)=>e.length>t.length?e.bind(null,...t):e(...t);var D=y(require("crypto-js")),me=(e,t)=>D.AES.decrypt(e,t).toString(D.enc.Utf8);var fe=(e,t)=>Object.keys(t).reduce((a,o)=>{if(e[o]===t[o]||o==="lastModifiedBy"||o==="createdAt")return a;let{oldData:r,newData:d}=a;return{oldData:{...r,[o]:e[o]},newData:{...d,[o]:t[o]}}},{});var ge=(e,t)=>e&&typeof e=="string"?e.search(/[a-z]\.[a-z]/i)>=0?t.__(e):e:"";var ye=e=>{let t={};return e==null||e.forEach(a=>{Object.keys(a).forEach(r=>{typeof a[r]=="string"&&(a[r].toLowerCase()==="true"||a[r].toLowerCase()==="false")?t[r]=a[r].toLowerCase()==="true":t[r]=a[r]})}),t};var _=y(require("crypto-js")),he=(e,t)=>(typeof e=="object"&&(e=JSON.stringify(e)),_.AES.encrypt(e,t).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,t,a=["id","name"])=>{let o=null;return!e||!t||Object.keys(e).some(r=>e[r][a[0]]===t?(o=e[r][a[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 xe={on(e,t){document.addEventListener(e,t)},dispatch(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},remove(e,t){document.removeEventListener(e,t)}};var A=(e,t)=>{if(Array.isArray(e)===!1)return null;let a=null;return e.some(o=>(a=t(o),!!a)),a};var De=(e,t)=>e?e[t]?e[t]:A(e.or,a=>a[t]):null;var Ee=e=>{let t=e.lastIndexOf(".");return t===-1?e:e.substring(0,t)};var be=(e,t)=>e&&e.length&&t&&t.length?e.map(a=>Object.entries(a).filter(([o])=>t.includes(o)).reduce((o,[r,d])=>Object.assign(o,{[r]:d}),{})):[];var Ce=e=>e.filter(t=>R(t).length>0&&t);var P=(e,t={})=>{let a={decimalCount:2,decimal:",",thousands:".",...t},{decimal:o,thousands:r,currencySymbol:d}=a,{decimalCount:c}=a;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(),g=u.length>3?u.length%3:0;return(d?`${p}${d}`:p)+(g?u.substr(0,g)+r:"")+u.substr(g).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=y(require("moment-timezone")),M=e=>{let t=e?new Date(e):new Date,a={timeZone:"America/Sao_Paulo"},o=t.toLocaleString("en-US",a);return new Date(o)},V=(e,t,a,o,r)=>{if(!e)return null;if(r)return(0,m.default)(e,t);let d=m.default.utc(e);return o||d.local(),a&&d.locale(a),d.format(t)},ve=(e,t="YYYY-MM-DD")=>{let a=(0,m.default)(e,t).add(1,"days");return typeof e=="string"?a.format(t):a.toDate()},j=(e=new Date,t=1)=>{let a=new Date(e.setDate(e.getDate()+t));return a.getDay()%6?a:j(a)},G=(e=new Date,t=1)=>{let a=new Date(e.setDate(e.getDate()-t));return a.getDay()%6?a:G(a)},E=e=>e?m.default.utc(e).local():null,S=e=>e&&m.default.tz(new Date(e),"America/Sao_Paulo"),Be=(e,t)=>{let a=S(e);return a&&a.format(t||"YYYY-MM-DDTHH:mm:ssZ")},Ie=(e,t)=>{if(!e||!t)return null;let a=E(e),o=E(t);return!a||!o?null:o.diff(a,"months")},Re=(e,t)=>{var a;return!e||!t?null:(a=E(e))==null?void 0:a.isAfter(t)},Ne=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo");return e?t.startOf("day").toDate():t.toDate()},Ae=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo").subtract(1,"day");return e?t.startOf("day").toDate():t.toDate()},Pe=(e=!0)=>{let t=m.default.tz("America/Sao_Paulo").add(1,"day");return e?t.startOf("day").toDate():t.toDate()},Se=e=>{let t=M(e);return`${t.getFullYear()}${t.getMonth().toString().padStart(2,"0")}`},Te=(e,t)=>{let a=new Date(e),o=new Date;return new Date(o.getFullYear()-t,o.getMonth(),o.getDate()).getTime()>a.getTime()},Le=e=>m.default.max(e),we=e=>m.default.min(e),Oe=e=>(0,m.default)(e).isValid(),T=(e,t)=>new Date(e,t-1,1).toISOString().split("T")[0],L=(e,t)=>new Date(e,t,0).toISOString().split("T")[0],w=()=>{let e=new Date(S(new Date));return V(e,"YYYY-MM-DD")};var ke=y(require("dayjs"));var b=e=>e.length===2?[e[0].replace(/\./g,""),e[1].replace(/\./g,"")]:e;var z=e=>{let t=b(e.toString().replace("%","").replace("R$","").replace(/\s/g,"").trim().split(","));if(t.length===2)return t.join(".");let a=b(t[0].split("."));return a.length===2?a.join("."):t[0].replace(/\./g,"")},Fe=e=>{if(e==null)return e;if(!z(e))return null;let t=Number(z(e));return t>=Number.MAX_SAFE_INTEGER||Number.isNaN(t)?null:t},Ue=e=>e?(e=e.replace(/[^0-9.,-]/g,""),e.includes(",")&&e.includes(".")?e.lastIndexOf(".")>e.lastIndexOf(",")?e=e.replace(/,/g,""):(e=e.replace(/\./g,""),e=e.replace(",",".")):e.includes(",")?e.match(/,\d{3}$/)?e=e.replace(/,/g,""):e=e.replace(",","."):e.includes(".")&&e.match(/\.\d{3}$/)&&(e=e.replace(/\./g,"")),Number(e)):null;var _e=e=>{let t=e.indexOf("."),a=e.length;return t&&a?e.substr(t,a):""};var Me=new RegExp('<img[^>]+src="(https://vobi-storage[^">]+)"',"gm");var Ve=e=>{if(!e)return!1;let t=new Date(e);return!isNaN(t.getTime())};var je=e=>!isNaN(parseFloat(e))&&!isNaN(e-0);var Ge=e=>{try{return!!new URL(e)}catch{return!1}};var q=y(require("jwt-decode")),W=e=>{var t,a;return(t=e.headers)!=null&&t.authorization&&((a=e.headers)==null?void 0:a.authorization.split(" ")[0])==="Bearer"?e.headers.authorization.split(" ")[1]:e.query&&e.query.token?e.query.token:null},ze=(e,t,a)=>{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 a()}catch(o){console.log("err",o);let r=new Error("Invalid token");return a(r)}};var qe=(e,t,a,o)=>{let r=e.idStatus>=5?"projetos":"oportunidades",d=t==="customer"?"cliente":"profissional",c=`/${d}/${r}/perfil/${e.id}`,p=`/${d}`;return`${{operator:c,provider:c,customer:p}}/arquivos?arquivo=${a.id}${o?"&visualizar":""}`};var We=e=>(e==null?void 0:e.length)===0?null:e;var $e=(e,t="0000")=>(t+e).slice(t.length*-1);var Ye=(e,t=!1)=>{let a={};for(let o=0;o<e.length;o++){let r=e[o];a[r.value]=t?{...r}:r.label}return a};var Je=e=>e.replace(/ /g,"").split("-").reduce((t,a)=>t+N(a),"");var He=e=>e==null?void 0:e.replace(/[,-./]/g,"");var Ke=({id:e,name:t,email:a,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:g,limitAccess:$,company:C})=>({id:e,name:t,email:a,idCompany:o,userType:r,type:d,isOwner:c,MGMCode:p,groupPermission:u,isActive:g,limitAccess:$,idPlan:C==null?void 0:C.idPlan});var Qe=e=>{let t=new Array(e.length),a=0;return new Promise((o,r)=>{e.forEach((d,c)=>{Promise.resolve(d).then(o).catch(p=>{t[c]=p,a+=1,a===e.length&&r(t)})})})};var Ze=(e,t)=>Object.keys(t).filter(a=>a!==e).reduce((a,o)=>({...a,[o]:t[o]}),{});var Xe=(e,t,a=!0)=>{if(!e)return e;let o=e.toLowerCase();return a&&(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("`",""),t&&(o=o.replace(new RegExp("\\W","g"),"")),o};var et=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 tt=(e,t)=>e.reduce((a,o,r)=>{let d=Math.floor(r/t),c=[...a];return a[d]||(c[d]=[]),c[d].push(o),c},[]);var at=(e,t,a)=>{let o=a||t;return(e==null?void 0:e.map(r=>o?r[a]||r[t]:r).reduce((r,d)=>r+(Number(d||0)||0),0))||0};var ot=(e,t)=>(e==null?void 0:e.map(a=>t(a)).reduce((a,o)=>a+(Number(o||0)||0),0))||0;var nt=e=>{let t=e.replace(/\D/g,"");return/^(?:\+?55 ?)?(?:0?[1-9]{2})?9\d{8}$/.test(t)};var rt=e=>typeof e!="string"||!e?"":e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim();var O=(e,t="")=>!e||e.length<=0?[]:e.flatMap((a,o)=>{let r=t?`${t}.${o+1}`:`${o+1}`,{children:d,...c}=a;return[{...c,index:r},...O(d||[],r)]}),st=e=>O(e).reduce((a,o)=>o.id?{...a,[o.id]:o}:a,{});var it=(e,t)=>{var o;let a=e?(o=Number(e).toFixed(2))==null?void 0:o.replace(".",","):0;return t?`${P(e*100)}%`:a};var lt=e=>{if(!e)return{};let[t,a]=e.split("-").map(Number),o=w(),r=T(t,a),d=L(t,a);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,formatNumberAnyFormat,getExtension,getMonthNumber,getNameWithoutExtension,getNextDay,getNextWeekday,getPreviewsWeekday,getToday,getToken,getTomorrow,getYesterday,imgSrcRegex,isAfter,isDateValid,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});
|