PageSourceSearch

https://fenaprevi.org.br/_next/static/chunks/pages/noticias-a1582cafd9ac6fe9.js

js fenaprevi.org.br collected 2026-09-28 10:36:51 UTC 11,324 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6082],{47566:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/noticias",function(){return a(57447)}])},57447:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return O}});var n=a(85893),i=a(42298),l=a(29081),s=a(80129),d=a.n(s),o=a(67294),r=a(30286);a(81759),a(15138);var c=a(41898),u=a(25935),h=a(41664),p=a.n(h),m=a(51384),v=a(22546);a(22692);var x=a(86893),y=a(42602),j=a(78619),g=a(76537),f=a(76954),b=a(88570),k=a(71771),w=a(32665),C=a(88482),S=a(48761),E=a(59429),N=a(94356),D=a(99317),T=a(11163),q=a(41330),F=a(11676);function O(){let e=(0,T.useRouter)(),{setVisibility:t}=(0,o.useContext)(C.M),[a,s]=(0,o.useState)(null),[h,O]=(0,o.useState)(null),[Z,_]=(0,o.useState)(null),[B,I]=(0,o.useState)(null),[L,M]=(0,o.useState)(""),[z,R]=(0,o.useState)(""),[P,$]=(0,o.useState)(""),[U,V]=(0,o.useState)(""),[H,K]=(0,o.useState)(!1),[W,J]=(0,o.useState)(0),[Q,X]=(0,o.useState)(!1),A=()=>K(!1),Y=()=>K(!0),[G,ee]=(0,o.useState)("Tudo"),[et,ea]=(0,o.useState)(1);(0,o.useEffect)(()=>{document.addEventListener("keydown",eN,!0),document.addEventListener("click",eD,!0)},[]),(0,o.useEffect)(()=>{document.addEventListener("keydown",eN,!0),document.addEventListener("click",eD,!0)},[e.query]),(0,o.useEffect)(()=>{if(e.isReady){let t=e.query.categoria,a=e.query.palavraChave,n=e.query.dataInicio,i=e.query.dataFim;if(t&&"Tudo"!==t&&(ee(t),ef(t)),a&&$(a),n&&i){let e=new Date(n+"T00:00:00.000Z"),t=new Date(i+"T23:59:59.999Z");em({startDate:e,endDate:t,key:"selection"}),M(n),R(i),ex(!0)}X(!0)}},[e.isReady,e.query]);let en=()=>{em({startDate:new Date,endDate:new Date,key:"selection"}),ex(!1),ej(!1),M(""),R(""),$(""),el(""),es("",""),setTimeout(()=>{eh(er(!0,1,"","",""))},0)},ei=t=>{let a={...e.query};"Tudo"===t?delete a.categoria:a.categoria=t,0===Object.keys(a).length?e.push(e.pathname,void 0,{shallow:!0}):e.push({pathname:e.pathname,query:a},void 0,{shallow:!0})},el=t=>{let a={...e.query};t&&""!==t.trim()?a.palavraChave=t.trim():delete a.palavraChave,0===Object.keys(a).length?e.push(e.pathname,void 0,{shallow:!0}):e.push({pathname:e.pathname,query:a},void 0,{shallow:!0})},es=(t,a)=>{console.log("updateUrlWithDateRange called with:",{startDate:t,endDate:a});let n={...e.query};t&&a?(n.dataInicio=t,n.dataFim=a):(delete n.dataInicio,delete n.dataFim),console.log("updateUrlWithDateRange - newQuery:",n),0===Object.keys(n).length?e.push(e.pathname,void 0,{shallow:!0}):e.push({pathname:e.pathname,query:n},void 0,{shallow:!0})},ed=d().stringify({fields:["nome"],filters:{destaque:{$eq:!0}},sort:["updatedAt:desc"],pagination:{page:1,pageSize:6}},{encodeValuesOnly:!0}),eo=d().stringify({fields:["nome"],sort:["nome:asc"]},{encodeValuesOnly:!0}),er=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:L,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:z,l=(0,E.ge)(),s={fields:["titulo","slug","introducao","dataNoticia","descricao"],populate:["banner","editoria"],filters:{canais:{[l]:{$eq:!0}},editoria:{id:{$notNull:!0},nome:{$eq:"".concat(G)}}},sort:["dataNoticia:desc"],pagination:{page:t,pageSize:100}};"Tudo"===G&&(s.filters.editoria.nome=void 0),n&&i&&!e&&(s.filters.dataNoticia={$gte:n+"T00:00:00.000Z",$lte:i+"T23:59:59.999Z"}),a&&""!==a.trim()&&!e&&Object.assign(s.filters,(0,N.m)(a,["palavrasChave","titulo","introducao","descricao"]));let o=d().stringify(s,{encodeValuesOnly:!0});return o};(0,o.useEffect)(()=>{Q&&(eh(er()),ea(1))},[Q]),(0,o.useEffect)(()=>{Q&&G&&(eh(er()),ea(1))},[G,Q]);let ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if("Tudo"!==e){let a=t.data.filter(t=>t.attributes.editoria.data.attributes.nome===e);eu(a)}else eu(t.data)},eu=e=>{let t=[];for(let a=0;a<e.length;a+=10){let n=e.slice(a,a+10);t.push(n)}O(t)},eh=async function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t(!0);let i=w.Hg+"?"+e,l=(await S.U.get(i)).data;if(n){ea(et+1),s({data:[...a.data,...l.data],meta:l.meta}),ec(eg,{data:[...a.data,...l.data]}),t(!1);return}let d=w.s6+"?"+ed,o=(await S.U.get(d)).data,r=w.s6+"?"+eo,c=(await S.U.get(r)).data;s(l),"Outros…"===eg?ec(eb,l):ec(eg,l),_(o),I(c),null==eT||eT.slideTo(0),0===l.data.length?V("N\xe3o foram encontrados itens para esta consulta."):V(""),t(!1)}
1,[ep,em]=(0,o.useState)({startDate:new Date,endDate:new Date,key:"selection"}),[ev,ex]=(0,o.useState)(!1),[ey,ej]=(0,o.useState)(!1),[eg,ef]=(0,o.useState)("Tudo"),[eb,ek]=(0,o.useState)("Tudo");function ew(e,t){return e?(0,i.default)(e,"dd/MM/yyyy"):t}let eC=e=>{em(e.selection);let t=(0,i.default)(e.selection.startDate,"yyyy-MM-dd"),a=(0,i.default)(e.selection.endDate,"yyyy-MM-dd");M(t),R(a)},eS=()=>{ex(!0)},eE=(0,o.useRef)(null),eN=e=>{"Escape"===e.key&&ej(!1)},eD=e=>{eE.current&&!eE.current.contains(e.target)&&ej(!1)},[eT,eq]=(0,o.useState)(),[eF,eO]=(0,o.useState)(!0),[eZ,e_]=(0,o.useState)(!1),eB=(0,o.useCallback)(()=>{null==eT||eT.slidePrev(),eL()},[eT]),eI=(0,o.useCallback)(()=>{null==eT||eT.slideNext(),eL()},[eT]),eL=()=>{eO(!eT.activeIndex),e_(eT.isEnd)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(f.t,{headerPageTitle:"Not\xedcias institucionais",children:[(0,n.jsx)(c.J,{children:(0,n.jsx)("nav",{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:"In\xedcio"}),(0,n.jsx)("li",{children:(0,n.jsx)("strong",{children:"Not\xedcias institucionais"})})]})})}),(0,n.jsxs)(D.W2,{children:[(0,n.jsxs)(D.h4,{children:[(0,n.jsxs)(D.BQ,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(D.zx,{onClick:()=>{ef("Tudo"),ec("Tudo"),ee("Tudo"),ei("Tudo")},className:"Tudo"===eg?"active-button":"",children:"Tudo"}),Z&&Z.data.map(e=>(0,n.jsx)(D.zx,{onClick:()=>{ef(e.attributes.nome),ee(e.attributes.nome),ei(e.attributes.nome)},className:eg===e.attributes.nome?"active-button":"",children:e.attributes.nome},e.id)),(0,n.jsx)(D.zx,{onClick:()=>{ef("Outros…"),Y()},className:"Outros…"===eg?"active-button":"",children:"Outros…"})]}),(0,n.jsx)("div",{children:(0,n.jsxs)("span",{children:["Resultados: ",eg]})})]}),(0,n.jsx)(D.o9,{children:(0,n.jsx)("form",{children:(0,n.jsxs)("fieldset",{children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{htmlFor:"palavra-chave",children:["Palavra-chave",(0,n.jsx)(g.S,{})]}),(0,n.jsx)("input",{value:P,type:"text",onChange:e=>{$(e.target.value)},onKeyDown:t=>{if("Enter"===t.key){var a;t.preventDefault();let n=(null===(a=document.getElementById("palavra-chave"))||void 0===a?void 0:a.value)||"";console.log("Enter pressed - Button Filtrar logic:",{currentKeyword:n,currentKeywordLength:n.length,isEmpty:""===n.trim(),keyWord:P});let i={...e.query};n&&""!==n.trim()?i.palavraChave=n.trim():delete i.palavraChave,L&&z?(i.dataInicio=L,i.dataFim=z):(delete i.dataInicio,delete i.dataFim),console.log("Final query to push (Enter):",i),0===Object.keys(i).length?e.push(e.pathname,void 0,{shallow:!0}):e.push({pathname:e.pathname,query:i},void 0,{shallow:!0}),eh(er())}},placeholder:"Digite aqui",id:"palavra-chave",className:"input-select"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"periodo",children:"Per\xedodo"}),(0,n.jsx)("input",{value:ev?" ".concat(ew(ep.startDate,"")," | ").concat(ew(ep.endDate,"")," "):"",autoComplete:"off",type:"text",onClick:()=>ej(e=>!e),placeholder:"Selecionar",id:"periodo",className:"input-select"}),(0,n.jsxs)("div",{ref:eE,className:"calendar-container ".concat(ey?"active":""),children:[(0,n.jsx)(r.C0,{ranges:[ep],onChange:eC,locale:l.Z,weekdayDisplayFormat:"EEEEEE",weekStartsOn:1,dateDisplayFormat:"dd/MM/yyyy",className:"calendar-content "}),(0,n.jsxs)("div",{className:"calendar-button-select-content",children:[(0,n.jsx)("button",{className:"calendar-button link-clear",onClick:e=>{e.preventDefault(),en()},children:"Limpar"}),(0,n.jsx)("button",{className:"calendar-button",onClick:e=>{e.preventDefault(),ej(!1),eS(),console.log("Bot\xe3o Selecionar clicked - startDate:",L,"endDate:",z),L&&z?es(L,z):console.log("startDate ou endDate est\xe3o vazios!")},children:"Selecionar"})]})]})]}),(0,n.jsx)("div",{children:(0,n.jsx)(j.t,{handleClick:()=>{var t;let a=(null===(t=document.getElementById("palavra-chave"))||void 0===t?void 0:t.value)||"";console.log("Button Filtrar clicked:",{currentKeyword:a,currentKeywordLength:a.length,isEmpty:""===a.trim(),keyWord:P});let n={...e.query};a&&""!==a.trim()?n.palavraChave=a.trim():delete n.palavraChave,L&&z?(n.dataInicio=L,n.dataFim=z):(delete n.dataInicio,delete n.dataFim),console.log("Final query to push:",n),0===Object.keys(n).length?e.push(e.pathname,void 0,{shallow:!0}):e.push({pathname:e.pathname,query:n},void 0,{shallow:!0}),eh(er())},isLink:!1,label:"Filtrar",size:"s"})}),(0,n.jsx)("div",{children:(0,n.jsx)("button",{onClick:e=>{e.preventDefault(),en(),ef("Tudo"),ee("Tudo"),ei("Tudo"),eh(er(!0,1,"","",""))},children:"Limpar filtros"})})]})})})]}),a&&(0,n.jsxs)(b.S,{children:[(0,n.jsxs)(v.tq,{onReachEnd:()=>{et<a.meta.pagination.pageCount&&eh(er(!1,et+1),!0)},slidesPerView:1,onSwiper:eq,pagination:{clickable:!0,renderBullet:function(e,t){return'<span class="'+t+'">'+(e+1)+"</span>"},dynamicBullets:!0,dynamicMainBullets:1},modules:[m.tl],children:[h&&h.map((e,t)=>
1(0,n.jsx)(v.o5,{children:(0,n.jsx)("div",{className:"wrap-link-item",children:e.map(e=>{var t,a,i;let l=(0,E.Jn)((null===(t=e.attributes.banner)||void 0===t?void 0:t.data)?null===(a=e.attributes.banner)||void 0===a?void 0:a.data[0].attributes.url:"");return(0,n.jsxs)(p(),{className:"item link-item",href:"/noticias/".concat(e.attributes.slug),title:"",children:[(0,n.jsx)("div",{className:"banner-image",children:(null===(i=e.attributes.banner)||void 0===i?void 0:i.data)&&(0,n.jsx)(q.Z,{src:l,alt:""})}),(0,n.jsxs)("div",{className:"description",children:[(0,n.jsx)("span",{children:(0,E.p6)(e.attributes.dataNoticia)+" - "+e.attributes.editoria.data.attributes.nome}),(0,n.jsx)("h3",{children:e.attributes.titulo}),(0,n.jsx)("p",{children:e.attributes.introducao?e.attributes.introducao:(0,u.ZP)((0,E.gd)(e.attributes.descricao,300))})]})]},e.id)})})},t)),h&&0===h.length&&(0,n.jsx)("h3",{children:U})]}),h.length>1&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:()=>{eB()},children:(0,n.jsx)(x.YFh,{})}),(0,n.jsx)("button",{onClick:()=>{eI()},children:(0,n.jsx)(x.Tfp,{})})]}),(0,n.jsx)(y.j,{})]})]}),(0,n.jsx)(D.F0,{children:(0,n.jsxs)(k.Z,{show:H,onHide:A,centequinternary:!0,className:"modal-container",children:[(0,n.jsx)(k.Z.Header,{closeButton:!0,children:(0,n.jsx)(k.Z.Title,{children:"Outros"})}),(0,n.jsx)(k.Z.Body,{children:(0,n.jsx)(F.Z,{children:B&&B.data.map(e=>(0,n.jsx)(F.Z.Check,{type:"radio",id:e.attributes.nome,name:"editoria",label:e.attributes.nome,onClick:()=>{ek(e.attributes.nome)}},e.id))})}),(0,n.jsxs)(k.Z.Footer,{style:{padding:"22.5px"},children:[(0,n.jsxs)("div",{style:{display:"flex"},children:[(0,n.jsx)(j.t,{handleClick:()=>{A()},isLink:!1,label:"Cancelar",size:"s"}),(0,n.jsx)(j.t,{handleClick:()=>{A(),ef(eb),ee(eb),ei(eb)},isLink:!1,label:"Salvar",size:"s"})]}),(0,n.jsx)(D.nk,{style:{order:-1},children:"Role para mais op\xe7\xf5es."})]})]})})]})})}}},function(e){e.O(0,[6556,2146,2462,5832,2326,8983,9774,2888,179],function(){return e(e.s=47566)}),_N_E=e.O()}]);

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.