1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2220],{3554:(e,t,i)=>{"use strict";i.d(t,{C:()=>d,g:()=>a});var n=i(94513),r=i(54020),o=i(60930),c=i(11730),s=i(48655);let a=({label:e,isSelected:t=!1,onSelectedChange:i,brandShortName:r="",disabled:o=!1})=>{let c="GP"===r;return(0,n.jsxs)(l,{type:"button",role:"checkbox","aria-checked":t,"aria-label":e,disabled:o,onClick:()=>i(!t),isGP:c,isSelected:t,children:[(0,n.jsxs)(d,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,isSelected:t,isGP:c,children:[(0,n.jsx)("circle",{className:"ring",cx:"12",cy:"12",r:"11"}),t&&(0,n.jsx)("path",{className:"check",d:"M7 12.5L10.5 16L17 8.5",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("span",{children:e})]})},l=c.Ay.button.withConfig({componentId:"sc-20148592-0"})(["display:inline-flex;align-items:center;gap:0.5rem;border-radius:30px;height:2.5rem;cursor:pointer;white-space:nowrap;border:1px solid ",";background-color:transparent;color:var(--corp-color-darken);transition:0.23s ease-in-out;"," "," "," "," &:hover{border-color:",";svg .ring{transition:0.23s ease-in-out;stroke:",";}}&:focus-visible{outline:none;box-shadow:0 0 0 1px var(--white),0 0 0 3px var(--corp-color-darken);}&:disabled{background-color:var(--gray-300);border-color:var(--gray-300);color:var(--gray-600);pointer-events:none;}span{color:#14191e;font-size:14px;}"],({theme:e,isGP:t})=>t?e.subscription.table?.separatorColor:"var(--gray-500)",s.Ov,(0,o.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1rem",fontWeight:500,lineHeight:1}),(0,r.xe)({px:"1rem"}),({isSelected:e})=>e&&(0,c.AH)(["background-color:","};border-color:",";color:",";"],({theme:e})=>e.subscription.table?.checkIconBgColor,({theme:e})=>e.subscription.table?.checkIconColor,({theme:e})=>e.subscription.table?.checkIconColor),({theme:e})=>e.subscription.table?.checkIconColor,({theme:e})=>e.subscription.table?.checkIconColor),d=c.Ay.svg.withConfig({componentId:"sc-20148592-1"})(["flex-shrink:0;width:18px;height:18px;.ring{fill:",";stroke:",";stroke-width:1.5;transition:fill 0.23s ease-in-out;}.check{stroke:var(--white);fill:none;}"],({theme:e,isSelected:t})=>t?e.subscription.table?.checkIconColor:"transparent",({theme:e,isSelected:t,isGP:i})=>t?e.subscription.table?.checkIconColor:i?e.subscription.table?.separatorColor:"var(--gray-500)")},22623:(e,t,i)=>{e.exports=i(58891)},82220:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>eY});var n=i(94513),r=i(94285),o=i(68599),c=i(68535),s=i(99717),a=i(39153),l=i(63588),d=i(94705),p=i(24241),u=i(23602),h=i(11730),g=i(35585),x=i(2640),m=i(50272),f=i(98466),b=i(76254),w=i(47357),j=i(71974),v=i(48907),y=i(912),k=i(3554),C=i(10574),I=i(54745),S=i(54020),A=i(60930),B=i(95532),P=i(998),F=i(26301);let N=h.Ay.button.withConfig({componentId:"sc-2e7f8dc1-0"})(["",";width:100%;cursor:pointer;border:none;background-color:transparent;display:flex;align-items:center;justify-content:space-between;",";"],(0,S.xe)({p:d.B.Spacing16}),(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1rem",fontWeight:700})),T=h.Ay.h3.withConfig({componentId:"sc-2e7f8dc1-1"})(["",";",";"],(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1.25rem",fontWeight:700}),(0,S.xe)({m:0})),E=h.Ay.div.withConfig({componentId:"sc-2e7f8dc1-2"})(["background-color:var(--bg-transparent-gray);background-color:",";border-top:",";border-bottom:1px solid ",";border-left:1px solid ",";border-right:1px solid ",";border-bottom-left-radius:",";border-bottom-right-radius:",";"],({theme:e})=>e.subscription.paywall?.dropdownBgColor,({theme:e})=>`2px solid ${e.subscription.paywall?.contentBorderColor}`,({theme:e})=>e.subscription.paywall?.dropdownBgColor,({theme:e})=>e.subscription.paywall?.dropdownBgColor,({theme:e})=>e.subscription.paywall?.dropdownBgColor,d.B.Spacing8,d.B.Spacing8),$=h.Ay.div.withConfig({componentId:"sc-2e7f8dc1-3"})(["",";p{",";}"],(0,S.xe)({pr:d.B.Spacing16,pl:d.B.Spacing16,pb:d.B.Spacing16}),(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1rem"})),z=({product:e})=>{let t=(0,r.useMemo)(()=>Object.values(B.brandShortNamesMap).filter(e=>"AU"!==e).map(B.getBrandFullName),[]),i=(0,o.PT)(),c="GP"===(0,o.UO)(),[s,a]=(0,r.useState)(!1);return(0,n.jsxs)(E,{children:[(0,n.jsxs)(N,{onClick:()=>a(e=>!e),children:[e.included?.cta,(0,n.jsx)(C.t,{href:s?"icon-chevron-up":"icon-chevron-down",className:"c-icon c-icon--24"})]}),s&&(0,n.jsxs)($,{children:[(0,n.jsx)(I.h,{value:d.B.Spacing8}),e.included?.items?.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T,{children:i.includedItemsTitle}),(0,n.jsx)(I.h,{value:d.B.Spacing16})]}):null,(0,n.jsx)(P.O_,{children:(e.included?.items??[]).map((e,t)=>(0,n.jsxs)(P.or,{"aria-disabled":"false","aria-label":`${e} ing\xe5r`,children:[(0,n.jsxs)(k.C,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,isSelected:!0,isGP:c,children:[(0,n.jsx)("circle",{className:"ring",cx:"12",cy:"12",r:"11"}),(0,n.jsx)("path",{className:"check",d:"M7 12.5L10.5 16L17 8.5",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)(F.d,{as:"span",html:e["text-html"]})]},t))}),(0,n.jsx)(I.h,{value:d.B.Spacing24}),e.included?.showAllNewsTitles&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T,{children:i.titlesIncludedTitle}),(0,n.jsx)(I.h,{value:d.B.Spacing16}),(0,n.jsx)("p",{children:t.map((e,i)=>t.length-1===i?(0,n.jsx)("span",{children:e},i):(0,n.jsx)("span",{children:e+", "},i))})]})]})]})};var W=i(99949);let _=function({isAppVersion:e}){return(0,n.jsx)(W.A,{headerText:"Kolla i din inkorg",icon:"mail",children:(0,n.jsxs)("p",{children:["Ditt k\xf6p har g\xe5tt igenom men inloggningen misslyckades. F\xf6r att logga in, f\xf6lj l\xe4nken i e-postmeddelandet âV\xe4lj nytt l\xf6senordâ som vi skickat till din angivna e-postadress.",e&&" N\xe4r du har valt l\xf6senord kan du logga in i appen."]})})},L=function({showReloginHelp:e=!1}){let t=(0,o.Pj)().cmsSettings.admin.webmaster.purchaseflow.common;return(0,n.jsxs)(W.A,{headerText:"N\xe5gonting gick fel",icon:"warning",children:[(0,n.jsxs)("p",{children:["Ditt k\xf6p har g\xe5tt igenom men vi kunde tyv\xe4rr inte ge dig tillg\xe5ng till din prenumeration. Vi ber om urs\xe4kt f\xf6r detta."," ",e?"Prova att logga ut och sen logga in p\xe5 nytt f\xf6r att f\xe5 tillg\xe5ng till din prenumeration. Om det fortsatt inte fungerar v\xe4nligen kontakta Kundservice.":"F\xf6r att f\xe5 tillg\xe5ng till din prenumeration, v\xe4nligen kontakta Kundservice."]}),(0,n.jsxs)("p",{children:["E-post ",(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:`mailto:${t.customerServiceMail}`,children:t.customerServiceMail})]}),(0,n.jsxs)("p",{children:["Telefon ",(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:`tel:${t.customerServicePhoneNumber}`,children:t.customerServicePhoneNumber})]}),(0,n.jsxs)("p",{children:["\xd6ppettider ",(0,n.jsx)("br",{}),"M\xe5ndag - fredag, kl. 8-15"]})]})},M=()=>{let e=(0,o.Pj)().cmsSettings.admin.webmaster.purchaseflow.common;return(0,n.jsxs)(W.A,{headerText:"N\xe5gonting gick fel",icon:"warning",children:[(0,n.jsx)("p",{children:"V\xe4nligen kontakta Kundservice."}),(0,n.jsxs)("p",{children:["E-post ",(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:`mailto:${e.customerServiceMail}`,children:e.customerServiceMail})]}),(0,n.jsxs)("p",{children:["Telefon ",(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:`tel:${e.customerServicePhoneNumber}`,children:e.customerServicePhoneNumber})]}),(0,n.jsxs)("p",{children:["\xd6ppettider ",(0,n.jsx)("br",{}),"M\xe5ndag - fredag, kl. 8-15"]})]})},O=h.Ay.div.withConfig({componentId:"sc-c657b428-0"})(["border:1px solid ",";padding:"," "," 0px;border-radius:8px;@media ","{padding:"," "," 0px;}"],({theme:e})=>e.subscription.paywall?.otherOptions,d.B.Spacing16,d.B.Spacing16,l.j.lg,d.B.Spacing20,d.B.Spacing20),G=({type:e,showReloginHelp:t})=>{let i="gp"===(0,o.Pj)().site;return(0,n.jsx)(O,{isGP:i,children:(()=>{switch(e){case"autoLoginFailed":return(0,n.jsx)(_,{});case"pollingRequestFailed":return(0,n.jsx)(L,{showReloginHelp:t});default:return(0,n.jsx)(M,{})}})()})};var K=i(48655),R=i(91664),V=i(41409),U=i(49043),H=i(81619),D=i(22623),q=i.n(D),J=i(56131),Q=i.n(J),Y=i(3197),X=i(55980),Z=i(50504);let ee=h.Ay.h1.withConfig({componentId:"sc-aa2cfcf9-0"})(["",";"],(0,A.I)({fontFamily:({isGP:e})=>e?"var(--font-family-slab)":"var(--font-family-sans-serif)"})),et=(0,h.Ay)(a.BJ).withConfig({componentId:"sc-aa2cfcf9-1"})(["",";border-bottom:0px;"],(0,S.xe)({pb:d.B.Spacing12})),ei=h.Ay.div.withConfig({componentId:"sc-aa2cfcf9-2"})(["border:",";",";border-top-left-radius:",";border-top-right-radius:",";border-bottom:0px;@media ","{padding:",";}"],({theme:e})=>`1px solid ${e.subscription.paywall?.contentBorderColor}`,(0,S.xe)({px:d.B.Spacing4,py:d.B.Spacing20}),d.B.Spacing8,d.B.Spacing8,l.j.md,d.B.Spacing20),en=h.Ay.span.withConfig({componentId:"sc-aa2cfcf9-3"})(["",";"],(0,A.I)({fontFamily:"var(--font-family-sans-serif)"})),er=h.Ay.h2.withConfig({componentId:"sc-aa2cfcf9-4"})(["text-align:center;",";",";"],(0,A.I)({fontFamily:({isGP:e})=>e?"var(--font-family-slab)":"var(--font-family-sans-serif)",fontSize:"2.25rem",fontWeight:700}),(0,S.xe)({m:0})),eo=h.Ay.div.withConfig({componentId:"sc-aa2cfcf9-5"})(["display:flex;flex-direction:column;align-items:center;h1{text-align:center;",";",";}p{",";",";}"],(0,A.I)({fontSize:"1.75rem",fontWeight:500}),(0,S.xe)({m:0}),(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"1rem",fontWeight:400}),(0,S.xe)({m:0})),ec=h.Ay.div.withConfig({componentId:"sc-aa2cfcf9-6"})(["display:flex;gap:8px;img{height:revert-layer;background-color:var(--corp-color-darken);&:nth-child(2){background-color:var(--blue-800);}}"]),es=h.Ay.div.withConfig({componentId:"sc-aa2cfcf9-7"})(["display:flex;flex-direction:column;align-items:center;"]),ea=h.Ay.div.withConfig({componentId:"sc-aa2cfcf9-8"})(["display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:4px;text-align:center;p{display:inline;margin:0;}"]),el=({product:e,session:t,setErrorCode:i,handlePurchaseComplete:c,setIncompletionState:s})=>{let[a,l]=(0,r.useState)(!1),p=(0,o.UO)(),u="GP"===p,h=e.showLocalSiteIcon??void 0===e.showLocalSiteIcon,g=(0,r.useCallback)(()=>l(!1),[]),x=(0,r.useMemo)(()=>t?.activeProducts??[],[t?.activeProducts]),b=(0,r.useCallback)((e,t={})=>i({code:e,ctx:t}),[i]),{data:j,isValidating:v}=(0,Y.Ay)(e.productId+a,()=>a?y({productId:e.productId}):null,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}),y=async({productId:e})=>{try{let t=await fetch(`/api/purchase/product?product_id=${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}});if(!t.ok){let e=await t.json();throw new(q())(e.message||{statusCode:404,title:"Failed to initialize checkout"})}let[i]=await t.json();return i}catch(t){w.vF.warn({error:t,productId:e},"Could not fetch product for tracking in paywall"),i({code:"product_not_found"}),l(!1)}};return(0,r.useEffect)(()=>{a&&j&&(0,m.KA)("beginCheckout",{product:j,source:"blikundartikel",sourceCode:(0,f.dA)()?.articleInfo?.id??""})},[a,j]),(0,n.jsxs)("div",{children:[(0,n.jsxs)(ei,{children:[(0,n.jsxs)(et,{spacing:d.B.Spacing20,flexProps:{alignItems:"center"},children:[(0,n.jsxs)(eo,{children:[(0,n.jsxs)(ec,{children:[h?(0,n.jsx)(Q(),{src:`/images/${p.toLowerCase()}/logo/shortname-logo.svg`,alt:`${p}'s logotype`,width:30,height:30}):null,e.icon&&(0,n.jsx)(Q(),{src:`/images/${e.icon.toLowerCase()}/logo/shortname-logo.svg`,alt:`${e.icon}'s logotype`,width:30,height:30})]}),(0,n.jsx)(I.h,{value:d.B.Spacing16}),(0,n.jsx)(ee,{isGP:u,children:e.title}),e.extraInfo&&(0,n.jsx)("p",{children:e.extraInfo})]}),(0,n.jsx)(er,{isGP:u,children:e.uspText}),a&&j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.default,{productId:e.productId,ssoAccountId:t?.ssoAccountId??"",checkoutUser:{email:t?.email??void 0,phoneNumber:t?.phoneNumber??void 0},sourceData:(0,f.uB)(e.productId),activeProducts:x,setPurchaseError:b,setIncompletionState:s,cancelCheckout:g,setPurchaseComplete:()=>c(j),selectedProduct:j}),(0,n.jsx)(X.q,{type:"paywall"})]}):(0,n.jsx)(K.$n,{size:"large",variant:u?"GP":"promo",isLoading:v,onClick:()=>l(!0),"data-testid":"paywall-purchase-button",children:e.cta})]}),(0,n.jsx)(es,{children:(0,n.jsxs)(ea,{children:[(0,n.jsx)(F.d,{as:en,html:e["priceInfoText-html"]}),(0,n.jsx)(en,{children:e.subscriptionInfo})]})})]}),(0,n.jsx)(z,{product:e})]})},ed=(0,h.Ay)(a.BJ).withConfig({componentId:"sc-2c7eb502-0"})(["div{height:24px;}"]),ep=h.Ay.div.withConfig({componentId:"sc-2c7eb502-1"})(["display:flex;flex-direction:column;align-items:center;"]),eu=(0,h.Ay)(K.$n).withConfig({componentId:"sc-2c7eb502-2"})(["color:",";",";",";svg{fill:",";}"],({theme:e})=>e.subscription.paywall?.otherOptions,(0,S.xe)({p:d.B.Spacing16}),(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"18px",fontWeight:600}),({theme:e})=>e.subscription.paywall?.otherOptions),eh=h.Ay.p.withConfig({componentId:"sc-2c7eb502-3"})(["margin:0;",";",";"],(0,A.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"16px"}),({weight:e})=>e&&(0,A.I)({fontWeight:e})),eg=(0,h.AH)(["display:inline;text-decoration:underline;color:var(--link-blue);"]),ex=h.Ay.a.withConfig({componentId:"sc-2c7eb502-4"})(["",""],eg),em=({session:e,setErrorCode:t,handlePurchaseComplete:i,setIncompletionState:c})=>{let s=(0,o.PT)(),[a]=(0,u.DB)(),l=(0,V.pv)(),[p,h]=(0,r.useState)(!1),g=(0,U.useRouter)().asPath,[x,m]=(0,r.useState)([]),[f,b]=(0,r.useState)();return(0,r.useEffect)(()=>{let e=(s.items||[]).filter(e=>e.active);if(!e.length)return;let t=e[0];b(t),m(e.filter(e=>e.productId!==t.productId))},[s]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ep,{children:[(0,n.jsxs)(ed,{direction:"row",spacing:d.B.Spacing8,children:[(0,n.jsx)(R.s,{iconType:"icon-lock"}),(0,n.jsx)(eh,{weight:700,children:s.lockedArticleInfo})]}),"unknown"===l&&!a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I.h,{value:d.B.Spacing8}),(0,n.jsxs)(eh,{children:[s?.link?.text," ",(0,n.jsx)("span",{children:(0,n.jsx)(ex,{href:(0,H.aM)(H.Y0.LOGIN,g),children:s?.link?.targetText})})]})]})]}),f&&(0,n.jsx)(el,{product:f,session:e,setErrorCode:t,handlePurchaseComplete:i,setIncompletionState:c}),x.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eu,{onClick:()=>h(!p),children:(0,n.jsxs)(ed,{direction:"row",spacing:d.B.Spacing8,children:[s.showMoreProductsCta,(0,n.jsx)(C.t,{href:p?"icon-chevron-up":"icon-chevron-down",className:"c-icon c-icon--24"})]})}),p&&x.map((r,o)=>(0,n.jsx)(el,{product:r,session:e,setErrorCode:t,handlePurchaseComplete:i,setIncompletionState:c},o))]})]})};var ef=i(59785),eb=i(46718),ew=i(35189);let ej=h.Ay.p.withConfig({componentId:"sc-14e16a0f-0"})(["max-width:428px;text-align:center;margin-bottom:0;"]),ev=(0,h.Ay)(a.BJ).withConfig({componentId:"sc-14e16a0f-1"})(["align-items:center;img{max-width:85px;}p{text-align:center;}"]),ey=h.Ay.div.withConfig({componentId:"sc-14e16a0f-2"})(["border:1px solid ",";padding:"," ",";border-top-left-radius:8px;border-top-right-radius:8px;border-bottom-left-radius:","px;border-bottom-right-radius:","px;border-bottom-width:","px;@media ","{padding:"," ",";}"],({theme:e})=>e.subscription.paywall?.contentBorderColor,d.B.Spacing16,d.B.Spacing16,e=>8*("success"!==e.state),e=>8*("success"!==e.state),e=>+("success"!==e.state),l.j.lg,d.B.Spacing20,d.B.Spacing20),ek=({productCmsSettings:e,state:t})=>{let{refreshSession:i,session:r}=(0,u.wV)(),o=(0,j.lV)(r)?r:void 0;return(0,n.jsx)(ey,{state:t,children:o?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(ev,{spacing:{mobile:d.B.Spacing8,tablet:d.B.Spacing24},children:[(0,n.jsx)(C.t,{href:"icon-success-check-mark",className:"c-icon c-icon--32"}),(0,n.jsx)(P.hE,{children:"Klart!"}),e?.successCopy?(0,n.jsx)(F.d,{as:"p",html:e.successCopy}):(0,n.jsx)(ej,{children:"Nu har du tillg\xe5ng till alla artiklar. En bekr\xe4ftelse p\xe5 ditt k\xf6p skickas strax till din e-postadress."}),(0,n.jsx)(K.$n,{size:"large",variant:"promo",onClick:async()=>{await i(),(0,m.KA)("purchaseCompletedFromPaywall")},children:(0,ew.u)("link","to_article")})]})}):(0,n.jsx)(ef.A,{fromPaywall:!0,checkoutId:(0,eb.Q)()})})},eC=({type:e})=>{switch(e){case b.Ak:case b.Fn:return(0,n.jsx)(y.c,{restricted:!0});case b.NE:case b.Fr:default:return(0,n.jsx)(v.W,{restricted:!0})}},eI=(0,h.Ay)(a.BJ).withConfig({componentId:"sc-8c6436cf-0"})(["background:white;padding:0;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom-left-radius:"
1,"px;border-bottom-right-radius:","px;border-bottom-width:","px;max-width:610px;margin:0 auto;@media ","{padding:"," "," 0px;}"],e=>8*("success"!==e.currentState.value),e=>8*("success"!==e.currentState.value),e=>+("success"!==e.currentState.value),l.j.lg,d.B.Spacing20,d.B.Spacing20),eS=h.Ay.div.withConfig({componentId:"sc-8c6436cf-1"})(["margin-bottom:",";@media ","{width:var(--article-with-sidebar-width);}"],e=>"success"===e.currentState.value?0:d.B.Spacing32,l.j.lg),eA=h.Ay.div.withConfig({componentId:"sc-8c6436cf-2"})(["max-width:610px;margin:0 auto;@media ","{padding:0 ",";}"],l.j.lg,d.B.Spacing20),eB=()=>{let[e,t]=(0,r.useState)({value:"",errorType:""}),[i,c]=(0,r.useState)(),{session:s}=(0,u.wV)(),a=(0,j.lV)(s)?s:void 0,[l,h]=(0,r.useState)(),b=(0,p.Qt)(),v=(0,o.PT)(),y=(0,r.useCallback)(async e=>{try{if(!e)throw Error("Missing product on handlePurchaseComplete");let i=window.location.pathname.split("/").slice(0,-1).filter(Boolean).join("/");(0,m.KA)("purchasedProduct",{product:e,cuid:a?.subscriptionAccountId??"",accountId:a?.ssoAccountId??"",source:"blikundartikel",sourceCode:(0,f.dA)()?.articleInfo?.id??"",articleUrl:window.location.href,articleSection:i}),(0,m.KA)("addToCart");let n=(v.items??[]).find(t=>t.productId===e.code);n&&c(n),t(e=>({...e,value:"success"}))}catch(e){w.vF.warn({error:e},"Could not fetch product for tracking in paywall. Use fallback product")}},[a,v.items,c]),k=(0,r.useCallback)(e=>{t({value:"error",errorType:e})},[]),C=(0,r.useCallback)(t=>{switch(t){case"error":return(0,n.jsx)(G,{type:e.errorType,showReloginHelp:!!a});case"success":return(0,n.jsx)(ek,{productCmsSettings:i,state:e.value});default:return(0,n.jsx)(em,{session:a,setErrorCode:h,handlePurchaseComplete:y,setIncompletionState:k})}},[e.errorType,i,a,h,y,k,e.value]);return b?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.x,{error:l,consumeError:()=>h(void 0)}
1),(0,n.jsx)(eC,{type:b.type}),(0,n.jsx)(eS,{className:"c-premium-lockscreen__subscribe",currentState:e,children:(0,n.jsx)(eI,{currentState:e,spacing:d.B.Spacing24,children:C(e.value)})}),"success"===e.value&&i&&(0,n.jsx)(eS,{currentState:e,children:(0,n.jsx)(eA,{children:(0,n.jsx)(z,{product:i})})}),(0,n.jsx)(g.s,{direction:"up"})]}):null};var eP=i(43143),eF=i.n(eP),eN=i(46001),eT=i(47679),eE=i(8665);let e$=h.Ay.div.withConfig({componentId:"sc-5f4e2c87-0"})(["border:1px solid var(--accent-green-400);border-top-width:3px;background-color:var(--white);",";.js-show-noaccess,.js-show-safari-noaccess{display:none;}iframe{background-color:var(--white);}",""],(0,S.xe)({mb:"20px"}),(0,A.I)({fontFamily:"var(--font-family-sans-serif)"})),ez=h.Ay.div.withConfig({componentId:"sc-5f4e2c87-1"})(["",";background-color:var(--accent-green-300);.c-alert--error{",";@media ","{",";max-width:400px;}}"],(0,A.I)({textAlign:"center"}),(0,S.xe)({m:"15px"}),l.j.sm,(0,S.xe)({m:"15px auto"})),eW=h.Ay.div.withConfig({componentId:"sc-5f4e2c87-2"})(["display:flex;flex-direction:column;align-items:center;",";",";@media ","{",";",";}> span{",";}"],(0,A.I)({fontSize:"1rem",lineHeight:"1.3"}),(0,S.xe)({px:0,pb:"20px",mb:0}),l.j.md,(0,A.I)({fontSize:"1.063"}),(0,S.xe)({pb:3,mx:"auto"}),(0,A.I)({fontWeight:500})),e_=(0,h.Ay)(F.d).withConfig({componentId:"sc-5f4e2c87-3"})(["&&{text-decoration:initial;color:var(--gray-800);&:hover{cursor:default;}}&& ul{",";border:1px solid var(--accent-green-400);",";",";max-width:320px;list-style-type:square;}&& li{position:relative;line-height:1.125rem;display:block;&:before{display:none;}&:not(:last-child){",";}span{",";}}"],eE.s,(0,S.xe)({pr:"20px",pl:3,py:2,mx:"auto",mt:3}),(0,A.I)({textAlign:"left",fontWeight:500}),(0,S.xe)({mb:"10px",pb:0}),(0,A.I)({fontWeight:"bold"})),eL=h.Ay.div.withConfig({componentId:"sc-5f4e2c87-4"})(["",";display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:var(--white);"],(0,S.xe)({p:"20px",px:3})),eM=h.Ay.div.withConfig({componentId:"sc-5f4e2c87-5"})(["display:flex;flex-direction:column;background-color:var(--white);max-width:",";min-width:280px;width:100%;",";h2{",";line-break:'strict';}h3{",";line-break:'strict';}"],e=>e.$maxWidth||"320px",(0,S.xe)({pb:2,mt:3}),(0,A.I)({textAlign:"center",fontSize:"2.375rem",lineHeight:"2.5rem"}),(0,A.I)({textAlign:"center",fontSize:"2rem",lineHeight:"2.2rem"})),eO={Lockscreen:e$,Subscribe:ez,SubscribeText:eW,IncludedList:e_,FormContainer:eL,PaywallFooter:h.Ay.div.withConfig({componentId:"sc-5f4e2c87-6"})(["",";display:flex;flex-direction:column;align-items:center;justify-content:center;p{","}"],(0,S.xe)({py:2,px:3}),(0,S.xe)({mb:"20px"})),PaywallContainer:eM},eG=(0,h.Ay)(eO.Lockscreen).withConfig({componentId:"sc-12a837fc-0"})(["border-color:var(--pink-500);"]),eK=(0,h.Ay)(eO.Subscribe).withConfig({componentId:"sc-12a837fc-1"})(["background-color:var(--pink-500);"]),eR=({children:e})=>(0,n.jsx)(eG,{"data-testid":"paywall_campaign_restriction-lock-screen",children:(0,n.jsx)(eK,{className:"c-premium-lockscreen__subscribe",children:e})}),eV=h.Ay.button.withConfig({componentId:"sc-7883f181-0"})(["background:none;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit;clear:both;text-decoration:underline;text-decoration-color:var(--green-700);color:var(--green-700);"," ",";&:hover{cursor:pointer;text-decoration-color:var(--green-800);color:var(--green-800);}&:focus{box-shadow:0 0 0 3px var(--gray-300);outline:0;}"],(0,S.xe)({mt:2}),(0,A.I)({fontWeight:700})),eU=({dropdown:e,setDropdown:t,offer:i})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(eV,{onClick:()=>t(e=>!e),children:[(0,n.jsx)("span",{children:"Visa allt som ing\xe5r"}),(0,n.jsx)(C.t,{href:e?"icon-chevron-up":"icon-chevron-down",className:"c-icon c-icon--24","aria-hidden":"true",viewBox:"0 0 24 24"})]}),e&&(0,n.jsx)(eO.IncludedList,{html:i})]}),eH=eF()(()=>Promise.resolve().then(i.bind(i,50504)),{loadableGenerated:{webpack:()=>[50504]},ssr:!1}),eD=({type:e})=>{switch(e){case b.Ak:case b.Fn:return(0,n.jsx)(y.c,{restricted:!0});case b.NE:case b.Fr:default:return(0,n.jsx)(v.W,{restricted:!0})}},eq=h.Ay.p.withConfig({componentId:"sc-5dc0d669-0"})(["",";"],(0,A.I)({textAlign:"center",fontSize:"1rem",fontWeight:700,fontFamily:"var(--font-family-sans-serif)"})),eJ=h.Ay.div.withConfig({componentId:"sc-5dc0d669-1"})(["border-width:10px 1px 1px 1px;@media ","{width:var(--article-with-sidebar-width);}"],l.j.lg),eQ=()=>{let{header:e="",description:t="",offer:i,productId:c="",premiumArticleTopText:s,buyButtonText:l}=(0,o.nm)(),[h,b]=(0,r.useState)(!1),v=(0,o.UO)(),{session:y}=(0,u.wV)(),{settings:k}=(0,o.lv)(),[C,I]=(0,r.useState)({isSuccess:!1,url:""}),{query:S}=(0,U.useRouter)(),[A,B]=(0,r.useState)(),F=(0,p.Qt)(),N=(0,j.lV)(y)?y:void 0,[T,E]=(0,r.useState)(!1),$=(0,r.useCallback)((e,t={})=>B({code:e,ctx:t}),[]),[z,M]=(0,r.useState)(),O=[T?void 0:"purchaseButton",T?"newCheckout":void 0].find(Boolean)??"purchaseButton",G=(0,r.useMemo)(()=>N?.activeProducts??[],[N?.activeProducts]);(0,r.useEffect)(function(){let{returnUrl:e,returnurl:t}=(0,eT.iU)(S),i=(0,eT.Jg)(t??e??"",window.location.origin).toString();I(e=>({...e,url:i}))},[S]);let R=k.isActive&&k?.campaignRestrictionProductId?k.campaignRestrictionProductId:c,V=(0,r.useMemo)(()=>({code:R,name:e,accesses:{},description:t,discount:null,isCampaign:!1,priceAfterCampaignOrCoupon:null,vatCode:0,rate:{id:"unknown",price:0}
1,type:"digital",shortDescription:"",titleCode:v}),[v,t,e,R]),{data:H}=(0,Y.Ay)(R+T,()=>T?D({productId:R,fallbackProduct:V}):null,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1});(0,r.useEffect)(()=>{T&&H&&"newCheckout"===O&&(0,m.KA)("beginCheckout",{product:H,source:"blikundartikel",sourceCode:(0,f.dA)()?.articleInfo?.id??""})},[T,H,O]);let D=async({productId:e,fallbackProduct:t})=>{try{let t=await fetch(`/api/purchase/product?product_id=${e}`,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}});if(!t.ok)throw Error("Could not fetch product");let[i]=await t.json();return i}catch(i){return w.vF.warn({error:i,productId:e},"Could not fetch product for tracking in paywall. Use fallback product"),t}},q=(0,r.useCallback)(()=>B(void 0),[]),J=async e=>{H||w.vF.warn("Missing product on handlePurchaseComplete");let t=window.location.pathname.split("/").slice(0,-1).filter(Boolean).join("/");(0,m.KA)("purchasedProduct",{product:H??V,cuid:N?.subscriptionAccountId??"",accountId:N?.ssoAccountId??"",orderId:e,source:"blikundartikel",sourceCode:(0,f.dA)()?.articleInfo?.id??"",articleUrl:window.location.href,articleSection:t}),(0,m.KA)("addToCart"),B(void 0),I(e=>({...e,isSuccess:!0})),(0,eN.dG)()},Q=(0,r.useCallback)(()=>E(!1),[]);return F?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eD,{type:F.type}),(0,n.jsxs)(eJ,{className:"c-premium-lockscreen__subscribe","data-testid":"paywall-karens",children:[(0,n.jsx)(a.BJ,{spacing:d.B.Spacing24,children:(0,n.jsxs)(eR,{children:[(0,n.jsx)(eO.FormContainer,{children:(0,n.jsxs)(eO.PaywallContainer,{$maxWidth:"480px",children:[!C.isSuccess&&!z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eq,{children:k.topText??s}),(0,n.jsx)("h3",{children:`${k.title} ${k.price}`}),(0,n.jsx)("span",{children:k.description}),(0,n.jsx)(eO.SubscribeText,{children:(0,n.jsx)(eU,{dropdown:h,setDropdown:b,offer:i})}),(e=>{let t=k.cta?k.cta:l||"K\xf6p";return"purchaseButton"===e?(0,n.jsx)(P.Rq,{children:(0,n.jsx)(K.$n,{size:"large",variant:"promo",onClick:()=>E(!0),"data-testid":"paywall-purchase-button",children:t})}):"newCheckout"===e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eH,{productId:R,ssoAccountId:N?.ssoAccountId??"",checkoutUser:{email:N?.email??void 0,phoneNumber:N?.phoneNumber??void 0},sourceData:(0,f.uB)(R),activeProducts:G,setPurchaseError:$,setIncompletionState:M,cancelCheckout:Q,setPurchaseComplete:J,selectedProduct:H}),(0,n.jsx)(X.q,{})]}):void 0})(O)]}),!C.isSuccess&&"autoLoginFailed"===z&&(0,n.jsx)(_,{}),!C.isSuccess&&"pollingRequestFailed"===z&&(0,n.jsx)(L,{}),C.isSuccess&&(0,n.jsx)(W.A,{singleColumn:!0,headerText:"",children:(0,n.jsx)(ef.A,{fromPaywall:!0,checkoutId:(0,eb.Q)()})})]})}),(0,n.jsx)(eO.PaywallFooter,{})]})}),(0,n.jsx)(x.x,{error:A,consumeError:q})]}),(0,n.jsx)(g.s,{direction:"up"})]}):null},eY=()=>{let{settings:e}=(0,o.lv)(),[t,i]=(0,r.useState)(void 0),a=(0,r.useCallback)(()=>{i((0,c.F)(e.isActive))},[e.isActive]);if((0,r.useEffect)(()=>(a(),()=>i(void 0)),[a]),t)return t===s.E9.VERSION_A?(0,n.jsx)(eB,{}):(0,n.jsx)(eQ,{})}}}]);
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.