1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[806],{22798:(e,r,t)=>{t.r(r),t.d(r,{NewsCustom:()=>b});var s=t(95155),o=t(26838),a=t(14367),l=t(55383),n=t(83101),i=t(12115),c=t(60727);let d=e=>{let{options:r,selected:t,onChange:o,error:a}=e;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{className:"mb-6 mt-4 flex flex-col gap-4",children:(0,s.jsx)("div",{className:"grid grid-cols-2 items-center gap-4 overflow-auto",children:r.map((e,r)=>{let{group_id:a,group_name:l,group_title:n,group_show_front:i}=e,c="".concat(a,"-checkbox-").concat(l),d="".concat(a,"-").concat(r,"-option-item-wrapper");return i?(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{id:c,type:"checkbox",className:"peer hidden",name:l,checked:t.includes(l),onChange:()=>o(l)}),(0,s.jsx)("label",{htmlFor:c,className:"relative ml-7 flex cursor-pointer flex-wrap items-center break-words text-sm text-neutral-700 before:absolute before:-left-6 before:z-20 before:h-4 before:w-4 before:rounded before:border before:border-gray-300 before:content-[''] peer-checked:before:flex peer-checked:before:items-center peer-checked:before:justify-center peer-checked:before:border-red-600 peer-checked:before:bg-red-600 peer-checked:before:text-white peer-checked:before:content-['\\2714']",children:n},c)]},d):null})},"checkbox-list-wrapper")}),a&&(0,s.jsx)("div",{className:"mt-2 text-sm text-red-600",children:a})]})},m=(0,n.F)("m-0 flex flex-col gap-0 overflow-hidden rounded-none bg-neutral-100 p-0 lg:items-center lg:justify-between lg:rounded-lg",{variants:{"image position":{left:"lg:flex-row",right:"lg:flex-row-reverse"}},defaultVariants:{"image position":"left"}}),b=e=>{let{settings:r}=e,{image_position:t,image_url:n,newsletter_background_color:b,newsletter_content:f,newsletter_title:u,send_all:p,newsletter_groups:h=[]}=r,x=!!(!p&&h.every(e=>!e.group_show_front)),g=!!(p&&Array.isArray(h)),w=!!(Array.isArray(h)&&h.some(e=>!!e.group_show_front)),j=(0,i.useRef)(null),v=(0,i.useRef)(null),[N,k]=(0,i.useState)(()=>g||x?h.filter(e=>!e.group_show_front).map(e=>e.group_name):[]),{emailError:y,setEmailError:C,newsletterError:A,setNewsletterError:F,termsError:_,setTermsError:E,responsesSuccess:I,setResponsesSuccess:z,responsesError:L,setResponsesError:M}=(0,l.NQ)();return 0===h.length?(0,s.jsxs)("p",{className:"text-lg text-neutral-700",children:["ATEN\xc7\xc3O: A"," ",(0,s.jsx)("span",{className:"font-bold",children:"Newsletter Customiz\xe1vel"})," deve ter pelo menos um item cadastrado em"," ",(0,s.jsx)("span",{className:"font-bold",children:"Grupos da Newsletter"})]}):(0,s.jsxs)("div",{className:m({"image position":t}),style:b?{backgroundColor:b}:{backgroundColor:"#F5F5F5"},children:[(0,s.jsx)("div",{className:"w-full shrink-0 p-0 lg:w-1/2",children:(0,s.jsx)(a.H,{src:n||"https://admin.cnnbrasil.com.br/wp-content/themes/master-theme/assets/img/fallbackImage.jpg",alt:"Imagem: ".concat(u),size:"S657x374",className:"m-0 h-full w-full p-0"})}),(0,s.jsx)("div",{className:"px-6 py-10 lg:w-1/2 lg:px-16 lg:py-7",children:(0,s.jsx)("div",{id:"mc_embed_signup",children:(0,s.jsxs)("form",{className:"relative",method:"post",onSubmit:e=>(0,l.tV)({event:e,emailRef:j,termsRef:v,selectedNewsletters:N,setEmailError:C,setNewsletterError:F,setTermsError:E,setResponsesSuccess:z,setResponsesError:M,resetSelections:()=>{}}),children:[u&&(0,s.jsx)(o.E,{size:"h2",weight:"bold",className:"mb-4 break-words text-neutral-800",children:(0,s.jsx)("h2",{children:u})}),!w&&f&&(0,s.jsx)(o.E,{size:"p",weight:"normal",className:"mb-6 break-words text-neutral-600",children:(0,s.jsx)("p",{children:f})}),w&&(0,s.jsx)(d,{options:h,selected:N,onChange:e=>{k(r=>(0,l.s)(e,r))},error:A}),(0,s.jsx)(c.w8,{inputRef:j,error:y,variant:"custom"}),(0,s.jsx)(c.qF,{inputRef:v,error:_}),(0,s.jsx)(c.r7,{success:I,error:L})]})})})]})}},60727:(e,r,t)=>{t.d(r,{qF:()=>a,tF:()=>l,w8:()=>f,r7:()=>u});var s=t(95155),o=t(12115);let a=e=>{let{inputRef:r,error:t}=e,a=(0,o.useId)();return(0,s.jsxs)("div",{className:"relative mt-2 flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center",role:"group","aria-labelledby":a,children:[(0,s.jsx)("input",{"aria-label":"Aceite os termos e condi\xe7\xf5es",ref:r,type:"checkbox",id:"termos-".concat(a),className:"peer sr-only",name:"aceite-termos","aria-required":"true","aria-invalid":!!t,"aria-describedby":t?"".concat(a,"-error"):void 0}),(0,s.jsxs)("label",{htmlFor:"termos-".concat(a),id:"label-termos-".concat(a),className:"relative ml-7 flex cursor-pointer flex-wrap items-center whitespace-nowrap text-sm before:absolute before:-left-6 before:h-4 before:w-4 before:rounded before:border before:border-gray-300 before:content-[''] peer-checked:before:flex peer-checked:before:items-center peer-checked:before:justify-center peer-checked:before:border-red-600 peer-checked:before:bg-red-600 peer-checked:before:text-white peer-checked:before:content-['â'] peer-focus-visible:before:ring-2 peer-focus-visible:before:ring-red-600 peer-focus-visible:before:ring-offset-2",children:["Li e c
1oncordo com os",(0,s.jsx)("a",{href:"https://conteudos.cnnbrasil.com.br/termos-de-uso-da-cnn-brasil/",target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-gray-600 underline","aria-label":"Abrir termos e condi\xe7\xf5es da CNN Brasil em nova aba",children:"termos e condi\xe7\xf5es"}),"."]})]}),t&&(0,s.jsx)("div",{className:"absolute top-6 text-sm text-red-600",id:"".concat(a,"-error"),role:"alert",children:t})]})},l=e=>{let{options:r,selected:t,onChange:o,error:a}=e;return(0,s.jsxs)("div",{className:"space-y-4",children:[r.map(e=>(0,s.jsxs)("details",{className:"group border-0",children:[(0,s.jsxs)("summary",{className:"relative flex cursor-pointer list-none items-center rounded-lg border p-2 after:absolute after:right-4 after:top-1/2 after:h-2 after:w-2 after:-translate-y-1/2 after:rotate-[-135deg] after:border-l-2 after:border-t-2 after:border-gray-800 after:transition-transform after:duration-300 group-open:after:rotate-[45deg]","aria-describedby":"desc-".concat(e.id),"aria-controls":"desc-".concat(e.id),"aria-expanded":t.includes(e.name),children:[(0,s.jsx)("input",{id:"chk-".concat(e.id),type:"checkbox",checked:t.includes(e.name),onChange:()=>o(e.name),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:"peer sr-only"}),(0,s.jsx)("label",{htmlFor:"chk-".concat(e.id),id:"title-".concat(e.id),className:"relative flex flex-1 cursor-pointer select-none items-center pl-10 pr-10 text-base leading-tight before:text-xs before:absolute before:left-2 before:flex before:h-5 before:w-5 before:items-center before:justify-center before:rounded before:border before:border-gray-300 before:bg-white before:p-2 peer-checked:before:border-red-600 peer-checked:before:bg-red-600 peer-checked:before:text-white peer-checked:before:content-['â'] peer-focus-visible:before:ring-2 peer-focus-visible:before:ring-red-600 peer-focus-visible:before:ring-offset-2 peer-focus-visible:before:ring-offset-white",children:e.title})]}),(0,s.jsx)("p",{id:"desc-".concat(e.id),className:"mt-1 overflow-hidden rounded-md text-sm text-gray-700 shadow-lg transition-all group-open:mb-5 group-open:block group-open:border group-open:p-2 group-open:px-2 group-open:py-4",children:e.description})]},e.id)),a&&(0,s.jsx)("div",{className:"mt-2 text-sm text-red-600",children:a})]})};var n=t(2821),i=t(57830),c=t(83101);let d=(0,c.F)("relative",{variants:{variant:{default:"mt-4 mb-4",inline:"m-0 flex items-center justify-items-start",custom:"m-0 flex items-center justify-items-start mb-5"}}}),m=(0,c.F)("w-full rounded-md border p-2",{variants:{variant:{default:"",inline:"mr-3 h-11 flex-grow rounded-none rounded-bl-lg rounded-tl-lg bg-white",custom:"mr-3 h-11 flex-grow rounded-md bg-white"}}}),b=(0,c.F)("transition-all duration-300 ease-in-out text-white",{variants:{variant:{default:"absolute right-2 top-2 flex h-7 w-9 items-center justify-center rounded-md bg-red-400 hover:bg-red-600 focus:bg-red-600",inline:"flex h-11 w-14 items-center justify-center rounded-none rounded-br-lg rounded-tr-lg bg-neutral-400 p-0 hover:bg-red-600 focus:bg-red-600 sm:w-12",custom:"flex h-11 w-14 px-3.5 items-center justify-center rounded-none rounded-br-md rounded-tr-md hover:bg-red-600/80 bg-red-600 focus:bg-red-600 sm:w-12"}}}),f=e=>{let{inputRef:r,error:t,variant:o="default"}=e;return(0,s.jsxs)("div",{className:d({variant:o}),role:"group","aria-labelledby":"EMAIL","aria-describedby":"EMAIL",children:[(0,s.jsx)("label",{className:"sr-only",htmlFor:"EMAIL",children:"Insira seu e-mail"}),(0,s.jsx)("input",{ref:r,type:"email",placeholder:"Digite seu e-mail",name:"EMAIL",className:m({variant:o}),autoComplete:"email"}),(0,s.jsx)("button",{type:"submit",className:b({variant:o}),children:"inline"===o||"custom"===o?(0,s.jsx)(i.KpL,{className:"size-6"}):(0,s.jsx)(i.iCA,{className:"rotate-180"})}),t&&(0,s.jsx)("div",{className:(0,n.A)("text-sm text-red-600",{"absolute top-12":"inline"===o||"custom"===o,"mt-2":"default"===o}),children:t})]})},u=e=>{let{success:r,error:t}=e;return r||t?(0,s.jsx)("div",{className:"absolute top-full mt-1 text-sm ".concat(r?"text-green-600":"text-red-600"),children:r||t}):null}},60806:(e,r,t)=>{t.r(r),t.d(r,{CustomNewsletterParserProps:()=>l});var s=t(95155),o=t(22798);let a=e=>{let{settings:r}=e;return r?(0,s.jsx)(o.NewsCustom,{settings:r}):null},l={parser:e=>{let{block:r}=e,{data:t}=r,o=t.settings;return(0,s.jsx)(a,{settings:o})},key:"cnn-block-newsletter-custom"}}}]);
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.