PageSourceSearch

https://fenaprevi.org.br/_next/static/chunks/pages/imprensa/cadastro-7932298b59a287e0.js

js fenaprevi.org.br collected 2026-09-28 10:37:01 UTC 14,785 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1715],{17515:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/imprensa/cadastro",function(){return t(92595)}])},27661:function(e,n,t){"use strict";t.d(n,{Bc:function(){return P},Dx:function(){return k},II:function(){return _},Ji:function(){return q},Ph:function(){return I},QE:function(){return y},W2:function(){return w},XZ:function(){return T},Yb:function(){return j},__:function(){return V},kk:function(){return E},l0:function(){return Z},oC:function(){return F},qO:function(){return N},rU:function(){return S},tp:function(){return z}});var o=t(7297),i=t(14141);function r(){let e=(0,o.Z)(["\n  display: flex !important;\n  align-items: center !important;\n  justify-content: center !important;\n  min-height: calc(100vh - 140px) !important;\n  padding: 2rem !important;\n  padding-top: 220px !important;\n  padding-bottom: 70px !important;\n  margin: 0 !important;\n  margin-top: 0 !important;\n  background: ",";\n"]);return r=function(){return e},e}function a(){let e=(0,o.Z)(["\n  background: "," !important;\n  border-radius: 10px !important;\n  box-shadow: 0px 3px 6px #00000029 !important;\n  overflow: hidden !important;\n  font-size: 14px !important;\n  font-weight: bold !important;\n  max-width: 570px !important;\n  width: 100% !important;\n  margin: 0 !important;\n"]);return a=function(){return e},e}function c(){let e=(0,o.Z)(["\n  background: ",";\n  color: ",";\n  width: 100%;\n  text-align: center;\n  padding: 16px;\n  display: block;\n  font-size: 16px;\n  font-weight: normal;\n  margin: 0;\n"]);return c=function(){return e},e}function s(){let e=(0,o.Z)(["\n  padding: 20px 30px 0;\n  color: ",";\n  text-align: center;\n  font-size: 14px;\n  font-weight: normal;\n  margin: 0;\n"]);return s=function(){return e},e}function l(){let e=(0,o.Z)(["\n  padding: 30px 60px;\n  display: flex;\n  flex-direction: column;\n  gap: 0;\n"]);return l=function(){return e},e}function u(){let e=(0,o.Z)(["\n  padding: 16px !important;\n  font-size: 18px !important;\n  border-radius: 10px !important;\n  margin-bottom: 40px !important;\n  border: 1px solid "," !important;\n  background: white !important;\n  color: #403d4a !important;\n\n  &:focus {\n    outline: none !important;\n    border-color: "," !important;\n  }\n\n  &::placeholder {\n    color: #aaa9ae !important;\n    font-size: 18px !important;\n  }\n"]);return u=function(){return e},e}function d(){let e=(0,o.Z)(["\n  padding: 16px 48px 16px 16px !important;\n  font-size: 18px !important;\n  border-radius: 10px !important;\n  margin-bottom: 40px !important;\n  border: 1px solid "," !important;\n  background: white !important;\n  color: #403d4a !important;\n  appearance: none !important;\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\") !important;\n  background-repeat: no-repeat !important;\n  background-position: right 16px center !important;\n\n  &:focus {\n    outline: none !important;\n    border-color: "," !important;\n  }\n\n  option {\n    color: #403d4a;\n    background: white;\n  }\n"]);return d=function(){return e},e}function m(){let e=(0,o.Z)(["\n  color: ",";\n  position: relative;\n  top: -32px;\n  font-weight: 500;\n  font-size: 14px;\n  margin: 0;\n"]);return m=function(){return e},e}function p(){let e=(0,o.Z)(["\n  color: ",";\n  position: relative;\n  top: -32px;\n  font-weight: 500;\n  font-size: 14px;\n  margin: 0;\n"]);return p=function(){return e},e}function f(){let e=(0,o.Z)(["\n  text-align: center;\n  margin: 1rem 0;\n"]);return f=function(){return e},e}function h(){let e=(0,o.Z)(["\n  color: ",";\n  text-decoration: none;\n  font-size: 14px;\n  cursor: pointer;\n\n  &:hover {\n    text-decoration: underline;\n    color: ",";\n  }\n"]);return h=function(){return e},e}function x(){let e=(0,o.Z)(["\n  display: flex;\n  justify-content: center;\n  gap: 1rem;\n  margin-top: 1rem;\n  padding-bottom: 20px;\n\n  button {\n    min-width: 120px;\n    max-width: 150px;\n  }\n"]);return x=function(){return e},e}function g(){let e=(0,o.Z)(["\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n  margin-top: 0.5rem;\n  margin-bottom: 20px;\n"]);return g=function(){return e},e}function b(){let e=(0,o.Z)(["\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  font-size: 14px;\n  cursor: pointer;
1\n  color: ",";\n  font-weight: normal;\n"]);return b=function(){return e},e}function C(){let e=(0,o.Z)(["\n  margin: 0;\n  width: 16px;\n  height: 16px;\n"]);return C=function(){return e},e}function v(){let e=(0,o.Z)(["\n  display: block;\n  font-weight: 600;\n  color: ",";\n  margin-bottom: 10px;\n  font-size: 14px;\n"]);return v=function(){return e},e}let w=i.ZP.div.withConfig({componentId:"sc-900b0684-0"})(r(),e=>e.theme.colors["gray-100"]),j=i.ZP.div.withConfig({componentId:"sc-900b0684-1"})(a(),e=>e.theme.colors.white),k=i.ZP.div.withConfig({componentId:"sc-900b0684-2"})(c(),e=>e.theme.colors.black,e=>e.theme.colors.white),y=i.ZP.div.withConfig({componentId:"sc-900b0684-3"})(s(),e=>e.theme.colors.black),Z=i.ZP.form.withConfig({componentId:"sc-900b0684-4"})(l()),_=i.ZP.input.withConfig({componentId:"sc-900b0684-5"})(u(),e=>e.theme.colors["gray-300"],e=>e.theme.colors["primary-400"]),I=i.ZP.select.withConfig({componentId:"sc-900b0684-6"})(d(),e=>e.theme.colors["gray-300"],e=>e.theme.colors["primary-400"]),P=i.ZP.div.withConfig({componentId:"sc-900b0684-7"})(m(),e=>e.theme.colors["primary-400"]),E=i.ZP.div.withConfig({componentId:"sc-900b0684-8"})(p(),e=>e.theme.colors["tertiary-300"]),q=i.ZP.div.withConfig({componentId:"sc-900b0684-9"})(f()),S=i.ZP.a.withConfig({componentId:"sc-900b0684-10"})(h(),e=>e.theme.colors["quaternary-400-link"],e=>e.theme.colors["primary-400"]),N=i.ZP.div.withConfig({componentId:"sc-900b0684-11"})(x()),z=i.ZP.div.withConfig({componentId:"sc-900b0684-12"})(g()),F=i.ZP.label.withConfig({componentId:"sc-900b0684-13"})(b(),e=>e.theme.colors.black),T=i.ZP.input.withConfig({componentId:"sc-900b0684-14"})(C()),V=i.ZP.label.withConfig({componentId:"sc-900b0684-15"})(v(),e=>e.theme.colors.black)},20524:function(e,n,t){"use strict";t.d(n,{m:function(){return r}});var o=t(67294),i=t(11997);let r=()=>{let[e,n]=(0,o.useState)([]),[t,r]=(0,o.useState)(!0),[a,c]=(0,o.useState)(""),s=(0,o.useCallback)(async()=>{try{r(!0),c("");let e=await i.Nb.listarAssuntos();n(e)}catch(e){c(e instanceof Error?e.message:"N\xe3o foi poss\xedvel carregar os assuntos de interesse.")}finally{r(!1)}},[]);return(0,o.useEffect)(()=>{s()},[s]),{assuntos:e,isLoading:t,error:a,refetch:s}}},92595:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return b}});var o=t(85893),i=t(67294),r=t(11163),a=t(87536),c=t(16310),s=t(86501),l=t(78619),u=t(27661),d=t(20524);let m=c.Ry({nomeCompleto:c.Z_().required("Nome completo \xe9 obrigat\xf3rio").min(3,"M\xednimo 3 caracteres"),email:c.Z_().email("Informe um e-mail v\xe1lido").required("E-mail \xe9 obrigat\xf3rio"),telefone:c.Z_().required("Telefone \xe9 obrigat\xf3rio").min(14,"Telefone inv\xe1lido"),veiculoComunicacao:c.Z_().required("Ve\xedculo de comunica\xe7\xe3o \xe9 obrigat\xf3rio"),uf:c.Z_().required("Selecione um estado"),assuntos:c.IX(c.Rx().integer()).min(1,"Selecione pelo menos um assunto de interesse").required("Selecione pelo menos um assunto de interesse"),receberNotificacoes:c.O7().default(!0),frequencias:c.IX(c.nK().oneOf(["imediata","diaria","semanal"])).when("receberNotificacoes",{is:!0,then:e=>e.min(1,"Selecione pelo menos uma frequ\xeancia de notifica\xe7\xe3o"),otherwise:e=>e.notRequired()})});var p=t(11997);let f=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],h=e=>{let n=e.replace(/\D/g,"").slice(0,11);return n.length<=2?n:n.length<=6?"(".concat(n.slice(0,2),") ").concat(n.slice(2)):n.length<=10?"(".concat(n.slice(0,2),") ").concat(n.slice(2,6),"-").concat(n.slice(6)):"(".concat(n.slice(0,2),") ").concat(n.slice(2,7),"-").concat(n.slice(7,11))},x=(e,n)=>{let t=["nomeCompleto","email","telefone","veiculoComunicacao","uf","assuntos","receberNotificacoes","frequencias"],o=new Set;e.inner.forEach(e=>{!(!e.path||o.has(e.path))&&(o.add(e.path),t.includes(e.path)&&n(e.path,{message:e.message}))})};function g(){var e,n,t,g,b,C,v;let w=(0,r.useRouter)(),{assuntos:j,isLoading:k,error:y,refetch:Z}=(0,d.m)(),[_,I]=(0,i.useState)(""),[P,E]=(0,i.useState)(""),[q,S]=(0,i.useState)(!1),{register:N,handleSubmit:z,watch:F,setValue:T,setError:V,clearErrors:B,formState:{errors:A,isSubmitting:R}}=(0,a.cI)({defaultValues:{nomeCompleto:"",email:"",telefone:"",veiculoComunicacao:"",uf:"",assuntos:[],receberNotificacoes:!0,frequencias:["imediata"]}}),D=F("receberNotificacoes"),X=F("assuntos",[]),O=F("frequencias",[]);(0,i.useEffect)(()=>{N("assuntos"),N("frequencias"),N("receberNotificacoes")},[N]),(0,i.useEffect)(()=>
1{if(!D){T("frequencias",[]),B("frequencias");return}0===O.length&&T("frequencias",["imediata"])},[B,O.length,D,T]);let M=(0,i.useCallback)((e,n)=>{let t=n?[...X,e]:X.filter(n=>n!==e);T("assuntos",t,{shouldDirty:!0,shouldValidate:!0}),B("assuntos")},[X,B,T]),L=(0,i.useCallback)((e,n)=>{let t=n?[...O,e]:O.filter(n=>n!==e);T("frequencias",t,{shouldDirty:!0,shouldValidate:!0}),B("frequencias")},[B,O,T]),U=R||q,G=(0,i.useCallback)(async e=>{I(""),E("");try{let n=await m.validate(e,{abortEarly:!1,stripUnknown:!0}),t=n.assuntos.filter(e=>"number"==typeof e);await p.Nb.cadastrar({nomeCompleto:n.nomeCompleto,email:n.email,telefone:n.telefone,veiculoComunicacao:n.veiculoComunicacao,uf:n.uf,assuntos:t,receberNotificacoes:n.receberNotificacoes,frequencias:n.frequencias}),E("Cadastro realizado! Voce recebera um e-mail de confirmacao."),s.ZP.success("Cadastro realizado! Voce recebera um e-mail de confirmacao."),S(!0),window.setTimeout(()=>{w.push("/imprensa/acesso")},3e3)}catch(e){if(e instanceof c.p8){x(e,V);return}I(e instanceof Error?e.message:"Nao foi possivel concluir o cadastro."),s.ZP.error(e instanceof Error?e.message:"Nao foi possivel concluir o cadastro.")}},[w,V]),J=(0,i.useMemo)(()=>k?(0,o.jsx)("div",{style:{fontSize:"14px",color:"#403D4A"},children:"Carregando assuntos..."}):y?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{style:{color:"#F7871F",fontSize:"14px"},children:y}),(0,o.jsx)(l.t,{label:"Tentar novamente",type:"button",isLink:!1,handleClick:Z})]}):0===j.length?(0,o.jsx)("div",{style:{fontSize:"14px",color:"#403D4A"},children:"Nenhum assunto disponivel no momento."}):(0,o.jsx)(u.tp,{children:j.map(e=>(0,o.jsxs)(u.oC,{children:[(0,o.jsx)(u.XZ,{type:"checkbox",checked:X.includes(e.id),onChange:n=>M(e.id,n.currentTarget.checked)}),e.nome]},e.id))}),[j,y,X,k,Z,M]);return(0,o.jsx)(u.W2,{children:(0,o.jsxs)(u.Yb,{children:[(0,o.jsx)(u.Dx,{children:"Cadastro - Sala de Imprensa"}),(0,o.jsx)(u.QE,{children:"Preencha os dados abaixo para ter acesso a sala de imprensa"}),(0,o.jsxs)(u.l0,{onSubmit:z(G),children:[(0,o.jsx)(u.__,{htmlFor:"nomeCompleto",children:"Nome completo *"}),(0,o.jsx)(u.II,{id:"nomeCompleto",type:"text",placeholder:"Nome completo *",...N("nomeCompleto"),onChange:e=>{T("nomeCompleto",e.target.value,{shouldValidate:!0})}}),(null===(e=A.nomeCompleto)||void 0===e?void 0:e.message)&&(0,o.jsx)(u.Bc,{children:A.nomeCompleto.message}),(0,o.jsx)(u.__,{htmlFor:"email",children:"E-mail *"}),(0,o.jsx)(u.II,{id:"email",type:"email",placeholder:"E-mail *",autoComplete:"email",...N("email"),onChange:e=>{T("email",e.target.value,{shouldValidate:!0})}}),(null===(n=A.email)||void 0===n?void 0:n.message)&&(0,o.jsx)(u.Bc,{children:A.email.message}),(0,o.jsx)(u.__,{htmlFor:"telefone",children:"Telefone *"}),(0,o.jsx)(u.II,{id:"telefone",type:"tel",autoComplete:"tel",placeholder:"(00) 00000-0000",...N("telefone"),onChange:e=>{T("telefone",h(e.target.value),{shouldValidate:!0})}}),(null===(t=A.telefone)||void 0===t?void 0:t.message)&&(0,o.jsx)(u.Bc,{children:A.telefone.message}),(0,o.jsx)(u.__,{htmlFor:"veiculoComunicacao",children:"Ve\xedculo de Comunica\xe7\xe3o *"}),(0,o.jsx)(u.II,{id:"veiculoComunicacao",type:"text",placeholder:"Ve\xedculo de Comunica\xe7\xe3o *",...N("veiculoComunicacao"),onChange:e=>{T("veiculoComunicacao",e.target.value,{shouldValidate:!0})}}),(null===(g=A.veiculoComunicacao)||void 0===g?void 0:g.message)&&(0,o.jsx)(u.Bc,{children:A.veiculoComunicacao.message}),(0,o.jsx)(u.__,{htmlFor:"uf",children:"Estado (UF) *"}),(0,o.jsxs)(u.Ph,{id:"uf",...N("uf"),onChange:e=>{T("uf",e.target.value,{shouldValidate:!0})},children:[(0,o.jsx)("option",{value:"",children:"Selecione o Estado (UF) *"}),f.map(e=>(0,o.jsx)("option",{value:e,children:e},e))]}),(null===(b=A.uf)||void 0===b?void 0:b.message)&&(0,o.jsx)(u.Bc,{children:A.uf.message}),(0,o.jsxs)("div",{children:[(0,o.jsx)(u.__,{children:"Assuntos de interesse *"}),(null===(C=A.assuntos)||void 0===C?void 0:C.message)&&(0,o.jsx)(u.Bc,{style:{top:0,marginBottom:"4px"},children:A.assuntos.message}),J]}),(0,o.jsx)("div",{children:(0,o.jsx)(u.__,{children:(0,o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px"},children:[(0,o.jsx)(u.XZ,{type:"checkbox",checked:D,onChange:e=>T("receberNotificacoes",e.target.checked)}),"Deseja receber notifica\xe7\xf5es por e-mail?"]})})}),(0,o.jsxs)("div",{style:{maxHeight:D?"220px":"0px",opacity:D?1:0,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.25s ease"},children:[(0,o.jsx)(u.__,{children:"Frequ\xeancia de notifica\xe7\xe3o"}),(0,o.jsxs)(u.tp,{children:[(0,o.jsxs)(u.oC,{children:[(0,o.jsx)(u.XZ,{type:"checkbox",checked:O.includes("imediata"),onChange:e=>L("imediata",e.currentTarget.checked)}),"Imediata (a cada nova publica\xe7\xe3o)"]}),(0,o.jsxs)(u.oC,{children:[(0,o.jsx)(u.XZ,{type:"checkbox",checked:O.includes("diaria"),onChange:e=>L("diaria",e.currentTarget.checked)}),"Di\xe1ria (resumo \xe0s 18h)"]}),(0,o.jsxs)(u.oC,{children:[(0,o.jsx)(u.XZ,{type:"checkbox",checked:O.includes("semanal"),onChange:e=>L("semanal",e.currentTarget.checked)}),"Semanal (resumo toda sexta-feira \xe0s 18h)"]})]}),(null===(v=A.frequencias)||void 0===v?void 0:v.message)&&(0,o.jsx)("div",{style:{color:"#F7871F",fontSize:"14px",marginTop:"6px"},children:A.frequencias.message})]}),_&&(0,o.jsx)(u.Bc,{children:_}),P&&(0,o.jsx)(u.kk,{children:P}),(0,o.jsxs)(u.qO,{children:[(0,o.jsx)(l.t,{label:"Voltar",type:"button",isLink:!1,disabled:U,handleClick:()=>w.push("/imprensa/acesso")}),(0,o.jsx)(l.t,{label:R?"Cadastrando...":"Cadastrar",type:"submit",isLink:!1,disabled:U})]})]})]})})}function b(){return(0,o.jsx)(g,{})}}},function(e){e.O(0,[6310,7536,9774,2888,179],function(){return e(e.s=17515)}),_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.