PageSourceSearch

https://pocodastrincheiras.al.gov.br/build/assets/Index-DsuZkUQW.js

js pocodastrincheiras.al.gov.br collected 2026-10-07 23:10:48 UTC 10,506 bytes, 1 lines download raw bytes

1import{c as te,u as se,r as V,j as t,b as w,H as le}from"./app-CTaY8UJf.js";import{B as re}from"./badge-CwzmSl53.js";import{B as k}from"./button-DXCKLHtj.js";import{I as ae}from"./input-7aHhCeCr.js";import{L as X}from"./label-CxCrcTSv.js";import{T as U,a as N,b as oe,c as y,d as ie,e as ce}from"./table-Cb1Hol7G.js";import{A as ne}from"./AppLayoutWithNotifications-mus8tTbI.js";import de from"./file-text-jraIksbC.js";import me from"./external-link-CKJ9qIH2.js";import xe from"./pencil-TRb729mG.js";import pe from"./trash-2-QtamTJOn.js";import he from"./shield-DC5M7bu2.js";import fe from"./plus-BsfGhhT4.js";import Y from"./search-BOJp92ky.js";import ue from"./rotate-ccw-BVoCB8Ls.js";import"./app-CNmQMdEi.js";import"./index-fQ3brVpV.js";import"./x-DmP7A1Bz.js";import"./createLucideIcon-CmjF8lT1.js";import"./circle-alert-CTn79Wf8.js";import"./circle-x-VMcb1sXz.js";import"./circle-check-big-0QGs7tCc.js";import"./app-layout-DHg6PkRO.js";import"./index-sraz7nLe.js";import"./index-CsfSsVkk.js";import"./index-Svmmcv6D.js";import"./index-CJBlix5Q.js";import"./index-DHUBBKJC.js";import"./index-BE_AIKwc.js";import"./video-CWkR2iFG.js";import"./chevron-right-Dcl2lTY9.js";import"./dropdown-menu-D6OZoFra.js";import"./index-DXg2b8Vm.js";import"./index-msf3AG1t.js";import"./avatar-BRFzpAWX.js";import"./index-BGC6_Qsa.js";import"./index-C_SHgnPd.js";import"./layers-Cb0hKdx0.js";import"./shield-check-CXJJ4XEh.js";import"./file-check-tR1YCl9R.js";import"./message-square-BtERmk2L.js";import"./users-BYuco8Ea.js";import"./trending-up-CsQX3MuM.js";import"./handshake-ppgb6oUe.js";import"./calendar-CEIt2YqY.js";import"./trending-down-B7TczfdV.js";import"./building-BaJqVYxM.js";import"./list-Dehc_B-t.js";import"./activity-D1Ey-wIS.js";import"./breadcrumbs-ByKSkPWt.js";const _="/admin/lai-document";function be(e){return e?e.startsWith("http")||e.startsWith("/")?e:`/storage/${e}`:""}function bt(){const e=te.c(54),{items:l,types:a,filters:S}=se().props;let T;e[0]!==l?(T=l===void 0?[]:l,e[0]=l,e[1]=T):T=e[1];const r=T;let A;e[2]!==a?(A=a===void 0?{}:a,e[2]=a,e[3]=A):A=e[3];const o=A;let L;e[4]!==S?(L=S===void 0?{}:S,e[4]=S,e[5]=L):L=e[5];const J=L,[i,M]=V.useState(J.search??""),[c,Q]=V.useState(J.type??"");let D;e[6]!==i||e[7]!==c?(D=()=>{w.get(_,{search:i||void 0,type:c||void 0},{preserveScroll:!0,preserveState:!0,replace:!0})},e[6]=i,e[7]=c,e[8]=D):D=e[8];const n=D;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{M(""),Q(""),w.get(_,{},{preserveScroll:!0,replace:!0})},e[9]=C):C=e[9];const Z=C,ee=ve;let I;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{title:"Documentos LAI - Admin"}),e[10]=I):I=e[10];let B;e[11]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsxs("div",{children:[t.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-bold text-slate-700 dark:bg-slate-800 dark:text-slate-300",children:[t.jsx(he,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:"Lei de Acesso à Informação (LAI)"})]}),t.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-slate-900 dark:text-white sm:text-3xl",children:"Documentos LAI"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400 sm:text-sm",children:"Gerencie os arquivos, relatórios estatísticos e regulamentações da Lei de Acesso à Informação."})]}),e[11]=B):B=e[11];let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[B,t.jsxs(k,{onClick:ge,className:"rounded-xl text-xs font-bold shadow-md transition hover:scale-105",children:[t.jsx(fe,{className:"mr-1.5 h-4 w-4"}),"Novo Documento"]})]}),e[12]=E):E=e[12];let $;e[13]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(X,{className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Buscar por Título ou Nome do Arquivo"}),e[13]=$):$=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Y,{className:"absolute top-1/2 left-3.5 h-4 w-4 -translate-y-1/2 text-slate-400"}),e[14]=R):R=e[14];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s=>M(s.target.value),e[15]=F):F=e[15];let d;e[16]!==n?(d=s=>s.key==="Enter"&&n(),e[16]=n,e[17]=d):d=e[17];let m;e[18]!==i||e[19]!==d?(m=t.jsxs("div",{className:"md:col-span-8",children:[$,t.jsxs("div",{className:"relative mt-1.5",children:[R,t.jsx(ae,{value:i,onChange:F,placeholder:"Digite palavras-chave...",onKeyDown:d,className:"h-11 rounded-xl border-slate-200 bg-slate-50 pl-10 text-xs shadow-xs focus:bg-white dark:border-slate-800 dark:bg-slate-800"})]})]}),e[18]=i,e[19]=d,e[20]=m):m=e[20];let H;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(X,{className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Tipo de Documento"}),e[21]=H):H=e[21];let q;e[22]===Symbol.for("react.memo_cache_sentinel")?(q=s=>Q(s.target.value),e[22]=q):q=e[22];let z;e[23]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("option",{value:"",children:"Todos os Tipos"}),e[23]=z):z=e[23];let x;e[24]!==o?(x=Object.entries(o).map(je),e[24]=o,e[25]=x):x=e[25];let p;e[26]!==x||e[27]!==c?(p=t.jsxs("div",{className:"md:col-span-4",children:[H,t.jsxs("select",{value:c,onChange:q,className:"mt-1.5 flex h-11 w-full rounded-xl border border-slate-200 bg-slate-50 px-3 text-xs font-semibold text-slate-800 shadow-xs focus:outline-none focus:ring-2 focus:ring-slate-900 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-200",children:[z,x]})]}),e[26]=x,e[27]=c,e[28]=p):p=e[28];let h;e[29]!==m||e[30]!==p?(h=t.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12",children:[m,p]}),e[29]=m,e[30]=p,e[31]=h):h=e[31];let P;e[32]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs(k,{variant:"outline",onClick:Z,className:"rounded-xl text-xs font-semibold",children:[t.jsx(ue,{className:"mr-1.5 h-3.5 w-3.5"}),"Limpar"]}),e[32]=P):P=e[32];let W;e[33]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Y,{className:"mr-1.5 h-3.5 w-3.5"}),e[33]=W):W=e[33];let f;e[34]!==n?(f=t.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2 border-t border-slate-100 pt-4 dark:border-slate-800",children:[P,t.jsxs(k,{onClick:n,className:"rounded-xl text-xs font-bold shadow-xs",children:[W,"Filtrar"]})]}),e[34]=n,e[35]=f):f=e[35];let u;e[36]!==h||e[37]!==f?(u=t.jsxs("div",{className:"rounded-3xl border border-slate-200/80 bg-white p-6 shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[h,f]}),e[36]=h,e[37]=f,e[38]=u):u=e[38];let G;e[39]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:"Documentos LAI Cadastrados"}),e[39]=G):G=e[39];let b;e[40]!==r.length?(b=t.jsx("div",{className:"flex items-center justify-between border-b border-slate-100 p-6 dark:border-slate-800",children:t.jsxs("div",{children:[G,t.jsxs("p",{className:"text-xs text-slate-500",children:["Total de ",r.length," documentos disponíveis"]})]})}),e[40]=r.length,e[41]=b):b=e[41];let K;e[42]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(oe,{className:"bg-slate-50 dark:bg-slate-800/50",children:t.jsxs(U,{className:"border-b border-slate-100 dar
1k:border-slate-800",children:[t.jsx(y,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Título do Documento"}),t.jsx(y,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Tipo"}),t.jsx(y,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Arquivo Anexo"}),t.jsx(y,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Atualizado em"}),t.jsx(y,{className:"text-right text-[11px] font-bold text-slate-500 uppercase",children:"Ações"})]})}),e[42]=K):K=e[42];let j;e[43]!==r||e[44]!==o?(j=r.length===0?t.jsx(U,{children:t.jsx(N,{colSpan:5,className:"py-12 text-center text-slate-400",children:"Nenhum documento LAI encontrado."})}):r.map(s=>t.jsxs(U,{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[t.jsx(N,{className:"font-extrabold text-slate-900 dark:text-white",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300",children:t.jsx(de,{className:"h-4 w-4"})}),t.jsx("span",{className:"truncate max-w-sm",children:s.title})]})}),t.jsx(N,{children:t.jsx(re,{variant:"secondary",className:"rounded-full px-2.5 py-0.5 text-[11px] font-bold",children:o[s.type]??s.type})}),t.jsx(N,{children:t.jsxs("a",{href:be(s.path),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 font-medium text-blue-600 hover:underline dark:text-blue-400 max-w-xs truncate",children:[t.jsx("span",{className:"truncate",children:s.original_name}),t.jsx(me,{className:"h-3 w-3 shrink-0"})]})}),t.jsx(N,{className:"text-slate-500 dark:text-slate-400",children:s.updated_at?new Date(s.updated_at).toLocaleDateString("pt-BR"):"—"}),t.jsx(N,{className:"text-right",children:t.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[t.jsx(k,{variant:"ghost",size:"sm",onClick:()=>w.get(`${_}/${s.id}/edit`),className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800",title:"Editar",children:t.jsx(xe,{className:"h-3.5 w-3.5"})}),t.jsx(k,{variant:"ghost",size:"sm",onClick:()=>ee(s.id,s.title),className:"h-8 w-8 rounded-lg p-0 text-rose-500 hover:bg-rose-50 hover:text-rose-600 dar
1k:hover:bg-rose-950/40",title:"Excluir",children:t.jsx(pe,{className:"h-3.5 w-3.5"})})]})})]},s.id)),e[43]=r,e[44]=o,e[45]=j):j=e[45];let g;e[46]!==j?(g=t.jsx("div",{className:"overflow-x-auto",children:t.jsxs(ie,{children:[K,t.jsx(ce,{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:j})]})}),e[46]=j,e[47]=g):g=e[47];let v;e[48]!==b||e[49]!==g?(v=t.jsxs("div",{className:"overflow-hidden rounded-3xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[b,g]}),e[48]=b,e[49]=g,e[50]=v):v=e[50];let O;return e[51]!==u||e[52]!==v?(O=t.jsxs(ne,{children:[I,t.jsxs("div",{className:"container mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8 space-y-6",children:[E,u,v]})]}),e[51]=u,e[52]=v,e[53]=O):O=e[53],O}function je(e){const[l,a]=e;return t.jsx("option",{value:l,children:a},l)}function ge(){return w.get(`${_}/create`)}function ve(e,l){confirm(`Deseja excluir o documento "${l}"?`)&&w.delete(`${_}/${e}`,{preserveScroll:!0,replace:!0})}export{bt 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.