PageSourceSearch

https://delfinance.com.br/_nuxt/Ddf5klc9.js

js delfinance.com.br collected 2026-10-04 00:25:07 UTC 8,019 bytes, 3 lines download raw bytes

1import{d as U,o as q,q as L,c as i,e,u as s,t as l,x as k,h as m,A as M,B as w,C as D,j as B,F as O,m as Z,n as E,r as o,y as G,b as r}from"./Ca8YtliB.js";import{u as K}from"./C2iI2gyX.js";import{c as v}from"./DRvcSzMG.js";const J=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Q=v("file-text",J);const W=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],X=v("file-up",W);const Y=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ee=v("history",Y);const ae=[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],ne=v("mail-check",ae);const se=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],te=v("save",se);const oe=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ie=v("upload",oe),le={class:"admin-dashboard-page"}
1,re={class:"admin-page-heading"},de={key:0,class:"admin-version-badge"},ue={key:0,class:"admin-surface admin-loading-state","aria-live":"polite"},ce={key:1,class:"admin-settings-grid"},pe={class:"admin-surface admin-panel"},me={class:"admin-panel-heading"},ve={class:"admin-panel-icon"},fe={class:"admin-field"},he={class:"admin-field"},ge=["disabled"],ye={class:"admin-surface admin-panel"},_e={class:"admin-panel-heading"},be={class:"admin-panel-icon"},ke={class:"admin-field"},Me={class:"admin-field"},we={class:"admin-field"},De={class:"admin-file-picker"},Ce=["disabled"],Ve={class:"admin-surface admin-panel admin-history-panel"},ze={class:"admin-panel-heading"},xe={class:"admin-panel-icon"},Fe={class:"admin-history"},Ne={class:"admin-history-title"},Te={key:0,class:"admin-current-badge"},He={key:0,class:"admin-empty-state"},Be=["role"],$e=U({__name:"configuracoes",setup(Pe){const T=K(),d=o(null),C=o([]),f=o(""),h=o(""),u=o(""),c=o(""),g=o(null),V=o(null),z=o(!0),y=o(!1),_=o(!1),x=o(""),F=o("success"),N=(a,n={})=>$fetch(a,{...n,headers:{authorization:`Bearer ${T.token}`}}),b=async()=>{z.value=!0;try{const a=await N("/api/admin/configuracoes");d.value=a.configuration,C.value=a.regulationHistory,f.value=a.configuration.channels.ouvidoria.recipients.join(`
2`),h.value=a.configuration.channels.ilicitude.recipients.join(`
3`)}catch(a){a?.statusCode===401||a?.statusCode===403?await R():p(a?.data?.message||a?.data?.statusMessage||"Não foi possível carregar as configurações.","error")}finally{z.value=!1}},H=a=>a.split(/[\n,;]+/).map(n=>n.trim()).filter(Boolean),p=(a,n)=>{x.value=a,F.value=n},P=async()=>{if(d.value){y.value=!0;try{const a=await N("/api/admin/configuracoes/destinatarios",{method:"PUT",body:{version:d.value.version,ouvidoria:H(f.value),ilicitude:H(h.value)}});d.value=a.configuration,p("Destinatários atualizados.","success")}catch(a){p(a?.data?.message||a?.data?.statusMessage||"Não foi possível salvar os destinatários.","error"),a?.statusCode===409&&await b()}finally{y.value=!1}}},S=a=>{g.value=a.target.files?.[0]||null},A=async()=>{if(!d.value||!g.value||!u.value||!c.value){p("Informe versão, vigência e selecione o PDF.","error");return}_.value=!0;const a=new FormData;a.set("configurationVersion",String(d.value.version)),a.set("version",u.value),a.set("effectiveDate",c.value),a.set("regulation",g.value);try{await N("/api/admin/regulamento-ilicitude",{method:"POST",body:a}),u.value="",c.value="",g.value=null,V.value&&(V.value.value=""),p("Regulamento publicado e definido como vigente.","success"),await b()}catch(n){p(n?.data?.message||n?.data?.statusMessage||"Não foi possível publicar o regulamento.","error"),n?.statusCode===409&&await b()}finally{_.value=!1}},R=async()=>{await T.signOutAdmin(),await G("/admin/login")},$=a=>a?new Intl.DateTimeFormat("pt-BR",{timeZone:"UTC"}).format(new Date(`${a}T00:00:00Z`)):"não informada",j=a=>a?new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(new Date(a)):"não informado",I=a=>`${(a/1024).toFixed(1)} KiB`;return q(b),L({title:"Configurações regulatórias - Delfinance",meta:[{name:"robots",content:"noindex,nofollow"}]}),(a,n)=>(r(),i("div",le,[e("header",re,[n[4]||(n[4]=e("div",null,[e("h1",null,"Configurações regulatórias"),e("p",null,"Gerencie os destinatários dos canais e o regulamento público de indícios de ilicitude.")],-1)),s(d)?(r(),i("span",de,"Configuração v"+l(s(d).version),1)):k("",!0)]),s(z)?(r(),i("section",ue,[...n[5]||(n[5]=[e("span",{class:"admin-spinner","aria-hidden":"true"},null,-1),e("p",null,"Carregando configurações…",-1)])])):(r(),i("div",ce,[e("section",pe,[e("header",me,[e("span",ve,[m(s(ne),{size:18})]),n[6]||(n[6]=e("div",null,[e("h2",null,"Destinatários"),e("p",null,"Informe um endereço por linha. Cada canal exige ao menos um e-mail válido.")],-1))]),e("label",fe,[n[7]||(n[7]=e("span",null,"Ouvidoria",-1)),M(e("textarea",{"onUpdate:modelValue":n[0]||(n[0]=t=>D(f)?f.value=t:null),rows:"6",placeholder:"[email protected]"},null,512),[[w,s(f)]])]),e("label",he,[n[8]||(n[8]=e("span",null,"Indícios de ilicitude",-1)),M(e("textarea",{"onUpdate:modelValue":n[1]||(n[1]=t=>D(h)?h.value=t:null),rows:"6",placeholder:"[email protected]"},null,512),[[w,s(h)]])]),e("button",{class:"admin-button admin-button-primary",type:"button",disabled:s(y),onClick:P},[m(s(te),{size:16}),B(" "+l(s(y)?"Salvando…":"Salvar destinatários"),1)],8,ge)]),e("section",ye,[e("header",_e,[e("span",be,[m(s(X),{size:18})]),n[9]||(n[9]=e("div",null,[e("h2",null,"Publicar regulamento"),e("p",null,"O PDF será imutável e passará a ser a versão pública vigente.")],-1))]),e("label",ke,[n[10]||(n[10]=e("span",null,"Versão",-1)),M(e("input",{"onUpdate:modelValue":n[2]||(n[2]=t=>D(u)?u.value=t:null),maxlength:"80",placeholder:"Versão 1.0"},null,512),[[w,s(u)]])]),e("label",Me,[n[11]||(n[11]=e("span",null,"Data de vigência",-1)),M(e("input",{"onUpdate:modelValue":n[3]||(n[3]=t=>D(c)?c.value=t:null),type:"date"},null,512),[[w,s(c)]])]),e("label",we,[n[12]||(n[12]=e("span",null,"Arquivo PDF",-1)),e("span",De,[m(s(Q),{size:16}),e("span",null,l(s(g)?.name||"Selecionar arquivo PDF"),1),e("input",{ref_key:"regulationInput",ref:V,type:"file",accept:".pdf,application/pdf",onChange:S},null,544)])]),e("button",{class:"admin-button admin-button-primary",type:"button",disabled:s(_),onClick:A},[m(s(ie),{size:16}),B(" "+l(s(_)?"Publicando…":"Publicar e tornar vigente"),1)],8,Ce)]),e("section",Ve,[e("header",ze,[e("span",xe,[m(s(ee),{size:18})]),n[13]||(n[13]=e("div",null,[e("h2",null,"Histórico de regulamentos"),e("p",null,"As versões anteriores permanecem armazenadas no bucket privado.")],-1))]),e("ul",Fe,[(r(!0),i(O,null,Z(s(C),t=>(r(),i("li",{key:t.key}
3,[e("div",Ne,[e("strong",null,l(t.version),1),t.current?(r(),i("span",Te,"Vigente")):k("",!0)]),e("span",null,"Vigência: "+l($(t.effectiveDate))+" · "+l(I(t.size)),1),e("small",null,"Publicado em "+l(j(t.uploadedAt)),1)]))),128)),s(C).length?k("",!0):(r(),i("li",He,"Nenhum regulamento publicado."))])])])),s(x)?(r(),i("p",{key:2,class:E(["admin-notice",s(F)==="error"?"admin-notice-error":"admin-notice-success"]),role:s(F)==="error"?"alert":"status"},l(s(x)),11,Be)):k("",!0)]))}});export{$e as default};

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.