1"use strict";(self.webpackChunkflit_manager=self.webpackChunkflit_manager||[]).push([[5010],{2598:($,y,i)=>{i.r(y),i.d(y,{EmpresasModule:()=>Tt});var p=i(48525),b=i(12687),Z=i(36895),_=i(82333),l=i(24006),f=i(4859),F=i(56709),C=i(77331),x=i(3238),A=i(99602),I=i(65938),T=i(97392),N=i(284),D=i(28255),P=i(51572),L=i(84385),S=i(90455),B=i(3848),ae=i(10266),he=i(3868),_e=i(52993),ee=i(89383),aa=i(32447),Pe=i(20783),oa=i(15179),Oe=i(26402),ta=i(8720),ra=i(31861),ia=i(18059),Se=i(75675),na=i(13243),sa=i(1201),xe=i(96134),ye=i(907),la=i(21936),ca=i(48562),ma=i(77296),me=i(28015),Me=i(21094),pe=i(97185),ue=i(9116),pa=i(3870),O=i(15861),ua=i(35274),ve=i(28288),oe=i(14561),Ne=i(24634),da=i(69847),ga=i(47089),k=i(88913),V=i(60961),de=i(17489),fa=i(11796),M=i(61135),Ce=i(77579),Y=i(54004),te=i(78372),K=i(71884),U=i(95698),we=i(39300),Ae=i(18505),Ue=i(63900),ha=i(49770),ke=i(70262),Be=i(39646),_a=i(28746),Je=i(49808),ze=i(54244),Ve=i(13562),He=i(29521),Ge=i(41324),xa=i(79993),va=i(96958),be=i(71628),Ca=i(10135),Aa=i(88756),ge=(()=>{return(t=ge||(ge={})).AC="-05:00",t.AL="-03:00",t.AM="-04:00",t.AP="-03:00",t.BA="-03:00",t.CE="-03:00",t.DF="-03:00",t.ES="-03:00",t.GO="-03:00",t.MA="-03:00",t.MG="-03:00",t.MS="-04:00",t.MT="-04:00",t.PA="-03:00",t.PB="-03:00",t.PE="-03:00",t.PI="-03:00",t.PR="-03:00",t.RJ="-03:00",t.RN="-03:00",t.RO="-04:00",t.RR="-04:00",t.RS="-03:00",t.SC="-03:00",t.SE="-03:00",t.SP="-03:00",t.TO="-03:00",ge;var t})(),ba=i(8149),Ea=i(71766),Ee=i(73680),Ia=i(45106),qe=i(32577),re=i(29054),$e=i(1417),je=i(82502),Ta=i(72201),Qe=i(55898),ie=i(22799),Fa=i(39841),H=i(82722),z=i(68675);class Da{constructor(s){this.exibirDropzone=!0,this.read$=new Ce.x,this.cropperConfig={viewMode:0,checkCrossOrigin:!1,autoCropArea:1,aspectRatio:1,dragMode:"move",minContainerWidth:250,minContainerHeight:250,minCanvasWidth:250,minCanvasHeight:250,minCropBoxWidth:250,minCropBoxHeight:250,cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblClick:!1,crop:this.cropMoved.bind(this),ready:this.cropRead.bind(this),zoomable:!0,movable:!0,scalable:!0,rotatable:!0},this.cropmove$=new M.X(null),this.imagemPropostaBase64$=new M.X(""),this.cropperDataProposta$=new M.X(null),this._companyLogoCropperComponent=s}toggleHover(s){this.isHovering=Boolean(s)}importFile(s){const r=s.currentTarget.files.item(0);if("image"!==r.type.split("/")[0])return;const n=new FileReader;n.onloadend=()=>{this.imageUrl=n.result,setTimeout(()=>{this.exibirDropzone=!1},500)},n.readAsDataURL(r)}zoomInButton(){this._companyLogoCropperComponent.angularCropper.cropper.zoom(.2)}zoomOutButton(){this._companyLogoCropperComponent.angularCropper.cropper.zoom(-.2)}rotateButton(){this._companyLogoCropperComponent.angularCropper.cropper.rotate(-45)}resetButton(){this._companyLogoCropperComponent.angularCropper.cropper.reset()}cropMoved(s){this.cropmove$.next(s)}cropRead(s){this.read$.next(s)}cancelTask(){this.cropmove$.next(null),this.imagemPropostaBase64$.next(""),this.cropperDataProposta$.next(null),this.imageUrl=null,this.exibirDropzone=!0,this._companyLogoCropperComponent.angularCropper?.cropper?.destroy()}}var e=i(94650),G=i(1576),Za=i(37377),ne=i(55829);const Ra=["angularCropper"],La=function(t){return{"background-image":t}},Pa=function(){return{delay:"100ms"}},Oa=function(t){return{value:"*",params:t}};function Sa(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"div",11),e.NdJ("hovered",function(r){return e.CHM(a),e.oxw().cropperHelper.toggleHover(r)})("dropped",function(r){return e.CHM(a),e.oxw().cropperHelper.importFile(r)})("click",function(){return e.CHM(a),e.MAs(7).click()}),e.TgZ(1,"div",12),e._UZ(2,"fa-icon",13),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"input",14,15),e.NdJ("change",function(r){return e.CHM(a),e.oxw().cropperHelper.importFile(r)}),e.qZA()()}if(2&t){const a=e.oxw();e.ekj("hovering",a.cropperHelper.isHovering),e.Q6J("ngStyle",e.VKq(7,La,"url("+a.data.logoUrl+")"))("@animate",e.VKq(10,Oa,e.DdM(9,Pa))),e.xp6(4),e.hij(" ",e.lcZ(5,5,"GERAL.ARRASTEUMAFOTOOUCLIQUE"),"")}}let ya=(()=>{class t{constructor(a,o){this.data=a,this.matDialogRef=o,this.cropperHelper=new Da(this),this.logoRemovida=!1,this.caminhoSemLogo=X}selecionarFoto(){this.matDialogRef.close(this.logoRemovida?null:this.angularCropper.cropper.getCroppedCanvas({width:250,height:250}).toDataURL())}removerLogo(){this.cropperHelper.exibirDropzone=!1,this.logoRemovida=!0,this.data.logoUrl=this.caminhoSemLogo,this.cropperHelper.imageUrl=this.data.logoUrl}}return t.\u0275fac=function(a){return new(a||t)(e.Y36(I.WI),e.Y36(I.so))},t.\u0275cmp=e.Xpm({type:t,selectors:[["company-logo-cropper"]],viewQuery:function(a,o){if(1&a&&e.Gf(Ra,5),2&a){let r;e.iGM(r=e.CRH())&&(o.angularCropper=r.first)}},decls:28,vars:12,consts:[["fxFlex","0 1 calc(35% - 20px)",1,"pt-8","pb-8"],["id","foto-upload",1,"ml-4"],["class","dropzone","dropZone","",3,"hovering","ngStyle","hovered","dropped","click",4,"ngIf"],[1,"angular-cropper-wrapper",3,"hidden","fxHide"],[3,"cropperOptions","imageUrl"],["angularCropper",""],["fxFlex","","fxLayout","column","fxLayoutAlign","center center"],["mat-icon-button","","type","button",3,"disabled","click"],["mat-icon-button","","type","button","color","warn",3,"disabled","click"],[1,"flex","items-center","justify-center","pt-8"],["mat-raised-button","","color","primary",3,"disabled","click"],["dropZone","",1,"dropzone",3,"ngStyle","hovered","dropped","click"],[1,"bottom-overlay"],["matPreffix","","icon","upload",1,"secondary-text"],["type","file","accept","image/*",1,"file-input",3,"change"],["file",""]],template:function(a,o){1&a&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Sa,8,12,"div",2),e.TgZ(3,"div",3),e._UZ(4,"angular-cropper",4,5),e.qZA(),e.TgZ(6,"div",6)(7,"button",7),e.NdJ("click",function(){return o.cropperHelper.zoomInButton()}),e.TgZ(8,"mat-icon"),e._uU(9,"zoom_in"),e.qZA()(),e.TgZ(10,"button",7),e.NdJ("click",function(){return o.cropperHelper.zoomOutButton()}),e.TgZ(11,"mat-icon"),e._uU(12,"zoom_out"),e.qZA()(),e.TgZ(13,"button",7),e.NdJ("click",function(){return o.cropperHelper.rotateButton()}),e.TgZ(14,"mat-icon"),e._uU(15,"rotate_left"),e.qZA()(),e.TgZ(16,"button",7),e.NdJ("click",function(){return o.cropperHelper.resetButton()}),e.TgZ(17,"mat-icon"),e._uU(18,"refresh"),e.qZA()(),e.TgZ(19,"button",8),e.NdJ("click",function(){return o.cropperHelper.exibirDropzone=!0,o.cropperHelper.cancelTask()}),e.TgZ(20,"mat-icon"),e._uU(21,"close"),e.qZA()(),e.TgZ(22,"button",8),e.NdJ("click",function(){return o.removerLogo()}),e.TgZ(23,"mat-icon"),e._uU(24,"delete"),e.qZA()()()(),e.TgZ(25,"div",9)(26,"button",10),e.NdJ("click",function(){return o.selecionarFoto()}),e._uU(27,"SELECIONAR FOTO"),e.qZA()()()),2&a&&(e.xp6(2),e.Q6J("ngIf",o.cropperHelper.exibirDropzone),e.xp6(1),e.Q6J("hidden",o.cropperHelper.exibirDropzone)("fxHide",o.cropperHelper.exibirDropzone),e.xp6(1),e.Q6J("cropperOptions",o.cropperHelper.cropperConfig)("imageUrl",o.cropperHelper.imageUrl),e.xp6(3),e.Q6J("disabled",o.cropperHelper.exibirDropzone||o.logoRemovida),e.xp6(3),e.Q6J("disabled",o.cropperHelper.exibirDropzone||o.logoRemovida),e.xp6(3),e.Q6J("disabled",o.cropperHelper.exibirDropzone||o.logoRemovida),e.xp6(3),e.Q6J("disabled",o.cropperHelper.exibirDropzone||o.logoRemovida),e.xp6(3),e.Q6J("disabled",o.cropperHelper.exibirDropzone||o.logoRemovida),e.xp6(3),e.Q6J("disabled",o.data.logoUrl.includes(o.caminhoSemLogo)),e.xp6(4),e.Q6J("disabled",o.cropperHelper.exibirDropzone&&!o.logoRemovida))},directives:[G.yH,Z.O5,Za.i,Z.PC,ne.Zl,he.BN,ne.b8,ye.V2,G.xw,G.Wh,f.lW,T.Hw
1],pipes:[ee.X$],styles:["company-logo-cropper #foto-upload .angular-cropper-wrapper{height:250px;width:250px;align-items:center;justify-content:center}company-logo-cropper #foto-upload .dropzone{display:flex;align-items:center;justify-content:flex-end;flex-direction:column;font-weight:200;height:250px;width:250px;border:1px solid #39f;background:white;cursor:pointer;background-position:center center;background-repeat:no-repeat;background-size:cover}company-logo-cropper #foto-upload .dropzone.hovering{border:4px solid #39f;opacity:.6}company-logo-cropper #foto-upload .dropzone .file-label{font-size:1.2em}company-logo-cropper #foto-upload .dropzone .file-input{display:none}company-logo-cropper #foto-upload .dropzone .bottom-overlay{width:100%;line-height:30px;text-align:center;background-color:#ffffffb3}company-logo-cropper #foto-upload .dropzone .perfil-erro-reconhecimento-facial{width:100%;line-height:20px;text-align:center;padding:4px;color:#fff;background-color:#f00c}company-logo-cropper #foto-upload progress::-webkit-progress-value{-webkit-transition:width .1s ease;transition:width .1s ease}company-logo-cropper .img-container{max-width:100%}company-logo-cropper .img-container img{width:100%}company-logo-cropper .cropper-view-box{box-shadow:0 0 0 1px #39f;outline:0}\n"],encapsulation:2,data:{animation:[ve.L]}}),t})();class Na{constructor({domingo:s,segunda_a_sexta:a,sabado:o,feriado:r}){this.segunda_a_sexta=a??0,this.sabado=o??0,this.domingo=s??0,this.feriado=r??0}}class se{constructor(s){this._id=s._id??void 0,this._path=s._path??void 0,this.logo_path=s.logo_path??void 0,this.ativo=s.ativo??void 0,this.celular=s.celular??void 0,this.cnpj=s.cnpj??void 0,this.data_atualizacao_doc=s.data_atualizacao_doc??void 0,this.data_criacao_doc=s.data_criacao_doc??void 0,this.endereco=s.endereco??new wa({}),this.excluido=s.excluido??void 0,this.fantasia=s.fantasia??void 0,this.parametros=s.parametros??new Ua({}),this.percentuais_banco_horas=s.percentuais_banco_horas??new Na({}),this.pessoa_fisica=s.pessoa_fisica??void 0,this.razao=s.razao??void 0,this.telefone=s.telefone??void 0,this.integracao=s.integracao??void 0}}class wa{constructor({bairro:s,cep:a,cidade:o,complemento:r,logradouro:n,numero:c,uf:m,fuso_horario:d}){this.bairro=s??null,this.cep=a??null,this.cidade=o??null,this.complemento=r??null,this.logradouro=n??null,this.numero=c??null,this.uf=m??null,this.fuso_horario=d??null}}class Ua{constructor({capturar_foto_marcacao_externa:s,capturar_localizacao_marcacao_externa:a,codigo_externo:o,configuracao_tipo_falta_jornada:r,dia_abertura_frequencia:n,espelho_ponto_exibir_flitapp:c,espelho_ponto_numero_dias_disponiveis:m,exibir_informativo_banco_horas_flit_app:d,integracao_econtador:g,ips_externos:v,limite_minutos_interjornada:E,permitir_fotografar_flit_tab:u,permitir_fotografar_flit_web:R,permitir_fotografar_flit:h,permitir_marcar_fora_perimetro:J,permitir_autenticacao_por_celular:j,regime_compensacao:ce,restricao_ip_marcar_web:Ze,tolerancia_intervalos_tipo:Re,tolerancia_intervalos:Le}){this.capturar_foto_marcacao_externa=s??!1,this.capturar_localizacao_marcacao_externa=a??!1,this.codigo_externo=o??null,this.configuracao_tipo_falta_jornada=void 0===r?ie.EnumConfiguracaoTipoFaltaJornada.FALTA_NORMAL:r,this.dia_abertura_frequencia=n??1,this.espelho_ponto_exibir_flitapp=c??!0,this.espelho_ponto_numero_dias_disponiveis=m??null,this.exibir_informativo_banco_horas_flit_app=d??null,this.integracao_econtador=g??!1,this.ips_externos=v??[],this.limite_minutos_interjornada=E??null,this.permitir_fotografar_flit=h??!0,this.permitir_fotografar_flit_tab=u??!0,this.permitir_fotografar_flit_web=R??!0,this.permitir_marcar_fora_perimetro=J??!1,this.permitir_autenticacao_por_celular=j??!1,this.regime_compensacao=ce??null,this.restricao_ip_marcar_web=Ze??!1,this.tolerancia_intervalos=Le??null,this.tolerancia_intervalos_tipo=Re??ie.ToleranciaIntervalosTipo.IGNORAR_TEMPO}}var ka=i(85378),Ie=i(29260),Ye=i(95041),Ba=i(83905),We=i(51286),Ke=i(22962),Ja=i(92228),Te=i(5571),za=i(68445),Va=i(80027),Ha=i(40507),w=(()=>{return(t=w||(w={})).ADICIONAR="ADICIONAR",t.EDITAR="EDITAR",t.EXCLUIR="EXCLUIR",w;var t})();let Fe=(()=>{class t{constructor(a,o,r,n,c,m,d,g){this.afs=a,this.angularFireFunctions=o,this.globalService=r,this.angularFireStorage=n,this.ngxLogger=c,this.auditoriaModificadorService=m,this.toastr=d,this.usuariosService=g,this.backlogTask=new k.Z,this.empresasPaginadasCache$=new M.X(new Map),this.agGridPaginationCacheDetails=new M.X({firstDocCursor:null,lastDocCursor:null,endRow:0,quantidadeConsultas:0,finished:!1,lastFilterValue:null}),this.estadoDaListagem=new M.X({currentItemId:null,currentPage:null,currentScrollY:null}),this.empresas=new M.X([])}canDeactivate(a,o,r,n){var c=this;return(0,O.Z)(function*(){return c.ngxLogger.info("\nempresas.service => Fun\xe7\xe3o canDeactivate executada.\nPar\xe2metros:",{component:a,currentRoute:o,currentState:r,nextState:n}),"empresas"!==n.url.split("/")[1]&&c.removerCacheListagemEPaginacao(),!0})()}processarLogoEmpresa(a,o,r){var n=this;return(0,O.Z)(function*(){const{logoPath:c,metadata:m,uploadId:d}=n.obterDadosParaSalvarLogoEmpresaStorage(a,o);try{yield n.angularFireStorage.upload(c,V.yc.base64ToBlob(V.yc.removeBase64Prefix(o),"base64"),m),n.ngxLogger.trace(`\nLogo da empresa salvo.\nPath: ${c}\nUploadId: ${d}`),n.toastr.success("Logo da empresa salvo com sucesso","Logo salvo"),r&&(yield r.update({logo_path:c}))}catch(g){throw n.ngxLogger.error("\nErro ao fazer upload do logo da empresa.\n",g),n.toastr.error("N\xe3o foi poss\xedvel salvar o logo da empresa","Erro"),g}})()}removerCacheListagemEPaginacao(){this.ngxLogger.info("\nempresas.service => Fun\xe7\xe3o removerCacheListagemEPaginacao executada.\nPar\xe2metros:",{AgGridPaginationCacheDetailsDefaultValue:oe.$,ListStateDefaultValue:oe.S}),this.agGridPaginationCacheDetails.next(oe.$),this.estadoDaListagem.next(oe.S),this.empresasPaginadasCache$.next(new Map)}obterDadosParaSalvarLogoEmpresaStorage(a,o){const r=(0,We.Z)();return{uploadId:r,logoPath:`${this.globalService.contaPath}/empresas/${a}/logo`,metadata:{contentType:V.yc.getContentTypeFromBase64(o),customMetadata:{app:"MANAGER",uploadId:r}}}}salvarConfiguracaoFaltaDeAcordoComRegimeCompensacaoERemoverSelecao(a){const o=a.parametros.configuracao_tipo_falta_jornada;return"remover"===o?null:o}conveterEmpresaElasticPreservandoTipoDeFalta(a){const o=a?.parametros?.configuracao_tipo_falta_jornada,r=Ye.EmpresaElasticConvert.fromElastic(a);return r.parametros.configuracao_tipo_falta_jornada=void 0===o?Ye.EnumConfiguracaoTipoFaltaJornada.FALTA_NORMAL:o,r}listarEmpresasPaginadosElasticSearch({avancado:a,limit:o,startAfter:r}){const n={filtro_rapido:a?.filtro_rapido??null,paginacao_buscar_depois:r,paginacao_tamanho:o,ordenacao_colunas:[{fantasia:{order:"asc"}}],deve_ter:[{excluido:!1}]};return this.angularFireFunctions.httpsCallable("oncall_buscar_empresas")(n).pipe((0,U.q)(1),(0,Y.U)(m=>{const d=m.docs.map(v=>this.conveterEmpresaElasticPreservandoTipoDeFalta(v));return this.empresas.next(d),[d,{lastDocCursor:m.ultimo_valor_ordenacao,firstDocCursor:m.primeiro_valor_ordenacao,finished:m.tamanho<o,qtdQuerySnapDocs:m.tamanho}]}))}getDownloadUrl$(a){return this.angularFireStorage.ref(a).getDownloadURL().pipe((0,U.q)(1))}criarEmpresa(a,o){var r=this;return(0,O.Z)(function*(){r.ngxLogger.info("\nempresas.service => Fun\xe7\xe3o criarEmpresa executada.\nPar\xe2metros:",{empresaFormData:a,logoBase64:o});const n=new se({cnpj:a.ein,pessoa_fisica:a.singleOwnerBusiness,razao:a.companyName,fantasia:a.tradingName,telefone:a.phone,celular:a.cellphone,endereco:{cep:a.zip,cidade:a.city,uf:a.state,bairro:a.district,logradouro:a.street,numero:a.addressNumber,complemento:a.complement,fuso_horario:a.timezone},parametros:{capturar_foto_marcacao_externa:a.parametros.capturar_foto_marcacao_externa??!1,capturar_localizacao_marcacao_externa:a.parametros.capturar_localizacao_marcacao_externa??!1,integracao_econtador:a.parametros.integracao_econtador??!1,permitir_marcar_fora_perimetro:a.parametros.permitir_marcar_fora_perimetro??!1,permitir_fotografar_flit:a.allowPhotographsFlitParameter,permitir_fotografar_flit_tab:a.allowPhotographsFlitTabParameter,permitir_fotografar_flit_web:a.permitirFotografarFlitWeb,permitir_autenticacao_por_celular:a.parametros.permitir_autenticacao_por_celular??!1,dia_abertura_frequencia:parseInt(a.diaAberturaFrequenciaParametro,10),codigo_externo:a.codigoExterno,tolerancia_intervalos:V.yc.prototype.converterParaNumber(a.toleranciaIntervalos),tolerancia_intervalos_tipo:a.tolerancia_intervalos_tipo||null,regime_compensacao:a.regimeCompensacao,limite_minutos_interjornada:a.limite_minutos_interjornada,ips_externos:a.parametros.ips_externos??[],restricao_ip_marcar_web:a.parametros.restricao_ip_marcar_web??!1,espelho_ponto_exibir_flitapp:a.parametros.espelho_ponto_exibir_flitapp,espelho_ponto_numero_dias_disponiveis:a.parametros.espelho_ponto_numero_dias_disponiveis,exibir_informativo_banco_horas_flit_app:a.parametros.exibir_informativo_banco_horas_flit_app??null,configuracao_tipo_falta_jornada:r.salvarConfiguracaoFaltaDeAcordoComRegimeCompensacaoERemoverSelecao(a)},percentuais_banco_horas:{segunda_a_sexta:a.percentuais_banco_horas.segunda_a_sexta||0,sabado:a.percentuais_banco_horas.sabado||0,domingo:a.percentuais_banco_horas.domingo||0,feriado:a.percentuais_banco_horas.feriado||0}
1,...r.auditoriaModificadorService.getModificador()}),c=r.toastr.info(`Processando nova empresa: ${n.fantasia}.`,"Informa\xe7\xe3o",{progressBar:!0,timeOut:15e3}).toastRef,m=(0,We.Z)();r.backlogTask.add(m,{status:k.k.PENDING,data:{toastRef:c,acao:w.ADICIONAR,empresa:n,logoBase64:o}});try{const d=ie.EmpresaFireConvert.toFirestore(n);d.data_criacao_doc=Ie.Z.firestore.FieldValue.serverTimestamp(),d.data_atualizacao_doc=Ie.Z.firestore.FieldValue.serverTimestamp();const g=yield r.afs.collection(`${r.globalService.contaPath}/empresas`).add(d),E=(yield g.get()).data(),u={...n,_id:g.id,_path:g.path,data_criacao_doc:E.data_criacao_doc.toDate(),data_atualizacao_doc:E.data_atualizacao_doc.toDate()};if(o){const{logoPath:R}=r.obterDadosParaSalvarLogoEmpresaStorage(g.id,o);u.logo_path=R}else u.logo_path=null;return o&&(yield r.processarLogoEmpresa(g.id,o,g)),r.backlogTask.update(m,{status:k.k.COMPLETE,data:{toastRef:c,acao:w.ADICIONAR,empresa:u,logoBase64:o}}),r.ngxLogger.info("\nempresas.service => Sucesso na fun\xe7\xe3o criarEmpresa.\n",{empresaCriada:u}),u}catch(d){throw r.backlogTask.update(m,{status:k.k.ERROR,data:{toastRef:c,acao:w.ADICIONAR,empresa:n,logoBase64:o}}),r.ngxLogger.error("\nempresas.service => Erro na fun\xe7\xe3o criarEmpresa.\n",d),new Error(d)}})()}atualizarEmpresa(a,o,r){var n=this;return(0,O.Z)(function*(){n.ngxLogger.info("\nempresas.service => Fun\xe7\xe3o atualizarEmpresa executada.\nPar\xe2metros:",{empresaInicial:a,empresaFormData:o,temLogo:!!r});const c={cnpj:o.ein,pessoa_fisica:o.singleOwnerBusiness,razao:o.companyName,fantasia:o.tradingName,telefone:o.phone,celular:o.cellphone,endereco:{cep:o.zip,cidade:o.city,uf:o.state,bairro:o.district,logradouro:o.street,numero:o.addressNumber,complemento:o.complement,fuso_horario:o.timezone},parametros:{capturar_foto_marcacao_externa:o.parametros.capturar_foto_marcacao_externa,capturar_localizacao_marcacao_externa:o.parametros.capturar_localizacao_marcacao_externa,codigo_externo:o.codigoExterno,configuracao_tipo_falta_jornada:n.salvarConfiguracaoFaltaDeAcordoComRegimeCompensacaoERemoverSelecao(o),dia_abertura_frequencia:parseInt(o.diaAberturaFrequenciaParametro,10),espelho_ponto_exibir_flitapp:o.parametros.espelho_ponto_exibir_flitapp??!1,espelho_ponto_numero_dias_disponiveis:o.parametros.espelho_ponto_numero_dias_disponiveis??null,exibir_informativo_banco_horas_flit_app:o.parametros.exibir_informativo_banco_horas_flit_app??null,ips_externos:o.parametros.ips_externos??[],limite_minutos_interjornada:o.limite_minutos_interjornada,permitir_fotografar_flit_tab:o.allowPhotographsFlitTabParameter,permitir_fotografar_flit_web:o.permitirFotografarFlitWeb,permitir_fotografar_flit:o.allowPhotographsFlitParameter,permitir_marcar_fora_perimetro:o.parametros.permitir_marcar_fora_perimetro??!1,permitir_autenticacao_por_celular:o.parametros.permitir_autenticacao_por_celular??!1,integracao_econtador:o.parametros.integracao_econtador??!1,regime_compensacao:o.regimeCompensacao,restricao_ip_marcar_web:o.parametros.restricao_ip_marcar_web??!1,tolerancia_intervalos_tipo:o.tolerancia_intervalos_tipo||null,tolerancia_intervalos:V.yc.prototype.converterParaNumber(o.toleranciaIntervalos)},percentuais_banco_horas:{segunda_a_sexta:o.percentuais_banco_horas.segunda_a_sexta||0,sabado:o.percentuais_banco_horas.sabado||0,domingo:o.percentuais_banco_horas.domingo||0,feriado:o.percentuais_banco_horas.feriado||0},...n.auditoriaModificadorService.getModificador()};if(r){const{logoPath:v}=n.obterDadosParaSalvarLogoEmpresaStorage(a._id,r);c.logo_path=v}else c.logo_path=null===r?null:void 0!==a.logo_path?a.logo_path:null;const m={...a,...c,_id:a._id,_path:a._path},d={...c,data_atualizacao_doc:Ie.Z.firestore.FieldValue.serverTimestamp()},g=n.toastr.info(`Processando atualiza\xe7\xe3o da empresa: ${a.fantasia}.`,"Informa\xe7\xe3o",{progressBar:!0,timeOut:15e3}).toastRef;n.backlogTask.add(a._id,{status:k.k.PENDING,data:{toastRef:g,acao:w.EDITAR,empresa:m,logoBase64:r}});try{r&&(yield n.processarLogoEmpresa(a._id,r)),yield n.afs.collection(`${n.contaPath}/empresas`).doc(a._id).set(d,{merge:!0});const E=(yield n.afs.collection(`${n.contaPath}/empresas`).doc(a._id).ref.get()).data();return m.data_atualizacao_doc=E.data_atualizacao_doc.toDate(),n.backlogTask.update(a._id,{status:k.k.COMPLETE,data:{toastRef:g,acao:w.EDITAR,empresa:m,logoBase64:r}}),n.ngxLogger.trace(`\nDocumento atualizado.\nCole\xe7\xe3o: empresas\n_Id: ${a._id}\nDados:`,c),m}catch(v){throw n.backlogTask.update(a._id,{status:k.k.ERROR,data:{toastRef:g,acao:w.EDITAR,empresa:m,logoBase64:r}}),n.ngxLogger.error("\nempresas.service => Erro na fun\xe7\xe3o atualizarEmpresa.\n",v),new Error("N\xe3o foi poss\xedvel atualizar a empresa.")}})()}retornarTravasParaExcluirEmpresa(a){var o=this;return(0,O.Z)(function*(){const n=o.afs.doc(a).ref,c=n.id,m=n.parent.parent,d=["Dispositivos","Usu\xe1rios","Marca\xe7\xf5es","Jornadas"],g=o.afs.collection("usuarios",h=>h.where("conta_ref","==",m).where("excluido","==",!1).where("empresa_ref","==",n).limit(1)).get().pipe((0,U.q)(1),(0,Y.U)(h=>h.empty)).toPromise(),v=o.afs.collection("dispositivos",h=>h.where("conta_ref","==",m).where("excluido","==",!1).where("empresa_ref","==",n).limit(1)).get().pipe((0,U.q)(1),(0,Y.U)(h=>h.empty)).toPromise(),E=o.afs.collection(`${m.path}/marcacoes`,h=>h.where("empresa_ref","==",n).limit(1)).get().pipe((0,U.q)(1),(0,Y.U)(h=>h.empty)).toPromise(),u=o.afs.collection(`${m.path}/jornadas`,h=>h.where("usuario.empresa.uid","==",c).limit(1)).get().pipe((0,U.q)(1),(0,Y.U)(h=>h.empty)).toPromise();return(yield Promise.allSettled([v,g,E,u])).reduce((h,J,j)=>"fulfilled"===J.status&&!0===J.value?h:h.concat([d[j]??"Indefinido"]),[])})()}excluirEmpresa(a,o){var r=this;return(0,O.Z)(function*(){r.ngxLogger.info("\nempresas.service => Fun\xe7\xe3o excluirEmpresa executada.\nPar\xe2metros:",{empresaId:a.id,empresa:o});const n={excluido:!0,...r.auditoriaModificadorService.getModificador(
1)},c={_id:a.id,_path:a.path,...o,...n},m=r.toastr.info(`Processando exclus\xe3o da empresa: ${o?.fantasia}.`,"Informa\xe7\xe3o",{progressBar:!0,timeOut:1e4}).toastRef;r.backlogTask.add(a.id,{status:k.k.PENDING,data:{toastRef:m,acao:w.EXCLUIR,empresa:c}});try{return yield a.update(n),r.backlogTask.update(a.id,{status:k.k.COMPLETE,data:{toastRef:m,acao:w.EXCLUIR,empresa:c}}),r.ngxLogger.trace(`\nDocumento marcado como exclu\xeddo.\nCole\xe7\xe3o: empresas\n_Id: ${a.id}\nDados:`,n),c}catch(d){throw r.backlogTask.update(a.id,{status:k.k.ERROR,data:{toastRef:m,acao:w.EXCLUIR,empresa:c}}),r.ngxLogger.error("\nempresas.service => Erro na fun\xe7\xe3o excluirEmpresa.\n",d),new Error("N\xe3o foi poss\xedvel excluir a empresa.")}})()}buscarIdUsuariosVinculadosAEmpresa(a){var o=this;return(0,O.Z)(function*(){return(yield(0,Ba.z)(o.usuariosService.buscarUsuarios({empresaRef:o.afs.doc(a).ref,excluido:!1,usarPerfilAcesso:!1,semObservar:!0}))).reduce((n,c)=>c?.uid?n.concat(c.uid):n,[])})()}processarJornadasRetroativas({contas:a,dataInicial:o,dataFinal:r,timeZone:n,ajustarJornadaPrevista:c,processarJornadasExistentes:m,naoRecalcularAcumulados:d,ajustarJornadaRealizada:g,ajustarRegimeCompensacao:v,usuarios:E}){this.ngxLogger.info("\nFun\xe7\xe3o processarJornadasRetroativas executada.\nPar\xe2metros:",{contas:a,dataInicial:o,dataFinal:r,timeZone:n,ajustarJornadaPrevista:c,processarJornadasExistentes:m,naoRecalcularAcumulados:d,ajustarJornadaRealizada:g,ajustarRegimeCompensacao:v,usuarios:E});const u={contas:a,dataInicial:o,dataFinal:r,timeZone:n,ajustarJornadaPrevista:c,processarJornadasExistentes:m,naoRecalcularAcumulados:d,ajustarJornadaRealizada:g,ajustarRegimeCompensacao:v,usuarios:E};return this.angularFireFunctions.httpsCallable("oncall_tasks_processar_jornada")(u)}buscarIpUtilizado(){return this.ngxLogger.info("\nFun\xe7\xe3o buscarIpUtilizado executada."),this.angularFireFunctions.httpsCallable("oncall_verificar_ip")()}exibirTutorial(a){const o="manager@novo-cadastro-empresas-help-dialog";localStorage.getItem(o)||(localStorage.setItem(o,(new Date).getTime().toString()),a())}get(a){var o=this;return(0,O.Z)(function*(){let r=null;const n=o.empresasPaginadasCache$.getValue().get(a);if(n)r=n;else{const c=o.angularFireFunctions.httpsCallable("oncall_buscar_empresas"),m=yield(0,Je.n)(c({filtro_rapido:null,paginacao_tamanho:1,ordenacao_colunas:[{nome:{order:"asc"}}],deve_ter:[{i_id:a}]}).pipe((0,U.q)(1)));r=o.conveterEmpresaElasticPreservandoTipoDeFalta(m.docs[0])}return r})()}get empresas$(){return this.empresas.asObservable()}get contaPath(){return this.globalService.contaPath}get estadoDaListagemValue(){return this.estadoDaListagem.getValue()}get estadoDaListagem$(){return this.estadoDaListagem.asObservable()}set atualizarEstadoDaListagem(a){const o=this.estadoDaListagem.getValue();this.estadoDaListagem.next({...o,...a})}get agGridPaginationCacheDetailsValue(){return this.agGridPaginationCacheDetails.getValue()}get agGridPaginationCacheDetails$(){return this.agGridPaginationCacheDetails.asObservable()}set atualizarAgGridPaginationCacheDetails(a){const o=this.agGridPaginationCacheDetails.getValue();this.agGridPaginationCacheDetails.next({...o,...a})}}return t.\u0275fac=function(a){return new(a||t)(e.LFG(Ke.ST),e.LFG(Ja.l4),e.LFG(Te.U),e.LFG(za.Q1),e.LFG(me.Kf),e.LFG(Va.p),e.LFG(pe._W),e.LFG(Ha.J))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var Ga=i(58298),qa=i(42935),$a=i(30675),ja=i(70147),Qa=i(70643),W=i(59549),Ya=i(55600),Wa=i(96163),Ka=i(57382);const Xa=["duvidasSwal"],eo=["confirmarExclusaoSwal"],ao=["matTabGroup"],De=function(){return{delay:"100ms",x:"-25px"}},le=function(t){return{value:"*",params:t}};function oo(t,s){if(1&t&&(e.ynx(0),e.TgZ(1,"div",89)(2,"div",90)(3,"div"),e._uU(4,"Data cria\xe7\xe3o:"),e.qZA(),e.TgZ(5,"div"),e._uU(6),e.ALo(7,"date"),e.qZA()()(),e.TgZ(8,"div",89)(9,"div",90)(10,"div"),e._uU(11,"\xdalt. atualiza\xe7\xe3o:"),e.qZA(),e.TgZ(12,"div"),e._uU(13),e.ALo(14,"date"),e.qZA()()(),e.BQk()),2&t){const a=s.ngIf,o=e.oxw();
1e.xp6(1),e.Q6J("@animate",e.VKq(11,le,e.DdM(10,De))),e.xp6(5),e.Oqu(e.xi3(7,4,a,"dd/MM/yyyy HH:mm")),e.xp6(2),e.Q6J("@animate",e.VKq(14,le,e.DdM(13,De))),e.xp6(5),e.hij(" ",e.xi3(14,7,o.empresaDadosInicias.data_atualizacao_doc||a,"dd/MM/yyyy HH:mm")," ")}}function to(t,s){if(1&t){const a=e.EpF();e.ynx(0),e.TgZ(1,"button",91)(2,"mat-icon"),e._uU(3,"more_horiz"),e.qZA()(),e.TgZ(4,"mat-menu",92,93)(6,"div",94)(7,"button",95),e.NdJ("click",function(){e.CHM(a);const r=e.oxw();return r.dialogRef.close({actionType:"delete",form:r.empresaForm})}),e.TgZ(8,"div",96),e._UZ(9,"ng-icon",97),e.TgZ(10,"div",11),e._uU(11),e.ALo(12,"translate"),e.qZA()()()()(),e.BQk()}if(2&t){const a=e.MAs(5);e.xp6(1),e.Q6J("matMenuTriggerFor",a),e.xp6(8),e.Q6J("size","22px"),e.xp6(2),e.Oqu(e.lcZ(12,3,"FORMS.DELETEBUTTON"))}}function ro(t,s){1&t&&(e.TgZ(0,"div",98)(1,"div")(2,"b"),e._uU(3,"Aviso!"),e.qZA(),e._uU(4," Endere\xe7o da empresa est\xe1 cadastrado incorretamente, favor verificar os campos marcados como obrigat\xf3rios, para atender a portaria 671."),e.qZA()())}function io(t,s){if(1&t&&(e._UZ(0,"img",103),e.ALo(1,"async")),2&t){const a=e.oxw(2);e.Q6J("src",e.lcZ(1,1,a.logoUrl$),e.LSH)}}function no(t,s){if(1&t&&(e._UZ(0,"img",103),e.ALo(1,"async")),2&t){const a=e.oxw(2);e.Q6J("src",e.lcZ(1,1,a.logoUrlProposta$),e.LSH)}}const Xe=function(){return{delay:"50ms",scale:"0.2"}},so=function(t,s){return{"background-color":t,opacity:s}};function lo(t,s){if(1&t&&(e.TgZ(0,"div",99),e.YNc(1,io,2,3,"img",100),e.ALo(2,"async"),e.YNc(3,no,2,3,"ng-template",null,101,e.W1O),e.TgZ(5,"div",102)(6,"mat-icon"),e._uU(7,"edit"),e.qZA()()()),2&t){const a=e.MAs(4),o=e.oxw(),r=e.MAs(37);e.Q6J("matMenuTriggerFor",r)("@animate",e.VKq(8,le,e.DdM(7,Xe))),e.xp6(1),e.Q6J("ngIf",null===e.lcZ(2,5,o.logoUrlProposta$))("ngIfElse",a),e.xp6(4),e.Q6J("ngStyle",e.WLB(10,so,null!=o.empresaLogoCropperComponentDialogRef&&o.empresaLogoCropperComponentDialogRef.componentInstance?"rgba(0, 0, 0, 0.6)":"",null!=o.empresaLogoCropperComponentDialogRef&&o.empresaLogoCropperComponentDialogRef.componentInstance?"1":""))}}function co(t,s){1&t&&(e.TgZ(0,"div",104),e._UZ(1,"mat-spinner",105),e.qZA()),2&t&&(e.Q6J("@animate",e.VKq(3,le,e.DdM(2,Xe))),e.xp6(1),e.Q6J("diameter",48))}function mo(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){return e.CHM(a),e.oxw().removerFoto()}),e.TgZ(1,"mat-icon",106),e._uU(2,"delete"),e.qZA(),e.TgZ(3,"span"),e._uU(4,"Remover foto"),e.qZA()()}}function po(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function uo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.EINERROR")," "))}function go(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function fo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.COMPANYNAMEERROR")," "))}function ho(t,s){if(1&t&&(e.TgZ(0,"div",28)(1,"mat-form-field",29)(2,"mat-label"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e._UZ(5,"input",107),e.YNc(6,go,3,3,"mat-error",7),e.YNc(7,fo,3,3,"mat-error",7),e.qZA()()),2&t){const a=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,3,"COMPANYFORM.COMPANYNAME")),e.xp6(3),e.Q6J("ngIf",a.empresaForm.get("companyName").hasError("required")),e.xp6(1),e.Q6J("ngIf",!a.empresaForm.get("companyName").hasError("required"))}}function _o(t,s){1&t&&(e.TgZ(0,"mat-label"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.TRADINGNAME")," "))}function xo(t,s){1&t&&(e.TgZ(0,"mat-label"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.NAME"),""))}function vo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function Co(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.TRADINGNAMEERROR")," "))}function Ao(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.CELLPHONEERROR")," "))}function bo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}
1function Eo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.ZIPERROR")," "))}function Io(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function To(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"button",109),e.NdJ("click",function(r){e.CHM(a);const n=e.oxw(2);return r.stopPropagation(),n.stateFormControl.setValue(null)}),e.TgZ(1,"div",110),e._UZ(2,"ng-icon",13),e.qZA()()}2&t&&(e.xp6(2),e.Q6J("size","24px"))}function Fo(t,s){1&t&&e.YNc(0,To,3,1,"ng-template",null,108,e.W1O)}function Do(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"button",109),e.NdJ("click",function(r){e.CHM(a);const n=e.oxw(2);return r.stopPropagation(),n.cityFormControl.setValue(null)}),e.TgZ(1,"div",110),e._UZ(2,"ng-icon",13),e.qZA()()}2&t&&(e.xp6(2),e.Q6J("size","24px"))}function Zo(t,s){1&t&&e.YNc(0,Do,3,1,"ng-template",null,108,e.W1O)}function Ro(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"GERAL.TAMANHOMINIMO")+" 3 "+e.lcZ(3,3,"GERAL.CARACTERES")+"."," "))}function Lo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"GERAL.TAMANHOMAXIMO")+" 40 "+e.lcZ(3,3,"GERAL.CARACTERES")+"."," "))}function Po(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.ALo(4,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"GERAL.POSSUI")+" "+e.lcZ(3,3,"GERAL.CARACTERES")+" "+e.lcZ(4,5,"GERAL.INVALIDOS")+"."," "))}function Oo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function So(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"COMPANYFORM.STREETERROR")," "))}function yo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function Mo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function No(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORMS.DIASVALIDOS")," "))}function wo(t,s){1&t&&(e.TgZ(0,"mat-select-trigger")(1,"div",112)(2,"mat-icon",113),e._uU(3,"remove_circle"),e.qZA(),e.TgZ(4,"span",114),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&t&&(e.xp6(5),e.hij(" ",e.lcZ(6,1,"GERAL.REMOVERSELECAO")," "))}function Uo(t,s){if(1&t&&(e.TgZ(0,"mat-option",84),e._uU(1),e.qZA()),2&t){const a=s.$implicit;e.Q6J("value",a),e.xp6(1),e.hij(" ",a," ")}}function ko(t,s){if(1&t&&(e.TgZ(0,"mat-form-field",111)(1,"mat-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"mat-select",83),e.YNc(5,wo,7,3,"mat-select-trigger",7),e.TgZ(6,"mat-option",84)(7,"div",112)(8,"mat-icon",113),e._uU(9,"remove_circle"),e.qZA(),e.TgZ(10,"span",114),e._uU(11),e.ALo(12,"translate"),e.qZA()()(),e.YNc(13,Uo,2,2,"mat-option",115),e.qZA(),e.TgZ(14,"mat-hint",116),e._uU(15),e.ALo(16,"async"),e.qZA()()),2&t){const a=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,7,"PARAMETROS.REGIMEHORARIO")," * "),e.xp6(2),e.Q6J("formControl",a.parametrosRegimeCompensacaoFormControl),e.xp6(1),e.Q6J("ngIf","remover"===a.parametrosRegimeCompensacaoFormControl.value),e.xp6(1),e.Q6J("value","remover"),e.xp6(5),e.Oqu(e.l
1cZ(12,9,"GERAL.REMOVERSELECAO")),e.xp6(2),e.Q6J("ngForOf",a.regimesCompensacao),e.xp6(2),e.hij(" ",e.lcZ(16,11,a.hintTrocaRegimeDeCompensacao$)," ")}}function Bo(t,s){1&t&&(e.TgZ(0,"mat-select-trigger")(1,"div",118)(2,"mat-icon",113),e._uU(3,"remove_circle"),e.qZA(),e.TgZ(4,"span",114),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&t&&(e.xp6(5),e.hij(" ",e.lcZ(6,1,"GERAL.REMOVERSELECAO")," "))}function Jo(t,s){if(1&t&&(e.TgZ(0,"mat-option",84),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t){const a=s.$implicit;e.Q6J("value",a.valorEmMinutos),e.xp6(1),e.AsE(" ",a.labelHoras," ",e.lcZ(2,3,"GERAL.HORAS")," ")}}function zo(t,s){if(1&t&&(e.TgZ(0,"mat-form-field",72)(1,"mat-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"mat-select",117),e.ALo(5,"translate"),e.YNc(6,Bo,7,3,"mat-select-trigger",7),e.TgZ(7,"mat-option",84)(8,"div",112)(9,"mat-icon",113),e._uU(10,"remove_circle"),e.qZA(),e.TgZ(11,"span",114),e._uU(12),e.ALo(13,"translate"),e.qZA()()(),e.YNc(14,Jo,3,5,"mat-option",115),e.qZA()()),2&t){const a=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,7,"GERAL.LIMITEINTEVALOINTERJORNADA")," "),e.xp6(2),e.s9C("matTooltip",e.lcZ(5,9,"GERAL.LIMITEINTEVALOINTERJORNADATIP")),e.Q6J("formControl",a.limiteMinutosInterjornadaFormControl),e.xp6(2),e.Q6J("ngIf","remover"===a.limiteMinutosInterjornadaFormControl.value),e.xp6(1),e.Q6J("value","remover"),e.xp6(5),e.Oqu(e.l
1cZ(13,11,"GERAL.REMOVERSELECAO")),e.xp6(2),e.Q6J("ngForOf",a.limiteIntervaloInterjornada.intervalosDisponiveis)}}function Vo(t,s){1&t&&(e.TgZ(0,"mat-select-trigger")(1,"div",112)(2,"mat-icon",113),e._uU(3,"remove_circle"),e.qZA(),e.TgZ(4,"span",114),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&t&&(e.xp6(5),e.hij(" ",e.lcZ(6,1,"GERAL.REMOVERSELECAO")," "))}function Ho(t,s){if(1&t&&(e.TgZ(0,"mat-option",84),e._uU(1),e.qZA()),2&t){const a=s.$implicit;e.Q6J("value",a.value),e.xp6(1),e.hij(" ",a.label," ")}}const Go=function(t){return{"pb-32":t}};function qo(t,s){if(1&t&&(e.TgZ(0,"div",119)(1,"div",51),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"div",120)(5,"mat-form-field",121),e.ALo(6,"translate"),e.TgZ(7,"mat-label"),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"mat-select",83),e.YNc(11,Vo,7,3,"mat-select-trigger",7),e.TgZ(12,"mat-option",84)(13,"div",112)(14,"mat-icon",113),e._uU(15,"remove_circle"),e.qZA(),e.TgZ(16,"span",114),e._uU(17),e.ALo(18,"translate"),e.qZA()()(),e.YNc(19,Ho,2,2,"mat-option",115),e.qZA(),e.TgZ(20,"mat-hint",116),e._uU(21),e.ALo(22,"async"),e.qZA()()()()),2&t){const a=e.oxw();e.Q6J("ngClass",e.VKq(20,Go,a.hintTrocaConfiguracaoTipoDeFaltaJornada$.value)),e.xp6(2),e.hij(" ",e.lcZ(3,10,"GERAL.TRATAMENTOAUTOMATICODEJORNADAS")," "),e.xp6(3),e.Q6J("matTooltip",e.lcZ(6,12,"PARAMETROS.CONFIGURACAOTIPOFALTAQUANDOJORNADABANCOHORASTIP")),e.xp6(3),e.hij(" ",e.lcZ(9,14,"PARAMETROS.CONFIGURACAOTIPOFALTAQUANDOJORNADABANCOHORAS")," * "),e.xp6(2),e.Q6J("formControl",a.configuracaoTipoDeFaltaJornadaFormControl),e.xp6(1),e.Q6J("ngIf","remover"===a.configuracaoTipoDeFaltaJornadaFormControl.value),e.xp6(1),e.Q6J("value","remover"),e.xp6(5),e.Oqu(e.l
1cZ(18,16,"GERAL.REMOVERSELECAO")),e.xp6(2),e.Q6J("ngForOf",a.configuracoesTipoFalta),e.xp6(2),e.hij(" ",e.lcZ(22,18,a.hintTrocaConfiguracaoTipoDeFaltaJornada$)," ")}}const $o=function(){return[""]};function jo(t,s){if(1&t&&(e.TgZ(0,"div",122)(1,"div",58),e._uU(2,"Toler\xe2ncia"),e.qZA(),e.TgZ(3,"div")(4,"mat-form-field",123)(5,"mat-label"),e._uU(6),e.ALo(7,"translate"),e.qZA(),e._UZ(8,"input",124),e.ALo(9,"async"),e.ALo(10,"translate"),e.TgZ(11,"mat-hint",125),e._uU(12),e.ALo(13,"async"),e.qZA()()()()),2&t){const a=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,6,"GERAL.TOLERANCIAHORASEXTRASOUINCOMPLETAS")),e.xp6(2),e.Q6J("readonly",e.lcZ(9,8,a.limitacoesPlanoLicencaService.limitacoes$).tratamento_de_ponto)("formControl",a.toleranciaIntervalosFormControl)("specialCharacters",e.DdM(14,$o))("matTooltip",e.lcZ(10,10,"GERAL.TOLERANCIAHORASEXTRASOUINCOMPLETASTIP")),e.xp6(4),e.hij(" ",e.lcZ(13,12,a.hintTrocaTolerancia$),"")}}function Qo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function Yo(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORMS.DIASVALIDOSESPELHODEPONTO")," "))}function Wo(t,s){if(1&t&&(e.TgZ(0,"mat-form-field",123)(1,"mat-label"),e._uU(2,"Quantidade de dias que fica dispon\xedvel"),e.qZA(),e._UZ(3,"input",130),e.YNc(4,Qo,3,3,"mat-error",7),e.YNc(5,Yo,3,3,"mat-error",7),e.qZA()),2&t){const a=e.oxw(2);e.xp6(3),e.Q6J("formControl",a.espelhoPontoNumeroDiasDisponiveisFormControl),e.xp6(1),e.Q6J("ngIf",null==a.espelhoPontoNumeroDiasDisponiveisFormControl?null:a.espelhoPontoNumeroDiasDisponiveisFormControl.hasError("required")),e.xp6(1),e.Q6J("ngIf",!(null!=a.espelhoPontoNumeroDiasDisponiveisFormControl&&a.espelhoPontoNumeroDiasDisponiveisFormControl.hasError("required")))}}function Ko(t,s){if(1&t&&(e.TgZ(0,"mat-hint",125),e._uU(1),e.qZA()),2&t){const a=e.oxw(3);e.xp6(1),e.hij(' O valor dos par\xe2metros gerais \xe9 "',a.matHintExibirBancoHorasParametrosGerais(),'"')}}function Xo(t,s){if(1&t&&(e.TgZ(0,"mat-option",84),e._uU(1),e.qZA()),2&t){const a=s.$implicit;e.Q6J("value",a),e.xp6(1),e.hij(" ",a," ")}}function et(t,s){if(1&t&&(e.TgZ(0,"mat-form-field",131),e.ALo(1,"translate"),e.TgZ(2,"mat-label"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,Ko,2,1,"mat-hint",132),e.TgZ(6,"mat-select",83),e.YNc(7,Xo,2,2,"mat-option",115),e.qZA()()),2&t){const a=e.oxw(2);e.s9C("matTooltip",e.lcZ(1,5,"PARAMETROS.EXIBIRBANCODEHORASFLITAPPTIP")),e.xp6(3),e.hij(" ",e.lcZ(4,7,"GERAL.EXIBIRBANCODEHORASFLITAPP")," "),e.xp6(2),e.Q6J("ngIf",a.exibirInformativoBancoHorasFlitAppFormControl.value===a.PreferenciasExibirInformativoBancoHorasFlitApp.RespeitarParametrosGerais),e.xp6(1),e.Q6J("formControl",a.exibirInformativoBancoHorasFlitAppFormControl),e.xp6(1),e.Q6J("ngForOf",a.preferenciasExibirInformativoBancoHorasFlitApp)}}function at(t,s){if(1&t&&(e.TgZ(0,"div",126)(1,"div",58),e._uU(2,"Aplicativo Flit"),e.qZA(),e.TgZ(3,"div",63)(4,"mat-slide-toggle",127),e._uU(5," Exibir espelho de ponto. "),e.qZA(),e.YNc(6,Wo,6,3,"mat-form-field",128),e.YNc(7,et,8,9,"mat-form-field",129),e.qZA()()),2&t){const a=e.oxw();e.xp6(4),e.Q6J("formControl",a.exibirEspelhoDePontoFormControl),e.xp6(2),e.Q6J("ngIf",null==a.exibirEspelhoDePontoFormControl?null:a.exibirEspelhoDePontoFormControl.value),e.xp6(1),e.Q6J("ngIf",a.globalService.parametrosConta.regime_compensacao!==a.RegimesCompensacao.HorasExtras)}}function ot(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CAMPOOBRIGATORIO")," "))}function tt(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&t&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"VALIDACOES.CODIGOINDISPONIVEL")," "))}function rt(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"mat-chip",133),e.NdJ("removed",function(){const n=e.CHM(a).$implicit;return e.oxw().matChipRemoverIpExterno(n)}),e._uU(1),e.TgZ(2,"button",134)(3,"mat-icon",135),e._uU(4,"cancel"),e.qZA()()()}if(2&t){const a=s.$implicit;e.Q6J("selectable",!0)("removable",!0),e.xp6(1),e.hij(" ",a," ")}}function it(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"input",136),e.NdJ("matChipInputTokenEnd",function(r){return e.CHM(a),e.oxw().matChipAdicionarIpExterno(r)})("input",function(r){e.CHM(a);const n=e.oxw();return"IPV6"===n.tipoIpFormControl.value&&n.formatarMaskIpv6(r)}),e.qZA()}if(2&t){const a=e.oxw(),o=e.MAs(218);e.Q6J("mask","IPV4"===a.tipoIpFormControl.value?"IP":"")("validation",!0)("formControl",a.inputMatChipIpsExternos)("disabled",a.ipsExternosFormControl.value.length>=a.MAX_IPS)("placeholder",a.ipsExternosFormControl.value.length>=a.MAX_IPS?"":"Novo IP...")("matChipInputFor",o)("matChipInputSeparatorKeyCodes",a.separatorKeysCodes)("matChipInputAddOnBlur",!0)("maxlength","IPV4"===a.tipoIpFormControl.value?"15":"45")}}function nt(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1,"Insira no m\xe1ximo 5
1ips externos."),e.qZA())}function st(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1,"Remova os ips duplicados."),e.qZA())}function lt(t,s){if(1&t&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&t){const a=e.oxw();e.xp6(1),e.hij("O IP excede o limite de ","IPV4"===a.tipoIpFormControl.value?"15":"45"," caracteres.")}}function ct(t,s){1&t&&(e.TgZ(0,"mat-error"),e._uU(1," Insira um IP v\xe1lido. "),e.qZA())}function mt(t,s){if(1&t&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&t){const a=e.oxw();e.xp6(1),e.hij(" \xc9 permitido cadastrar no m\xe1ximo ",a.MAX_IPS," IPs. ")}}function pt(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"mat-tab",137)(1,"div",49)(2,"form",50)(3,"div",51),e._uU(4," Percentual de banco de horas "),e.TgZ(5,"mat-icon",138),e.NdJ("click",function(){return e.CHM(a),e.oxw().abrirDuvidasSwal()}),e._uU(6,"help"),e.qZA()(),e.TgZ(7,"div",139),e._uU(8," Percentual de acr\xe9scimo "),e.TgZ(9,"span",140),e._uU(10,"(Somente para valores positivos.) "),e.qZA()(),e.TgZ(11,"div",141)(12,"div",142)(13,"mat-form-field",143)(14,"mat-label",144),e._uU(15,"Segunda a sexta"),e.qZA(),e._UZ(16,"input",145),e.TgZ(17,"mat-icon",146),e._uU(18,"percent"),e.qZA()(),e.TgZ(19,"mat-form-field",143)(20,"mat-label",147),e._uU(21,"S\xe1bado"),e.qZA(),e._UZ(22,"input",148),e.TgZ(23,"mat-icon",146),e._uU(24,"percent"),e.qZA()(),e.TgZ(25,"mat-form-field",143)(26,"mat-label",149),e._uU(27,"Domingo"),e.qZA(),e._UZ(28,"input",150),e.TgZ(29,"mat-icon",146),e._uU(30,"percent"),e.qZA()(),e.TgZ(31,"mat-form-field",143)(32,"mat-label",151),e._uU(33,"Feriado"),e.qZA(),e._UZ(34,"input",152),e.TgZ(35,"mat-icon",146),e._uU(36,"percent"),e.qZA()()()(),e.TgZ(37,"mat-hint",125),e._uU(38),e.ALo(39,"async"),e.qZA()()()()}if(2&t){const a=e.oxw();e.xp6(2),e.Q6J("formGroup",a.empresaForm),e.xp6(14),e.Q6J("mask","999"),e.xp6(6),e.Q6J("mask","999"),e.xp6(6),e.Q6J("mask","999"),e.xp6(6),e.Q6J("mask","999"),e.xp6(4),e.hij(" ",e.lcZ(39,6,a.hintTrocaPercentualBancoHoras$),"")}}const ut=function(){return{container:"swal-acima-mat-dialog"}},X="assets/images/avatars/sem-imagem.jpg";var q=(()=>{return(t=q||(q={})).RespeitarParametrosGerais="Respeitar dos par\xe2metros gerais",t.Exibir="Exibir",t.NaoExibir="N\xe3o exibir",q;var t})();let fe=(()=>{class t{constructor(a,o,r,n,c,m,d,g,v,E,u,R,h,J,j,ce,Ze,Re,Le){this.empresaDados=a,this._formBuilder=o,this.adapter=r,this.cepService=n,this.empresasService=c,this.fuseTranslationLoaderService=m,this.matDialog=d,this.ngxLogger=g,this.recursoAdicionalSwalService=v,this.toastrService=E,this.translateService=u,this.elementRef=R,this.globalService=h,this.utilitariosService=J,this.ibgeService=j,this.limitacoesPlanoLicencaService=ce,this.dialogRef=Ze,this.confirmDialogRef=Re,this.validationPatternService=Le,this.caminhoSemLogo=X,this.codigosExternos=[],this.empresas=[],this.ErrosValidacao=V.Xe,this.einMask$=new M.X(""),this.isCpf=!0,this.ngUnsubscribe=new Ce.x,this.cities$=new M.X([]),this.showCityHint=!1,this.RegimesCompensacao=re.sR,this.regimesCompensacao=[re.sR.BancoDeHoras,re.sR.HorasExtras],this.PreferenciasExibirInformativoBancoHorasFlitApp=q,this.preferenciasExibirInformativoBancoHorasFlitApp=Object.values(q),this.textoBotao="Descobrir meu IP",this.retornouIp=!1,this.MAX_IPS=5,this.tiposToleranciaHEeIncompletas=[{label:"Ignorar tempo",value:Qe.ToleranciaIntervalosTipo.IGNORAR_TEMPO},{label:"Considerar tempo como normal",value:Qe.ToleranciaIntervalosTipo.CONSIDERAR_TEMPO_COMO_NORMAL}],this.configuracoesTipoFalta=[{label:"Falta",value:ie.EnumConfiguracaoTipoFaltaJornada.FALTA_NORMAL},{label:"Falta banco de horas",value:ie.EnumConfiguracaoTipoFaltaJornada.FALTA_BANCO_DE_HORAS}],this.hintConfiguracaoTipoDeFaltaJornadaMessage="A nova configura\xe7\xe3o do tipo de falta ser\xe1 v\xe1lida no dia seguinte.",this.logoUrl$=new M.X(null),this.logoUrlProposta$=new M.X(null),this.keyValueAcessorCityFn=Q=>Q.nome,this.keyValueAcessorStateFn=Q=>Q.sigla,this.limiteIntervaloInterjornada=Ca.b,this.separatorKeysCodes=[He.K5,He.OC],this.tipoIpFormControl=new l.NI("IPV4"),this.inputMatChipIpsExternos=new l.NI(""),this.REGEX_IPV4=/^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/,this.REGEX_IPV6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:(((:[0-9a-fA-F]{1,4}){1,7})|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,this.hintTrocaTolerancia$=new M.X(""),this.hintTrocaPercentualBancoHoras$=new M.X(""),this.hintTrocaConfiguracaoTipoDeFaltaJornada$=new M.X(""),this.hintTrocaRegimeDeCompensacao$=new M.X(""),this.numeroMask=new M.X(null),this.loading=!1,this.tabsComErro$=new M.X({cadastro:!1,parametros:!1,banco_horas:!1}),this.subscriptionManager=new Ve.LF({prefixId:"EmpresaFormDialogComponent"}
1),this.getSelectErrorMessage=Q=>Q?.hasError("required")?qe.S.data.VALIDACOES.CAMPOOBRIGATORIO:"",this.states$=this.cepService.estados$,this.action=a.action,this.enderecoIncorreto=a.enderecoIncorreto,"edit"===this.action?(this.empresaDadosInicias=new se({...a.empresa}),this.empresaForm=this.criarEmpresaForm(),this.enderecoFormGroup=this.criarEnderecoFormGroup(),this.enderecoIncorreto&&(this.zipFormControl.markAsTouched(),this.streetFormControl.markAsTouched(),this.enderecoBairroFormControl.markAsTouched(),this.stateFormControl.markAsTouched(),this.cityFormControl.markAsTouched(),this.cellPhoneFormControl.markAsTouched())):(this.empresaDadosInicias=new se({}),this.empresaForm=this.criarEmpresaForm(),this.enderecoFormGroup=this.criarEnderecoFormGroup()),this.semNumeroFormControl=new l.NI("S/N"===this.empresaDadosInicias?.endereco?.numero),this.fuseTranslationLoaderService.loadTranslations(Ia.S,qe.S),this.adapter.setLocale("pt"),this.empresaDadosInicias.logo_path?this.empresasService.getDownloadUrl$(this.empresaDadosInicias.logo_path).pipe((0,U.q)(1)).subscribe({next:Q=>{this.logoUrl$.next(Q)},error:Q=>{this.ngxLogger.error("\nErro ao buscar a logo da empresa.\nErro:",Q),this.logoUrl$.next(X)}}):this.logoUrl$.next(X)}ngOnInit(){this.ngxLogger.info("\nInicializando o EmpresasFormDialogComponent."),this.ngxLogger.info("\nFormul\xe1rio de cadastro de empresa aberto.\nDados:",this.empresaDadosInicias),this.buscarCidades(),this.empresaForm.get("ein").valueChanges.pipe((0,H.R)(this.ngUnsubscribe)).subscribe(u=>{"string"==typeof u&&u!==u.toUpperCase()&&this.empresaForm.get("ein").setValue(u.toUpperCase(),{emitEvent:!1})}),this.empresaForm.get("ein").valueChanges.pipe((0,te.b)(200),(0,K.x)(),(0,z.O)(this.empresaDadosInicias.cnpj),(0,H.R)(this.ngUnsubscribe)).subscribe(u=>{const R=(0,Ge.gT)(u??"");if(!R)return;const h=this.empresaForm.get("companyName"),J=this.empresaForm.get("singleOwnerBusiness"),j=this.empresaForm.get("ein");this.isCpf=!/[A-Za-z]/.test(R)&&R.length<=11,this.isCpf?(h.clearValidators(),h.setValue("",{emitEvent:!1}),this.einMask$.next(this.validationPatternService.companyCpfMask)):(h.setValidators([l.kI.required,l.kI.minLength(3),l.kI.maxLength(200),l.kI.pattern(this.validationPatternService.textSpaceNumberExtraPattern)]),this.einMask$.next(this.validationPatternService.cnpjMask)),J.setValue(this.isCpf),h.updateValueAndValidity({emitEvent:!1}),j.updateValueAndValidity({emitEvent:!1})}),this.empresaForm.get("zip").valueChanges.pipe((0,K.x)(),(0,H.R)(this.ngUnsubscribe),(0,te.b)(500),(0,we.h)(()=>this.empresaForm.get("zip").valid&&this.empresaForm.get("zip").value.length>7),(0,Ue.w)(u=>this.cepService.buscarCep(u).pipe((0,U.q)(1),(0,ke.K)(R=>(this.ngxLogger.error("Erro ao buscar o CEP da empresa.\nErro:",R),this.toastrService.warning("Por favor preencha o endere\xe7o manualmente","CEP n\xe3o encontrado!",{positionClass:"toast-top-right",progressBar:!0}),(0,Be.of)(null)))))).subscribe(u=>{if(u){const{cep:R,uf:h,cidade:J,bairro:j,logradouro:ce}=u;R&&h&&this.empresaForm.patchValue({state:h,city:J,district:j,street:ce})}else this.empresaForm.patchValue({state:null,city:null,district:null,street:null})}),this.empresasService.empresas$.pipe((0,H.R)(this.ngUnsubscribe)).subscribe(u=>{this.empresas=u,this.codigosExternos=u.reduce((R,h)=>(h.parametros.codigo_externo!==this.empresaDadosInicias.parametros.codigo_externo&&R.push(h.parametros?.codigo_externo),R),[]),this.codigoExternoFormControl.setValidators([Ee.B.verificarValor(this.codigosExternos)]),this.codigoExternoFormControl.updateValueAndValidity({emitEvent:!1})}),this.codigoExternoFormControl.valueChanges.pipe((0,H.R)(this.ngUnsubscribe),(0,te.b)(1500)).subscribe(u=>{this.codigoExternoFormControl.getError(V.Xe.ValorIndisponivel)&&this.empresas.filter(h=>h.parametros?.codigo_externo===u).forEach(h=>{this.toastrService.warning(`${this.translateService.instant("NOTIFICACOES.CODIGOEMUSONAEMPRESA")} ${h.fantasia}`,"",{positionClass:"toast-top-right",progressBar:!0})})}),this.ipsExternosFormControl.valueChanges.pipe((0,H.R)(this.ngUnsubscribe),(0,z.O)(this.empresaDadosInicias?.parametros?.ips_externos)).subscribe(u=>{this.restricaoIpMarcarWebFormControl.setValue(!!(u??[]).length)}),this.monitorarEControlarNumeroDoEndereco$(),this.exibirEspelhoDePonto();const a=this.empresaDadosInicias?.parametros?.configuracao_tipo_falta_jornada;this.configuracaoTipoDeFaltaJornadaFormControl.valueChanges.pipe((0,H.R)(this.ngUnsubscribe)).subscribe(u=>{this.hintTrocaConfiguracaoTipoDeFaltaJornada$.next(a===(u="remover"===u?null:u)?"":"edit"===this.action?"Reprocessamento de jornadas dispon\xedvel. Caso n\xe3o reprocesse, a configura\xe7\xe3o s\xf3 ser\xe1 aplicada a partir do pr\xf3ximo dia.":this.hintConfiguracaoTipoDeFaltaJornadaMessage)});const o=this.empresaDadosInicias.parametros.tolerancia_intervalos||"",r=this.toleranciaIntervalosF
1ormControl.valueChanges.pipe((0,z.O)(o),(0,K.x)()).subscribe(u=>{"edit"===this.action&&this.hintTrocaTolerancia$.next(o===u?"":"Reprocessamento de jornadas dispon\xedvel")});this.subscriptionManager.add({ref:"subTolerancia",sub:r});const n=this.empresaDadosInicias.parametros.regime_compensacao||null,c=this.parametrosRegimeCompensacaoFormControl.valueChanges.pipe((0,z.O)(n),(0,K.x)()).subscribe(u=>{this.hintTrocaRegimeDeCompensacao$.next(n===u?"":"edit"===this.action?"Reprocessamento de jornadas dispon\xedvel. Caso n\xe3o reprocesse, a configura\xe7\xe3o s\xf3 ser\xe1 aplicada a partir do pr\xf3ximo dia.":"Esta configura\xe7\xe3o s\xf3 ser\xe1 aplicada a partir do pr\xf3ximo dia.")});this.subscriptionManager.add({ref:"subRegimeCompensacao",sub:c});const m=this.empresaDadosInicias.percentuais_banco_horas||{segunda_a_sexta:0,sabado:0,domingo:0,feriado:0},d=this.percentuaisBancoHorasFormGroup.valueChanges.pipe((0,z.O)(m),(0,K.x)()).subscribe(u=>{"edit"===this.action&&(m.segunda_a_sexta===Number(u.segunda_a_sexta)&&m.sabado===Number(u.sabado)&&m.domingo===Number(u.domingo)&&m.feriado===Number(u.feriado)?this.hintTrocaPercentualBancoHoras$.next(""):this.hintTrocaPercentualBancoHoras$.next("Reprocessamento de jornadas dispon\xedvel"))});this.subscriptionManager.add({ref:"subPercentualBancoHoras",sub:d});const g=(0,Fa.a)(this.stateFormControl.valueChanges,this.cityFormControl.valueChanges).pipe((0,ze.n)(u=>(0,de.isNil)(u)),(0,z.O)([this.empresaDadosInicias?.endereco?.uf,this.empresaDadosInicias?.endereco?.cidade])).subscribe(([u,R])=>{this.timezoneFormControl.setValue("PE"===u&&"Fernando de Noronha"===R?"-02:00":ge[u])});this.subscriptionManager.add({ref:"subStateCityChange",sub:g});const v=this.tipoIpFormControl.valueChanges.pipe((0,z.O)("IPV4")).subscribe(u=>{this.atualizarValidacaoIp(u)});this.subscriptionManager.add({ref:"subTipoIp",sub:v});const E=this.inputMatChipIpsExternos.valueChanges.subscribe(()=>{this.atualizarErroIpInvalido()});this.subscriptionManager.add({ref:"subInputMatChipIpsExternosValueChanges",sub:E})}ngOnDestroy(){this.ngxLogger.info("\nDestruindo o EmpresasFormDialogComponent."),this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),this.subscriptionManager.destroy()}processarEFecharDialog(a){var o=this;return(0,O.Z)(function*(){(yield o.verificaRealizaProcessamentoJornada())&&(o.atualizarPercentuaisBancoHoras(),o.dialogRef.close(a))})()}marcarFormulariosComoTouchedEAtualizar(){[this.empresaForm,this.enderecoFormGroup].forEach(a=>{a.markAllAsTouched(),a.updateValueAndValidity()})}marcarFormularioComoDirty(){[this.empresaForm,this.enderecoFormGroup].forEach(a=>{a.markAsDirty()})}atualizarPercentuaisBancoHoras(){this.empresaForm.patchValue({percentuais_banco_horas:{segunda_a_sexta:Number(this.empresaForm.get("percentuais_banco_horas").get("segunda_a_sexta").value),sabado:Number(this.empresaForm.get("percentuais_banco_horas").get("sabado").value),domingo:Number(this.empresaForm.get("percentuais_banco_horas").get("domingo").value),feriado:Number(this.empresaForm.get("percentuais_banco_horas").get("feriado").value)}})}atualizarErroIpInvalido(){const a={...this.ipsExternosFormControl.errors??{}};(this.inputMatChipIpsExternos.value??"").trim()&&(this.inputMatChipIpsExternos.hasError("pattern")||this.inputMatChipIpsExternos.hasError("mask"))?a.ipInvalido=!0:delete a.ipInvalido,this.ipsExternosFormControl.setErrors(Object.keys(a).length?a:null)}validarFormulario(){if(this.marcarFormulariosComoTouchedEAtualizar(),this.empresaForm.valid&&this.enderecoFormGroup.valid)return this.tabsComErro$.next({cadastro:!1,parametros:!1,banco_horas:!1}),!0;this.toastrService.warning("Verifique os campos inv\xe1lidos.","Aten\xe7\xe3o!",{positionClass:"toast-top-right",progressBar:!0});const a=this.getTabsComErro();this.tabsComErro$.next(a);const r=Object.keys(a).findIndex(n=>a[n]);return-1!==r&&(this.matTabGroup.selectedIndex=r,this.matTabGroup.focusTab(r),setTimeout(()=>{Aa.z.scrollToFirstInvalidControl(this.elementRef)},500)),!1}getTabsComErro(){return{cadastro:this.enderecoFormGroup.invalid||this.possuiAlgumControleInvalido(["ein","companyName","tradingName","phone","cellphone"]),parametros:this.possuiAlgumControleInvalido(["allowPhotographsFlitParameter","allowPhotographsFlitTabParameter","permitirFotografarFlitWeb","diaAberturaFrequenciaParametro","codigoExterno","toleranciaIntervalos","tolerancia_intervalos_tipo","regimeCompensacao","limite_minutos_interjornada","parametros"]),banco_horas:this.percentuaisBancoHorasFormGroup.invalid}}possuiAlgumControleInvalido(a){return a.some(o=>this.empresaForm.get(o)?.invalid)}atualizarValidacaoIp(a){this.inputMatChipIpsExternos.setValidators(null),this.inputMatChipIpsExternos.setValidators("IPV4"===a?[l.kI.pattern(this.REGEX_IPV4),l.kI.maxLength(15)]:[l.kI.pattern(this.REGEX_IPV6),l.kI.maxLength(45)]),this.inputMatChipIpsExternos.updateV
1alueAndValidity()}buscarIp(a){const o=a.componentInstance.data.actionButton;o.displayIcon||(a.componentInstance.data.actionButton={...o,disabled:!0,label:"Buscando...",displayIcon:!1},this.empresasService.buscarIpUtilizado().subscribe({next:r=>{this.textoBotao=r?.ip||r,a.componentInstance.data.actionButton={...o,disabled:!1,label:this.textoBotao,displayIcon:!0}},error:r=>{this.ngxLogger.error("Erro ao buscar o IP do usu\xe1rio.",r),this.textoBotao="Erro ao buscar IP",a.componentInstance.data.actionButton={...o,disabled:!1,label:this.textoBotao,displayIcon:!1}}}))}copiarIp(){this.textoBotao&&"Buscando..."!==this.textoBotao&&"Erro ao buscar IP"!==this.textoBotao&&navigator.clipboard.writeText(this.textoBotao).then(()=>{this.toastrService.success("IP copiado para a \xe1rea de transfer\xeancia.","",{positionClass:"toast-top-right",progressBar:!0})})}buscarCidades(){var a=this;this.empresaForm.get("state").valueChanges.pipe((0,z.O)(this.empresaDadosInicias?.endereco?.uf),(0,H.R)(this.ngUnsubscribe)).subscribe(function(){var o=(0,O.Z)(function*(r){if(r){a.empresaForm.get("city").enable(),a.showCityHint=!1;const n=yield a.cepService.buscarCidades(r);-1===n.findIndex(c=>c.nome===a.cityFormControl.value)&&a.cityFormControl.reset(),a.cities$.next(n)}else a.empresaForm.get("city").disable(),a.showCityHint=!0});return function(r){return o.apply(this,arguments)}}()),this.empresaForm.get("state").updateValueAndValidity({onlySelf:!0})}monitorarEControlarNumeroDoEndereco$(){this.enderecoNumeroFormControl.valueChanges.pipe((0,z.O)(this.empresaDadosInicias.endereco?.numero),(0,K.x)((a,o)=>a===o),(0,H.R)(this.ngUnsubscribe)).subscribe(a=>{"S/N"===a&&this.semNumeroFormControl.setValue(!0)}),this.semNumeroFormControl.valueChanges.pipe((0,H.R)(this.ngUnsubscribe),(0,z.O)("S/N"===this.empresaDadosInicias?.endereco?.numero)).subscribe(a=>{a?(this.numeroMask.next(null),this.enderecoNumeroFormControl.disable(),this.enderecoNumeroFormControl.setValue("S/N")):(this.numeroMask.next("9{7}"),this.enderecoNumeroFormControl.enable(),"S/N"===this.enderecoNumeroFormControl.value&&this.enderecoNumeroFormControl.setValue(null))}),this.enderecoNumeroFormControl.value||this.semNumeroFormControl.setValue(!0)}exibirEspelhoDePonto(){const a=this.exibirEspelhoDePontoFormControl.valueChanges.pipe((0,z.O)(this.empresaDadosInicias?.parametros?.espelho_ponto_exibir_flitapp)).subscribe(o=>o?this.espelhoPontoNumeroDiasDisponiveisFormControl.enable():this.espelhoPontoNumeroDiasDisponiveisFormControl.disable());this.subscriptionManager.add({sub:a,ref:"exibirEspelhoDePonto"})}abrirProcessarJornadaRetroativaDialog(){var a=this;return(0,O.Z)(function*(){return new Promise(o=>{a.matDialog.open(xa.A,{data:{title:"Identificamos uma mudan\xe7a na toler\xe2ncia de intervalos ou percentual de banco de horas. Deseja reprocessar as jornadas retroativas?",cancelar:!0}}).afterClosed().subscribe(r=>{r?.cancelar?a.dialogRef.close():o({processarJornadaRetroativaModalResponse:r||{confirmacao:!1,data_inicial:new Date,jornada_ajustar_regime_compensacao:void 0},prosseguirComSalvamento:!!r})})})})()}salvarClick(){var a=this;return(0,O.Z)(function*(){if(a.ngxLogger.info("EmpresasFormDialogComponent. Fun\xe7\xe3o salvarClick executada."),!a.validarFormulario()||a.loading)return void a.ngxLogger.debug("EmpresasFormDialogComponent => salvarClick validation.\n",{validationErrors:a.empresaForm.errors});const o=a.logoUrlProposta$.getValue(),r=a.logoUrl$.getValue().includes(X)&&a.empresaDadosInicias.logo_path,n={form:a.empresaForm};"edit"===a.action&&(n.actionType="save"),("edit"!==a.action||o||r)&&(n.logoBase64=o),a.loading=!0;try{yield a.validarEFecharDialog(n)}finally{a.loading=!1}})()}converteValorExibidoInformativoBancoHorasFlitAppFromBD(a){return!0===a?q.Exibir:!1===a?q.NaoExibir:q.RespeitarParametrosGerais}onPaste(a){a.preventDefault();const o=(0,Ge.gT)(a.clipboardData?.getData("text")??"").toUpperCase();if(!o)return;const n=!/[A-Za-z]/.test(o)&&o.length<=11?this.validationPatternService.companyCpfMask:this.validationPatternService.cnpjMask;this.einMask$.next(n);const c=(0,va.kx)(o);this.empresaForm.get("ein").setValue((c||o).toUpperCase()),this.empresaForm.get("ein").markAsDirty()}preventEnterKey(a){"Enter"===a.key&&a.preventDefault()}verificaRealizaProcessamentoJornada(){var a=this;return(0,O.Z)(function*(){let o=0!==a.hintTrocaTolerancia$.value.length||0!==a.hintTrocaPercentualBancoHoras$.value.length||0!==a.hintTrocaConfiguracaoTipoDeFaltaJornada$.value.length||0!==a.hintTrocaRegimeDeCompensacao$.value.length;if(o&&"edit"===a.action){const{processarJornadaRetroativaModalResponse:r,prosseguirComSalvamento:n}=yield a.abrirProcessarJornadaRetroativaDialog();if(!n)return a.marcarFormularioComoDirty(),!1;if(r.confirmacao&&r.data_inicial){const c=yield a.empresasService.buscarIdUsuariosVinculadosAEmpresa(a.empresaDados.empresa._path);if((c?.length||0)>0){const E={contas:[a.globalService.contaUid],dataInicial:(0,je.Z)(be.O.converterDataParaMeioDiaUtcZero(r.data_inicial),"yyyy-MM-dd"),dataFinal:(0,je.Z)(be.O.converterDataParaMeioDiaUtcZero(new Date),"yyyy-MM-dd"),timeZone:a.empresaDadosInicias?.endereco?.fuso_horario?a.empresaDadosInicias?.endereco?.fuso_horario:"-03:00",processarJornadasExistentes:!1,naoRecalcularAcumulados:!1,ajustarJornadaRealizada:!0,ajustarJornadaPrevista:!1,ajustarRegimeCompensacao:r.jornada_ajustar_regime_compensacao,usuarios:c};o=!1;const u=a.toastrService.info("Processando jornadas retroativas...","Aviso!",{positionClass:"toast-top-right",progressBar:!0});a.empresasService.processarJornadasRetroativas(E).pipe((0,U.q)(1)).subscribe({next:()=>{a.toastrService.clear(u.toastId),a.toastrService.success("Jornadas processadas com sucesso!","Sucesso!",{positionClass:"toast-top-right",progressBar:!0})},error:()=>{a.toastrService.clear(u.toastId),a.toastrService.error("N\xe3o foi poss\xedvel processar as jornadas","Ops!",{positionClass:"toast-top-right",progressBar:!0})}})}else a.toastrService.warning("N\xe3o existem colaboradores associados a essa empresa, n\xe3o ser\xe1 poss\xedvel processar as jornadas retroativas.","Aviso!",{positionClass:"toast-top-right",progressBar:!0})}}return!0})()}validarEFecharDialog(a){var o=this;return(0,O.Z)(function*(){const r=o.logoUrlProposta$.getValue(),n=o.logoUrl$.getValue().includes(X)&&o.empresaDadosInicias.logo_path;
1!o.empresaForm.pristine||!o.enderecoFormGroup.pristine||r||n?yield o.processarEFecharDialog(a):o.toastrService.info("N\xe3o houve altera\xe7\xf5es para salvar.","Informa\xe7\xe3o!",{positionClass:"toast-top-right",progressBar:!0})})()}cropImage(){this.empresaLogoCropperComponentDialogRef=this.matDialog.open(ya,{panelClass:"company-logo-cropper",data:{logoUrl:this.logoUrl$.getValue()}}),this.empresaLogoCropperComponentDialogRef.afterClosed().subscribe(a=>{a&&(this.logoUrlProposta$.next(a),this.logoUrl$.next(a),this.marcarFormularioComoDirty()),this.empresaLogoCropperComponentDialogRef=null})}removerFoto(){var a=this;this.confirmarExclusaoSwal.swalOptions={text:"Deseja realmente remover a logo da empresa?"},this.confirmarExclusaoSwal.fire().then(function(){var n=(0,O.Z)(function*(c){c.value&&(a.logoUrl$.next(X),a.logoUrlProposta$.next(null),a.marcarFormularioComoDirty())});return function(c){return n.apply(this,arguments)}}()).catch(n=>{this.ngxLogger.error("\nErro na promise da fun\xe7\xe3o removerFoto.\n",n)})}criarEmpresaForm(){return this._formBuilder.group({ein:[this.empresaDadosInicias.cnpj,[l.kI.required,l.kI.maxLength(18),l.kI.pattern(this.validationPatternService.cnpjPattern),ba.K.cpfOuCnpj]],singleOwnerBusiness:this.empresaDadosInicias.pessoa_fisica,companyName:[this.empresaDadosInicias.razao,[l.kI.minLength(3),l.kI.maxLength(200),l.kI.pattern(this.validationPatternService.textSpaceNumberExtraPattern)]],tradingName:[this.empresaDadosInicias.fantasia,[l.kI.minLength(3),l.kI.maxLength(200),l.kI.pattern(this.validationPatternService.textSpaceNumberExtraPattern)]],phone:[this.empresaDadosInicias.telefone,[l.kI.minLength(13),l.kI.maxLength(14),l.kI.pattern(this.validationPatternService.phonePattern)]],cellphone:[this.empresaDadosInicias.celular,[l.kI.required,l.kI.minLength(14),l.kI.maxLength(15),l.kI.pattern(this.validationPatternService.cellphonePattern)]],zip:[this.empresaDadosInicias?.endereco?.cep,[l.kI.required,l.kI.minLength(9),l.kI.maxLength(9),l.kI.pattern(this.validationPatternService.cepPattern)]],city:[this.empresaDadosInicias?.endereco?.cidade],state:[this.empresaDadosInicias?.endereco?.uf,[l.kI.required,l.kI.minLength(2),l.kI.maxLength(40),l.kI.pattern(this.validationPatternService.textSpacePattern)]],district:[this.empresaDadosInicias?.endereco?.bairro,[l.kI.required,l.kI.minLength(3),l.kI.maxLength(40),l.kI.pattern(this.validationPatternService.textSpaceNumberExtraPattern)]],street:[this.empresaDadosInicias?.endereco?.logradouro,[l.kI.required,l.kI.minLength(3),l.kI.maxLength(80),l.kI.pattern(this.validationPatternService.textSpaceNumberExtraPattern)]],addressNumber:[this.empresaDadosInicias?.endereco?.numero,[l.kI.required,l.kI.required,l.kI.maxLength(7),l.kI.pattern(this.validationPatternService.numberPattern)]],complement:[this.empresaDadosInicias?.endereco?.complemento,[l.kI.minLength(3),l.kI.maxLength(200)]],timezone:this.empresaDadosInicias?.endereco?.fuso_horario,allowPhotographsFlitParameter:!!this.empresaDadosInicias.parametros&&this.empresaDadosInicias.parametros?.permitir_fotografar_flit,allowPhotographsFlitTabParameter:!!this.empresaDadosInicias.parametros&&this.empresaDadosInicias.parametros?.permitir_fotografar_flit_tab,permitirFotografarFlitWeb:!!this.empresaDadosInicias.parametros&&this.empresaDadosInicias.parametros?.permitir_fotografar_flit_web,diaAberturaFrequenciaParametro:[this.empresaDadosInicias?.parametros?.dia_abertura_frequencia||1,[l.kI.min(1),l.kI.max(31)]],codigoExterno:[this.empresaDadosInicias.parametros?.codigo_externo,{validators:Ee.B.verificarValor(this.codigosExternos)}],toleranciaIntervalos:this.empresaDadosInicias.parametros?.tolerancia_intervalos,tolerancia_intervalos_tipo:this.empresaDadosInicias.parametros?.tolerancia_intervalos_tipo,regimeCompensacao:this.empresaDadosInicias.parametros?.regime_compensacao??null,limite_minutos_interjornada:this.empresaDadosInicias?.parametros?.limite_minutos_interjornada,parametros:new l.cw({capturar_foto_marcacao_externa:new l.NI(this.empresaDadosInicias?.parametros?.capturar_foto_marcacao_externa??!1),capturar_localizacao_marcacao_externa:new l.NI(this.empresaDadosInicias?.parametros?.capturar_localizacao_marcacao_externa??!1),integracao_econtador:new l.NI(this.empresaDadosInicias?.parametros?.integracao_econtador??!1),ips_externos:new l.NI(this.empresaDadosInicias?.parametros?.ips_externos??[],[l.kI.maxLength(5),Ee.B.verificarValoresProprioInputArray()]),restricao_ip_marcar_web:new l.NI(this.empresaDadosInicias?.parametros?.restricao_ip_marcar_web),permitir_marcar_fora_perimetro:new l.NI(this.empresaDadosInicias?.parametros?.permitir_marcar_fora_perimetro??!1),permitir_autenticacao_por_celular:new l.NI(this.empresaDadosInicias?.parametros?.permitir_autenticacao_por_celular??!1),exibir_informativo_banco_horas_flit_app:new l.NI(this.converteValorExibidoInformativoBancoHorasFlitAppFromBD(this.empresaDadosInicias?.parametros?.exibir_informativo_banco_horas_flit_app)),espelho_ponto_exibir_flitapp:new l.NI(this.empresaDadosInicias?.parametros?.espelho_ponto_exibir_flitapp),espelho_ponto_numero_dias_disponiveis:new l.NI(this.empresaDadosInicias?.parametros?.espelho_ponto_numero_dias_disponiveis,[l.kI.min(0),l.kI.max(90)]),configuracao_tipo_falta_jornada:new l.NI(this.empresaDadosInicias?.parametros?.configuracao_tipo_falta_jornada)}),percentuais_banco_horas:new l.cw({segunda_a_sexta:new l.NI(this.empresaDadosInicias?.percentuais_banco_horas?.segunda_a_sexta||0),sabado:new l.NI(this.empresaDadosInicias?.percentuais_banco_horas?.sabado||0),domingo:new l.NI(this.empresaDadosInicias?.percentuais_banco_horas?.domingo||0),feriado:new l.NI(this.empresaDadosInicias?.percentuais_banco_horas?.feriado||0)}),excluido:this.empresaDadosInicias.excluido})}criarEnderecoFormGroup(){return new l.cw({street:this.streetFormControl,addressNumber:this.enderecoNumeroFormControl,district:this.enderecoBairroFormControl,city:this.cityFormControl,state:this.stateFormControl,complement:this.complementFormControl,zip:this.zipFormControl})}matHintExibirBancoHorasParametrosGerais(){return this.converteValorExibidoInformativoBancoHorasFlitAppFromBD(this.globalService.parametrosConta?.exibir_informativo_banco_horas_flit_app)}abrirRecursoAdicionalMarcacaoWhatsAppSwal(a,o){this.ngxLogger.info("\nFun\xe7\xe3o abrirRecursoAdicionalSwal executada.\nPar\xe2metros:",{dados:o}),this.globalService.licencaAtual.integracoes.marcacao_whatsapp||(a.preventDefault(),a.stopPropagation(),this.recursoAdicionalSwalService.abrirSwal(this.recursoAdicionalSwal,o,!0))}abrirRecursoAdicionalSwal(a){this.ngxLogger.info("\nFun\xe7\xe3o abrirRecursoAdicionalSwal executada.\nPar\xe2metros:",{dados:a}),this.recursoAdicionalSwalService.abrirSwal(this.recursoAdicionalSwal,a,this.limitacoesPlanoLicencaService.limitacoes$.getValue().tratamento_de_ponto)}habilitarAbaBancoHoras(){return!(this.parametrosRegimeCompensacaoFormControl.value===re.sR.HorasExtras||this.globalService.parametrosConta.regime_compensacao===re.sR.HorasExtras)}abrirDuvidasSwal(){this.ngxLogger.info("\nFun\xe7\xe3o abrirDuvidasSwal() executada."),this.duvidasSwal.swalOptions={title:"Percentual de banco de horas",html:"\n <div class='paragrafo'>\n Configure percentuais de acr\xe9scimo de horas, o banco de horas ser\xe1 calculado de acordo com o percentual informado em cada campo. \n </div>\n <div class='paragrafo'>\n Deixando o campo zerado n\xe3o ter\xe1 acr\xe9scimo de horas, ser\xe1 levado para o saldo apenas as horas feitas pelo usu\xe1rio. Acrescentando valores como 50%, 100%, ser\xe1 levado para o saldo de banco de horas o valor das horas feitas acrescidas do percentual informado no campo.\n </div>\n ",icon:"question",reverseButtons:!0,width:600,confirmButtonText:"Entendi"},this.duvidasSwal.fire()}abrirRestricaoDialog(){this.ngxLogger.info("Fun\xe7\xe3o abrirRestricaoDialog() executada.");const a=this.matDialog.open(Ne.u,{data:{maxWidth:"600px",title:"Restri\xe7\xf5es de IP",labelButton:"Entendi",HTMLContent:'\n <div class="content-restr
1icao-ip-help">\n <h3 class="primeiro-paragrafo-restricao-ip-help">\n Com este recurso, voc\xea pode\n <span class="font-semibold text-sky-600">\n restringir as marca\xe7\xf5es de ponto\n </span>\n no Flit Web por meio do endere\xe7o IP da empresa.\n </h3>\n\n <p class="mb-4">\n Para que a restri\xe7\xe3o funcione corretamente, \xe9 necess\xe1rio utilizar um\n <strong>IP externo fixo</strong> (IP dedicado), contratado junto ao seu provedor de internet.\n </p>\n\n <p class="mb-3 font-medium text-gray-800">\n O campo funciona de duas formas:\n </p>\n\n <ul class="lista-formas-ip mb-5 list-disc pl-6">\n <li class="mb-2">\n <strong>Campo em branco:</strong>\n n\xe3o h\xe1 restri\xe7\xe3o por IP. O usu\xe1rio poder\xe1 registrar o ponto de qualquer rede.\n </li>\n\n <li class="mb-2">\n <strong>IPs informados:</strong>\n o sistema valida o IP no momento da marca\xe7\xe3o. O colaborador s\xf3 poder\xe1 registrar o ponto se estiver conectado \xe0 rede autorizada da empresa.\n </li>\n\n <li>\n <strong>Tipos de formata\xe7\xe3o:</strong>\n selecione entre <strong>IPv4</strong> e <strong>IPv6</strong> antes de informar o endere\xe7o. O campo adapta automaticamente a valida\xe7\xe3o e a formata\xe7\xe3o de acordo com o tipo escolhido.\n </li>\n </ul>\n\n <div class="flag-restricao-ip-help">\n <strong class="text-amber-700">Importante:</strong>\n Se for utilizado um IP din\xe2mico, a restri\xe7\xe3o poder\xe1 deixar de funcionar devido \xe0 altera\xe7\xe3o autom\xe1tica do endere\xe7o pelo provedor, bloqueando marca\xe7\xf5es leg\xedtimas.\n </div>\n </div>\n ',alignButton:"center",actionButton:{label:this.textoBotao,cssClass:"descobrir-ip-button",onClick:()=>this.botaoDescobrirMeuIpClick(a),icon:"content_copy",displayIcon:!1,tooltip:"Copiar IP"}}});a.afterClosed().subscribe(()=>{this.textoBotao="Descobrir meu IP"})}formatarMaskIpv6(a){const o=a.target;let r=o.value;r=r.replace(/[^0-9a-fA-F:.%]/g,""),r=r.replace(/:{3,}/g,"::");const n=r.match(/::/g);if(n&&n.length>1&&(r=r.substring(0,r.lastIndexOf(":"))),r=r.replace(/([0-9a-fA-F]{4})([0-9a-fA-F])/g,"$1:$2"),!r.includes("::")){const c=r.split(":");c.length>8&&(r=c.slice(0,8).join(":"))}r=r.replace(/:([0-9a-fA-F]{4})[0-9a-fA-F]/g,":$1"),o.value=r,this.inputMatChipIpsExternos.setValue(r,{emitEvent:!1})}botaoDescobrirMeuIpClick(a){"Descobrir meu IP"===a.componentInstance.data.actionButton.label?this.buscarIp(a):this.copiarIp()}matChipAdicionarIpExterno(a){const o=(this.inputMatChipIpsExternos.value||"").trim();!o||(this.inputMatChipIpsExternos.valid?(this.ipsExternosFormControl.setValue([...this.ipsExternosFormControl.value,o]),this.ipsExternosFormControl.markAsDirty(),this.inputMatChipIpsExternos.reset()):this.ngxLogger.debug("EmpresasFormDialogComponent => matChipAdicionarIpExterno validation.\n",{validationErrors:this.inputMatChipIpsExternos.errors}))}matChipRemoverIpExterno(a){const o=[...this.ipsExternosFormControl.value],r=o.indexOf(a);r>=0&&(o.splice(r,1),this.ipsExternosFormControl.setValue(o),this.ipsExternosFormControl.markAsDirty(),this.atualizarErroIpInvalido())}get codigoExternoFormControl(){return this.empresaForm.get("codigoExterno")}get enderecoNumeroFormControl(){return this.empresaForm.get("addressNumber")}get enderecoBairroFormControl(){return this.empresaForm.get("district")}get cityFormControl(){return this.empresaForm.get("city")}get stateFormControl(){return this.empresaForm.get("state")}get complementFormControl(){return this.empresaForm.get("complement")}get zipFormControl(){return this.empresaForm.get("zip")}get streetFormControl(){return this.empresaForm.get("street")}get timezoneFormControl(){return this.empresaForm.get("timezone")}get diaAberturaFrequenciaParametro(){return this.empresaForm?this.empresaForm.get("diaAberturaFrequenciaParametro"):null}
1get toleranciaIntervalosFormControl(){return this.empresaForm.get("toleranciaIntervalos")}get toleranciaIntervalosTipoFormControl(){return this.empresaForm.get("tolerancia_intervalos_tipo")}get parametrosRegimeCompensacaoFormControl(){return this.empresaForm.get("regimeCompensacao")}get limiteMinutosInterjornadaFormControl(){return this.empresaForm.get("limite_minutos_interjornada")}get ipsExternosFormControl(){return this.empresaForm.get("parametros").get("ips_externos")}get restricaoIpMarcarWebFormControl(){return this.empresaForm.get("parametros").get("restricao_ip_marcar_web")}get permitirMarcarForaPerimetroFormControl(){return this.empresaForm.get("parametros").get("permitir_marcar_fora_perimetro")}get permitirAutenticacaoPorCelularFormControl(){return this.empresaForm.get("parametros").get("permitir_autenticacao_por_celular")}get capturarFotoMarcacaoExternaFormControl(){return this.empresaForm.get("parametros").get("capturar_foto_marcacao_externa")}get capturarLocalizacaoMarcacaoExternaFormControl(){return this.empresaForm.get("parametros").get("capturar_localizacao_marcacao_externa")}get exibirInformativoBancoHorasFlitAppFormControl(){return this.empresaForm.get("parametros").get("exibir_informativo_banco_horas_flit_app")}get exibirEspelhoDePontoFormControl(){return this.empresaForm.get("parametros").get("espelho_ponto_exibir_flitapp")}get espelhoPontoNumeroDiasDisponiveisFormControl(){return this.empresaForm.get("parametros").get("espelho_ponto_numero_dias_disponiveis")}get configuracaoTipoDeFaltaJornadaFormControl(){return this.empresaForm.get("parametros").get("configuracao_tipo_falta_jornada")}get percentuaisBancoHorasFormGroup(){return this.empresaForm.get("percentuais_banco_horas")}get percentualBancoHorasSegundaASextaFormControl(){return this.empresaForm.get("percentuais_banco_horas").get("segunda_a_sexta")}get percentualBancoHorasSabadoFormControl(){return this.empresaForm.get("percentuais_banco_horas").get("sabado")}get percentualBancoHorasDomingoFormControl(){return this.empresaForm.get("percentuais_banco_horas").get("domingo")}get percentualBancoHorasFeriadoFormControl(){return this.empresaForm.get("percentuais_banco_horas").get("feriado")}get cellPhoneFormControl(){return this.empresaForm.get("cellphone")}get processarJornadasRetroativasDataValidators(){const a=be.O.converterDataParaMeioDiaUtcZero((0,Ta.Z)(new Date,60));return[l.kI.required,Ea.x.min(a)]}}return t.\u0275fac=function(a){return new(a||t)(e.Y36(I.WI),e.Y36(l.qu),e.Y36(x._A),e.Y36(ka.q),e.Y36(Fe),e.Y36(Ga.s),e.Y36(I.uw),e.Y36(me.Kf),e.Y36(qa.U),e.Y36(pe._W),e.Y36(ee.sK),e.Y36(e.SBq),e.Y36(Te.U),e.Y36(V.yc),e.Y36($a.M),e.Y36(ja.a),e.Y36(I.so),e.Y36(I.so),e.Y36(Qa.m))},t.\u0275cmp=e.Xpm({type:t,selectors:[["empresas-form-dialog"]],viewQuery:function(a,o){if(1&a&&(e.Gf($e.o,7),e.Gf(Xa,7),e.Gf(eo,7),e.Gf(ao,7)),2&a){let r;e.iGM(r=e.CRH())&&(o.recursoAdicionalSwal=r.first),e.iGM(r=e.CRH())&&(o.duvidasSwal=r.first),e.iGM(r=e.CRH())&&(o.confirmarExclusaoSwal=r.first),e.iGM(r=e.CRH())&&(o.matTabGroup=r.first)}},decls:243,vars:189,consts:[["id","empresas-form",1,"page-layout","carded"],["fxLayoutAlign","start center","fxLayoutGap","10px","fxLayout","row wrap",1,"header"],[1,"pr-4","py-5"],[1,"title"],[1,"flex","items-center","space-x-2"],[1,"text-xl","hover:no-underline","cursor-pointer",3,"click"],[1,"text-xl","text-gray-500"],[4,"ngIf"],["mat-flat-button","","aria-label","Save button",1,"save-button",3,"disabled","click"],["fxLayoutAlign","center center"],["name","hero-save",3,"size"],[1,"ml-4"],[1,"close-x-button","close-modal-position","cursor-pointer",3,"click"],["name","hero-x",1,"rotate",3,"size"],["matTabGroup",""],[3,"label"],["class","alerta-endereco",4,"ngIf"],["mat-dialog-content","",1,"p-24","pb-0","m-0"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign","flex-start","fxLayoutGap.gt-xs","20p
1x",3,"formGroup"],["fxFlex","",1,"form-divider"],["class","company-logo-thumb mr-8 mr-sm-16",3,"matMenuTriggerFor",4,"ngIf","ngIfElse"],["imgLoad",""],["avatarMenu","matMenu"],["mat-menu-item","",3,"click"],[1,"mr-md-4"],["mat-menu-item","",3,"click",4,"ngIf"],["fxFlex","",1,"form-divider","mt-[20px]"],["matSuffix","","icon","briefcase","size","lg",1,"secondary-text"],["fxFlex","0 1 calc(50% - 20px)"],["appearance","outline","fxFlex",""],["name","ein","formControlName","ein","matInput","","required","",3,"mask","paste"],["fxFlex","0 1 calc(50% - 20px)",4,"ngIf"],["fxFlex","0 1 calc(100% - 20px)"],["trimExtraWhiteSpace","","name","tradingName","formControlName","tradingName","matInput","","required",""],["matSuffix","","icon","comments","size","lg",1,"secondary-text"],["name","phone","formControlName","phone","matInput","",3,"mask"],["name","cellphone","formControlName","cellphone","matInput","",3,"mask"],["matSuffix","","icon","home","size","lg",1,"secondary-text"],["name","zip","formControlName","zip","matInput","",3,"mask","keydown"],["keyLabelAcessor","sigla","keyLabelAcessor2","nome","formFielFxFlex","fxFlex",3,"keyValueAcessorFn","selectLabel","selectFormControl","dataArray$","errorMessageFn"],["keyLabelAcessor","nome","formFielFxFlex","fxFlex",3,"keyValueAcessorFn","selectLabel","selectFormControl","dataArray$","hint","errorMessageFn"],["name","district","formControlName","district","trimExtraWhiteSpace","","matInput","",3,"minLength"],["name","street","formControlName","street","trimExtraWhiteSpace","","matInput","","maxlength","80",3,"pattern"],["appearance","outline","fxFlex","",1,"sem-numero-sufix"],["matInput","","name","numero","trimExtraWhiteSpace","","autocomplete","new-numero","formControlName","addressNumber",3,"maxLength","mask"],["mat-icon-button","","matSuffix","",3,"formControl"],[2,"font-size","12.5px"],["name","complement","formControlName","complement","trimExtraWhiteSpace","","matInput",""],["name","singleOwnerBusiness","formControlName","singleOwnerBusiness","type","hidden"],["mat-dialog-content","","fusePerfectScrollbar","",1,"p-24","pb-0","m-0"],["fxLayout","column","fxLayoutAlign","flex-start",3,"formGroup"],["fxFlex","0 1 calc(100% - 20px)",1,"h1","font-weight-300"],["id","allowPhotographsFlitParameter","formControlName","allowPhotographsFlitParameter","matTooltip","Permite fotografar o rosto do colaborador ao marcar ponto no Flit.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal"],["fxFlex","0 1 calc(100%)","id","allowPhotographsFlitTabParameter","formControlName","allowPhotographsFlitTabParameter","matTooltip","Permite fotografar o rosto do colaborador ao marcar ponto no Flit Multi.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal"],["fxFlex","0 1 calc(100%)","id","permitirFotografarFlitWeb","formControlName","permitirFotografarFlitWeb","matTooltip","Permite fotografar o rosto do colaborador ao marcar ponto no navegador (Flit Web).","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal"],["fxFlex","0 1 calc(100%)","id","permitirMarcarForaPerimetro","matTooltip","Permite marcar ponto se o dispositivo n\xe3o tiver detectado a localiza\xe7\xe3o atual ou se o funcion\xe1rio estiver fora do per\xedmetro ap\xf3s 30 segundos do in\xedcio da marca\xe7\xe3o.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal",3,"formControl"],["fxFlex","0 1 calc(100%)","id","habilitarLoginCpfWhatsapp","matTooltip","Permite que funcion\xe1rios fa\xe7am login utilizando o CPF e recebam um c\xf3digo de verifica\xe7\xe3o por WhatsApp.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal",3,"formControl"],[1,"flex","!flex-col","w-full","mt-[20px]",3,"click"],[1,"h1","font-weight-300"],["fxFlex","0 1 calc(100%)","id","capturarFotoMarcacaoExterna","matTooltip","Foto obrigat\xf3ria do colaborador ao marcar ponto por WhatsApp.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal",3,"formControl"],["fxFlex","0 1 calc(100%)","id","capturarLocalizacaoMarcacaoExterna","matTooltip","Localiza\xe7\xe3o obrigat\xf3ria do colaborador ao marcar ponto por WhatsApp.","matTooltipClass","tooltip-font-13-5",1,"mb-0","child:!whitespace-normal",3,"formControl"],["fxLayout","column","fxFlex","0 1 100%","id","frequencia"],["fxFlex","0 1 calc(100% - 20px)",1,"h1","font-weight-300","mt-[20px]"],["fxFlex","1 1 100%","fxLayout","row wrap"],["appearance","outline",1,"md:mr-[10px]","md:w-[calc(50%-10px)]","w-full",3,"click"],["matInput","","mask","d0","autocomplete","new-password","required","",3,"readonly","formControl"],["class","md:ml-[10px] md:w-[calc(50%-10px)] w-full","appearance","outline","hideRequiredMarker","",4,"ngIf"],["appearance","outline","class","md:mr-[10px] md:w-[calc(50%-10px)] w-full",4,"ngIf"],["fxLayout","column","fxFlex","0 1 100%","id","jornadas",3,"ngClass",4,"ngIf"],["class","flex !flex-col w-full","id","tolerancia",4,"ngIf"],["class","flex !flex-col w-full","id","espelho_ponto",4,"ngIf"],["fxLayout","column","fxFlex","1 1 50%","id","integracoes"],["appearance","outline",1,"md:mr-[10px]","md:w-[calc(50%-10px)]","w-full"],["matTooltipClass","tooltip-font-13-5","autocomplete","off","mask","9{10}","trimExtraWhiteSpace","","matInput","",3,"formControl","matTooltip"],["fxLayout","row wrap","fxFlex","0 1 100%","id","frequencia",1,"mb-[10px]"],["fxFlex","0 1 calc(100% - 20px)",1,"h1","font-weight-300","mt-[10px]","restricoes-container"],["matSuffix","","color","primary","matTooltip","Saiba como funciona a restri\xe7\xe3o e descubra o IP p\xfablico da sua conex\xe3o.","matTooltipClass","tooltip-font-13-5",1,"button-restricao-dialog",3,"click"],["appearance","outline",1,"ip-list","md:flex-1","w-full"],["aria-label","Ip selection",3,"formControl"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],["id","ip","name","ip","autocomplete","off",3,"mask","validation","formControl","disabled","placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","maxlength","matChipInputTokenEnd","input",4,"ngIf"],["appearance","outline",1,"w-full","md:w-[160px]","md:ml-[10px]"],[3,"formControl"],[3,"value"],["label","Banco de horas",4,"ngIf"],["duvidasSwal",""],[3,"cancelButtonText","confirmButtonColor","confirmButtonText","customClass","focusCancel","focusConfirm","icon","reverseButtons","showCancelButton","title"],["confirmarExclusaoSwal",""],[1,"subtitle","secondary-text","w-full"],[1,"flex","flex-row","items-center","gap-2","w-full","text-[13px]"],["mat-icon-button","","aria-label","Menu extra actions",1,"empresas-toggle-more-actions-menu",3,"matMenuTriggerFor"],[1,"empresas-more-actions-menu"],["menu","matMenu"],["mat-menu-item","",2,"padding","0p
1x !important"],["mat-menu-item","","aria-label","mat-menu-exclude-button",1,"mat-menu-exclude-button",3,"click"],["fxLayout","row","fxLayoutAlign","start center"],["fxLayoutAlign","center center","name","hero-trash",1,"icon",3,"size"],[1,"alerta-endereco"],[1,"company-logo-thumb","mr-8","mr-sm-16",3,"matMenuTriggerFor"],["class","image",3,"src",4,"ngIf","ngIfElse"],["logoProposta",""],["fxLayoutAlign","center center",1,"middle",3,"ngStyle"],[1,"image",3,"src"],["fxLayoutAlign","center center",1,"company-logo-thumb","mr-8","mr-sm-16"],[1,"photo-spinner-loading",3,"diameter"],["color","warn",1,"mr-md-4"],["trimExtraWhiteSpace","","name","companyName","formControlName","companyName","matInput","","required",""],["selectSearchSufix",""],["mat-button","","mat-icon-button","",3,"click"],[1,"close-x-button","cursor-pointer"],["appearance","outline","hideRequiredMarker","",1,"md:ml-[10px]","md:w-[calc(50%-10px)]","w-full"],[1,"centralizar-mat-option"],[1,"m-0"],[1,"ml-8"],[3,"value",4,"ngFor","ngForOf"],[1,"text-left"],["matTooltipClass","tooltip-font-13-5",3,"matTooltip","formControl"],["fxFlex","",1,"centralizar-mat-option",2,"max-height","17px !important"],["fxLayout","column","fxFlex","0 1 100%","id","jornadas",3,"ngClass"],["fxFlex","1 1 100%","fxLayout","row wrap",1,"min-h-[110px]"],["appearance","outline","hideRequiredMarker","",1,"md:mr-[10px]","md:w-[calc(50%-10px)]","w-full",3,"matTooltip"],["id","tolerancia",1,"flex","!flex-col","w-full"],["appearance","outline","floatLabel","always",1,"md:mr-[10px]","md:w-[calc(50%-10px)]","w-full"],["placeholder","10 (Padr\xe3o)","mask","999","matInput","","matTooltipClass","tooltip-font-13-5",3,"readonly","formControl","specialCharacters","matTooltip"],[1,"hint-warn"],["id","espelho_ponto",1,"flex","!flex-col","w-full"],["fxFlex","0 1 calc(100%)","id","exibirEspelhoDePonto","matTooltip","Quando marcado, exibe o recurso de espelho de ponto para o colaborador no app.","matTooltipClass","tooltip-font-13-5",1,"exibir-espelho-slide-toggle","child:!whitespace-normal",3,"formControl"],["class","md:mr-[10px] md:w-[calc(50%-10px)] w-full","appearance","outline","floatLabel","always",4,"ngIf"],["class","md:ml-[10px] md:w-[calc(50%-10px)] w-full","appearance","outline","floatLabel","always","hideRequiredMarker","",3,"matTooltip",4,"ngIf"],["matInput","","placeholder","7 (Padr\xe3o)","type","number","min","1","max","90",3,"formControl"],["appearance","outline","floatLabel","always","hideRequiredMarker","",1,"md:ml-[10px]","md:w-[calc(50%-10px)]","w-full",3,"matTooltip"],["class","hint-warn",4,"ngIf"],[3,"selectable","removable","removed"],["matChipRemove",""],["matTooltip","Remover IP"],["id","ip","name","ip","autocomplete","off",3,"mask","validation","formControl","disabled","placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","maxlength","matChipInputTokenEnd","input"],["label","Banco de horas"],["matSuffix","","color","primary","matTooltipClass","tooltip-font-13-5",2,"cursor","pointer",3,"click"],["fxFlex","0 1 calc(100% - 20px)",1,"h3","font-weight-300","mt-2","mb-4"],[1,"text-gray-500","text-[13px]"],["formGroupName","percentuais_banco_horas","fxFlex","1 1 100%","fxLayout","row wrap"],["fxFlex","1 1 100%","fxLayout","row wrap",1,"percentuais-banco-horas","items-center","justify-start","gap-10"],["appearance","outline","floatLabel","always",1,"w-[150px]"],["for","percentualBancoHorasSegundaASexta"],["name","percentualBancoHorasSegundaASexta","formControlName","segunda_a_sexta","matInput","","type","text","placeholder","0","apenasNumerosDiretiva","","trimExtraWhiteSpace","","maxlength","4",3,"mask"],["matSuffix","",1,"text-gray-400"],["for","percentualBancoHorasSabado"],["name","percentualBancoHorasSabado","formControlName","sabado","matInput","","type","text","placeholder","0","apenasNumerosDiretiva","","trimExtraWhiteSpace","","maxlength","4",3,"mask"],["for","percentualBancoHorasDomingo"],["name","percentualBancoHorasDomingo","formControlName","domingo","matInput","","type","text","placeholder","0","apenasNumerosDiretiva","","trimExtraWhiteSpace","","maxlength","4",3,"mask"],["for","percentualBancoHorasFeriado"],["name","percentualBancoHorasFeriado","formControlName","feriado","matInput","","type","text","placeholder","0","apenasNumerosDiretiva","","trimExtraWhiteSpace","","maxlength","4",3,"mask"]],template:function(a,o){if(1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",4)(7,"a",5),e.NdJ("click",function(){return o.dialogRef.close()}),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"div",6),e._uU(11,"/"),e.qZA(),e.TgZ(12,"span",6),e._uU(13),e.qZA()(),e.YNc(14,oo,15,16,"ng-container",7),e.qZA(),e.TgZ(15,"button",8),e.NdJ("click",function(){return o.salvarClick()}),e.TgZ(16,"div",9),e._UZ(17,"ng-icon",10),e.TgZ(18,"div",11),e._uU(19),e.qZA()()(),e.YNc(20,to,13,5,"ng-container",7),e.TgZ(21,"div",12),e.NdJ("click",function(){return o.dialogRef.close()}),e._UZ(22,"ng-icon",13),e.qZA()(),e.TgZ(23,"mat-tab-group",null,14)(25,"mat-tab",15),e.ALo(26,"translate"),e.YNc(27,ro,5,0,"div",16),e.TgZ(28,"div",17)(29,"form",18)(30,"div",19),e._uU(31,"L
1ogo da empresa"),e.qZA(),e.YNc(32,lo,8,13,"div",20),e.ALo(33,"async"),e.YNc(34,co,2,5,"ng-template",null,21,e.W1O),e.TgZ(36,"mat-menu",null,22)(38,"button",23),e.NdJ("click",function(){return o.cropImage()}),e.TgZ(39,"mat-icon",24),e._uU(40,"edit"),e.qZA(),e.TgZ(41,"span"),e._uU(42,"Incluir / Editar foto"),e.qZA()(),e.YNc(43,mo,5,0,"button",25),e.qZA(),e.TgZ(44,"div",26),e._uU(45),e.ALo(46,"translate"),e.TgZ(47,"span"),e._uU(48,"\xa0"),e.qZA(),e._UZ(49,"fa-icon",27),e.qZA(),e.TgZ(50,"div",28)(51,"mat-form-field",29)(52,"mat-label"),e._uU(53),e.ALo(54,"translate"),e.qZA(),e.TgZ(55,"input",30),e.NdJ("paste",function(n){return o.onPaste(n)}),e.ALo(56,"async"),e.qZA(),e.YNc(57,po,3,3,"mat-error",7),e.YNc(58,uo,3,3,"mat-error",7),e.qZA()(),e.YNc(59,ho,8,5,"div",31),e.TgZ(60,"div",32)(61,"mat-form-field",29),e.YNc(62,_o,3,3,"mat-label",7),e.YNc(63,xo,3,3,"mat-label",7),e._UZ(64,"input",33),e.YNc(65,vo,3,3,"mat-error",7),e.YNc(66,Co,3,3,"mat-error",7),e.qZA()(),e.TgZ(67,"div",19),e._uU(68),e.ALo(69,"translate"),e.TgZ(70,"span"),e._uU(71,"\xa0"),e.qZA(),e._UZ(72,"fa-icon",34),e.qZA(),e.TgZ(73,"div",28)(74,"mat-form-field",29)(75,"mat-label"),e._uU(76),e.ALo(77,"translate"),e.qZA(),e._UZ(78,"input",35),e.TgZ(79,"mat-error"),e._uU(80),e.ALo(81,"translate"),e.qZA()()(),e.TgZ(82,"div",28)(83,"mat-form-field",29)(84,"mat-label"),e._uU(85),e.ALo(86,"translate"),e.qZA(),e._UZ(87,"input",36),e.YNc(88,Ao,3,3,"mat-error",7),e.YNc(89,bo,3,3,"mat-error",7),e.qZA()(),e.TgZ(90,"div",19),e._uU(91),e.ALo(92,"translate"),e.TgZ(93,"span"),e._uU(94,"\xa0"),e.qZA(),e._UZ(95,"fa-icon",37),e.qZA(),e.TgZ(96,"div",28)(97,"mat-form-field",29)(98,"mat-label"),e._uU(99),e.ALo(100,"translate"),e.qZA(),e.TgZ(101,"input",38),e.NdJ("keydown",function(n){return o.preventEnterKey(n)}),e.qZA(),e.YNc(102,Eo,3,3,"mat-error",7),e.YNc(103,Io,3,3,"mat-error",7),e.qZA()(),e.TgZ(104,"div",28)(105,"select-search",39),e.ALo(106,"translate"),e.YNc(107,Fo,2,0,null,7),e.qZA()(),e.TgZ(108,"div",28)(109,"select-search",40),e.ALo(110,"translate"),e.ALo(111,"translate"),e.YNc(112,Zo,2,0,null,7),e.qZA()(),e.TgZ(113,"div",28)(114,"mat-form-field",29)(115,"mat-label"),e._uU(116),e.ALo(117,"translate"),e.qZA(),e._UZ(118,"input",41),e.YNc(119,Ro,4,5,"mat-error",7),e.YNc(120,Lo,4,5,"mat-error",7),e.YNc(121,Po,5,7,"mat-error",7),e.YNc(122,Oo,3,3,"mat-error",7),e.qZA()(),e.TgZ(123,"div",28)(124,"mat-form-field",29)(125,"mat-label"),e._uU(126),e.ALo(127,"translate"),e.qZA(),e._UZ(128,"input",42),e.YNc(129,So,3,3,"mat-error",7),e.YNc(130,yo,3,3,"mat-error",7),e.qZA()(),e.TgZ(131,"div",28)(132,"mat-form-field",43)(133,"mat-label"),e._uU(134),e.ALo(135,"translate"),e.qZA(),e._UZ(136,"input",44),e.ALo(137,"async"),e.TgZ(138,"mat-checkbox",45)(139,"span",46),e._uU(140,"Sem n\xfamero"),e.qZA()(),e.TgZ(141,"mat-error"),e._uU(142),e.qZA()()(),e.TgZ(143,"div",32)(144,"mat-form-field",29)(145,"mat-label"),e._uU(146),e.ALo(147,"translate"),e.qZA(),e._UZ(148,"input",47),e.TgZ(149,"mat-error"),e._uU(150),e.ALo(151,"translate"),e.qZA()()(),e._UZ(152,"input",48),e.qZA()()(),e.TgZ(153,"mat-tab",15),e.ALo(154,"translate"),e.TgZ(155,"div",49)(156,"form",50)(157,"div",51),e._uU(158,"Permiss\xf5es"),e.qZA(),e.TgZ(159,"mat-checkbox",52),e._uU(160," Fotografar colaborador ao marcar ponto no Flit. "),e.qZA(),e.TgZ(161,"mat-checkbox",53),e._uU(162," Fotografar colaborador ao marcar ponto no Flit Multi. "),e.qZA(),e.TgZ(163,"mat-checkbox",54),e._uU(164," Fotografar colaborador ao marcar ponto no Flit Web. "),e.qZA(),e.TgZ(165,"mat-checkbox",55),e._uU(166," Permitir marcar ponto fora do per\xedmetro. "),e.qZA(),e.TgZ(167,"mat-checkbox",56),e._uU(168," Habilitar login por CPF e verifica\xe7\xe3o por n\xfamero de celular (WhatsApp) no Flit. "),e.qZA(),e.TgZ(169,"div",57),e.NdJ("click",function(n){return o.abrirRecursoAdicionalMarcacaoWhatsAppSwal(n,{recurso_nome:"GERAL.MARCACAOPORWHATSAPPTITULO",recurso_complemento:"GERAL.EACENTOUM",recurso_subtitulo:"GERAL.MARCACAOPORWHATSAPPSUBTITULO",conteudo_paragrafos:["GERAL.MARCACAOPORWHATSAPPPARAGRAFO1","GERAL.MARCACAOPORWHATSAPPPARAGRAFO2","GERAL.MARCACAOPORWHATSAPPPARAGRAFO3"]})}),e.TgZ(170,"div",58),e._uU(171,"Marca\xe7\xe3o de ponto por WhatsApp"),e.qZA(),e.TgZ(172,"mat-checkbox",59),e._uU(173," Foto obrigat\xf3ria. "),e.qZA(),e.TgZ(174,"mat-checkbox",60),e._uU(175," Localiza\xe7\xe3o obrigat\xf3ria. "),e.qZA()(),e.TgZ(176,"div",61)(177,"div",62),e._uU(178),e.ALo(179,"translate"),e.qZA(),e.TgZ(180,"div",63)(181,"mat-form-field",64),e.NdJ("click",function(){return o.abrirRecursoAdicionalSwal({recurso_nome:"GERAL.FREQUENCIA",recurso_complemento:"GERAL.EACENTOUM",recurso_subtitulo:"GERAL.ESCOLHAODIADEABETURADESUAFOLHA",conteudo_paragrafos:["GERAL.DETALHESDIAABERTURAFREQUENCIAP1"]})}),e.TgZ(182,"mat-label"),e._uU(183),e.ALo(184,"translate"),e.qZA(),e._UZ(185,"input",65),e.ALo(186,"async"),e.YNc(187,Mo,3,3,"mat-error",7),e.YNc(188,No,3,3,"mat-error",7),e.qZA(),e.YNc(189,ko,17,13,"mat-form-field",66),e.YNc(190,zo,15,13,"mat-form-field",67),e.ALo(191,"async"),e.qZA()(),e.YNc(192,qo,23,22,"div",68),e.YNc(193,jo,14,15,"div",69),e.ALo(194,"async"),e.YNc(195,at,8,3,"div",70),e.ALo(196,"async"),e.TgZ(197,"div",71)(198,"div",51),e._uU(199),e.ALo(200,"translate"),e.qZA(),e.TgZ(201,"mat-form-field",72)(202,"mat-label"),e._uU(203),e.ALo(204,"translate"),e.qZA(),e._UZ(205,"input",73),e.ALo(206,"translate"),e.YNc(207,ot,3,3,"mat-error",7),e.YNc(208,tt,3,3,"mat-error",7),e.qZA()(),e.TgZ(209,"div",74)(210,"div",75),e._uU(211," Restri\xe7\xf5es "),e.TgZ(212,"mat-icon",76),e.NdJ("click",function(){return o.abrirRestricaoDialog()}),e._uU(213,"help"),e.qZA()(),e.TgZ(214,"mat-form-field",77)(215,"mat-label"),e._uU(216,"Permitir os seguintes IPs para marca\xe7\xf5es no Flit Web"),e.qZA(),e.TgZ(217,"mat-chip-list",78,79),e.YNc(219,rt,5,3,"mat-chip",80),e.YNc(220,it,1,9,"input",81),e.qZA(),e.YNc(221,nt,2,0,"mat-error",7),e.YNc(222,st,2,0,"mat-error",7),e.YNc(223,lt,2,1,"mat-error",7),e.YNc(224,ct,2,0,"mat-error",7),e.YNc(225,mt,2,1,"mat-hint",7),e.qZA(),e.TgZ(226,"mat-form-field",82)(227,"mat-label"),e._uU(228,"Tipos de formata\xe7\xe3o"),e.qZA(),e.TgZ(229,"mat-select",83)(230,"mat-option",84),e._uU(231,"IPV4"),e.qZA(),e.TgZ(232,"mat-option",84),e._uU(233,"IPV6"),e.qZA()()()()()()(),e.YNc(234,pt,40,8,"mat-tab",85),e.qZA()(),e._UZ(235,"recurso-adicional-swal")(236,"swal",null,86)(238,"swal",87,88),e.ALo(240,"translate"),e.ALo(241,"translate"),e.ALo(242,"translate")),2&a){const r=e.MAs(35);let n;e.xp6(1),e.Q6J("@animate",e.VKq(186,le,e.DdM(185,De))),e.xp6(3),e.Oqu(e.l
1cZ(5,115,"COMPANYLIST.TITLE")),e.xp6(4),e.Oqu(e.lcZ(9,117,"COMPANYLIST.LIST")),e.xp6(5),e.Oqu("new"===o.action?"Novo":"Edi\xe7\xe3o"),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&(null==o.empresaDadosInicias?null:o.empresaDadosInicias.data_criacao_doc)),e.xp6(1),e.Q6J("disabled",o.loading),e.xp6(2),e.Q6J("size","22px"),e.xp6(2),e.hij(" ","new"===o.action?"CRIAR":"SALVAR"," "),e.xp6(1),e.Q6J("ngIf","edit"===o.action),e.xp6(2),e.Q6J("size","26px"),e.xp6(3),e.s9C("label",e.lcZ(26,119,"GERAL.CADASTRO")),e.xp6(2),e.Q6J("ngIf",o.enderecoIncorreto),e.xp6(2),e.Q6J("formGroup",o.empresaForm),e.xp6(3),e.Q6J("ngIf",e.lcZ(33,121,o.logoUrl$))("ngIfElse",r),e.xp6(11),e.Q6J("ngIf",!(null!=(n=o.logoUrl$.getValue())&&n.includes(o.caminhoSemLogo))),e.xp6(2),e.hij(" ",e.lcZ(46,123,"COMPANYFORM.BASICINFODIV")," "),e.xp6(8),e.Oqu(e.lcZ(54,125,"COMPANYFORM.EIN")),e.xp6(2),e.Q6J("mask",e.lcZ(56,127,o.einMask$)),e.xp6(2),e.Q6J("ngIf",o.empresaForm.get("ein").hasError("required")),e.xp6(1),e.Q6J("ngIf",!o.empresaForm.get("ein").hasError("required")),e.xp6(1),e.Q6J("ngIf",!o.isCpf),e.xp6(3),e.Q6J("ngIf",!o.isCpf),e.xp6(1),e.Q6J("ngIf",o.isCpf),e.xp6(2),e.Q6J("ngIf",o.empresaForm.get("tradingName").hasError("required")),e.xp6(1),e.Q6J("ngIf",!o.empresaForm.get("tradingName").hasError("required")),e.xp6(2),e.hij(" ",e.lcZ(69,129,"COMPANYFORM.CONTACTDIV")," "),e.xp6(8),e.Oqu(e.lcZ(77,131,"COMPANYFORM.PHONE")),e.xp6(2),e.Q6J("mask",o.validationPatternService.phoneMask),e.xp6(2),e.hij(" ",e.lcZ(81,133,"COMPANYFORM.PHONEERROR")," "),e.xp6(5),e.Oqu(e.l
1cZ(86,135,"COMPANYFORM.CELLPHONE")),e.xp6(2),e.Q6J("mask",o.validationPatternService.cellphoneMask),e.xp6(1),e.Q6J("ngIf",o.empresaForm.get("cellphone").hasError("pattern")),e.xp6(1),e.Q6J("ngIf",o.empresaForm.get("cellphone").hasError("required")),e.xp6(2),e.hij(" ",e.lcZ(92,137,"COMPANYFORM.ADDRESSDIV")," "),e.xp6(8),e.Oqu(e.lcZ(100,139,"COMPANYFORM.ZIP")),e.xp6(2),e.Q6J("mask",o.validationPatternService.cepMask),e.xp6(1),e.Q6J("ngIf",o.zipFormControl.hasError("minlength")),e.xp6(1),e.Q6J("ngIf",o.zipFormControl.hasError("required")),e.xp6(2),e.Q6J("keyValueAcessorFn",o.keyValueAcessorStateFn)("selectLabel",e.lcZ(106,141,"COMPANYFORM.STATE"))("selectFormControl",o.stateFormControl)("dataArray$",o.states$)("errorMessageFn",o.getSelectErrorMessage),e.xp6(2),e.Q6J("ngIf",(null==o.stateFormControl.value?null:o.stateFormControl.value.length)>0),e.xp6(2),e.Q6J("keyValueAcessorFn",o.keyValueAcessorCityFn)("selectLabel",e.lcZ(110,143,"COMPANYFORM.CITY"))("selectFormControl",o.cityFormControl)("dataArray$",o.cities$)("hint",o.showCityHint?e.lcZ(111,145,"USERFORM.CITYHINT"):"")("errorMessageFn",o.getSelectErrorMessage),e.xp6(3),e.Q6J("ngIf",(null==o.cityFormControl.value?null:o.cityFormControl.value.length)>0),e.xp6(4),e.Oqu(e.lcZ(117,147,"COMPANYFORM.DISTRICT")),e.xp6(2),e.Q6J("minLength",3)("minLength",40),e.xp6(1),e.Q6J("ngIf",o.enderecoBairroFormControl.hasError("minlength")),e.xp6(1),e.Q6J("ngIf",o.enderecoBairroFormControl.hasError("maxlength")),e.xp6(1),e.Q6J("ngIf",o.enderecoBairroFormControl.hasError("pattern")&&!o.enderecoBairroFormControl.hasError("minlength")&&!o.enderecoBairroFormControl.hasError("maxlength")),e.xp6(1),e.Q6J("ngIf",o.enderecoBairroFormControl.hasError("required")),e.xp6(4),e.Oqu(e.lcZ(127,149,"COMPANYFORM.STREET")),e.xp6(2),e.Q6J("pattern",o.validationPatternService.textSpaceNumberExtraPattern),e.xp6(1),e.Q6J("ngIf",o.streetFormControl.hasError("minlength")),e.xp6(1),e.Q6J("ngIf",o.streetFormControl.hasError("required")),e.xp6(4),e.Oqu(e.lcZ(135,151,"COMPANYFORM.ADDRESSNUMBER")),e.xp6(2),e.s9C("mask",e.lcZ(137,153,o.numeroMask)),e.Q6J("maxLength",7),e.xp6(2),e.Q6J("formControl",o.semNumeroFormControl),e.xp6(4),e.hij(" ","N\xfamero obrigatorio"," "),e.xp6(4),e.Oqu(e.lcZ(147,155,"COMPANYFORM.COMPLEMENT")),e.xp6(4),e.hij(" ",e.lcZ(151,157,"COMPANYFORM.COMPLEMENTERROR")," "),e.xp6(3),e.s9C("label",e.lcZ(154,159,"GERAL.PARAMETROS")),e.xp6(3),e.Q6J("formGroup",o.empresaForm),e.xp6(9),e.Q6J("formControl",o.permitirMarcarForaPerimetroFormControl),e.xp6(2),e.Q6J("formControl",o.permitirAutenticacaoPorCelularFormControl),e.xp6(5),e.Q6J("formControl",o.capturarFotoMarcacaoExternaFormControl),e.xp6(2),e.Q6J("formControl",o.capturarLocalizacaoMarcacaoExternaFormControl),e.xp6(4),e.hij(" ",e.lcZ(179,161,"GERAL.FREQUENCIA")," "),e.xp6(5),e.Oqu(e.l
1cZ(184,163,"COMPANYFORM.DIAABERTURAFREQUENCIA")),e.xp6(2),e.Q6J("readonly",e.lcZ(186,165,o.limitacoesPlanoLicencaService.limitacoes$).tratamento_de_ponto)("formControl",o.diaAberturaFrequenciaParametro),e.xp6(2),e.Q6J("ngIf",null==o.diaAberturaFrequenciaParametro?null:o.diaAberturaFrequenciaParametro.hasError("required")),e.xp6(1),e.Q6J("ngIf",!(null!=o.diaAberturaFrequenciaParametro&&o.diaAberturaFrequenciaParametro.hasError("required"))),e.xp6(1),e.Q6J("ngIf",o.globalService.parametrosConta.regime_compensacao===o.RegimesCompensacao.Hibrido),e.xp6(1),e.Q6J("ngIf",!e.lcZ(191,167,o.limitacoesPlanoLicencaService.limitacoes$).tratamento_de_ponto),e.xp6(2),e.Q6J("ngIf",o.globalService.parametrosConta.regime_compensacao!==o.RegimesCompensacao.HorasExtras),e.xp6(1),e.Q6J("ngIf",!e.lcZ(194,169,o.limitacoesPlanoLicencaService.limitacoes$).tratamento_de_ponto),e.xp6(2),e.Q6J("ngIf",!e.lcZ(196,171,o.limitacoesPlanoLicencaService.limitacoes$).tratamento_de_ponto),e.xp6(4),e.hij(" ",e.lcZ(200,173,"GERAL.INTEGRACAO")," "),e.xp6(4),e.Oqu(e.lcZ(204,175,"GERAL.CODIGOEXTERNO")),e.xp6(2),e.s9C("matTooltip",e.lcZ(206,177,"GERAL.CODIGOEXTERNOEMPRESATIP")),e.Q6J("formControl",o.codigoExternoFormControl),e.xp6(2),e.Q6J("ngIf",null==o.codigoExternoFormControl?null:o.codigoExternoFormControl.hasError("required")),e.xp6(1),e.Q6J("ngIf",null==o.codigoExternoFormControl?null:o.codigoExternoFormControl.hasError(o.ErrosValidacao.ValorIndisponivel)),e.xp6(9),e.Q6J("formControl",o.ipsExternosFormControl),e.xp6(2),e.Q6J("ngForOf",o.ipsExternosFormControl.value),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.value.length<o.MAX_IPS),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.hasError("maxlength")),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.hasError("ValorIndisponivel")),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.hasError("maxLenght")),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.hasError("ipInvalido")),e.xp6(1),e.Q6J("ngIf",o.ipsExternosFormControl.value.length>=o.MAX_IPS),e.xp6(4),e.Q6J("formControl",o.tipoIpFormControl),e.xp6(1),e.Q6J("value","IPV4"),e.xp6(2),e.Q6J("value","IPV6"),e.xp6(2),e.Q6J("ngIf",o.habilitarAbaBancoHoras()),e.xp6(4),e.Q6J("cancelButtonText",e.lcZ(240,179,"GERAL.CANCELAR"))("confirmButtonColor","#4caf50")("confirmButtonText",e.lcZ(241,181,"GERAL.CONFIRMAR"))("customClass",e.DdM(188,ut))("focusCancel",!0)("focusConfirm",!1)("icon","warning")("reverseButtons",!0)("showCancelButton",!0)("title",e.lcZ(242,183,"GERAL.TEMCERTEZA"))}},directives:[G.Wh,G.SQ,G.xw,Z.O5,f.lW,_e.o,D.p6,T.Hw,D.VK,D.OP,B.SP,B.uX,I.xY,l._Y,l.JL,l.sg,G.yH,Z.PC,ne.Zl,P.Ou,he.BN,W.R9,W.KE,W.hX,l.Fj,N.Nt,Me.hx,l.JJ,l.u,l.Q7,W.TO,Ya.A,Wa.h,l.nD,l.c5,F.oG,l.oH,ae.gM,L.gD,L.$L,x.ey,Z.sg,W.bx,Z.mk,ne.oO,S.Rr,l.qQ,l.Fd,l.wV,C.qn,C.HS,C.qH,C.oH,l.x0,Ka.Z,$e.o,xe.q1],pipes:[ee.X$,Z.uU,Z.Ov],styles:[".empresas-form-dialog{width:1300px}@media (max-height: 795px){.empresas-form-dialog{justify-content:center;align-items:center}}@media screen and (max-width: 599px){.empresas-form-dialog{width:100%}}.empresas-form-dialog .mat-dialog-content{height:800px}.empresas-form-dialog .pb-32{padding-bottom:32px}.swal2-container{z-index:99999!important}#empresas-form{background-color:#fff}#empresas-form .header{background-color:#fff;padding:12px 22px;border-bottom:1px solid #d1d5db}#empresas-form .header .title{font-size:34px;line-height:34px;font-weight:900;margin:0}#empresas-form .header .save-button{min-height:35px;background-color:#22c55e!important;color:#fff!important;transition:.5s all!important}#empresas-form .header .save-button:hover{background-color:#4ade80!important}#empresas-form .header .save-button.mat-button-disabled{background-color:#e5e7eb!important}#empresas-form .company-logo-thumb{border:1px solid #ccc;cursor:pointer;overflow:hidden;width:56px;min-width:56px;max-width:56px;height:56px;min-height:56px;max-height:56px;border-radius:4px;position:relative}#empresas-form .company-logo-thumb .image{height:100%;width:auto;max-width:none;display:block;transition:.5s ease;backface-visibility:hidden}#empresas-form .company-logo-thumb .middle{width:100%;height:100%;transition:.5s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center}#empresas-form .company-logo-thumb .middle .mat-icon{color:#fff}#empresas-form .company-logo-thumb:hover .middle{background-color:#0009!important;opacity:1!important}#empresas-form .company-logo-thumb .photo-spinner-loading.mat-progress-spinner circle,#empresas-form .company-logo-thumb .photo-spinner-loading.mat-spinner circle{stroke:#00a5eb!important}#empresas-form .sem-numero-sufix .mat-form-field-suffix{top:-2.5px!important}#empresas-form .mat-grid-fix .mat-form-field-wrapper{padding:0!important}#empresas-form .mat-dialog-container{margin:0!important}#empresas-form .exibir-espelho-slide-toggle{margin:1rem 0!important}#empresas-form .alerta-endereco{padding:1rem;background-color:#f97316;color:#fff;font-size:1.8rem;display:flex;align-items:center;justify-content:center;flex-direction:column}#empresas-form .percentuais-banco-horas .mat-form-field-wrapper{padding-bottom:0}#empresas-form .form-divider{min-width:100%!important}#empresas-form .ip-list .mat-standard-chip,#empresas-form .ip-list .mat-chip-remove,#empresas-form .ip-list .mat-chip-trailing-icon{border-radius:6px;border:1px solid #bae6fd;background-color:#f0f9ff;padding:12px 24px;font-size:16px;font-weight:500;transition:all .15s cubic-bezier(.4,0,.2,1);min-height:0!important}#empresas-form .ip-list .mat-standard-chip,#empresas-form .ip-list .mat-chip-trailing-icon{color:#0369a1}#empresas-form .ip-list .mat-chip-remove{color:red}#empresas-form .ip-list :hover .mat-standard-chip,#empresas-form .ip-list :hover .mat-chip-remove,#empresas-form .ip-list :hover .mat-chip-trailing-icon{border-color:#7dd3fc!important;background-color:#e0f2fe!important}#empresas-form .ip-list .mat-standard-chip .mat-chip-remove .mat-icon{justify-content:center;display:flex}#empresas-form .ip-list .mat-chip-list-wrapper{display:flex;flex-wrap:wrap;column-gap:8px;row-gap:4px}#empresas-form .ip-list .mat-chip-list-wrapper .mat-standard-chip{margin:0!important}.empresas-toggle-more-actions-menu .mat-icon{transition:.5s all!important;color:#1f2937!important}.empresas-toggle-more-actions-menu:hover .mat-icon{color:#4b5563!important}.empresas-more-actions-menu button{transition:.5s all!important}.empresas-more-actions-menu button:hover{background-color:#e1f4fd!important}.empresas-more-actions-menu .mat-menu-exclude-button{min-height:35px;font-weight:500}.empresas-more-actions-menu .mat-menu-exclude-button .icon{transition:.5s all!important;color:#ef4444!important}.empresas-more-actions-menu .mat-menu-exclude-button:hover .icon{color:#f87171!important}.empresas-more-actions-menu .mat-menu-exclude-button.mat-menu-item[disabled]{pointer-events:all;cursor:not-allowed!important}.empresas-more-actions-menu .mat-menu-exclude-button.mat-menu-item[disabled] .icon{color:#e5e7eb!important}.restricoes-container{display:flex;align-items:center;gap:8px}.restricoes-container .button-restricao-dialog{cursor:pointer}
1.content-restricao-ip-help{text-align:left;color:#374151;font-size:15px}.content-restricao-ip-help .primeiro-paragrafo-restricao-ip-help{margin-bottom:20px;font-size:15px;font-weight:600;color:#1f2937}.content-restricao-ip-help .lista-formas-ip{font-size:14px}.content-restricao-ip-help .flag-restricao-ip-help{border-radius:4px;border-left:4px solid #f59e0b;background-color:#fef3c7;padding:12px 16px;font-size:15px}.descobrir-ip-button{border-radius:6px;border:1px solid #bae6fd;background-color:#f0f9ff;padding:12px 24px;font-size:16px;font-weight:500;color:#0369a1;transition:all .15s cubic-bezier(.4,0,.2,1);cursor:pointer}.descobrir-ip-button .descobrir-ip-button:hover{border-color:#7dd3fc;background-color:#e0f2fe}\n"],encapsulation:2,data:{animation:[ve.L]}}),t})();class dt{sortAndFilter(s,a,o){return this.sortData(a,this.filterData(o,s))}sortData(s,a){return s&&s.length>0?[...a].sort((r,n)=>{for(const c of s){let m=r[c.colId],d=n[c.colId];if(c.colId.includes("data")&&(m=new Date(m).getTime(),d=new Date(d).getTime()),m!==d)return(m>d?1:-1)*("asc"===c.sort?1:-1)}return 0}):a}filterData(s,a){return s&&0!==Object.keys(s).length?a.filter(o=>Object.keys(s).every(r=>{const n=s[r]?.filter;return!n||o[r]?.toString().toLowerCase().includes(n.toLowerCase())})):a}}const ea={avancado:{filtro_rapido:null}};var gt=i(50479),ft=i(81159);const ht=["filter"],_t=["confirmarExclusaoSwal"];function xt(t,s){if(1&t){const a=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){return e.CHM(a),e.oxw().limparTodosOsFiltros()}),e.TgZ(1,"mat-icon"),e._uU(2,"clear"),e.qZA()()}2&t&&e.Q6J("disableRipple",!1)}const vt=function(){return{delay:"100ms",x:"-25px"}},Ct=function(t){return{value:"*",params:t}},At=function(t){return{"filtro-ativo":t}},Et=[{path:"",canActivate:[pa.a],canDeactivate:[Fe],component:(()=>{class t{constructor(a,o,r,n,c,m,d,g,v,E,u,R,h){this.matDialog=a,this.ngxLogger=o,this.adapter=r,this.agGridService=n,this.toastrService=c,this.elementRef=m,this.router=d,this.empresasService=g,this.translateService=v,this.firestoreService=E,this.angularFirestore=u,this.globalService=R,this.route=h,this.modules=ua.F$j,this.selectedRowsState$=new M.X([]),this.listNodeId=[],this.pageSize=20,this.carregandoEmpresas=!1,this.estadoAnteriorPaginacaoAplicado=!1,this.rowsThisPage$=new M.X([]),this.gridEmpresasHelper=new dt,this.idEmpresasAdicionadasEmMemoria=new Set,this.subscriptionManager=new Ve.LF,this.toastrIndividualConfig={timeOut:5e3,progressBar:!0},this.filterChange$=new Ce.x,this.filterValue$=new M.X(ea),this.adapter.setLocale("pt"),this.iniciarAgGrid(),this.subscriptionManager.add({ref:"selectedRowsState",sub:this.selectedRowsState$.subscribe(J=>{this.ngxLogger.debug("\nthis.selectedRowsState$ emitiu valor.\nDados:",J)})})}ngOnInit(){this.ngxLogger.info("\nInicializando o EmpresasListComponent."),this.iniciarRotaAtiva().then(a=>{this.ngxLogger.info("\nempresas-list.component => Sucesso na promise da fun\xe7\xe3o iniciarRotaAtiva.\n",a)}).catch(a=>this.ngxLogger.error("\nempresas-list.component => Erro na promise da fun\xe7\xe3o iniciarRotaAtiva.\n",a)),this.observarFiltro(),this.observarServiceBacklogTasks(),this.gridOptions.columnDefs.push({colId:"enderecoIncorreto",hide:!0,comparator:(a,o,r,n,c)=>{const m=this.listNodeId.includes(r.id),d=this.listNodeId.includes(n.id);return m&&d?0:d&&!m?1:-1}})}ngOnDestroy(){this.ngxLogger.info("empresas-list.component.ts - Destruindo o component."),this.subscriptionManager.destroy()}observarFiltro(){this.subscriptionManager.add({ref:"filter",sub:this.filterChange$.pipe((0,Y.U)(a=>a.toLowerCase().trim()),(0,te.b)(500),(0,K.x)()).subscribe(a=>{if(this.gridApi){if(""===a)return void this.filterValue$.next(ea);this.filterValue$.next({avancado:{filtro_rapido:a}})}})})}observarServiceBacklogTasks(){const a=this.empresasService.backlogTask.changes$.pipe((0,te.b)(300)).subscribe(()=>{const[o,r]=this.empresasService.backlogTask.filter(([n,c])=>c.status!==k.k.PENDING)??[];if(o)switch(r.data.toastRef?.manualClose(),r.status){case k.k.COMPLETE:switch(this.empresasService.backlogTask.remove(o),this.toastrService.success(`Sucesso ao ${r.data.acao.toLowerCase()} a empresa: ${r.data.empresa.fantasia}
1`,"Tudo certo!",this.toastrIndividualConfig),r.data.acao){case w.ADICIONAR:const n=this.empresasService.empresasPaginadasCache$.getValue();if(this.idEmpresasAdicionadasEmMemoria.add(r.data.empresa._id),this.empresasService.empresasPaginadasCache$.next(n.set(r.data.empresa._id,{...r.data.empresa})),this.empresasService.agGridPaginationCacheDetailsValue.finished){const g=this.gridApi.getInfiniteRowCount();this.gridApi.setInfiniteRowCount(g+1)}this.gridApi.refreshInfiniteCache();break;case w.EDITAR:const m=this.gridApi.getRowNode(r.data.empresa._id);if(m){m.updateData({...r.data.empresa});const g=this.empresasService.empresasPaginadasCache$.getValue();this.empresasService.empresasPaginadasCache$.next(g.set(r.data.empresa._id,{...r.data.empresa}))}break;case w.EXCLUIR:const d=this.gridApi.getRowNode(r.data.empresa._id);if(d){const g={...r.data.empresa,fantasia:"Exclu\xeddo - "+r.data.empresa.fantasia,excluido:!0};d.updateData(g);const v=this.empresasService.empresasPaginadasCache$.getValue();this.empresasService.empresasPaginadasCache$.next(v.set(r.data.empresa._id,g))}break;default:console.error("observarServiceBacklogTasks a\xe7\xe3o inv\xe1lida.")}break;case k.k.ERROR:this.empresasService.backlogTask.remove(o),this.toastrService.error(`N\xe3o conseguimos ${r.data.acao.toLowerCase()} a empresa ${r.data.empresa.fantasia} `,"Oops!",{timeOut:0,extendedTimeOut:0,closeButton:!0}).onTap.subscribe(()=>{this.router.navigate(["/empresas"],{queryParams:{modal:"detalhes",itemId:r.data.empresa._id||"new",descricao:V.yc.handleize(r.data.empresa.fantasia)}}).finally(()=>{this.iniciarRotaAtiva(r.data.empresa)})});break;default:console.error("observarServiceBacklogTasks status inv\xe1lido.")}});this.subscriptionManager.add({sub:a,ref:"observarServiceBacklogTasks"})}iniciarRotaAtiva(a){var o=this;return(0,O.Z)(function*(){const r=o.route.snapshot.queryParams;if("new"===r.itemId)o.empresasFormDialogRef=o.matDialog.open(fe,{data:{empresa:new se({excluido:!1}),empresaErro:a,action:"new"},panelClass:"empresas-form-dialog"}),o.empresasFormDialogRef.afterClosed().pipe((0,U.q)(1)).subscribe(()=>{o.router.navigate(["/empresas"])});else if(r.itemId){const n=yield o.empresasService.get(r.itemId);if(o.gridApi){const c=o.gridApi.getRowNode(n._id);c&&c.setSelected(!0)}n?(o.empresasFormDialogRef=o.matDialog.open(fe,{data:{empresa:n,empresaErro:a,action:"edit",enderecoIncorreto:o.listNodeId.includes(n._id)},panelClass:"empresas-form-dialog"}),o.empresasFormDialogRef.afterClosed().pipe((0,U.q)(1)).subscribe(()=>{o.router.navigate(["/empresas"])})):o.router.navigate(["/empresas"])}else o.empresasService.exibirTutorial(o.abrirAjuda.bind(o));return!0})()}iniciarAgGrid(){this.ngxLogger.info("empresas-list.component => Fun\xe7\xe3o iniciarAgGrid executada."),this.gridOptions={...this.agGridService.agGridGlobalOptions,suppressMovableColumns:!0,columnDefs:this.setColumnDefs(),animateRows:!0,headerHeight:48,rowMultiSelectWithClick:!0,suppressCellFocus:!0,suppressRowClickSelection:!0,components:{...this.agGridService.agGridGlobalOptions.components,skeletonAgOverlayComponent:Oe.T,agHeader:Pe.p},pagination:!0,rowModelType:"infinite",paginationAutoPageSize:!1,cacheOverflowSize:this.pageSize,maxConcurrentDatasourceRequests:1,infiniteInitialRowCount:this.pageSize,maxBlocksInCache:this.pageSize,paginationPageSize:this.pageSize,cacheBlockSize:this.pageSize,rowClassRules:{"row-excluded-item":a=>!0===a.node?.data?.excluido,"row-new-item":a=>this.idEmpresasAdicionadasEmMemoria.has(a.data?._id)}
1,onGridReady:a=>this.onGridReady(a),onFirstDataRendered:a=>{this.ngxLogger.debug("\nempresas-list.component => CallBack onFirstDataRendered emitiu valor.\nDados:",{e:a})},onRowClicked:a=>{this.ngxLogger.debug("\nempresas-list.component => CallBack onRowClicked emitiu valor.\nDados:",{e:a}),!0!==a.node.data.excluido?this.editarEmpresa(a.node.id):this.toastrService.info("Esta empresa foi exclu\xedda, n\xe3o \xe9 poss\xedvel interagir com ela, na pr\xf3xima atualiza\xe7\xe3o ela ser\xe1 removida da lista, caso seja necess\xe1rio voc\xea dever\xe1 cadastrar uma nova empresa.","Oops!",this.toastrIndividualConfig)},getRowId:a=>a.data._id,onRowDataChanged:a=>{this.ngxLogger.debug("\nempresas-list.component => CallBack gridOptions.onRowDataChanged emitiu valor.\nDados:",{e:a})},onSelectionChanged:a=>{this.ngxLogger.debug("\nempresas-list.component => CallBack gridOptions.onSelectionChanged emitiu valor.\nDados:",{e:a}),this.selectedRowsState$.next(this.gridApi.getSelectedRows()??[])},onPaginationChanged:a=>{this.ngxLogger.debug("\nempresas-list.component => CallBack onPaginationChanged emitiu valor.\nDados:",{paginationCurrentPage:a.api.paginationGetCurrentPage()});const o=a.api.paginationGetCurrentPage();this.empresasService.estadoDaListagemValue.currentPage!==o&&(this.estadoAnteriorPaginacaoAplicado&&this.agBodyViewportPerfectScrollbar.element.scroll({top:0}),this.estadoAnteriorPaginacaoAplicado=!0,this.empresasService.atualizarEstadoDaListagem={currentPage:o})},getRowStyle:a=>{const o=a.node?.data;let r=!1;if(Object.keys(o?.endereco||{}).sort().forEach(n=>{"complemento"!==n&&"fuso_horario"!==n&&((0,de.isNil)(o?.endereco[n])||""===o?.endereco[n])&&(r=!0)}),r&&!this.listNodeId.includes(a.node.id))this.listNodeId.push(a.node.id);else if(!r&&this.listNodeId.includes(a.node.id)){const n=this.listNodeId.indexOf(a.node.id);this.listNodeId.splice(n,1)}return this.listNodeId.includes(a.node.id)?{color:"red"}:{}}}}editarEmpresa(a){var o=this;const r=this.gridApi.getRowNode(a);if(r){r.setSelected(!0);const{id:n,data:c}=r??{};this.empresasService.atualizarEstadoDaListagem={currentItemId:n,currentScrollY:this.agBodyViewportPerfectScrollbar.element.scrollTop},this.router.navigate(["/empresas"],{queryParams:{modal:"detalhes",itemId:n,descricao:V.yc.handleize(c.fantasia)}}),this.empresasFormDialogRef=this.matDialog.open(fe,{data:{empresa:c,action:"edit",enderecoIncorreto:this.listNodeId.includes(n)},panelClass:"empresas-form-dialog"}),this.empresasFormDialogRef.afterClosed().pipe((0,U.q)(1)).subscribe(function(){var m=(0,O.Z)(function*(d){if(!d)return;const v=d.form;switch(d.actionType){case"save":const E=v.getRawValue(),u="remover"===E.regimeCompensacao?null:E.regimeCompensacao,R="remover"===E.limite_minutos_interjornada?null:E.limite_minutos_interjornada,h=o.converteValorExibidoInformativoBancoHorasFlitAppToBD(E);E.regimeCompensacao=u,E.limite_minutos_interjornada=R,E.parametros.exibir_informativo_banco_horas_flit_app=h,yield o.empresasService.atualizarEmpresa(c,E,d.logoBase64);break;case"delete":o.abrirConfirmarExclusaoSwal(c)}o.router.navigate(["/empresas"])});return function(d){return m.apply(this,arguments)}}())}}setColumnDefs(){return[{field:"fantasia",headerName:"Fantasia",flex:1,resizable:!1,sortable:!1,filter:!1,unSortIcon:!1,cellClass:"pl-32",headerClass:"pl-32",headerComponent:"agHeader"},{field:"cnpj",headerName:"CNPJ / CPF",flex:1,resizable:!1,sortable:!1,filter:!1,unSortIcon:!1,cellClass:"pl-32",headerClass:"pl-32",headerComponent:"agHeader"}]}onGridReady(a){var o=this;return(0,O.Z)(function*(){o.ngxLogger.debug("empresas-list.component => CallBack onGridReady emitiu valor.",{params:a}),o.gridApi=a.api,o.gridColumnApi=a.columnApi;const r=o.elementRef.nativeElement.querySelector(".ag-body-viewport");r&&(o.agBodyViewportPerfectScrollbar=new fa.Z(r,{useBothWheelAxes:!0,wheelSpeed:.8}),o.agBodyViewportPerfectScrollbar.update());const n=o.filterValue$.pipe((0,we.h)(({avancado:c})=>!(0,de.isEqual)(o.empresasService.agGridPaginationCacheDetailsValue.lastFilterValue,{avancado:c})),(0,Ae.b)(({avancado:c})=>{o.idEmpresasAdicionadasEmMemoria.clear(),o.empresasService.empresasPaginadasCache$.next(new Map),o.empresasService.atualizarAgGridPaginationCacheDetails={...oe.$,lastFilterValue:{avancado:c}},o.gridApi.showLoadingOverlay()}),(0,Ue.w)(({avancado:c})=>o.buscarDadosPaginadosEAtualizarReferencias$({avancado:c,limit:o.pageSize+1}).pipe((0,Y.U)(()=>c)))).subscribe(c=>{const m={getRows:(d=(0,O.Z)(function*(g){o.gridApi.showLoadingOverlay(),g.endRow>o.pageSize&&o.empresasService.agGridPaginationCacheDetailsValue.endRow<g.endRow&&!o.empresasService.agGridPaginationCacheDetailsValue.finished&&(o.empresasService.atualizarAgGridPaginationCacheDetails={endRow:g.endRow},yield o.buscarDadosPaginadosEAtualizarReferencias({avancado:c,startAfter:o.empresasService.agGridPaginationCacheDetailsValue.lastDocCursor,limit:o.pageSize}));const v=o.gridEmpresasHelper.sortAndFilter(Array.from(o.empresasService.empresasPaginadasCache$.getValue().values()),g.sortModel,g.filterModel),E=v.slice(g.startRow,g.endRow);o.rowsThisPage$.next(E);let u=-1;v.length<=g.endRow&&(u=v.length),g.successCallback(E,u),o.gridApi.deselectAll(),o.agBodyViewportPerfectScrollbar.update(
1),o.gridApi.hideOverlay()}),function(v){return d.apply(this,arguments)})};var d;a.api.setDatasource(m)});o.subscriptionManager.add({ref:"filter_value",sub:n})})()}buscarDadosPaginadosEAtualizarReferencias$({avancado:a,limit:o,endBefore:r,startAfter:n},c=!1){return(0,ha.P)(()=>(this.carregandoEmpresas=!0,this.empresasService.listarEmpresasPaginadosElasticSearch({avancado:a,limit:o,endBefore:r,startAfter:n}).pipe((0,U.q)(1)))).pipe((0,Ae.b)(([m,d])=>{if(!(0,de.isEqual)(this.empresasService.agGridPaginationCacheDetailsValue.lastFilterValue,{avancado:a}))return void this.ngxLogger.debug("\nempresas-list.component => Resposta descartada em buscarDadosPaginadosEAtualizarReferencias$: o filtro mudou durante a requisi\xe7\xe3o.\nDados:",{avancado:a,lastFilterValue:this.empresasService.agGridPaginationCacheDetailsValue.lastFilterValue});c?(d.firstDocCursor&&(this.empresasService.atualizarAgGridPaginationCacheDetails={firstDocCursor:d.firstDocCursor}),d.lastDocCursor&&(this.empresasService.atualizarAgGridPaginationCacheDetails={lastDocCursor:d.lastDocCursor})):this.empresasService.atualizarAgGridPaginationCacheDetails={firstDocCursor:d.firstDocCursor,lastDocCursor:d.lastDocCursor},this.empresasService.atualizarAgGridPaginationCacheDetails={finished:d.finished,quantidadeConsultas:this.empresasService.agGridPaginationCacheDetailsValue.quantidadeConsultas+1};const v=this.empresasService.empresasPaginadasCache$.getValue();for(const E of m){const u=v.get(E._id);v.set(E._id,{...u,...E})}this.empresasService.empresasPaginadasCache$.next(v)}),(0,Y.U)(()=>{}),(0,ke.K)(m=>(this.ngxLogger.error("\nempresas-list.component => Erro na fun\xe7\xe3o buscarDadosPaginadosEAtualizarReferencias$.\n",m),(0,Be.of)(void 0))),(0,_a.x)(()=>{this.carregandoEmpresas=!1}))}buscarDadosPaginadosEAtualizarReferencias(a){var o=this;return(0,O.Z)(function*(r,n=!1){yield(0,Je.n)(o.buscarDadosPaginadosEAtualizarReferencias$(r,n))}).apply(this,arguments)}abrirConfirmarExclusaoSwal(a){var o=this;const r=this.translateService.instant("GERAL.TEMCERTEZA"),n=this.angularFirestore.doc(`${this.globalService.contaPath}/empresas/${a._id}`).ref;let c=a.fantasia,m=this.translateService.instant("GERAL.MENSAGEMEXCLUIREMPRESA1")+c+this.translateService.instant("GERAL.MENSAGEMEXCLUIREMPRESA2");const d=this.translateService.instant("GERAL.CANCELAR"),g=this.translateService.instant("GERAL.CONFIRMAR");this.confirmarExclusaoSwal.swalOptions={showCancelButton:!0,reverseButtons:!0,icon:"question",title:r,html:m,focusConfirm:!1,focusCancel:!0,
1cancelButtonText:d,confirmButtonText:g,confirmButtonColor:"#4caf50"},this.confirmarExclusaoSwal.fire(),this.subscriptionManager.close("confirmarExclusaoSwalConfirmSubscription"),this.subscriptionManager.add({ref:"confirmarExclusaoSwalConfirmSubscription",sub:this.confirmarExclusaoSwal.confirm.subscribe(function(){var v=(0,O.Z)(function*(E){if(E){o.loadingDialogRef=o.matDialog.open(ga.b,{disableClose:!1});const u=yield o.empresasService.retornarTravasParaExcluirEmpresa(n.path);if(u.length){const R=u.map(h=>h.includes("Dispositivos")?h.replace("Dispositivos","um ou mais Dispositivos"):h);o.loadingDialogRef.close(),o.matDialog.open(Ne.u,{width:"400px",data:{icon:"warn",title:"N\xe3o podemos excluir a empresa.",labelButton:"Entendi",paragraphs:[`A empresa <strong>${a.fantasia}</strong> est\xe1 vinculada a <strong>${R.join(", ")}<strong>.`,"N\xe3o podemos exclu\xed-la, pois perderia o v\xednculo."]}})}else yield o.empresasService.excluirEmpresa(n,a).then(()=>{o.observarServiceBacklogTasks(),o.loadingDialogRef.close()})}});return function(E){return v.apply(this,arguments)}}())}),this.subscriptionManager.add({ref:"confirmarExclusaoSwalEmpresaDocSubscription",sub:this.firestoreService.buscarDocPorRef$(n).pipe((0,Ae.b)(v=>{this.confirmarExclusaoSwal.swalVisible&&v.excluido&&(this.ngxLogger.info("\nA empresa foi exclu\xedda por outra inst\xe2ncia enquanto a modal de confirma\xe7\xe3o de exclus\xe3o estava aberta, fechando a modal."),this.confirmarExclusaoSwal.close())}),(0,ze.n)(v=>c===v.fantasia)).subscribe(v=>{v&&(c=v.fantasia,m=this.translateService.instant("GERAL.MENSAGEMEXCLUIREMPRESA1")+c+this.translateService.instant("GERAL.MENSAGEMEXCLUIREMPRESA2"),this.confirmarExclusaoSwal.html=m,this.confirmarExclusaoSwal.update())})})}criarEmpresa(){var a=this;this.empresasFormDialogRef=this.matDialog.open(fe,{data:{empresa:new se({excluido:!1}),action:"new"},panelClass:"empresas-form-dialog"}),this.empresasFormDialogRef.afterClosed().subscribe(function(){var o=(0,O.Z)(function*(r){if(!r)return;const n=r.form.getRawValue(),c="remover"===n.regimeCompensacao?null:n.regimeCompensacao,m="remover"===n.limite_minutos_interjornada?null:n.limite_minutos_interjornada,d=a.converteValorExibidoInformativoBancoHorasFlitAppToBD(n);n.regimeCompensacao=c,n.limite_minutos_interjornada=m,n.parametros.exibir_informativo_banco_horas_flit_app=d,yield a.empresasService.criarEmpresa(n,r.logoBase64)});return function(r){return o.apply(this,arguments)}}())}onFilterChange(a){this.filterChange$.next(a)}abrirAjuda(){this.matDialog.open(da.h,{panelClass:"help-dialog",data:{title:"Empresas",contentHtml:'<h3>\n Aqui voc\xea pode cadastrar <strong class="color-blue">empresas</strong> de acordo com as suas necessidades.\n </h3>'}})}limparTodosOsFiltros(){this.filter.nativeElement.value="",this.filterChange$.next("")}converteValorExibidoInformativoBancoHorasFlitAppToBD(a){return a.parametros.exibir_informativo_banco_horas_flit_app!==q.NaoExibir&&(a.parametros.exibir_informativo_banco_horas_flit_app===q.Exibir||null)}get existeFiltroAplicado(){const a=this.filterValue$.value;return!!(a&&a.avancado&&a.avancado.filtro_rapido)&&""!==a.avancado.filtro_rapido.trim()}}return t.\u0275fac=function(a){return new(a||t)(e.Y36(I.uw),e.Y36(me.Kf),e.Y36(x._A),e.Y36(gt.Z),e.Y36(pe._W),e.Y36(e.SBq),e.Y36(ue.F0),e.Y36(Fe),e.Y36(ee.sK),e.Y36(ft.C),e.Y36(Ke.ST),e.Y36(Te.U),e.Y36(ue.gz))},t.\u0275cmp=e.Xpm({type:t,selectors:[["app-empresas-list"]],viewQuery:function(a,o){if(1&a&&(e.Gf(ht,7),e.Gf(_t,7)),2&a){let r;e.iGM(r=e.CRH())&&(o.filter=r.first),e.iGM(r=e.CRH())&&(o.confirmarExclusaoSwal=r.first)}},decls:32,vars:25,consts:[["id","empresas-list",1,"page-layout","carded","fullwidth","inner-scroll"],["fxLayoutAlign","start center","fxLayoutGap","20px","fxLayout","row wrap",1,"header"],[1,"py-5"],[1,"title"],[1,"flex","items-center","space-x-2"],[1,"text-xl","text-gray-500"],[1,"help-icon","s-30",3,"click"],[1,"search-container"],["appearance","outline",1,"search-form-field"],["matPrefix","",1,"search-icon",3,"ngClass"],["type","search","matInput","",3,"placeholder","input"],["filter",""],["mat-icon-button","","matSuffix","","color","warn","aria-label","Remove all search","matTooltipClass","tooltip-font-13","matTooltip","Limpar o filtro de pesquisa.",3,"disableRipple","click",4,"ngIf"],["mat-flat-button","","aria-label","Add button",1,"add-button","py-5",3,"disabled","click"],["fxLayoutAlign","center center"],["name","hero-plus",1,"rotate",3,"size"],[1,"ml-4"],[1,"content"],[1,"ag-grid-angular","ag-theme-material","tabela",3,"gridOptions","modules","loadingOverlayComponent"],["agGrid",""],["confirmarExclusaoSwal",""],["mat-icon-button","","matSuffix","","color","warn","aria-label","Remove all search","matTooltipClass","tooltip-font-13","matTooltip","Limpar o filtro de pesquisa.",3,"disableRipple","click"]],template:function(a,o){if(1&a){const r=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",4)(7,"span",5),e._uU(8),e.ALo(9,"translate"),e.qZA()()(),e.TgZ(10,"div")(11,"mat-icon",6),e.NdJ("click",function(){return o.abrirAjuda()}),e._uU(12,"help"),e.qZA()(),e.TgZ(13,"div",7)(14,"mat-form-field",8)(15,"mat-icon",9),e._uU(16," search "),e.qZA(),e.TgZ(17,"input",10,11),e.NdJ("input",function(){e.CHM(r);const c=e.MAs(18);return o.onFilterChange(c.value)}),e.ALo(19,"translate"),e.qZA(),e.YNc(20,xt,3,1,"button",12),e.qZA()(),e.TgZ(21,"button",13),e.NdJ("click",function(){return o.criarEmpresa()}),e.TgZ(22,"div",14),e._UZ(23,"ng-icon",15),e.TgZ(24,"div",16),e._uU(25),e.ALo(26,"translate"),e.qZA()()()(),e.TgZ(27,"div",17),e._UZ(28,"ag-grid-angular",18,19),e.qZA()(),e._UZ(30,"swal",null,20)}2&a&&(e.xp6(1),e.Q6J("@animate",e.VKq(21,Ct,e.DdM(20,vt))),e.xp6(3),e.Oqu(e.l
1cZ(5,12,"COMPANYLIST.TITLE")),e.xp6(4),e.Oqu(e.lcZ(9,14,"COMPANYLIST.LIST")),e.xp6(7),e.Q6J("ngClass",e.VKq(23,At,o.existeFiltroAplicado)),e.xp6(2),e.s9C("placeholder",e.lcZ(19,16,"COMPANYLIST.SEARCH")),e.xp6(3),e.Q6J("ngIf",o.existeFiltroAplicado),e.xp6(1),e.Q6J("disabled",o.carregandoEmpresas),e.xp6(2),e.Q6J("size","22px"),e.xp6(2),e.Oqu(e.lcZ(26,18,"FORMS.ADDBUTTON")),e.xp6(3),e.Q6J("gridOptions",o.gridOptions)("modules",o.modules)("loadingOverlayComponent","skeletonAgOverlayComponent"))},directives:[G.Wh,G.SQ,G.xw,T.Hw,W.KE,W.qo,Z.mk,ne.oO,N.Nt,Z.O5,f.lW,W.R9,ae.gM,_e.o,p.N8,xe.q1],pipes:[ee.X$],styles:["#empresas-list{background-color:#fff}#empresas-list .header{background-color:#fff;padding:22px 32px;border-bottom:1px solid #d1d5db}#empresas-list .header .title{font-size:34px;line-height:34px;font-weight:900;margin:0}#empresas-list .header .mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{transform:translateY(-1.1em) scale(.75);width:133.33333%}#empresas-list .header .breadcrumb{margin-left:2px}#empresas-list .header .search-container{width:100%;max-width:300px}@media screen and (max-width: 1279px){#empresas-list .header .search-container{width:100%}}@media screen and (max-width: 599px){#empresas-list .header .search-container{width:100%}}#empresas-list .header .search-container .search-form-field{width:100%}#empresas-list .header .search-container .search-form-field .mat-form-field-wrapper{padding-bottom:0}#empresas-list .header .search-container .search-form-field .mat-form-field-flex{height:48px;min-height:48px;align-items:center}#empresas-list .header .search-container .search-form-field .mat-input-element{font-family:Inter var,Helvetica Neue,Arial,sans-serif;height:48px;line-height:48px}#empresas-list .header .search-container .search-form-field .search-icon{margin-right:10px;transition:all .6s ease}#empresas-list .header .search-container .search-form-field .search-icon.filtro-ativo{color:#039be5;transform:scale(1.1)}#empresas-list .header .search-container .search-form-field .mat-form-field-suffix .mat-icon-button{width:40px;height:40px;line-height:40px}#empresas-list .header .search-container .search-form-field .mat-form-field-outline{box-shadow:none;height:48px}#empresas-list .header .add-button{min-height:35px;background-color:#00a5eb!important;color:#fff;transition:.5s all!important}#empresas-list .header .add-button .rotate{transition:transform .5s ease-in-out}#empresas-list .header .add-button:hover{background-color:#4ebff0!important}#empresas-list .header .add-button:hover .rotate{transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg)}#empresas-list .header .add-button:disabled{background-color:#d1d5db!important}#empresas-list .content{flex:1 1 100%}#empresas-list .content .tabela{height:100%;flex:1 1 100%;-webkit-overflow-scrolling:touch}#empresas-list .content .tabela .ag-header-viewport,#empresas-list .content .tabela .ag-header-container{background-color:#e5e7eb}#empresas-list .content .tabela .ag-header-active{cursor:default;background-color:#e1f4fd!important}#empresas-list .content .tabela .ag-row{transition:.2s}#empresas-list .content .tabela .ag-row-hover{background-color:#e1f4fd!important}#empresas-list .content .tabela .ag-row-selected{background-color:#b2e3f9!important}#empresas-list .content .tabela .row-excluded-item{background-color:#fef2f2!important}#empresas-list .content .tabela .row-new-item{background-color:#f0fdf4}#empresas-list .content .tabela .ag-icon-first,#empresas-list .content .tabela .ag-icon-last{display:none!important}#empresas-list .content .tabela .ag-paging-panel{background-color:#e5e7eb;color:#111827!important;font-weight:500}\n"],encapsulation:2,data:{animation:ve.L}}),t})()}];let It=(()=>{class t{}return t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[ue.Bz.forChild(Et)],ue.Bz]}),t})(),Tt=(()=>{class t{}return t.\u0275fac=function(a){return new(a||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({providers:[{provide:x._A,useClass:Se.wt},{provide:x.sG,useValue:Se.MF}],imports:[[Z.ez,It,_.o9,l.u5,l.UX,ra.n,sa.w,la.n,ye.dD,pe.Rh,ee.aw,me.f9.forChild(),ma.Rq,ta.d,oa.l,p.sF.forRoot([Oe.T,aa.F,Pe.p]),_e.s,T.Ps,he.uH,b.rt,L.LD,f.ot,N.c,ae.AV,A.FA,F.p9,I.Is,D.Tx,D.Tx,B.Nh,ia.m,P.Cq,C.Hi,xe.ii,S.rP,ca.m,na.J,Me.
1yI.forRoot({validation:!0,dropSpecialCharacters:!1})]]}),t})()},21936:($,y,i)=>{i.d(y,{n:()=>D});var p=i(36895),b=i(82333),Z=i(24006),_=i(4859),l=i(65938),f=i(59549),F=i(97392),C=i(284),x=i(51572),A=i(52993),I=i(1201),T=i(21474),N=i(94650);let D=(()=>{class P{}return P.\u0275fac=function(S){return new(S||P)},P.\u0275mod=N.oAB({type:P}),P.\u0275inj=N.cJS({imports:[[p.ez,b.o9,f.lN,Z.u5,Z.UX,_.ot,l.Is,C.c,I.w,x.Cq,T.dt,A.s,F.Ps]]}),P})()},32447:($,y,i)=>{i.d(y,{F:()=>F});var p=i(28288),b=i(94650),Z=i(36895);const _=function(C,x){return{selected:C,"not-selected":x}},l=function(){return{delay:"100ms",x:"-25px"}},f=function(C){return{value:"*",params:C}};let F=(()=>{class C{agInit(A){this.params=A}refresh(A){return!0}}return C.\u0275fac=function(A){return new(A||C)},C.\u0275cmp=b.Xpm({type:C,selectors:[["ag-badge"]],decls:3,vars:9,consts:[[1,"ag-badge",3,"ngClass"]],template:function(A,I){1&A&&(b.TgZ(0,"div",0)(1,"div"),b._uU(2),b.qZA()()),2&A&&(b.Q6J("ngClass",b.WLB(3,_,I.params.data.selected,!I.params.data.selected))("@animate",b.VKq(7,f,b.DdM(6,l))),b.xp6(2),b.hij(" ",I.params.value," "))},directives:[Z.mk],styles:[".ag-badge[_ngcontent-%COMP%]{padding:4px 5px;background-color:#d1d5db;border-radius:8px;min-width:117px;line-height:20px;font-weight:500;text-align:center}.ag-badge.selected[_ngcontent-%COMP%]{background-color:#0097dc;color:#fff}.ag-badge.not-selected[_ngcontent-%COMP%]{background-color:#ff9b03;color:#fff}"],data:{animation:p.L}}),C})()},69847:($,y,i)=>{i.d(y,{h:()=>N});var p=i(94650),b=i(65938),Z=i(1576),_=i(36895),l=i(4859),f=i(97392);const F=["dynamicComponentContainer"];function C(D,P){if(1&D&&(p.TgZ(0,"h2"),p._uU(1),p.qZA()),2&D){const L=p.oxw();p.xp6(1),p.Oqu(L.data.title)}}function x(D,P){if(1&D&&p._UZ(0,"div",9),2&D){const L=p.oxw();p.Q6J("innerHTML",L.data.titleHtml,p.oJD)}}function A(D,P){if(1&D&&p._UZ(0,"mat-dialog-content",10),2&D){const L=p.oxw();p.Q6J("innerHTML",L.data.contentHtml,p.oJD)}}function I(D,P){}function T(D,P){1&D&&(p.TgZ(0,"mat-dialog-content",11),p.YNc(1,I,0,0,"ng-template",null,12,p.W1O),p.qZA())}let N=(()=>{class D{constructor(L,S){this.data=L,this.injector=S}ngOnInit(){}ngAfterViewInit(){this.data.component&&this.dynamicComponentContainer&&this.createDynamicComponent()}ngOnDestroy(){this.componentRef&&this.componentRef.destroy()}createDynamicComponent(){if(!this.data.component)return;let L=this.injector;this.data.injections&&Object.keys(this.data.injections).length>0&&(L=p.zs3.create({providers:Object.entries(this.data.injections).map(([S,B])=>({provide:S,useValue:B})),parent:this.injector})),this.componentRef=this.dynamicComponentContainer.createComponent(this.data.component,{injector:L}),this.data.componentData&&Object.keys(this.data.componentData).length>0&&(Object.entries(this.data.componentData).forEach(([S,B])=>{try{this.componentRef.instance[S]=B}catch(ae){console.warn(`Failed to set property '${S}' on component:`,ae)}}),this.componentRef.changeDetectorRef.detectChanges())}}return D.\u0275fac=function(L){return new(L||D)(p.Y36(b.WI),p.Y36(p.zs3))},D.\u0275cmp=p.Xpm({type:D,selectors:[["help-dialog"]],viewQuery:function(L,S){if(1&L&&p.Gf(F,5,p.s_b),2&L){let B;p.iGM(B=p.CRH())&&(S.dynamicComponentContainer=B.first)}},decls:13,vars:4,consts:[["fxLayout","row","fxLayoutAlign","center center",1,"title-container"],[4,"ngIf","ngIfElse"],["titleHtml",""],["class","mat-typography",3,"innerHTML",4,"ngIf"],["class","mat-typography",4,"ngIf"],["align","end"],["color","primary","mat-button","","cdkFocusInitial","","mat-dialog-close","",1,"action-button"],["fxLayout","row","fxLayoutAlign","start center"],["aria-hidden","false","aria-label","Ok"],[3,"innerHTML"],[1,"mat-typography",3,"innerHTML"],[1,"mat-typography"],["dynamicComponentContainer",""]],template:function(L,S){if(1&L&&(p.TgZ(0,"div",0),p.YNc(1,C,2,1,"h2",1),p.YNc(2,x,1,1,"ng-template",null,2,p.W1O),p.qZA(),p.YNc(4,A,1,1,"mat-dialog-content",3),p.YNc(5,T,3,0,"mat-dialog-content",4),p.TgZ(6,"mat-dialog-actions",5)(7,"button",6)(8,"div",7)(9,"mat-icon",8),p._uU(10,"done"),p.qZA(),p.TgZ(11,"div"),p._uU(12,"OK"),p.qZA()()()()),2&L){const B=p.MAs(3);p.xp6(1),p.Q6J("ngIf",S.data.title)("ngIfElse",B),p.xp6(3),p.Q6J("ngIf",S.data.contentHtml&&!S.data.component),p.xp6(1),p.Q6J("ngIf",S.data.component)}},directives:[Z.xw,Z.Wh,_.O5,b.xY,b.H8,l.lW,b.ZT,f.Hw],styles:[".help-dialog{max-width:800px!important}.help-dialog .color-blue{color:#1689db}.help-dialog .color-yellow{color:#ff9b03}.help-dialog .title-container{padding:0 60px!important;display:flex}.help-dialog .title-container h2{font-size:3rem;font-weight:700;color:#424242;text-align:center}.help-dialog .title-container .mat-icon{padding-left:8px;color:#1689db;transform:scale(2)}
1.help-dialog mat-dialog-content{max-width:100%!important;padding:0 50px!important;margin:0!important}.help-dialog mat-dialog-content h3{font-weight:600}.help-dialog mat-dialog-actions{padding:20px 10px 30px}.help-dialog mat-dialog-actions .action-button{color:#1689db!important;height:38px!important}.artigo-386-help-dialog .action-button{border:1px solid #1689db!important;border-radius:4px!important;padding:0 16px!important}\n"],encapsulation:2}),D})()},75675:($,y,i)=>{i.d(y,{MF:()=>_,qV:()=>f,wt:()=>l});var p=i(36895),b=i(3238),Z=i(94650);const _={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"customInput",monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let l=(()=>{class C extends b.LF{parse(A){if("en"===this.locale){if("string"==typeof A&&A.indexOf(".")>-1){const T=A.split(".");return T.length<2||isNaN(+T[0])||isNaN(+T[1])||isNaN(+T[2])?null:new Date(Number(T[2]),Number(T[1])-1,Number(T[0]))}const I="number"==typeof A?A:Date.parse(A);return isNaN(I)?null:new Date(I)}{if("string"==typeof A){const T=A.replace(/\D/g,"");if(6===T.length||8===T.length){const N=T.slice(0,2),D=T.slice(2,4),P=(8===T.length?"":"20")+T.slice(4,T.length);return!N||!D||!P||isNaN(+N)||isNaN(+D)||isNaN(+P)?null:new Date(Number(P),Number(D)-1,Number(N))}return null}const I="number"==typeof A?A:Date.parse(A);return isNaN(I)?null:new Date(I)}}format(A,I){return"customInput"===I?new p.uU(this.locale).transform(A,"shortDate"):new p.uU(this.locale).transform(A,"MMM yyyy")}}return C.\u0275fac=function(){let x;return function(I){return(x||(x=Z.n5z(C)))(I||C)}}(),C.\u0275prov=Z.Yz7({token:C,factory:C.\u0275fac}),C})();function f(C,x){return"ptbr"===C?(x.setLocale("pt"),!0):"en"===C?(x.setLocale("en"),!0):(console.log("Tradu\xe7\xe3o n\xe3o encontrada"),!1)}},55600:($,y,i)=>{i.d(y,{A:()=>Z});var p=i(94650),b=i(24006);let Z=(()=>{class _{constructor(f,F){this._el=f,this._ngModel=F}onInputChange(f){const F=this._el.nativeElement.value;this._ngModel.control.setValue(F.replace(/ +/g," ").replace(/\n\n\n+/g,"\n")),F!==this._el.nativeElement.value&&f.stopPropagation()}onBlur(){const f=this._el.nativeElement.value;f!==f.trim()&&this._ngModel.control.setValue(f.trim())}}return _.\u0275fac=function(f){return new(f||_)(p.Y36(p.SBq),p.Y36(b.a5))},_.\u0275dir=p.lG2({type:_,selectors:[["","trimExtraWhiteSpace",""]],hostBindings:function(f,F){1&f&&p.NdJ("input",function(x){return F.onInputChange(x)})("blur",function(){return F.onBlur()})}}),_})()},88913:($,y,i)=>{i.d(y,{Z:()=>Z,k:()=>b});var p=i(61135),b=(()=>{return(_=b||(b={})).PENDING="PENDING",_.COMPLETE="COMPLETE",_.ERROR="ERROR",_.PARTIAL="PARTIAL",b;var _})();class Z{constructor(){this.backlogTasks=new p.X(new Map)}add(l,f){this.backlogTasks.next(this.backlogTasks.getValue().set(l,f))}remove(l){const f=this.backlogTasks.getValue();f.delete(l),this.backlogTasks.next(f)}update(l,f){const C=this.backlogTasks.getValue().get(l)||{};this.backlogTasks.next(this.backlogTasks.getValue().set(l,{...C,...f}))}get(l){return this.backlogTasks.getValue().get(l)}filter(l){return Array.from(this.backlogTasks.getValue().entries()).find(l)}filterAll(l){return Array.from(this.backlogTasks.getValue().entries()).filter(l)}clearAll(){this.backlogTasks.next(new Map)}get changes$(){return this.backlogTasks.asObservable()}}},22790:($,y,i)=>{function p(b){return null==b||0===b.length}i.d(y,{P:()=>p})},12912:($,y,i)=>{i.d(y,{E:()=>p});let p=(()=>{class b{static removeAccents(_){return _.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}static removeDash(_){return _.replace(/-/g,"")}static normalizeFilename(_){return this.removeAccents(_).replace(/\s+/g,"-").replace(/\./g,"").toLowerCase()}static replaceVarsInString(_,l){return _.replace(this.jsInterpolationRegex,(f,F)=>{const C=F.split(".");let x=l;for(const A of C){if(typeof x[A]>"u")return f;x=x[A]}return this.removeDash(String(x))})}static capitalize(_){const l=_.toLowerCase().split(" ");for(let f=0;f<l.length;f++)l[f]=l[f].charAt(0).toUpperCase()+l[f].substring(1);return l.join(" ")}static capitalizeFirst(_){const l=_.toLowerCase();return l[0].charAt(0).toUpperCase()+l.substring(1)}static normalize(_){return"string"!=typeof _?"":_.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}static sortComparator(_,l){const f=b.normalize(_),F=b.normalize(l);return f>F?1:f<F?-1:0}static cleanString(_){return _?.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]/g,"")}static trimAndRemoveExtraWhiteSpaces(_){return _.replace(/ +/g," ").replace(/\n\n\n+/g,"\n").trim()}}return b.jsInterpolationRegex=/\$\{([^}]+)\}/g,b})()},13920:($,y,i)=>{i.d(y,{$:()=>l,F:()=>f});var p=i(3238),b=i(64602),Z=i(66745),_=i(94650);let l=(()=>{class F extends p.LF{parse(x){if("string"==typeof x&&x.indexOf("/")>-1){const I=x.split("/"),T=Number(I[2].replace(/\D/g,"")),D=(2===T.toString().length?T>(new Date).getFullYear()%100?`19${T}`:`20${T}`:T.toString()).padStart(4,"0"),P=Number(I[1].replace(/\D/g,"")).toString().padStart(2,"0"),L=Number(I[0].replace(/\D/g,"")).toString().padStart(2,"0"),S=(0,b.Z)(`${L}/${P}/${D} 12:00:00:000`,"dd/MM/yyyy HH:mm:ss:SSS",new Date);return(0,Z.Z)(S)?S:null}const A="number"==typeof x?x:Date.parse(x);return isNaN(A)?null:new Date(A)}format(x,A){if("input"===A){const I=x.getDate(),T=x.getMonth()+1,N=x.getFullYear();return this._to2digit(I)+"/"+this._to2digit(T)+"/"+N}if("inputMonth"===A){const I=x.getMonth()+1,T=x.getFullYear();return this._to2digit(I)+"/"+T}return x.toDateString()}_to2digit(x){return("00"+x).slice(-2)}}return F.\u0275fac=function(){let C;return function(A){return(C||(C=_.n5z(F)))(A||F)}}(),F.\u0275prov=_.Yz7({token:F,factory:F.\u0275fac}),F})();const f={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:"inputMonth",dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.