1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2928],{2928:(e,t,i)=>{i.r(t),i.d(t,{default:()=>m});var r=i(37876),n=i(58756),l=i(14232),o=i(28484),s=i(11261);let a=o.Ay.div.withConfig({componentId:"sc-2f13d278-0"})(["width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;.newsletter-header{width:100%;display:flex;align-items:flex-start;justify-content:center;flex-direction:column;margin-bottom:16px;margin-top:10px;.newsletter-header-title{",";font-size:36px;line-height:28px;color:#555555;",'{[data-theme="dark"] &{color:',";}}","{font-size:26px;}}.newsletter-header-text{",";font-size:21px;line-height:26px;color:",";margin:16px 0px 10px;",'{[data-theme="dark"] &{color:',";}}","{font-size:17px;line-height:23px;margin:10px 0px 10px;}}}.newsletters-list{width:100%;border-top:1px solid ",";margin-bottom:16px;display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;.newsletter-card{width:calc(100% / 4);border-bottom:1px solid ",";padding:16px;display:flex;flex-direction:column;justify-content:flex-start;flex-wrap:wrap;position:relative;",'{flex-direction:row;}&::after{content:"";width:1px;height:92%;background-color:',";position:absolute;top:50%;transform:translateY(-50%);right:0;","{width:0;}}&:nth-of-type(4n){&::after{width:0;}}&:last-of-type{&::after{width:0;}}","{width:calc(100% / 3);&:nth-of-type(3n){&::after{width:0;}}&:nth-of-type(4n){&::after{height:92%;width:1px;}}}","{width:100%;}.newsletter-card-header{position:relative;display:flex;align-items:flex-start;justify-content:space-between;","{flex-direction:column;justify-content:flex-start;width:135px;}.newsletter-img{width:135px;height:135px;border-radius:10px;overflow:hidden;display:block;img{max-width:100%;width:100%;height:100%;}}.newsletter-button-container{z-index:4;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;","{margin-top:15px;}.newsletter-button{background-color:transparent;border:none;padding:0;margin-bottom:5px;.newsletter-button-switch{position:relative;display:inline-block;width:58px;height:24px;input{opacity:0;width:0;height:0;&:focus + .newsletter-button-slider{box-shadow:0 0 1px #2196f3;}&:checked + .newsletter-button-slider:before{-webkit-transform:translateX(31px);-ms-transform:translateX(31px);transform:translateX(31px);}}.newsletter-button-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px;&.subsTrue{background-color:",";",'{[data-theme="dark"] &{background-color:',";}}}&.subsFalse{background-color:#ededed;",'{[data-theme="dark"] &{background-color:',';}}}&::before{position:absolute;content:"";width:22px;height:22px;left:2px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%;border:1px solid #b5b5b5;','{[data-theme="dark"] &{background-color:',";}}}}}}}.newsletter-paywall{text-align:right;",";font-size:14px;line-height:25px;color:",";div{","{padding-bottom:12px;}}}}.newsletter-info{","{display:flex;flex-direction:column;margin-left:20px;width:calc(100% - 155px);}.newsletter-name{",";font-size:21px;line-height:24px;color:",";padding-top:10px;padding-bottom:5px;","{padding-top:0px;}",'{[data-theme="dark"] &{color:',";}}}.newsletter-info-suscriptor{margin-bottom:.5rem;}.newsletter-description{",";font-size:16px;line-height:20px;color:",";",'{[data-theme="dark"] &{color:',";}}}}.newsletter-footer{margin-top:auto;color:",";width:100%;","{margin-top:7px;}
1.newsletter-frequency,.newsletter-example{",";font-size:13px;line-height:16px;",'{[data-theme="dark"] &{color:',";}}}.newsletter-example{text-decoration:underline;margin-top:5px;padding-bottom:10px;cursor:pointer;color:",";",'{[data-theme="dark"] &{color:',";}}&:visited{color:",";}}}}}.only-mobile{",";font-size:14px;color:",";display:none;","{display:flex;flex-direction:column;}}.only-mobile.newsletter-paywall > div{padding-bottom:12px;}.only-desktop{display:flex;flex-direction:column;","{display:none;}}"],s.KQ.clarinVarSub2Regular,s.fi.darkMode,s.C.textLight,s.fi.phone,s.KQ.clarinVarSub2Regular,s.Q1.grey,s.fi.darkMode,s.C.textLight,s.fi.phone,s.Q1.greySeparator,s.Q1.greySeparator,s.fi.phone,s.Q1.greySeparator,s.fi.phone,s.fi.smallDesktop,s.fi.phone,s.fi.phone,s.fi.phone,s.Q1.mainColor,s.fi.darkMode,s.C.mainColor,s.fi.darkMode,s.C.greySeparator,s.fi.darkMode,s.C.textLight,s.KQ.sansBold,s.Q1.mainColor,s.fi.phone,s.fi.phone,s.KQ.clarinVarSub2Bold,s.Q1.black000,s.fi.phone,s.fi.darkMode,s.C.textLight,s.KQ.sansRegular,s.Q1.grey,s.fi.darkMode,s.C.textLight,s.Q1.grey,s.fi.phone,s.KQ.sansRegular,s.fi.darkMode,s.C.textLight,s.Q1.grey,s.fi.darkMode,s.C.textLight,s.Q1.grey,s.KQ.sansBold,s.Q1.mainColor,s.fi.phone,s.fi.phone);var d=i(37796),c=i(81796),p=i(2081),x=i(79048),h=i(24746),u=i(51001),f=i(15897);let m=()=>{var e,t,i;let{content:o,...s}=(0,l.useContext)(f.A)||{},{data:m}=null==s||null==(e=s.properties)?void 0:e.service,g=null!=(i=null==m||null==(t=m.newsletters)?void 0:t.filter(e=>{var t;return null==e||null==(t=e.extras)?void 0:t.active}))?i:[],[w,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[k,j]=(0,l.useState)(Array(g.length).fill(!1)),{loginWithRedirect:N}=(0,c.WB)(),{dataSubscription:Q,userId:C,userAuth0:S,userEmail:z}=(0,d.A)(),A=(0,l.useRef)(null),M=(0,l.useRef)([]),K=async(e,t,i,r,n)=>{if(C||""!=C||k[e]){if(r&&(null==S?void 0:S.subscriptionStatus)!=="subscribed")window.location.href="".concat("https://www.clarin.com","/suscripciones/landing.html");else if(await (0,x.Yyd)(z,!k[e]?t:i)){R({newsletterName:n,subscription:!k[e]});let t=[...k];t[e]=!t[e],j(t)}}else _()},_=async()=>{(0,p.hC)("ui_interaction","newsletter","Boton Suscribirse");let e=(0,x.AdN)(1);document.cookie="auth0_redir=".concat(window.location.href,";expires=").concat(e.toUTCString(),";path=/"),N()},R=e=>{b(e),A.current.showModal()};return(0,l.useEffect)(()=>{let e=[...k];for(let t=0;t<g.length;t++)(null==Q?void 0:Q.filter(e=>{var i,r;return parseInt(null==e||null==(i=e.emailGroup)?void 0:i.id)==parseInt(null==(r=g[t].extras)?void 0:r.idGroup)&&"true"===e.isSubscribed}).length)>0&&(e[t]=!e[t]);j(e),v(!0)},[Q]),(0,l.useLayoutEffect)(()=>{if(window.innerWidth<=975)return;let e=M.current,t=Math.max(...e.map(e=>e.offsetHeight))+20;e.forEach(e=>{e.style.height="".concat(t,"px")})},[]),(0,r.jsxs)(a,{children:[(0,r.jsx)(u.A,{data:w,handleModal:R,favDialogRef:A}),(0,r.jsxs)("div",{className:"newsletter-header",children:[(0,r.jsx)("p",{className:"newsletter-header-title",children:"Clar\xedn en tu e-mail"}),(0,r.jsx)("p",{className:"newsletter-header-text",children:"Recib\xed los contenidos que m\xe1s te gustan. Hac\xe9 click en los botones para suscribirte o cancelar los newsletters que quieras recibir."})]}),(0,r.jsx)("div",{className:"newsletters-list",children:g.filter(e=>{var t;return null==e||null==(t=e.extras)?void 0:t.active}).map((e,t)=>{var i,l,o,s,a,d,c,p,x,u;return(0,r.jsxs)("div",{className:"newsletter-card",ref:e=>M.current[t]=e,children:[(0,r.jsxs)("div",{className:"newsletter-card-header",children:[(0,r.jsx)(h.A,{href:"https://www.clarin.com"+e.slug}),(0,r.jsx)("picture",{className:"newsletter-img",children:(0,r.jsx)("img",{src:null==(i=e.extras)?void 0:i.image})}),(0,r.jsxs)("div",{className:"newsletter-button-container",children:[(0,r.jsx)("button",{className:"newsletter-button",style:{visibility:y?"visible":"hidden"},children:(0,r.jsxs)("label",{className:"newsletter-button-switch",children:[(0,r.jsx)("input",{type:"checkbox",value:k[t],checked:k[t],onChange:()=>{var i,r,n,l;return K(t,null==(i=e.extras)?void 0:i.subscriptionUrl,null==(r=e.extras)?void 0:r.unsubscribeUrl,null==(n=e.extras)?void 0:n.premium,null==(l=e.extras)?void 0:l.name)}}),(0,r.jsx)("span",{className:"newsletter-button-slider ".concat(k[t]?"subsTrue":"subsFalse")})]})}),(0,r.jsx)("div",{className:"newsletter-paywall only-desktop",children:(null==(l=e.extras)?void 0:l.new)&&"NOVEDAD"})]})]}),(0,r.jsxs)("div",{className:"newsletter-info",children:[(0,r.jsx)("p",{className:"newsletter-name",children:e.name}),(0,r.jsx)("div",{className:"newsletter-info-suscriptor",children:(null==(o=e.extras)?void 0:o.premium)&&(0,r.jsx)(n.A,{})}),(0,r.jsx)("p",{className:"newsletter-description",children:null==(s=e.extras)?void 0:s.templateDescription}),(0,r.jsxs)("div",{className:"newsletter-footer only-mobile",children:[(0,r.jsx)("p",{className:"newsletter-frequency",children:null==(a=e.extras)?void 0:a.frequency}),(0,r.jsx)("a",{className:"newsletter-example",style:{visibility:(null==(d=e.extras)?void 0:d.example)?"visible":"hidden"},href:null==(c=e.extras)?void 0:c.example,target:"_blank",children:"Ver ejemplo"})]})]}),(0,r.jsxs)("div",{className:"newsletter-footer only-desktop",children:[(0,r.jsx)("p",{className:"newsletter-frequency",children:null==(p=e.extras)?void 0:p.frequency}),(0,r.jsx)("a",{className:"newsletter-example",style:{visibility:(null==(x=e.extras)?void 0:x.example)?"visible":"hidden"},href:null==(u=e.extras)?void 0:u.example,target:"_blank",children:"Ver ejemplo"})]})]},"newsletter".concat(t))})})]})}},51001:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(37876),n=i(28484),l=i(11261);let o=n.Ay.div.withConfig({componentId:"sc-f6ca5114-0"})(["dialog{width:40%;border:none;border-radius:8px;background-color:",";padding:40px;","{width:90%;padding:40px 20px;}form{display:flex;flex-direction:column;gap:10px;.dialog-title{",";font-size:24px;line-height:20px;text-align:center;padding-bottom:10px;color:",";","{font-size:20px;padding-bottom:20px;}}.dialog-text{",";font-size:20px;line-height:28px;text-align:center;color:",";","{font-size:16px;line-height:20px;}}menu{display:flex;align-items:center;justify-content:center;padding:0;margin-bottom:0;button{background-color:",";border-radius:50px;",";font-size:16px;line-height:20px;color:",";margin-top:10px;border:none;padding:10px 25px 10px;cursor:pointer;margin-bottom:0;}}}}"],l.Q1.white,l.fi.phone,l.KQ.clarinVarSub2Bold,l.Q1.black000,l.fi.phone,l.KQ.sansRegular,l.Q1.grey,l.fi.phone,l.Q1.yellow2,l.KQ.sansSemiBold,l.Q1.black000);var s=i(2081);let a=e=>{let{data:t,favDialogRef:i}=e,n=()=>{i.current.close()};return(0,r.jsx)(o,{children:(0,r.jsx)("dialog",{id:"favDialog",ref:i,children:(0,r.jsx)("form",{method:"dialog",children:(0,r.jsx)("section",{children:t.subscription?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:"dialog-title",children:["\xa1Gracias por suscribirte a ",t.newsletterName,"!"]}),(0,r.jsx)("p",{className:"dialog-text",children:"A partir del pr\xf3ximo env\xedo
1ya lo recibir\xe1s en tu casilla de email."}),(0,r.jsx)("menu",{children:(0,r.jsx)("button",{type:"submit",onClick:()=>{(0,s.hC)("ui_interaction","newsletter","Suscribirse | "+t.newsletterName),n()},children:"Aceptar"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:"dialog-title",children:["Ya no recibir\xe1s el ",t.newsletterName,"."]}),(0,r.jsx)("menu",{children:(0,r.jsx)("button",{type:"submit",onClick:()=>{(0,s.hC)("ui_interaction","newsletter","Desuscribirse | "+t.newsletterName),n()},children:"Aceptar"})})]})})})})})}}}]); 2//# sourceMappingURL=2928.5123fae01880a55e-67003dfb.js.map
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.