PageSourceSearch

https://www.meillakotona.fi/_next/static/chunks/5750-1be4c28e985c9a93.js

js meillakotona.fi collected 2026-10-01 12:05:09 UTC 507,414 bytes, 1,301 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5750],{2696:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(95155),o=n(14562),a=n(12115),r=n(8395);let s={Container:r.Ay.div.withConfig({componentId:"sc-f426efec-0"})(["position:fixed;top:20px;left:20px;font-size:10px;color:black;background-color:rgba(255,255,255,0.95);padding:10px;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,0.5);z-index:9999;max-height:90vh;overflow-y:auto;font-family:monospace;"]),Title:r.Ay.div.withConfig({componentId:"sc-f426efec-1"})(["font-weight:bold;margin-bottom:8px;font-size:11px;"]),Line:r.Ay.div.withConfig({componentId:"sc-f426efec-2"})(["margin:2px 0;"])},l=({slug:e})=>{let[t,n]=(0,a.useState)(!1),r=(0,o.A)(e=>e.getGestureMetrics),[l,c]=(0,a.useState)(null);return((0,a.useEffect)(()=>{n("1"===new URLSearchParams(window.location.search).get("debug_gestures"))},[]),(0,a.useEffect)(()=>{if(!t)return;let n=setInterval(()=>{c(r(e))},100);return()=>clearInterval(n)},[t,e,r]),t&&l)?(0,i.jsxs)(s.Container,{children:[(0,i.jsx)(s.Title,{children:"Touch Gesture Debug"}),(0,i.jsxs)(s.Line,{children:["VP W: ",l.window_inner_width_px,"px H: ",l.window_inner_height_px,"px"]}),(0,i.jsxs)(s.Line,{children:["Pinch Events: ",l.pinch_events]}),(0,i.jsxs)(s.Line,{children:["Tap Events: ",l.tap_events]}),(0,i.jsxs)(s.Line,{children:["Vertical Swipes: ",l.vertical_swipes]}),(0,i.jsxs)(s.Line,{children:["Horizontal Swipes: ",l.horizontal_swipes]}),(0,i.jsxs)(s.Line,{children:["ScrollOnScroll Y: ",l.scroll_on_scroll_y]}),(0,i.jsxs)(s.Line,{children:["Left Hand Vertical Swipes: ",l.left_hand_vertical_swipes]}),(0,i.jsxs)(s.Line,{children:["Right Hand Vertical Swipes: ",l.right_hand_vertical_swipes]}),(0,i.jsxs)(s.Line,{children:["Average Pinch Duration: ",l.average_pinch_duration_ms?.toFixed(2)??0,"ms"]}),(0,i.jsxs)(s.Line,{children:["Average Tap Duration: ",l.average_tap_duration_ms?.toFixed(2)??0,"ms"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe Duration: ",l.average_vertical_swipe_duration_ms?.toFixed(2)??0,"ms"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe Duration: ",l.average_horizontal_swipe_duration_ms?.toFixed(2)??0,"ms"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe X Travel: ",l.average_vertical_swipe_x_travel_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe Y Travel: ",l.average_vertical_swipe_y_travel_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe X Travel: ",l.average_horizontal_swipe_x_travel_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe Y Travel: ",l.average_horizontal_swipe_y_travel_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe X Start: ",l.average_vertical_swipe_x_start_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe Y Start: ",l.average_vertical_swipe_y_start_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe X End: ",l.average_vertical_swipe_x_end_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Vertical Swipe Y End: ",l.average_vertical_swipe_y_end_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe X Start: ",l.average_horizontal_swipe_x_start_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe Y Start: ",l.average_horizontal_swipe_y_start_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe X End: ",l.average_horizontal_swipe_x_end_px?.toFixed(2)??0,"px"]}),(0,i.jsxs)(s.Line,{children:["Average Horizontal Swipe Y End: ",l.average_horizontal_swipe_y_end_px?.toFixed(2)??0,"px"]})]}):null},c=({children:e,slug:t})=>{let n=(0,a.useRef)(null),r=(0,a.useRef)(null),s=(0,a.useRef)(null),c=(0,a.useRef)(null),d=(0,a.useRef)(!1),u=(0,a.useRef)(null),m=(0,a.useRef)(!1),p=(0,a.useRef)(0),g=(0,a.useRef)(0),h=(0,a.useRef)(0),x=(0,a.useRef)(0),f=(0,a.useRef)(!1),y=(0,o.A)(e=>e.initializeGestureTracking),v=(0,o.A)(e=>e.recordTapEvent),b=(0,o.A)(e=>e.recordPinchEvent),C=(0,o.A)(e=>e.recordSwipeEvent),A=(0,o.A)(e=>e.recordScrollOnScrollY);return(0,a.useEffect)(()=>
1{if(y(t),!("ontouchstart"in window||(navigator?.maxTouchPoints??0)>0))return;let e=n.current;if(!e)return;g.current=Date.now(),p.current=window.scrollY;let i=()=>{d.current=!0;let e=Date.now(),n=window.scrollY,i=e-g.current;if(i>0){let o=Math.abs(n-p.current)/i,a=o-h.current;!m.current&&!f.current&&e-x.current>500&&a>.4&&(A(t),x.current=e),h.current=o}p.current=n,g.current=e,u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{d.current=!1},150)},o=e=>{if(r.current&&s.current){let e=Date.now()-r.current.time;(!r.current.touches||1===r.current.touches.length)&&(Math.hypot(s.current.x-r.current.x,s.current.y-r.current.y)>=10||e>=300)&&(C(t,r.current.x,r.current.y,s.current.x,s.current.y,e),f.current=!0,setTimeout(()=>{f.current=!1},200))}if(1===e.touches.length){let t=e.touches[0];r.current={x:t.clientX,y:t.clientY,time:Date.now(),touches:e.touches},s.current=null,m.current=!0,h.current=0}else if(2===e.touches.length){let t=e.touches[0],n=e.touches[1];c.current=Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY),r.current={x:(t.clientX+n.clientX)/2,y:(t.clientY+n.clientY)/2,time:Date.now(),touches:e.touches},s.current=null}},a=e=>{if(1===e.touches.length){let t=e.touches[0];s.current={x:t.clientX,y:t.clientY}}if(2===e.touches.length&&null!==c.current){let t=e.touches[0],n=e.touches[1];if(10>Math.abs(Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY)-c.current))return}},l=e=>{if(!r.current)return;let n=e.changedTouches[0],i=Date.now()-r.current.time;if(r.current.touches&&2===r.current.touches.length){null!==c.current&&b(t,i),c.current=null,r.current=null;return}let o=Math.hypot(n.clientX-r.current.x,n.clientY-r.current.y);i<300&&o<10?v(t,i):(o>=10||i>=300)&&(C(t,r.current.x,r.current.y,n.clientX,n.clientY,i),f.current=!0,setTimeout(()=>{f.current=!1},200)),r.current=null,s.current=null,m.current=!1},k=()=>{if(r.current&&s.current){let e=Date.now()-r.current.time;if(!r.current.touches||1===r.current.touches.length){let n=Math.hypot(s.current.x-r.current.x,s.current.y-r.current.y);e<300&&n<10?v(t,e):(n>=10||e>=300)&&(C(t,r.current.x,r.current.y,s.current.x,s.current.y,e),f.current=!0,setTimeout(()=>{f.current=!1},200))}}r.current=null,s.current=null,c.current=null,m.current=!1};return e.addEventListener("touchstart",o,{passive:!1}),e.addEventListener("touchmove",a,{passive:!1}),e.addEventListener("touchend",l,{passive:!1}),e.addEventListener("touchcancel",k,{passive:!1}),window.addEventListener("scroll",i,{passive:!0}),()=>{e.removeEventListener("touchstart",o),e.removeEventListener("touchmove",a),e.removeEventListener("touchend",l),e.removeEventListener("touchcancel",k),window.removeEventListener("scroll",i),u.current&&clearTimeout(u.current)}},[t,y,v,b,C,A]),(0,i.jsxs)("div",{ref:n,children:[e,(0,i.jsx)(l,{slug:t})]})}},5135:e=>{e.exports={portal:"MemoryGamesPortal_portal__rpRc0",header:"MemoryGamesPortal_header__VS2z7",lead:"MemoryGamesPortal_lead__b2JDv",table:"MemoryGamesPortal_table__d3DaK",photo:"MemoryGamesPortal_photo__YsImN",todayBadge:"MemoryGamesPortal_todayBadge__0DbEP",caption:"MemoryGamesPortal_caption__BVmcX",name:"MemoryGamesPortal_name__CGpns",category:"MemoryGamesPortal_category__9tT5N",credit:"MemoryGamesPortal_credit__C_qIQ",creditLink:"MemoryGamesPortal_creditLink__F1Vdi",creditLogo:"MemoryGamesPortal_creditLogo__eJYuH"}},5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return i.workAsyncStorageInstance}});let i=n(17828)},10524:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(95155),o=n(12115),a=n(8395),r=n(32463),s=n(70195),l=n(21084);n(15423);var c=n(86816);function d(e){let{content:t}=(0,o.useContext)(l.A),{language:n}=(0,c.B)();return(e?.article&&(t=e.article),t&&"no-cover"===t.coverType&&t.publishedAt)?(0,i.jsx)(s.A,{children:(0,i.jsxs)(u.Component,{children:[(0,i.jsx)("time",{dateTime:t.publishedAt,children:(0,r.Yq)(t.publishedAt,n)}),t.editedAt&&(0,r.Lh)(t.publishedAt,t.editedAt)?(0,i.jsxs)(i.Fragment,{children:[" | P\xe4ivitetty ",(0,i.jsx)("time",{dateTime:t.editedAt,children:(0,r.Yq)(t.editedAt,n)}),t.brand?" |":""]}):null,t.brand&&(0,i.jsxs)(u.Brand,{children:[" ",t.brand.name]})]})}):null}d.canLazyLoad=!1;let u={Component:a.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-dd97317d-0"})(["text-align:center;"]),Brand:a.Ay.span.withConfig({componentId:"sc-dd97317d-1"})(["font-weight:var(--bold-font-weight-for-body-xs);"])}}
1,12174:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i=[{countryCode:"AFG",countryName:"Afganistan",countryNameEng:"AFGHANISTAN"},{countryCode:"NLD",countryName:"Alankomaat",countryNameEng:"NETHERLANDS"},{countryCode:"ANT",countryName:"Alankomaiden Antillit",countryNameEng:"NETHERLAND ANTILLIES"},{countryCode:"ALB",countryName:"Albania",countryNameEng:"ALBANIA"},{countryCode:"DZA",countryName:"Algeria",countryNameEng:"ALGERIA"},{countryCode:"ASM",countryName:"Amerikan Samoa",countryNameEng:"SAMOA"},{countryCode:"AND",countryName:"Andorra",countryNameEng:"ANDORRA"},{countryCode:"AGO",countryName:"Angola",countryNameEng:"ANGOLA"},{countryCode:"AIA",countryName:"Anguilla",countryNameEng:"ANGUILLA"},{countryCode:"ATG",countryName:"Antigua ja Barbuda",countryNameEng:"ANTIGUA AND BARBUDA"},{countryCode:"ARE",countryName:"Arabiemiirikunnat",countryNameEng:"UNITED ARAB EMIRATES"},{countryCode:"ARG",countryName:"Argentiina",countryNameEng:"ARGENTINA"},{countryCode:"ARM",countryName:"Armenia",countryNameEng:"ARMENIA"},{countryCode:"ABW",countryName:"Aruba",countryNameEng:"ARUBA"},{countryCode:"ASC",countryName:"Ascension",countryNameEng:"ASCENSION ISLAND"},{countryCode:"AUS",countryName:"Australia",countryNameEng:"AUSTRALIA"},{countryCode:"AZE",countryName:"Azerbaidžan",countryNameEng:"AZERBAIDJAN"},{countryCode:"AZO",countryName:"Azorit",countryNameEng:"AZORES ISLANDS"},{countryCode:"BHS",countryName:"Bahama",countryNameEng:"BAHAMAS"},{countryCode:"BHR",countryName:"Bahrain",countryNameEng:"BAHRAIN"},{countryCode:"BGD",countryName:"Bangladesh",countryNameEng:"BANGLADESH"},{countryCode:"BRB",countryName:"Barbados",countryNameEng:"BARBADOS"},{countryCode:"BEL",countryName:"Belgia",countryNameEng:"BELGIUM"},{countryCode:"BLZ",countryName:"Belize",countryNameEng:"BELIZE"},{countryCode:"BEN",countryName:"Benin",countryNameEng:"BENIN"},{countryCode:"BMU",countryName:"Bermuda",countryNameEng:"BERMUDA"},{countryCode:"BTN",countryName:"Bhutan",countryNameEng:"BHUTAN"},{countryCode:"BOL",countryName:"Bolivia",countryNameEng:"BOLIVIA"},{countryCode:"BOP",countryName:"Bophuthatswana",countryNameEng:"BOPHUTHATSWANA"},{countryCode:"BIH",countryName:"Bosnia ja Hertsegovina",countryNameEng:"BOSNIA & HERZEGOVINA"},{countryCode:"BWA",countryName:"Botswana",countryNameEng:"BOTSWANA"},{countryCode:"BRA",countryName:"Brasilia",countryNameEng:"BRAZIL"},{countryCode:"BVI",countryName:"Brittil\xe4iset Neitsytsaaret",countryNameEng:"BRITISH VIRGIN ISL"},{countryCode:"BRN",countryName:"Brunei",countryNameEng:"BRUNEI DARUSSALAM"},{countryCode:"BGR",countryName:"Bulgaria",countryNameEng:"BULGARIA"},{countryCode:"BFA",countryName:"Burkina Faso",countryNameEng:"BURKINA FASO"},{countryCode:"BUR",countryName:"BURMA",countryNameEng:"BURMA"},{countryCode:"BDI",countryName:"Burundi",countryNameEng:"BURUNDI"},{countryCode:"CYM",countryName:"Caymansaaret",countryNameEng:"CAYMAN ISLANDS"},{countryCode:"CHL",countryName:"Chile",countryNameEng:"CHILE"},{countryCode:"COK",countryName:"Cookinsaaret",countryNameEng:"COOK ISLANDS"},{countryCode:"CRI",countryName:"Costa Rica",countryNameEng:"COSTA RICA"},{countryCode:"DJI",countryName:"Djibouti",countryNameEng:"DJIBOUTI"},{countryCode:"DMA",countryName:"Dominica",countryNameEng:"DOMINICA"},{countryCode:"DOM",countryName:"Dominikaaninen tasavalta",countryNameEng:"DOMINICAN REPUBLIC"},{countryCode:"ECU",countryName:"Ecuador",countryNameEng:"ECUADOR"},{countryCode:"EGY",countryName:"Egypti",countryNameEng:"EGYPT"},{countryCode:"SLV",countryName:"El Salvador",countryNameEng:"EL SALVADOR"},{countryCode:"ERI",countryName:"Eritrea",countryNameEng:"ERITREA"},{countryCode:"ESP",countryName:"Espanja",countryNameEng:"SPAIN"},{countryCode:"ZAF",countryName:"Etel\xe4-Afrikka",countryNameEng:"SOUTH AFRICA"},{countryCode:"ETH",countryName:"Etiopia",countryNameEng:"ETHIOPIA"},{countryCode:"FLK",countryName:"Falklandinsaaret",countryNameEng:"FALKLAND ISLANDS"},{countryCode:"FAE",countryName:"F\xe4rsaaret",countryNameEng:"FAEROE ISLANDS"},{countryCode:"FIJ",countryName:"Fidži",countryNameEng:"FIJI"},{countryCode:"PHL",countryName:"Filippiinit",countryNameEng:"PHILLIPPINES"},{countryCode:"GAB",countryName:"Gabon",countryNameEng:"GABON"},{countryCode:"GMB",countryName:"Gambia",countryNameEng:"GAMBIA"},{countryCode:"GAZ",countryName:"Gaza",countryNameEng:"GAZA"},{countryCode:"GEO",countryName:"Georgia",countryNameEng:"GEORGIA"},{countryCode:"GHA",countryName:"Ghana",countryNameEng:"GHANA"},{countryCode:"GIB",countryName:"Gibraltar",countryNameEng:"GIBRALTAR"},{countryCode:"GRD",countryName:"Grenada",countryNameEng:"GRENADA"},{countryCode:"GRL",countryName:"Gr\xf6nlanti",countryNameEng:"GREENLAND"},{countryCode:"GLP",countryName:"Guadeloupe",countryNameEng:"GUADELOUPE"},{countryCode:"GUM",countryName:"Guam",countryNameEng:"GUAM"},{countryCode:"GTM",countryName:"Guatemala",countryNameEng:"GUATEMALA"},{countryCode:"GIN",countryName:"Guinea",countryNameEng:"GUINEA"},{countryCode:"GNB",countryName:"Guinea-Bissau",countryNameEng:"GUINEA BISSAU"},{countryCode:"GUY",countryName:"Guyana",countryNameEng:"GUYANA"},{countryCode:"HTI",countryName:"Haiti",countryNameEng:"HAITI"},{countryCode:"HND",countryName:"Honduras",countryNameEng:"HONDURAS"},{countryCode:"HKG",countryName:"Hongkong",countryNameEng:"HONG KONG"},{countryCode:"IDN",countryName:"Indonesia",countryNameEng:"INDONESIA"},{countryCode:"IND",countryName:"Intia",countryNameEng:"INDIA"},{countryCode:"IRQ",countryName:"Irak",countryNameEng:"IRAQ"},{countryCode:"IRN",countryName:"Iran",countryNameEng:"IRAN"},{countryCode:"IRL",countryName:"Irlanti",countryNameEng:"IRELAND"},{countryCode:"ISL",countryName:"Islanti",countryNameEng:"ICELAND"},{countryCode:"ISR",countryName:"Israel",countryNameEng:"ISRAEL"},{countryCode:"TLS",countryName:"It\xe4-Timor",countryNameEng:"TIMOR-LESTE"},{countryCode:"ITA",countryName:"Italia",countryNameEng:"ITALY"},{countryCode:"AUT",countryName:"It\xe4valta",countryNameEng:"AUSTRIA"},{countryCode:"JAM",countryName:"Jamaika",countryNameEng:"JAMAICA"},{countryCode:"JPN",countryName:"Japani",countryNameEng:"JAPAN"},{countryCode:"YEM",countryName:"Jemen",countryNameEng:"YEMEN"},{countryCode:"JOR",countryName:"Jordania",countryNameEng:"JORDAN"},{countryCode:"KHM",countryName:"Kambodža",countryNameEng:"CAMBODIA"},{countryCode:"CMR",countryName:"Kamerun",countryNameEng:"CAMEROON"},{countryCode:"CAN",countryName:"Kanada",countryNameEng:"CANADA"},{countryCode:"CAP",countryName:"Kap Verde",countryNameEng:"CAPE VERDE"},{countryCode:"KAZ",countryName:"Kazakstan",countryNameEng:"KAZAKHSTAN"},{countryCode:"KEN",countryName:"Kenia",countryNameEng:"KENYA"},{countryCode:"CAF",countryName:"Keski-Afrikan tasavalta",countryNameEng:"CENTRAL AFRICAN REPU"},{countryCode:"CHN",countryName:"Kiina",countryNameEng:"CHINA"},{countryCode:"KGZ",countryName:"Kirgisia",countryNameEng:"KYRGYZSTAN"},{countryCode:"KIR",countryName:"Kiribati",countryNameEng:"KIRIBATI"},{countryCode:"COL",countryName:"Kolumbia",countryNameEng:"COLOMBIA"},{countryCode:"COM",countryName:"Komorit",countryNameEng:"COMOROS"},{countryCode:"COD",countryName:"Kongon demokraattinen tasavalta",countryNameEng:"CONGO"},{countryCode:"PRK",countryName:"Korean demokraattinen kansantasavalta",countryNameEng:"NORTH KOREA"},{countryCode:"KOR",countryName:"Korean tasavalta",countryNameEng:"SOUTH KOREA"},{countryCode:"KSV",countryName:"Kosovo",countryNameEng:"KOSOVO"},{countryCode:"GRC",countryName:"Kreikka",countryNameEng:"GREECE"},{countryCode:"HRV",countryName:"Kroatia",countryNameEng:"CROATIA"},{countryCode:"CUB",countryName:"Kuuba",countryNameEng:"CUBA"},{countryCode:"KWT",countryName:"Kuwait",countryNameEng:"KUWAIT"},{countryCode:"CYP",countryName:"Kypros",countryNameEng:"CYPRUS"},{countryCode:"ESH",countryName:"L\xe4nsi-Sahara",countryNameEng:"WESTERN SAHARA"},{countryCode:"LAO",countryName:"Laos",countryNameEng:"LAOS"},{countryCode:"LVA",countryName:"Latvia",countryNameEng:"LATVIA"},{countryCode:"LEE",countryName:"Leewardsaaret",countryNameEng:"LEEWARD ISL"},{countryCode:"LSO",countryName:"Lesotho",countryNameEng:"LESOTHO"},{countryCode:"LBN",countryName:"Libanon",countryNameEng:"LEBANON"},{countryCode:"LBR",countryName:"Liberia",countryNameEng:"LIBERIA"},{countryCode:"LBY",countryName:"Libya",countryNameEng:"LIBYA(N ARAB JAMAHI)"},{countryCode:"LIE",countryName:"Liechtenstein",countryNameEng:"LIECHTENSTEIN"},{countryCode:"LTU",countryName:"Liettua",countryNameEng:"LITHUANIA"},{countryCode:"LUX",countryName:"Luxemburg",countryNameEng:"LUXEMBOURG"},{countryCode:"MAC",countryName:"Macao",countryNameEng:"MACAO"},{countryCode:"MDG",countryName:"Madagaskar",countryNameEng:"MADAGASCAR"},{countryCode:"MKD",countryName:"Makedonia",countryNameEng:"MACEDONIA"},{countryCode:"NWI",countryName:"Malawi",countryNameEng:"MALAWI"},{countryCode:"MDV",countryName:"Malediivit",countryNameEng:"MALDIVES ISLANDS"},{countryCode:"MYS",countryName:"Malesia",countryNameEng:"MALAYSIA"},{countryCode:"MLI",countryName:"Mali",countryNameEng:"MALI"},{countryCode:"MLT",countryName:"Malta",countryNameEng:"MALTA"},{countryCode:"MAR",countryName:"Marokko",countryNameEng:"MOROCCO"},{countryCode:"MHL",countryName:"Marshallinsaaret",countryNameEng:"MARSHALL ISLANDS"},{countryCode:"MTQ",countryName:"Martinique",countryNameEng:"MARTINIQUE"},{countryCode:"MRT",countryName:"Mauritania",countryNameEng:"MAURITANIA"},{countryCode:"MUS",countryName:"Mauritius",countryNameEng:"MAURITIUS"},{countryCode:"MEX",countryName:"Meksiko",countryNameEng:"MEXICO"},{countryCode:"FSM",countryName:"Mikronesian liittovaltio",countryNameEng:"MICRONESIA"},{countryCode:"MDA",countryName:"Moldova",countryNameEng:"MOLDAVIA"},{countryCode:"MCO",countryName:"Monaco",countryNameEng:"MONACO"},{countryCode:"MNG",countryName:"Mongolia",countryNameEng:"MONGOLIA"},{countryCode:"MGR",countryName:"Montenegro",countryNameEng:"MONTENEGRO"},{countryCode:"MSR",countryName:"Montserrat",countryNameEng:"MONTSERRAT"},{countryCode:"MOZ",countryName:"Mosambik",countryNameEng:"MOZAMBIQUE"},{countryCode:"NMR",countryName:"Myanmar",countryNameEng:"MYANMAR"},{countryCode:"NAM",countryName:"Namibia",countryNameEng:"NAMIBIA"},{countryCode:"NRU",countryName:"Nauru",countryNameEng:"NAURU"},{countryCode:"NPL",countryName:"Nepal",countryNameEng:"NEPAL"},{countryCode:"NIC",countryName:"Nicaragua",countryNameEng:"NICARAGUA"},{countryCode:"NER",countryName:"Niger",countryNameEng:"NIGER"},{countryCode:"NGA",countryName:"Nigeria",countryNameEng:"NIGERIA"},{countryCode:"NIU",countryName:"Niue",countryNameEng:"NIUE"},{countryCode:"NFK",countryName:"Norfolkinsaari",countryNameEng:"NORFOLK ISLAND"},{countryCode:"NOR",countryName:"Norja",countryNameEng:"NORWAY"},{countryCode:"CIV",countryName:"Norsunluurannikko",countryNameEng:"IVORY COAST (COTE D'"},{countryCode:"OMN",countryName:"Oman",countryNameEng:"OMAN"},{countryCode:"CNQ",countryName:"P\xe4iv\xe4ntasaajan Guinea",countryNameEng:"EQUATORIAL GUINEA"},{countryCode:"PAK",countryName:"Pakistan",countryNameEng:"PAKISTAN"},{countryCode:"PLW",countryName:"Palau",countryNameEng:"PALAU"},{countryCode:"PSE",countryName:"Palestiina",countryNameEng:"PALESTINE"},{countryCode:"PAN",countryName:"Panama",countryNameEng:"PANAMA"},{countryCode:"PNG",countryName:"Papua-Uusi-Guinea",countryNameEng:"PAPUA NEW GUINEA"},{countryCode:"PRY",countryName:"Paraguay",countryNameEng:"PARAGUAY"},{countryCode:"PER",countryName:"Peru",countryNameEng:"PERU"},{countryCode:"PCN",countryName:"Pitcairn",countryNameEng:"PITCAIRN ISLAND"},{countryCode:"MNP",countryName:"Pohjois-Mariaanit",countryNameEng:"NORTHEN MARIANA ISL"},{countryCode:"PRT",countryName:"Portugali",countryNameEng:"PORTUGAL"},{countryCode:"PRI",countryName:"Puerto Rico",countryNameEng:"PUERTO RICO"},{countryCode:"POL",countryName:"Puola",countryNameEng:"POLAND"},{countryCode:"QAT",countryName:"Qatar",countryNameEng:"QATAR"},{countryCode:"FRA",countryName:"Ranska",countryNameEng:"FRANCE"},{countryCode:"GUF",countryName:"Ranskan Guayana",countryNameEng:"FRENCH GUYANA"},{countryCode:"PYF",countryName:"Ranskan Polynesia",countryNameEng:"FRENCH POLYNESIA"},{countryCode:"REU",countryName:"R\xe9union",countryNameEng:"REUNION"},{countryCode:"ROU",countryName:"Romania",countryNameEng:"ROMANIA"},{countryCode:"RWA",countryName:"Ruanda",countryNameEng:"RWANDA"},{countryCode:"SWE",countryName:"Ruotsi",countryNameEng:"SWEDEN"},{countryCode:"SHN",countryName:"Saint Helena",countryNameEng:"SAINT HELENA"},{countryCode:"KNA",countryName:"Saint Kitts ja Nevis",countryNameEng:"SAINT KITTS AND NEVI"},{countryCode:"LCA",countryName:"Saint Lucia",countryNameEng:"SAINT LUCIA"},{countryCode:"SVI",countryName:"Saint Vincent",countryNameEng:"SAINT VINCENT AND GR"},{countryCode:"DEU",countryName:"Saksa",countryNameEng:"GERMANY"},{countryCode:"SLB",countryName:"Salomonsaaret",countryNameEng:"SOLOMON ISLANDS"},{countryCode:"ZMB",countryName:"Sambia",countryNameEng:"ZAMBIA"},{countryCode:"SAN",countryName:"San Marino",countryNameEng:"SAN MARINO"},{countryCode:"STP",countryName:"S\xe3o Tom\xe9 ja Pr\xedncipe",countryNameEng:"SAINT TOME AND PRINC"},{countryCode:"SAU",countryName:"Saudi-Arabia",countryNameEng:"SAUDI ARABIA"},{countryCode:"SEN",countryName:"Senegal",countryNameEng:"SENEGAL"},{countryCode:"SRB",countryName:"Serbia",countryNameEng:"SERBIA"}
1,{countryCode:"SYC",countryName:"Seychellit",countryNameEng:"SEYCHELLES"},{countryCode:"SLE",countryName:"Sierra Leone",countryNameEng:"SIERRA LEONE"},{countryCode:"SGP",countryName:"Singapore",countryNameEng:"SINGAPORE"},{countryCode:"SVK",countryName:"Slovakia",countryNameEng:"SLOVAK REPUBLIC"},{countryCode:"SVN",countryName:"Slovenia",countryNameEng:"SLOVENIA"},{countryCode:"SOM",countryName:"Somalia",countryNameEng:"SOMALIA"},{countryCode:"LKA",countryName:"Sri Lanka",countryNameEng:"SRI LANKA"},{countryCode:"SDN",countryName:"Sudan",countryNameEng:"SUDAN"},{countryCode:"FIN",countryName:"Suomi",countryNameEng:"FINLAND"},{countryCode:"SUR",countryName:"Suriname",countryNameEng:"SURINAME"},{countryCode:"CHE",countryName:"Sveitsi",countryNameEng:"SWITZERLAND"},{countryCode:"SWZ",countryName:"Swazimaa",countryNameEng:"SWAZILAND"},{countryCode:"SYR",countryName:"Syyria",countryNameEng:"SYRIA"},{countryCode:"TJK",countryName:"Tadžikistan",countryNameEng:"TAJIKISTAN"},{countryCode:"TWN",countryName:"Taiwan",countryNameEng:"TAIWAN"},{countryCode:"TZA",countryName:"Tansania",countryNameEng:"TANZANIA"},{countryCode:"DNK",countryName:"Tanska",countryNameEng:"DENMARK"},{countryCode:"TSM",countryName:"Tasmania",countryNameEng:"TASMANIA"},{countryCode:"THA",countryName:"Thaimaa",countryNameEng:"THAILAND"},{countryCode:"TGO",countryName:"Togo",countryNameEng:"TOGO"},{countryCode:"TON",countryName:"Tonga",countryNameEng:"TONGA"},{countryCode:"TTO",countryName:"Trinidad ja Tobago",countryNameEng:"TRINIDAD AND TOBAGO"},{countryCode:"TCD",countryName:"Tšad",countryNameEng:"CHAD"},{countryCode:"CZE",countryName:"Tšekki",countryNameEng:"CZECH REPUBLIC"},{countryCode:"TUN",countryName:"Tunisia",countryNameEng:"TUNISIA"},{countryCode:"TUR",countryName:"Turkki",countryNameEng:"TURKEY"},{countryCode:"TKM",countryName:"Turkmenistan",countryNameEng:"TURKMENISTAN"},{countryCode:"TUV",countryName:"Tuvalu",countryNameEng:"TUVALU"},{countryCode:"UGA",countryName:"Uganda",countryNameEng:"UGANDA"},{countryCode:"UKR",countryName:"Ukraina",countryNameEng:"UKRAINE"},{countryCode:"HUN",countryName:"Unkari",countryNameEng:"HUNGARY"},{countryCode:"URY",countryName:"Uruguay",countryNameEng:"URUGUAY"},{countryCode:"NCL",countryName:"Uusi-Kaledonia",countryNameEng:"NEW CALEDONIA"},{countryCode:"NZL",countryName:"Uusi-Seelanti",countryNameEng:"NEW ZEALAND"},{countryCode:"UZB",countryName:"Uzbekistan",countryNameEng:"UZBEKISTAN"},{countryCode:"BLR",countryName:"Valko-Ven\xe4j\xe4",countryNameEng:"BELARUS"},{countryCode:"VUT",countryName:"Vanuatu",countryNameEng:"VANUATU"},{countryCode:"VAT",countryName:"Vatikaanivaltio",countryNameEng:"VATICAN CITY STATE"},{countryCode:"RUS",countryName:"Ven\xe4j\xe4",countryNameEng:"RUSSIA"},{countryCode:"VEN",countryName:"Venezuela",countryNameEng:"VENEZUELA"},{countryCode:"VNM",countryName:"Vietnam",countryNameEng:"VIETNAM"},{countryCode:"EST",countryName:"Viro",countryNameEng:"ESTONIA"},{countryCode:"GBR",countryName:"Yhdistynyt kuningaskunta",countryNameEng:"UNITED KINGDOM"},{countryCode:"USA",countryName:"Yhdysvallat",countryNameEng:"UNITED STATES"},{countryCode:"ZWE",countryName:"Zimbabwe",countryNameEng:"ZIMBABWE"}]},13481:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(95155),o=n(61953),a=n(5772),r=n(8395);function s(e){return(0,i.jsx)(l.Component,{"data-element-name":e.elementName,hasFade:e.hasFade,children:(0,i.jsxs)(l.Content,{children:[!1,e.title&&(0,i.jsx)(l.Title,{className:"is-heading-xxl",children:e.title}),e.description&&(0,i.jsx)(l.Description,{className:"is-body-s",children:e.description}),e.buttonUrl&&e.buttonText&&(0,i.jsx)(l.Button,{href:e.buttonUrl,target:"_self","data-click-element-name":e.buttonClickElementName,className:"",children:e.buttonText})]})})}let l={Component:r.Ay.div.withConfig({componentId:"sc-658c58a8-0"})(["box-sizing:border-box;margin-inline:auto;border-radius:calc(var(--radius-rounded) + 4px);width:var(--width-column);max-width:100%;padding:4px;background:var(--brand-trendi--gradient);",""],e=>e.hasFade&&`
2      &::before {
3        content: '';
4        position: absolute;
5        bottom: calc(100% + var(--block-spacing));
6        left: calc(-1 * var(--block-gutter));
7        right: calc(-1 * var(--block-gutter));
8        display: block;
9        height: 200px;
10        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
11        pointer-events: none;
12      }
13    `),Content:r.Ay.div.withConfig({componentId:"sc-658c58a8-1"})(["display:flex;padding:var(--spacing-spacing-3xl,28px) var(--spacing-spacing-xl,20px);flex-direction:column;align-items:center;gap:var(--spacing-spacing-2xl,24px);align-self:stretch;box-sizing:border-box;border-radius:var(--radius-rounded);padding:var(--spacing-3xl) var(--spacing-xl);text-align:center;background:var(--color-container-secondary);color:var(--color-on-surface);"]),Icon:(0,r.Ay)(a.default).withConfig({componentId:"sc-658c58a8-2"})([""]),Title:r.Ay.div.withConfig({componentId:"sc-658c58a8-3"})([""]),Description:r.Ay.div.withConfig({componentId:"sc-658c58a8-4"})([""]),Button:(0,r.Ay)(o.A).withConfig({componentId:"sc-658c58a8-5"})(["&.is-special-style{background:var(--color-on-surface) !important;color:var(--color-on-primary) !important;}"])}}
13,17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return i}});let i=(0,n(64054).createAsyncLocalStorage)()},17913:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i=n(8395).Ay.div.withConfig({componentId:"sc-ac42183b-0"})([""])},19565:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(95155),o=n(12115),a=n(8395),r=n(89217);function s(e){let t=e.items,[n,a]=(0,o.useState)();return t.length?(0,i.jsxs)(l.Component,{align:"full",children:[(0,i.jsx)(l.Carousel,{ref:e=>a(e),$gap:e.gap,children:t.map((t,n)=>(0,i.jsx)(l.Slide,{children:e.renderItem(t,n)},n))}),(0,i.jsx)(l.Pagination,{children:(0,i.jsx)(r.A,{carouselEl:n})})]}):null}let l={Component:a.Ay.div.withConfig({componentId:"sc-3a451f66-0"})(["position:relative;display:flex;flex-direction:column;align-items:center;"]),Carousel:a.Ay.div.withConfig({componentId:"sc-3a451f66-1"})(["display:flex;gap:",";max-width:100%;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;scroll-padding-left:15px;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"],e=>e.$gap||"var(--spacing-lg)"),Slide:a.Ay.div.withConfig({componentId:"sc-3a451f66-2"})(["scroll-snap-align:start;&:first-child{padding-left:var(--carousel--horizontal-spacing);}&:last-child{padding-right:var(--carousel--horizontal-spacing);}"]),Pagination:a.Ay.div.withConfig({componentId:"sc-3a451f66-3"})(["margin-top:var(--spacing-lg);"])}},20224:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var i=n(95155),o=n(12115),a=n(8395),r=n(32481),s=n(28121),l=n(14562),c=n(73321);let d=({slotId:e})=>{let t=(0,l.A)(e=>e.hasConsentForAds),n=(0,l.A)(e=>e.hasInitializedAds),o=(0,l.A)(t=>t.ads[e]);if("debug"!==(0,c.useSearchParams)().get("ads"))return null;let a=[`[${e}]`];return o&&a.push(` [${o?.adUnit}]`),t||a.push("no consent, "),n||a.push("no init"),t&&n&&a.push(o?.isRendered?o.hasAd?"loaded":"is empty":"is loading"),(0,i.jsx)("div",{className:"is-body-xs",style:{borderTop:"1px solid black",background:o?.isRendered?o?.hasAd?"green":"black":"blue",color:"white",fontSize:"12px",padding:"3px",textAlign:"center",whiteSpace:"nowrap",position:"absolute",marginTop:"25px",zIndex:999999},children:a.join(" ")})};var u=n(52620);let m=a.Ay.div.withConfig({componentId:"sc-318dc756-0"})(["position:relative;width:100vw;margin-left:calc(-50vw + 50%);@media (max-width:","){margin-left:0;}"],e=>e.theme["breakpoint-mobile-max"]),p=a.Ay.div.withConfig({componentId:"sc-318dc756-1"})(["position:relative;height:",";width:100vw;overflow:hidden;"],e=>e.$height?`${e.$height}px`:"100vh"),g=a.Ay.div.withConfig({componentId:"sc-318dc756-2"})(["position:absolute;height:100%;width:100vw;clip:rect(auto,auto,auto,auto);"]),h=a.Ay.div.withConfig({componentId:"sc-318dc756-3"})(["height:0px;top:0px;width:100vw;position:fixed;left:0;transform:translateZ(0px);pointer-events:auto;"]),x=a.Ay.a.withConfig({componentId:"sc-318dc756-4"})(["display:block;position:relative;height:",";box-sizing:content-box;"],e=>e.$height?`${e.$height}px`:"100vh"),f=a.Ay.video.withConfig({componentId:"sc-318dc756-5"})(["display:block;overflow:hidden;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;object-fit:contain;"]),y=a.Ay.img.withConfig({componentId:"sc-318dc756-6"})(["display:block;overflow:hidden;position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;object-fit:contain;"]),v=(0,o.memo)(function({slotId:e,backgroundImageUrl:t,backgroundVideoUrl:n,clickUrl:a,html:r,htmlTag:s}){let l=(0,o.useRef)(window.innerHeight),c=(0,o.useRef)(void 0);return(0,o.useEffect)(()=>{let t=document.querySelector(`#${e} > div[id^="google_ads_iframe"]`);if(t){t.style.position="absolute",t.style.width="100vw",t.style.marginLeft="calc(-50vw + 50%)",r&&s?(t.style.top="22px",t.style.bottom="22px"):t.style.height="100%";let e=t.querySelector('iframe[id^="google_ads_iframe"]');e&&(e.style.width="100vw",e.style.height="100%")}r&&s&&function(e,t,n){let i=document.createElement("iframe");if(i.style.width="100vw",i.style.height=n+"px",i.style.border="none",i.frameBorder="0",i.scrolling="no",e.appendChild(i),i.contentWindow){i.contentWindow.document.open();let e=t.trim().replace(/^"|"$/g,"");i.contentWindow.document.write(`
14      <style>
15        body {
16          margin: 0;
17          padding: 0;
18        }
19        #container {
20          position: relative;
21          transform-origin: top left;
22        }
23      </style>
24      <div id="container">${e}</div>
25      <script>
26        // Scale the ad to fit the iframe width.
27        var container = document.getElementById('container')
28
29        // Find the maximum width of the container children.
30        function findMaxWidth(children) {
31          let maxWidth = 0
32          for (let i = 0; i < children.length; i++) {
33            maxWidth = Math.max(children[i].clientWidth, maxWidth)
34          }
35          return maxWidth
36        }
37
38        // Scale the container to fit the iframe width.
39        var scale = window.innerWidth / findMaxWidth(container.children)
40        container.style.transform = 'scale(' + scale + ')'
41      </script>
42    `),i.contentWindow.document.close()}}(c.current,s,l.current)},[e,r,s]),(0,i.jsx)(m,{children:(0,i.jsx)(p,{$height:l.current,children:(0,i.jsx)(g,{children:(0,i.jsxs)(h,{children:[!n&&t&&(0,i.jsx)(x,{href:a,target:"_blank",$height:l.current,children:(0,i.jsx)(y,{src:t})}),n&&(0,i.jsx)(x,{href:a,target:"_blank",$height:l.current,children:(0,i.jsx)(f,{autoPlay:!0,loop:!0,muted:!0,playsInl
42ine:!0,children:(0,i.jsx)("source",{src:n})})}),r&&(0,i.jsx)("div",{ref:c})]})})})})});var b=n(96925),C=n(49071),A=n(89977),k=n(62953),j=n(8072),w=n.n(j),I=n(12023),N=n(36610);let S=[{type:"NativeAd",amount:1,position:1}],E=({onReady:e,elementName:t})=>{let n=(0,o.useContext)(k.A),a=(0,o.useMemo)(()=>{let e=w()(S);return t&&(e[0].elementName=t),e},[t]),{items:r,loading:s}=(0,C.A)(a);(0,o.useEffect)(()=>{s||e(r?.length>0)},[r,s,e]);let l=(0,o.useMemo)(()=>({...n,isBookmarksEnabled:!1,isReadingTimeEnabled:!1}),[n]);if(!r?.length||s)return null;let c=r[0];return(0,i.jsxs)(k.A.Provider,{value:l,children:[(c.viewTrackingUrls||c.viewPixels)&&(0,i.jsx)(I.A,{requestUrls:c.viewTrackingUrls,pixelUrls:c.viewPixels}),(0,i.jsx)(A.A,{...c,layout:"spotlight",commercialLabel:"",onClick:()=>{c.clickTrackingUrls?.forEach(e=>{fetch(e),N.A.debug("Native ad click tracking url loaded",e)}),c.clickTrackingPixels?.forEach(e=>{let t=new Image;t.onload=()=>{N.A.debug("Native ad click tracking pixel loaded",e)},t.src=e})}})]})};var T=n(97735);let P=(0,o.memo)(({slotId:e,hasFallbackNativeAd:t,hasParallax:n,hasBlock:o,children:a})=>(0,i.jsx)("div",{id:e,style:{overflow:t?"hidden":"visible",margin:"auto",position:"relative",height:t?"0":void 0},children:a},e),(e,t)=>e.slotId===t.slotId&&e.hasFallbackNativeAd===t.hasFallbackNativeAd&&e.hasParallax===t.hasParallax&&e.hasBlock===t.hasBlock);var L=n(66119);let M=(0,o.memo)(({slotId:e,onFallbackAdReady:t,onFullWidth:n})=>{let a,l,c=(0,b.A)(),m=(0,o.useRef)(null),[p,g]=(0,o.useState)(!1),h=(0,o.useMemo)(()=>e.startsWith("ad-richtext-")?"contentrichtext":e.startsWith("ad-id-entry")?"outofpage":e.startsWith("ad-id-above-nav")?"abovenav":"content",[e]),x=(0,s.A)({slotId:e,adComponentElem:m.current,prebidRetry:!0,surroundings:h}),f=x?.parallaxData,y=x?.isFullWidth,C=x?.passbackState==="passback-loading",A=x?.passbackState==="passback-no-ad",k=x?.hasAd;C&&(k=!1),A&&(k=!1),a=p||k,l=x?.hasAd||p,x?.adNotice===!1&&(l=!1),(0,o.useEffect)(()=>{(x?.block==="ShopifyCollectionBlock"||x?.block==="ShopifyProductBlock"||x?.block==="ContentBlock"||x?.block==="ShowHeroesBlock")&&n?.(!0)},[x?.block,n]);let[j,w]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{x?.isRendered&&!x?.hasAd&&w(!0),x?.isRendered&&x?.hasAd&&A&&w(!0)},[x?.isRendered,x?.hasAd,A]),(0,i.jsxs)(B.Component,{className:"ad-component",ref:m,$hasAnyAd:a,$hasBlockAd:!!x?.block,$hasParallax:!!f,$slotId:e,children:[(0,i.jsx)(d,{slotId:e}),l?y?(0,i.jsx)(u.A,{placement:"top"}):(0,i.jsx)(r.A,{visible:!0,placement:"top"}):null,j?(0,i.jsx)(E,{onReady:e=>{g(e),t?.(e)},elementName:"AdFallback"}):null,(0,i.jsxs)(P,{slotId:e,hasFallbackNativeAd:p,hasParallax:!!f,hasBlock:!!x?.block,children:[f&&(0,i.jsx)(v,{slotId:e,clickUrl:f.link,backgroundVideoUrl:"mobile"===c||"tablet"===c?f.videoMob:f.videoDesk,backgroundImageUrl:"mobile"===c||"tablet"===c?f.imageMob:f.imageDesk,html:f.html,htmlTag:f.htmlTag}),x?.block&&(0,i.jsx)(L.default,{forwardRef:void 0,children:(0,i.jsx)(T.e,{blockName:x.block,...x.blockProps,adSlotId:e})})]}),l?y?(0,i.jsx)(u.A,{placement:"bottom"}):(0,i.jsx)(r.A,{visible:!0,placement:"bottom"}):null]})},(e,t)=>e.slotId===t.slotId),B={Component:a.Ay.div.withConfig({componentId:"sc-beae4eae-0"})([""," text-align:center;"," "," ",""],e=>e.$hasAnyAd&&`
43      margin: var(--block-spacing) auto var(--block-spacing) auto;
44    `,e=>e.$hasBlockAd&&`
45      text-align: unset;
46    `,e=>e.$hasParallax&&`
47      margin-left: calc(-50vw + 50%);
48      width: 100vw;
49    `,e=>`
50      // iframes are inline by default, so when iframe is 1x1 size, it will still take up space.
51      & > #${e.$slotId} > :first-child { line-height: 0; }
52
53      // Remove margin-bottom from the last child to prevent unwanted margins from 3rd party ads (such as BBW).
54      & > #${e.$slotId} > :last-child { margin-bottom: 0 !important; }
55    `)}},21957:(e,t,n)=>{"use strict";function i({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return i}}),n(95155),n(47650),n(5214),n(2451),n(53887)},22118:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(38402);function r(e){return(0,i.jsxs)(s.Component,{children:[(0,i.jsxs)(s.Label,{className:["is-body-xs",e.className],children:[(0,i.jsx)("input",{id:e.id,type:"checkbox",checked:e.value,className:e.value?"is-checked":"",disabled:e.disabled,onChange:()=>{e.onChange?.(!e.value)}}),e.label&&(0,i.jsx)("label",{htmlFor:e.id,children:e.label})]}),e.helpText?(0,i.jsx)(a.A,{children:e.helpText}):null]})}let s={Component:o.Ay.div.withConfig({componentId:"sc-59636f2e-0"})(["display:flex;justify-content:space-between;align-items:flex-start;gap:var(--spacing-sm);"]),Label:o.Ay.label.withConfig({componentId:"sc-59636f2e-1"})(["display:flex;align-items:flex-start;justify-content:flex-start;gap:var(--spacing-sm);&:has(> input[disabled]){color:var(--color-on-surface-tertiary);}input[type='checkbox']{flex-shrink:0;-webkit-appearance:none;-moz-appearance:none;appearance:unset;position:relative;margin:0;width:18px;height:18px;margin:0;margin-top:0.1em;border:1px solid var(--color-outline-primary);border-radius:3px;background-color:var(--color-surface);cursor:pointer;&[disabled]{background-color:var(--color-on-container-dim);}&::before{content:'';box-sizing:border-box;display:none;width:9px;height:5px;position:absolute;top:64%;left:25%;transform:translate(-50%,0);border:1.5px solid var(--color-black);border-top:none;border-right:none;transform:rotate(-45deg) translate(4px,-4px);}&:checked{border-color:var(--checkbox--checked-border-color,var(--color-outline-primary));background-color:var(--checkbox--checked-background-color,var(--color-surface));}&:checked::before{display:block;border-color:var(--checkbox--checked-color,var(--color-black));}}"])}}
55,24272:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(45697);function r({value:e,label:t,image:n,linkLabel:o,linkUrl:a,linkOnClick:l,disabled:c}){return(0,i.jsxs)(s.Component,{children:[t?(0,i.jsx)(s.Label,{children:t}):null,(0,i.jsxs)(s.BottomContainer,{children:[n?(0,i.jsx)(s.ImageContainer,{children:n}):null,(0,i.jsx)(s.Value,{children:e||"-"}),(0,i.jsx)(s.Link,{"data-click-element-name":"DataListItem",href:a,disabled:c,onClick:l,children:o})]})]})}let s={Component:o.Ay.div.withConfig({componentId:"sc-e4d3fe0c-0"})(["color:var(--color-on-surface-primary);display:flex;flex-direction:column;padding:var(--spacing-lg) 0;border-bottom:1px solid var(--color-outline-secondary);"]),BottomContainer:o.Ay.div.withConfig({componentId:"sc-e4d3fe0c-1"})(["color:var(--color-on-surface-secondary);display:flex;justify-content:space-between;align-items:center;"]),Label:o.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-e4d3fe0c-2"})([""]),ImageContainer:o.Ay.div.withConfig({componentId:"sc-e4d3fe0c-3"})([""]),Value:o.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-e4d3fe0c-4"})(["flex:1;text-overflow:ellipsis;overflow:hidden;padding-right:var(--spacing-xs);"]),Link:(0,o.Ay)(a.A).attrs({className:"is-body-s"}).withConfig({componentId:"sc-e4d3fe0c-5"})(["color:var(--color-on-surface-secondary);"])}},26339:(e,t,n)=>{var i=n(81325);e.exports=function(e,t,n){return null==e?e:i(e,t,n)}},28121:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(12115),o=n(14562),a=n(21084),r=n(51627);let s=function({slotId:e,unit:t,adComponentElem:n,skipCommercialContentCheck:s,prebidRetry:l,surroundings:c}){let{content:d,isEmbedded:u,unlockedBy:m}=(0,i.useContext)(a.A),p=(0,o.A)(e=>e.hasInitializedAds),g=(0,o.A)(e=>e.callAd),h=(0,o.A)(e=>e.destroyAd),x=(0,o.A)(t=>t.ads[e]),f=!(0,r.yF)(d);return(0,i.useEffect)(()=>{if((!f||s)&&e&&p&&n)return g({slotId:e,content:d,isContentEmbedded:u,contentUnlockedBy:m,unit:t,adComponentElem:n,prebidRetry:l,surroundings:c}),()=>{h(e)}},[e,d,u,m,p,g,h,t,f,n,s,l,c]),x}},29610:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(95155),o=n(12115),a=n(5772),r=n(8395),s=n(62953);function l({title:e="Jotain meni vikaan",onClickRetry:t,errorMessage:n,error:a,isStagingOrDevelopment:r=!1}){let d=(0,o.useContext)(s.A),u=d?.errorImage,m=d?.isApp;return(0,i.jsxs)(c.Component,{className:m?"is-app":"is-web",children:[(0,i.jsx)(c.ErrorImage,{className:"errorImage",src:u,alt:"Error",width:200,height:200}),(0,i.jsx)(c.ErrorTitle,{className:m?"is-heading-m":"is-heading-xxxl",children:e}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.RetryButton,{onClick:t,children:"Yrit\xe4 uudelleen"}),(0,i.jsx)(c.ErrorMessage,{children:n}),(0,i.jsx)(c.Error,{children:a})]})]})}let c={Component:r.Ay.div.withConfig({componentId:"sc-b11d604e-0"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;&.is-web{padding:20px 0;}"]),ErrorTitle:r.Ay.div.withConfig({componentId:"sc-b11d604e-1"})([".is-web &{order:-1;padding:12px 20px;text-align:center;}"]),ErrorImage:(0,r.Ay)(a.default).withConfig({componentId:"sc-b11d604e-2"})([".is-web &{box-sizing:border-box;width:100%;max-width:375px;height:auto;padding:20px;}"]),ErrorMessage:r.Ay.div.withConfig({componentId:"sc-b11d604e-3"})(["margin:10px 15px;margin-top:30px;font-size:12px;"]),Error:r.Ay.div.withConfig({componentId:"sc-b11d604e-4"})(["margin:10px 15px;font-size:12px;"]),RetryButton:r.Ay.button.withConfig({componentId:"sc-b11d604e-5"})([""])}},29924:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var i=n(12115),o=n(97802);function a(e){let[t,n]=(0,i.useState)(),[a,r]=(0,i.useState)(),[s,l]=(0,i.useState)(!0),c=(0,i.useMemo)(()=>JSON.stringify(e.variables),[e.variables]),d=(0,i.useCallback)(async()=>{e.skip||(l(!0),await (0,o.P)({query:e.query,variables:e.variables}).then(e=>{n(e)}).catch(e=>{r(e)}).finally(()=>{l(!1)}))},[e.query,c,e.skip]);return(0,i.useEffect)(()=>{d()},[d]),{data:t,error:a,loading:s,refetch:d}}},32481:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(86816);let r=({text:e,visible:t,placement:n})=>{let{translate:o}=(0,a.B)();return(0,i.jsx)(s.Component,{$visible:t,$placement:n,children:(0,i.jsxs)(s.Divider,{children:[(0,i.jsx)(s.LeftLine,{}),(0,i.jsx)("div",{children:e||"top"===n&&o("AdDivider.textTop")||"bottom"===n&&o("AdDivider.textBottom")||o("AdDivider.adLabel")}),(0,i.jsx)(s.RightLine,{})]})})},s={Component:o.Ay.div.withConfig({componentId:"sc-17a20228-0"})(["text-align:center;width:100%;display:none;"," "," ",""],e=>!0===e.$visible&&`
56      display: block;
57    `,e=>"top"===e.$placement&&`
58      margin-bottom: 12px;
59    `,e=>"bottom"===e.$placement&&`
60      margin-top: 12px;
61    `),LeftLine:o.Ay.div.withConfig({componentId:"sc-17a20228-1"})(["margin:0 10px 0 0;border-top:1px solid var(--color-ads-stroke);flex-grow:1;height:0;"]),RightLine:o.Ay.div.withConfig({componentId:"sc-17a20228-2"})(["margin:0 0 0 10px;border-top:1px solid var(--color-ads-stroke);flex-grow:1;height:0;"]),Divider:o.Ay.div.withConfig({componentId:"sc-17a20228-3"})(["margin-left:auto;margin-right:auto;padding:0;display:flex;width:100%;max-width:calc(var(--width-wide) + 2 * var(--block-gutter));align-items:center;margin-bottom:;color:var(--color-ads-secondary);font-family:var(--ads-font-family);font-size:12px;line-height:15px;letter-spacing:1.2px;text-transform:uppercase;"])}},32681:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i=n(8395).Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-788579ac-0"})(["padding-bottom:var(--spacing-md);border-bottom:2px solid var(--color-outline-secondary);"])},33461:(e,t,n)=>{"use strict";n.d(t,{Iq:()=>o,m$:()=>i,vd:()=>a});let i=["katoava-kuva","mika-puuttuu","kuvanmuodostus","etsi-kuvasta","taydenna-teksti"],o=[{number:1,slug:"katoava-kuva",name:"Katoava kuva",description:"Katso kuvaa rauhassa, vastaa muutamaan kysymykseen ulkomuistista.",duration:"1–2 min",category:"Muistipeli",image:"/muistipelit/kuvat/ai/t1-marjametsan-taukopaikka.jpg",tone:"memory",hasContent:!0,isReady:!0},{number:2,slug:"mika-puuttuu",name:"Mik\xe4 kuvasta puuttuu",description:"Kaksi l\xe4hes samanlaista kuvaa. Napauta kohtaa, josta jotain on kadonnut.",duration:"2–3 min",category:"Havainto",image:"/muistipelit/kuvat/ai/t2-syksyisen-kuistin-kastelukannu-a.jpg",tone:"observation",hasContent:!0,isReady:!0},{number:3,slug:"kuvanmuodostus",name:"Kuvanmuodostuspeli",hyphenatedName:"Kuvan\xadmuodostus\xadpeli",description:"Siirr\xe4 ruutuja kunnes kuva on ehj\xe4. Ei aikarajaa, ei pisteit\xe4.",duration:"2–10 min",category:"Palapeli",image:"/muistipelit/kuvat/ai/t3-kaupunkipuiston-silta.jpg",tone:"observation",hasContent:!0,isReady:!0}
61,{number:4,slug:"etsi-kuvasta",name:"Etsi kuvasta",description:"Runsas kuva ja viisi etsitt\xe4v\xe4\xe4 asiaa. Ei kelloa, vain l\xf6yt\xe4misen ilo.",duration:"3–5 min",category:"Havainto",image:"/muistipelit/kuvat/ai/t4-torin-kukkakaupan-aarteet.jpg",tone:"observation",hasContent:!0,isReady:!0},{number:5,slug:"taydenna-teksti",name:"Muista sana",description:"Lue lyhyt Luonto-jutun ingressi ja palauta puuttuva sana mieleen.",duration:"2–3 min",category:"Kieli",image:"/muistipelit/kuvat/apu/apu-kuukkeli-syo-kadesta-nain-anniina-kesytti-lintuparven-sallassa-luonto-2026-09-06.jpg",tone:"language",hasContent:!0,isReady:!0}],a=e=>o.find(t=>t.slug===e)},34668:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(23880),o=n(50274),a=n(12115);let r=`
62  query GetConfiguration($keys: [String!]!) {
63    configuration(keys: $keys) {
64      key
65      value
66    }
67  }
68`;function s(e,{skip:t}={}){let n=(0,a.useContext)(i.A),{data:l,error:c,loading:d}=(0,o.A)({api:n.contentApi,query:r,variables:{keys:e},skip:t}),u=(0,a.useMemo)(()=>{try{if(!l?.configuration)return null;return JSON.parse(l.configuration.value)}catch(t){return console.error(`Error parsing '${e}' configuration`,t),null}},[e,l]);return{data:l,error:c,loading:d,value:u}}},37206:(e,t,n)=>{"use strict";n.d(t,{default:()=>o.a});var i=n(75707),o=n.n(i)},41112:(e,t,n)=>{"use strict";function i({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return i}}),n(1980)},45079:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i=(0,n(12115).createContext)({searchRequest:null,openSearch(){},clearSearchRequest(){}})},47297:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(95155),o=n(69730),a=n.n(o),r=n(8395);function s(e){return(0,i.jsx)(l.Component,{className:a()("is-block",e.hasDropCap&&"has-drop-cap",e.size&&`is-body-${e.size}`),children:e.children||e.text})}s.canLazyLoad=!1;let l={Component:r.Ay.p.withConfig({componentId:"sc-e683d47a-0"})(["&.has-drop-cap{min-height:78px;}&.has-drop-cap::first-letter{float:left;margin:var(--body--drop-cap-margin);padding:var(--body--drop-cap-padding);line-height:var(--body--drop-cap-line-height);font-family:var(--body--drop-cap-font-family);font-size:var(--body--drop-cap-font-size);font-weight:var(--body--drop-cap-font-weight);font-style:normal;color:var(--content-color,var(--body--drop-cap-color));}.lead-text{text-transform:var(--body--lead-text-text-transform);letter-spacing:var(--body--lead-text-letter-spacing);font-family:var(--body--lead-text-font-family);font-size:var(--body--lead-text-font-size);font-weight:var(--body--lead-text-font-weight);color:var(--content-color,var(--body--lead-text-color));}.underlined{text-decoration:underline;}"])}},52620:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(86816);let r=({className:e,text:t,placement:n})=>{let{translate:o}=(0,a.B)();return(0,i.jsxs)(s.Component,{className:e,$placement:n,children:[(0,i.jsx)(s.FullWidthBorder,{$placement:n}),(0,i.jsx)(s.AdPillContainer,{children:(0,i.jsx)(s.AdPill,{$placement:n,children:t||"top"===n&&o("AdDividerPill.textTop")||"bottom"===n&&o("AdDividerPill.textBottom")||o("AdDividerPill.adLabel")})})]})},s={Component:o.Ay.div.withConfig({componentId:"sc-732668d0-0"})(["position:relative;height:22px;width:100%;z-index:200;",""],e=>"top"===e.$placement?"z-index: 101;":""),AdPillContainer:o.Ay.div.withConfig({componentId:"sc-732668d0-1"})(["position:relative;display:flex;justify-content:center;z-index:101;"]),AdPill:o.Ay.div.withConfig({componentId:"sc-732668d0-2"})(["text-align:center;color:var(--color-ads-secondary);background-color:#ffffff;font-family:var(--ads-font-family);font-size:12px;line-height:15px;letter-spacing:1.2px;text-transform:uppercase;border:1px solid var(--color-ads-stroke);border-radius:13px;position:relative;padding:4px 10px;top:11px;",";"],e=>"bottom"===e.$placement&&`
69    top: -11px;
70  `),FullWidthBorder:o.Ay.div.withConfig({componentId:"sc-732668d0-3"})(["background-color:var(--color-ads-stroke);position:absolute;height:1px;width:100vw;top:22px;",";"],e=>"bottom"===e.$placement&&`
71    top: 0px;
72  `)}},54553:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(42630),o=n.n(i),a=n(12115),r=n(98554),s=n(32160);function l(e){let t=(0,a.useContext)(r.A),[n,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{i(!0)},[]),{contentUnlockedBy:(0,a.useMemo)(()=>{let n=e.content?.restrictAccessBy;if(!n)return null;if("Subscription"===n){{let e=(0,s.UM)("subscriptions");
72if(e?.indexOf("APFDIGI001")>=0)return"subscription"}if(t.user?.email?.indexOf("@a-lehdet.fi")>0)return"a_lehdet_email";{let t=new URLSearchParams(window.location.search).get("share");if(t&&e.content&&o()(e.content?.slug).slice(0,8)===t)return"share"}return null}if("Login"===n)return(0,s.UM)("user_id")?"login":null},[e.content?.restrictAccessBy,t.user?.email,n])}}},55663:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(97490);function r(e){let t={};return void 0!==e.isOpen&&(t.open=e.isOpen),(0,i.jsxs)(s.Details,{...t,children:[(0,i.jsxs)(s.Summary,{onClick:t=>{e.onToggle&&(t.preventDefault(),e.onToggle())},children:[(0,i.jsx)("span",{children:e.title}),(0,i.jsx)(s.Toggle,{className:"toggle",children:(0,i.jsx)(a.A,{name:"angle-right",style:"light"})})]}),(0,i.jsx)(s.Content,{children:e.children})]})}let s={Details:o.Ay.details.withConfig({componentId:"sc-e6f8b11d-0"})(["border-radius:var(--radius-md,8px);border:var(--border-border-primary,1px) solid var(--color-outline-primary);&[open] .toggle{transform:rotate(270deg);}"]),Summary:o.Ay.summary.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-e6f8b11d-1"})(["cursor:pointer;padding:var(--spacing-lg);list-style:none;display:flex;justify-content:space-between;align-items:center;&::-webkit-details-marker{display:none;}"]),Toggle:o.Ay.div.withConfig({componentId:"sc-e6f8b11d-2"})(["transform:rotate(90deg);transition:transform 0.3s;"]),Content:o.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-e6f8b11d-3"})(["padding:var(--spacing-lg);"])}},56005:(e,t,n)=>{"use strict";n.d(t,{ax:()=>i,gX:()=>o});let i=900,o=900},56441:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var i=n(95155),o=n(12115),a=n(88367),r=n(14562),s=n(21084),l=n(90599),c=n(40876);function d(e){let{content:t}=(0,o.useContext)(s.A),{height:n}=(0,a.A)(),d=(0,r.A)(e=>e.addVisitedContent);return(0,i.jsx)(c.A,{rootMarginVertical:-Math.floor(n/2),onEnter:()=>{d(t),(0,l.iy)()!==t.slug&&(0,l.FS)(t)},onEnterOnce:e.onEnterOnce,children:e.children})}},56512:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(95155),o=n(12115),a=n(8395),r=n(84731),s=n(64208);function l(e){var t;let n=(0,o.useRef)(null),[r,l]=(0,o.useState)(!1),[d,u]=(0,o.useState)(0),[m,p]=(0,o.useState)(e.duration||0),[g,h]=(0,o.useState)(!e.duration),x=(0,o.useContext)(a.Dx),f=x["simplecast--embed-color"]||"#95fc85",y=!0===(t=x["simplecast--embed-dark"])||"true"===t;(0,o.useEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{p(e.duration),h(!1)},i=()=>{u(e.currentTime)},o=()=>l(!0),a=()=>l(!1),r=()=>l(!1),s=()=>{h(!1)},c=()=>{h(!1)};return e.readyState>=1&&(p(e.duration),h(!1)),e.addEventListener("loadedmetadata",t),e.addEventListener("canplay",c),e.addEventListener("error",s),e.addEventListener("timeupdate",i),e.addEventListener("play",o),e.addEventListener("pause",a),e.addEventListener("ended",r),()=>{e.removeEventListener("loadedmetadata",t),e.removeEventListener("canplay",c),e.removeEventListener("error",s),e.removeEventListener("timeupdate",i),e.removeEventListener("play",o),e.removeEventListener("pause",a),e.removeEventListener("ended",r)}},[e.audioUrl]);let v=(0,o.useMemo)(()=>(0,s.K)({name:r?"pause":"play",style:"solid"}),[r]),b=e=>{let t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`},C=m||e.duration||0,A=C>0?d/C*100:0,k=C-d,j=(0,o.useMemo)(()=>r||d>0?`-${b(k)}`:C?b(C):void 0,[r,d,k,C]);return(0,i.jsxs)(c.Container,{"data-element-name":"PodcastPlayer",$embedColor:f,$dark:y,children:[(0,i.jsx)("audio",{ref:n,src:e.audioUrl,preload:"metadata"}),(0,i.jsxs)(c.Controls,{children:[(0,i.jsx)(c.PlayButton,{type:"button",onClick:()=>{let e=n.current;e&&(e.paused?e.play():e.pause())},disabled:g,$dark:y,$embedColor:f,$isPlaying:r,"aria-label":r?"Pause":"Play","data-click-element-name":r?"PodcastPauseButton":"PodcastPlayButton",children:(0,i.jsx)(c.PlayIcon,{icon:v,$isPlaying:r})}),(0,i.jsx)(c.ProgressContainer,{children:(0,i.jsx)(c.ProgressBar,{type:"range",min:"0",max:C||0,value:d,onChange:e=>{let t=n.current;if(!t)return;let i=parseFloat(e.target.value);t.currentTime=i,u(i)}
72,disabled:g,$dark:y,$embedColor:f,style:{background:`linear-gradient(
73                to right,
74                var(--podcast-player-progress-filled) 0%,
75                var(--podcast-player-progress-filled) ${A}%,
76                var(--podcast-player-progress-empty) ${A}%,
77                var(--podcast-player-progress-empty) 100%
78              )`}})}),j&&(0,i.jsx)(c.TimePill,{$dark:y,children:j})]})]})}let c={Container:a.Ay.div.withConfig({componentId:"sc-6bc96a9-0"})([""," position:relative;box-sizing:border-box;height:52px;background:var(--podcast-player-bg);border-radius:0;padding:0 12px;display:flex;align-items:center;"],e=>{var t;return t=e.$embedColor,e.$dark?(0,a.AH)(["--podcast-player-bg:#202020;--podcast-player-play-bg:",";--podcast-player-play-color:#ffffff;--podcast-player-progress-filled:",";--podcast-player-progress-empty:rgba(255,255,255,0.2);--podcast-player-time-bg:rgba(255,255,255,0.12);--podcast-player-time-color:#ffffff;"],t,t):(0,a.AH)(["--podcast-player-bg:",";--podcast-player-play-bg:#000000;--podcast-player-play-color:#ffffff;--podcast-player-progress-filled:rgba(0,0,0,0.35);--podcast-player-progress-empty:rgba(255,255,255,0.45);--podcast-player-time-bg:rgba(255,255,255,0.92);--podcast-player-time-color:#202020;"],t)}),Controls:a.Ay.div.withConfig({componentId:"sc-6bc96a9-1"})(["display:flex;align-items:center;gap:12px;width:100%;min-width:0;"]),PlayButton:a.Ay.button.withConfig({componentId:"sc-6bc96a9-2"})(["width:32px;height:32px;border-radius:50%;border:none;background:var(--podcast-player-play-bg);color:var(--podcast-player-play-color);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;&:disabled{opacity:0.5;cursor:not-allowed;}"]),PlayIcon:(0,a.Ay)(r.g).withConfig({componentId:"sc-6bc96a9-3"})(["width:14px;height:14px;display:block;transform:",";"],e=>e.$isPlaying?"none":"translateX(1px)"),ProgressContainer:a.Ay.div.withConfig({componentId:"sc-6bc96a9-4"})(["flex:1;display:flex;align-items:center;min-width:0;"]),ProgressBar:a.Ay.input.withConfig({componentId:"sc-6bc96a9-5"})(["width:100%;height:6px;border-radius:3px;outline:none;border:0;appearance:none;cursor:pointer;&::-webkit-slider-thumb{appearance:none;width:12px;height:12px;border-radius:50%;background:",";cursor:pointer;border:0;}&::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:",";cursor:pointer;border:0;}&:disabled{opacity:0.5;cursor:not-allowed;}"],e=>e.$dark?e.$embedColor:"#000000",e=>e.$dark?e.$embedColor:"#000000"),TimePill:a.Ay.span.withConfig({componentId:"sc-6bc96a9-6"})(["flex-shrink:0;background:var(--podcast-player-time-bg);color:var(--podcast-player-time-color);border-radius:4px;padding:2px 8px;font-size:12px;line-height:1.4;font-variant-numeric:tabular-nums;"])}},57173:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(95155),o=n(12115),a=n(8395),r=n(29610);class s extends o.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`ErrorBoundary (${this.props.name}): ${e}`),console.error("error",e),console.error("errorInfo",t),this.setState({hasError:!0,errorInfo:t,errorMessage:e.message})}render(){return this.state.hasError?(0,i.jsx)(c.Component,{children:(0,i.jsx)(r.A,{onClickRetry:()=>window.location.reload(),errorMessage:this.state.errorMessage,error:JSON.stringify(this.state.errorInfo,null,2),isStagingOrDevelopment:window.location.host.includes("vercel.app")})}):this.props.children}}let l=s,c={Component:a.Ay.div.withConfig({componentId:"sc-8e29612a-0"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;"])}},61776:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(95155),o=n(8395),a=n(61953);function r(e){return(0,i.jsxs)(s.Component,{className:e.isLight?"is-light":"",children:[e.title&&(0,i.jsx)(s.Title,{children:e.title}),e.description&&(0,i.jsx)(s.Description,{children:e.description}),e.buttonUrl&&(0,i.jsx)(s.Button,{href:e.buttonUrl,children:e.buttonText})]})}let s={Component:o.Ay.div.withConfig({componentId:"sc-a344048d-0"})(["border-radius:var(--radius-md);border:4px solid var(--color-container);padding:var(--spacing-3xl);background:var(--color-container-secondary);text-align:center;&.is-light{border-color:var(--color-container-secondary);}"]),Title:o.Ay.div.attrs({className:"is-heading-xxl"}).withConfig({componentId:"sc-a344048d-1"})(["color:var(--color-on-surface);&:not(:last-child){margin-bottom:var(--spacing-md);}"]),Description:o.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-a344048d-2"})(["color:var(--color-on-surface);&:not(:last-child){margin-bottom:var(--spacing-xl);}"]),Button:(0,o.Ay)(a.A).withConfig({componentId:"sc-a344048d-3"})(["@media (max-width:","){width:100%;}"],e=>e.theme["breakpoint-mobile-max"])}},62661:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var i=n(95155),o=n(84731),a=n(64208),r=n(12115),s=n(8395),l=n(34439),c=n(20816),d=n(50274),u=n(86816),m=n(23880);let p=`
79  query ImageAsset(
80    $name: String!
81  ) {
82    asset(
83      name: $name
84    ) {
85      url
86      ... on ImageAsset {
87        id
88        url
89        width
90        height
91        frameright {
92          crops {
93            defId
94            x
95            y
96            outWidth
97            outHeight
98            width
99            height
100          }
101          metadataFormat
102        }
103      }
104    }
105  }
106`;function g(e){let{translate:t}=(0,u.B)(),{Link:n}=(0,r.useContext)(c.A),s=(0,r.useContext)(m.A),l=(0,d.A)({api:s.contentApi,query:p,variables:{name:e.imageName},skip:!e.imageName}),g=(0,r.useMemo)(()=>l?.data?.asset?l.data.asset:!e.imageName&&e.imageUrl?{url:e.imageUrl}:void 0,[e.imageUrl,e.imageName,l?.data]),x=void 0!==e.ratio?e.ratio:"3/2",f=void 0!==e.crop?e.crop:"4-3-horizontal";return(0,i.jsxs)(h.Component,{className:e.url?"has-link":"",onClick:()=>{e.url&&(window.location.href=e.url)}
106,$isOnBackground:e.isOnBackground,children:[(0,i.jsxs)(h.Top,{children:[g&&(0,i.jsxs)(h.ImageContainer,{children:[(0,i.jsx)(h.Image,{...g,crop:f,$ratio:x}),e.hasLinkArrow&&e.url&&(0,i.jsx)(h.LinkArrow,{children:(0,i.jsx)(o.g,{icon:(0,a.K)({name:"angle-right",style:"solid"})})})]}),e.superEmoji&&(0,i.jsx)(h.SuperEmoji,{children:e.superEmoji}),e.title&&(0,i.jsx)(h.Title,{children:e.title}),e.body&&(0,i.jsx)(h.Body,{dangerouslySetInnerHTML:{__html:e.body}})]}),e.url&&null!==e.cta&&(0,i.jsxs)(h.Link,{as:n,href:e.url,children:[e.cta||t("GridCard.ctaLabel"),(0,i.jsx)(o.g,{icon:(0,a.K)({name:"angle-right",style:"solid"})})]})]})}let h={Component:s.Ay.div.withConfig({componentId:"sc-515a47b4-0"})(["display:flex;flex-direction:column;box-sizing:border-box;border-radius:var(--radius-minimal);overflow:hidden;border:1px solid #afafaf;text-align:center;background:white;&.has-link{cursor:pointer;}"," > :last-child{padding-bottom:var(--spacing-lg);}"],e=>e.$isOnBackground&&`
107      box-shadow: var(--box-shadow-8);
108    `),Top:s.Ay.div.withConfig({componentId:"sc-515a47b4-1"})(["flex-grow:1;"]),ImageContainer:s.Ay.div.withConfig({componentId:"sc-515a47b4-2"})(["position:relative;&:not(:last-child){margin-bottom:var(--spacing-lg);}"]),Image:(0,s.Ay)(l.A).withConfig({componentId:"sc-515a47b4-3"})([""," background-color:var(--color-placeholder);"],e=>e.$ratio&&`
109    --frameright-image--aspect-ratio: ${e.$ratio};
110    `),Title:s.Ay.div.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-515a47b4-4"})(["padding-inline:var(--spacing-md);color:#202020;&:first-child{margin-top:var(--spacing-lg);}&:not(:last-child){margin-bottom:var(--spacing-xs);}"]),Body:s.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-515a47b4-5"})(["padding-inline:var(--spacing-md);color:#202020;&:not(:last-child){margin-bottom:var(--spacing-sm);}"]),Link:s.Ay.div.attrs({className:"is-label-m"}).withConfig({componentId:"sc-515a47b4-6"})(["display:block;margin-inline:auto;padding-top:var(--spacing-xl);padding-inline:var(--spacing-md);color:#606060;text-decoration:none;svg{margin-left:var(--spacing-xs);font-size:10px;width:12px;height:12px;}"]),LinkArrow:s.Ay.div.withConfig({componentId:"sc-515a47b4-7"})(["position:absolute;bottom:var(--spacing-lg);right:var(--spacing-lg);display:flex;align-items:center;justify-content:center;border-radius:100%;width:24px;height:24px;background-color:rgba(255,255,255,0.6);font-size:12px;color:var(--color-on-surface-secondary);border:1px solid var(--color-outline-secondary);"]),SuperEmoji:s.Ay.div.withConfig({componentId:"sc-515a47b4-8"})(["bottom:0;left:50%;transform:translateY(calc(-1 * var(--spacing-lg) - 50%));font-family:var(--body--drop-cap-font-family);font-size:var(--body--drop-cap-font-size);font-weight:var(--body--drop-cap-font-weight);line-height:calc(var(--body--drop-cap-line-height) / 2);letter-spacing:-2.5px;font-style:normal;color:var(--grid-card--superemoji-color);-webkit-text-stroke:1.25px var(--grid-card--superemoji-stroke-color);"])}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return s},createSnapshot:function(){return c}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let o=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class a{disable(){throw o}getStore(){}run(){throw o}exit(){throw o}enterWith(){throw o}static bind(e){return e}}let r="u">typeof globalThis&&globalThis.AsyncLocalStorage;function s(){return r?new r:new a}function l(e){return r?r.bind(e):a.bind(e)}function c(){return r?r.snapshot():function(e,...t){return e(...t)}}},67658:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(95155),o=n(69730),a=n.n(o),r=n(12115),s=n(8395),l=n(70195),c=n(20816);let d=e=>{let t=(0,r.useContext)(s.Dx),{Link:n}=(0,r.useContext)(c.A),o=e.textType||t["stripe--text-type"],l=e.textSize||t["stripe--text-size"],d=e.textStyle||t["stripe--font-style"],u={...e.backgroundColor?{backgroundColor:e.backgroundColor}:{},...e.textColor?{color:e.textColor}:{},...e.background?{background:e.background}:{}};return(0,i.jsx)(m.Block,{align:"extra-wide",children:(0,i.jsx)(m.Component,{className:a()(`is-${o}-${l}`,!!e.linkUrl&&"has-link",e.variant&&`is-${e.variant}`),$maxWidth:e.width,$textStyle:d,as:e.linkUrl?n:"div",href:e.linkUrl,
110style:u,children:(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:e.text||""}})})})};d.canLazyLoad=!1;let u=d,m={Block:(0,s.Ay)(l.A).withConfig({componentId:"sc-cc3b582a-0"})(["margin-top:12px !important;margin-bottom:12px !important;"]),Component:s.Ay.div.withConfig({componentId:"sc-cc3b582a-1"})(["display:block;box-sizing:border-box;border-radius:var(--radius-minimal);padding:var(--spacing-md);max-width:",";width:calc(100% - 2 * var(--block-gutter));margin-inline:auto;color:var(--stripe--text-color);background-color:var(--stripe--background-color);text-align:center;font-style:",";"," text-decoration:none;&.has-link{text-decoration:underline;}&.has-link:hover{text-decoration:underline;}> *:last-child{margin-bottom:0;}a{color:inherit;}&.is-danger{background-color:var(--color-universal-danger-lighten-90) !important;border:1px solid var(--color-universal-danger-lighten-60);color:var(--color-universal-gray-900);}"],e=>e.$maxWidth||"var(--width-extra-wide)",e=>"italic"===e.$textStyle?"italic":"normal",e=>"bold"===e.$textStyle&&"font-weight: var(--bold-font-weight, 700);")}},68621:(e,t,n)=>{"use strict";n.d(t,{CookingModeContextProvider:()=>l,A:()=>s});var i=n(95155),o=n(12115),a=n(21084);let r=(0,o.createContext)(null),s=r;function l(e){let{blockContainerRef:t}=(0,o.useContext)(a.A),{isWakeLockSupported:n,isWakeLockEnabled:s,setWakeLock:l}=function(e){let[t,n]=(0,o.useState)(),[i,a]=(0,o.useState)(!1),[r,s]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1),[d,u]=(0,o.useState)();(0,o.useEffect)(()=>{"u"<typeof navigator?u(!1):u(!!navigator.wakeLock)},[]);let m=(0,o.useMemo)(()=>i&&!l?(console.log("Wake lock should be enabled because element is intersecting and lock is not disabled manually"),!0):(console.log("Wake lock should be disabled because it",i?"is intersecting":"is not intersecting","and",l?"is manually disabled":"is not manually disabled"),!1),[i,l]),p=(0,o.useCallback)(()=>{if(d){if(t)return void console.warn("Attempted to request wake lock when there was already a current lock, this should not happen");console.log("Requesting wake lock"),navigator.wakeLock.request("screen").then(e=>n(e)).then(()=>{console.log("Successfully got wake lock")}
110).catch(e=>{console.error("Error getting wake lock",e)})}},[d,t,r]),g=(0,o.useCallback)(()=>{t?(console.log("Releasing wake lock"),t.release().then(()=>n(null)).then(()=>{console.log("Successfully released wake lock")}).catch(e=>{console.error("Error releasing wake lock",e)})):console.warn("Attempted to release wake lock when there was no current lock, this should not happen")},[t]);(0,o.useEffect)(()=>{if(!e)return;console.log("Starting intersection observer for wake lock");let t=new IntersectionObserver(([e])=>{a(e.isIntersecting),console.log("Element is now "+(e.isIntersecting?"intersecting":"not intersecting")+" for wake lock")});return t.observe(e),()=>{console.log("Stopping intersection observer for wake lock due to cleanup"),t.unobserve(e)}},[e]),(0,o.useEffect)(()=>{m&&!t&&(console.log("Wake lock is not on and it should be on, requesting"),p()),!m&&t&&(console.log("Wake lock is on and it should not be on, releasing"),g())},[m,t,r]),(0,o.useEffect)(()=>()=>{t&&(console.log("Releasing wake lock due to component clean up"),g())},[]);let h=(0,o.useCallback)(e=>{e?c(!1):c(!0)},[]);return(0,o.useEffect)(()=>{if(!document||r)return;console.log("Listening to click event on document for wake lock",document);let e=()=>{console.log("Document clicked for wake lock, recording first click"),s(!0)};return document.addEventListener("click",e),()=>{console.log("Removing wake lock click listener due to cleanup"),document.removeEventListener("click",e)}},[r]),{isWakeLockSupported:d,isWakeLockEnabled:!!t,setWakeLock:h}}(t),c=(0,o.useMemo)(()=>({isSupported:n,isEnabled:s,set:l}),[n,s,l]);return(0,i.jsx)(r.Provider,{value:c,children:e.children})}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let i=n(95155),o=n(12115),a=n(41112);function r(e){return{default:e&&"default"in e?e.default:e}}n(21957);let s={loader:()=>Promise.resolve(r(()=>null)),loading:null,ssr:!0},l=function(e){let t={...s,...e},n=(0,o.lazy)(()=>t.loader().then(r)),l=t.loading;function c(e){let r=l?(0,i.jsx)(l,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,c=s?o.Suspense:o.Fragment,d=t.ssr?(0,i.jsxs)(i.Fragment,{children:[null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(c,{...s?{fallback:r}:{},children:d})}return c.displayName="LoadableComponent",c}},74971:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(95155),o=n(12115),a=n(69730),r=n.n(a),s=n(8395),l=n(84398),c=n(1775),d=n(70195),u=n(75013);function m(e){let t=(0,l.qn)(),n=(0,o.useRef)(),a=(0,o.useMemo)(()=>{var t;let n,i=e.src;return i?(t=i,(n=(0,u.If)(t))&&n.embedUrl||t):i},[e.src]),s=(0,o.useMemo)(()=>a?.indexOf("embed.pod.space")>=0,[a]);return((0,o.useEffect)(()=>{if(e.src?.match(/riddle.com/))return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)};function t(e){if(!n.current||e.source!==n.current.contentWindow)return;let t=e.data?.height||e.data?.riddleHeight;t&&(n.current.style.height="number"==typeof t?`${t}px`:t)}},[n,e.src]),!1===t)?(0,i.jsx)(c.A,{title:e.noConsentTitle,description:e.noConsentDescription}):void 0===t?null:(0,i.jsxs)(d.A,{align:e.align,className:e.className,children:[e.title&&(0,i.jsx)(p.Title,{children:e.title}),e.ingress&&(0,i.jsx)(p.Description,{children:e.ingress}),(0,i.jsx)(p.Component,{ref:n,className:r()("is-block",e.align&&`align-${e.align}`),src:a,height:s?"160px":void 0,$height:s?void 0:e.height,$heightMobile:s?void 0:e.heightMobile})]})}let p={Component:s.Ay.iframe.withConfig({componentId:"sc-99564032-0"})(["display:block;border:0;width:100%;"," ",""],e=>e.$height&&`
111      height: ${e.$height}px;
112    `,e=>e.$heightMobile&&`
113      @media (max-width: ${e.theme["breakpoint-mobile-max"]}) {
114        height: ${e.$heightMobile}px;
115      }
116    `),Title:s.Ay.h2.attrs({className:"is-heading-xxl"}).withConfig({componentId:"sc-99564032-1"})(["margin-bottom:var(--spacing-xl);text-align:center;"]),Description:s.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-99564032-2"})(["margin-bottom:var(--spacing-xl);text-align:center;"])}},75707:(e,t,n)=>{"use strict";
116Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let i=n(73623)._(n(68635));function o(e,t){let n={};"function"==typeof e&&(n.loader=e);let o={...n,...t};return(0,i.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(12115);function o(){let[e,t]=(0,i.useState)(!1);(0,i.useEffect)(()=>{t(!0)},[]);let n=e?window?.navigator?.userAgent:void 0,o=e?window?.navigator?.platform:void 0,a=n?.match(/^A-sovellus\//)||!1,r=(0,i.useMemo)(()=>{if(o&&n)return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(o)||n.includes("Mac")},[n,o]),s=(0,i.useMemo)(()=>{if(n)return/android/i.test(n)},[n]);return{userAgent:n,isNativeApp:a,isProbablyIos:r,isProbablyAndroid:s}}},81325:(e,t,n)=>{var i=n(98004),o=n(32538),a=n(88910),r=n(18610),s=n(97154);e.exports=function(e,t,n,l){if(!r(e))return e;t=o(t,e);for(var c=-1,d=t.length,u=d-1,m=e;null!=m&&++c<d;){var p=s(t[c]),g=n;if("__proto__"===p||"constructor"===p||"prototype"===p)break;if(c!=u){var h=m[p];void 0===(g=l?l(h,p,m):void 0)&&(g=r(h)?h:a(t[c+1])?[]:{})}i(m,p,g),m=m[p]}return e}},88312:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(95155),o=n(12115),a=n(8395),r=n(38402);let s=(0,o.forwardRef)(function(e,t){let{containerStyle:n,helpText:o,label:a,icon:s,...c}=e;return(0,i.jsxs)(l.Component,{onClick:e.onClick,style:n,children:[a||o?(0,i.jsxs)(l.LabelRow,{children:[a?(0,i.jsx)(l.Label,{htmlFor:e.id,children:a}):null,o?(0,i.jsx)(r.A,{iconSize:"xs",iconName:"circle-question",iconStyle:"solid",iconColor:"var(--color-primary)",children:o}):null]}):null,(0,i.jsxs)(l.InputContainer,{children:[(0,i.jsx)(l.Input,{type:"text",ref:t,className:"is-body-s",...c}),s]})]})}),l={Component:a.Ay.div.withConfig({componentId:"sc-10f43ee5-0"})(["cursor:pointer;position:relative;display:flex;flex-direction:column;width:100%;align-items:center;gap:var(--spacing-xs);"]),Input:a.Ay.input.withConfig({componentId:"sc-10f43ee5-1"})(["height:41px;background-color:transparent;",""],e=>e.enableInvalid&&`
117      &:invalid {
118        border: 2px solid var(--color-universal-danger);
119      }
120    `),InputContainer:a.Ay.div.withConfig({componentId:"sc-10f43ee5-2"})(["position:relative;width:100%;display:flex;align-items:center;"]),LabelRow:a.Ay.div.withConfig({componentId:"sc-10f43ee5-3"})(["width:100%;display:flex;justify-content:space-between;align-items:center;"]),Label:a.Ay.label.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-10f43ee5-4"})(["align-self:start;"])}},88499:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(95155),o=n(12115),a=n(69730),r=n.n(a),s=n(8395),l=n(70195);function c(e){let t=(0,o.useContext)(s.Dx),n="ordered"===e.type?"ol":"ul",a=t["list--item-body-size"];return(0,i.jsx)(l.A,{children:(0,i.jsx)(d.Component,{as:n,className:r()(`is-body-${a}`,e.type||"unordered"),children:e.children})})}let d={Component:s.Ay.div.withConfig({componentId:"sc-e80d783-0"})(["margin-top:0;margin-bottom:0;padding-left:var(--list--left-spacing);> li{&:not(:last-child){margin-bottom:var(--list--item-spacing);}p{display:inline-block;}}&.unordered{padding-left:calc(var(--list--item-marker-size) + var(--list--item-marker-distance-from-text));list-style:none;> li::before{content:'\\2022';color:var(--list--item-marker-color);display:inline-block;width:var(--list--item-marker-size);margin-left:calc(-1 * var(--list--item-marker-size));font-size:var(--list--item-marker-font-size);vertical-align:top;position:relative;left:calc(-1 * var(--list--item-marker-distance-from-text));font-weight:var(--list--item-marker-font-weight);font-family:var(--list--item-marker-font-family);}}&.ordered{padding-left:calc(var(--list--item-marker-size) + var(--list--item-marker-distance-from-text));list-style:none;> li{counter-increment:li;&::before{content:counter(li) '.';color:var(--list--item-marker-color);display:inline-block;width:var(--list--item-marker-size);margin-left:calc(-1 * var(--list--item-marker-size));position:relative;
120left:calc(-1 * var(--list--item-marker-distance-from-text));font-weight:var(--list--item-marker-font-weight);}}}"])}},88903:(e,t,n)=>{"use strict";n.d(t,{AW:()=>c,Ay:()=>d,Eq:()=>s,Lf:()=>l});var i,o,a,r=n(12115),s=((i={}).none="",i.charge="ImmediateCharge",i.noCharge="ImmediateNotCharge",i.periodEnd="PeriodEnd",i.payAndChooseFreeItem="PayAndChooseFreeItem",i),l=((o={}).periodEnd="PeriodEnd",o),c=((a={}).Expensive="Expensive",a.NoTime="NoTime",a.NotInterested="NotInterested",a.BadContent="BadContent",a.Other="Other",a);let d=(0,r.createContext)({isEnabled:!1})},90927:(e,t,n)=>{"use strict";function i(e){try{return window.sessionStorage.getItem(e)}catch(e){return console.warn("sessionStorage.getItem failed:",e),null}}function o(e,t){try{return window.sessionStorage.setItem(e,t),!0}catch(e){return console.warn("sessionStorage.setItem failed:",e),!1}}function a(e){try{return window.sessionStorage.removeItem(e),!0}catch(e){return console.warn("sessionStorage.removeItem failed:",e),!1}}n.d(t,{Oq:()=>a,Us:()=>o,Uy:()=>i})},92392:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(95155);n(12115);var o=n(8395),a=n(85609),r=n(13481),s=n(28456);let l=function(e){let t=(0,s.A)();return(0,i.jsx)(a.A,{elementName:"LoginWall",elementText:"Juttu jatkuu heti kirjautumisen j\xe4lkeen",placementName:e.placementName,children:(0,i.jsx)(c.Container,{"data-element-name":"LoginWall",children:(0,i.jsx)(r.A,{elementName:"LoginWall",buttonClickElementName:"LoginWallLoginButton",title:"Juttu jatkuu heti kirjautumisen j\xe4lkeen",description:"Kirjautuminen on ilmaista ja nopeaa. Jos sinulla ei viel\xe4 ole tunnusta, luo se nyt.",buttonUrl:t,buttonText:"Kirjaudu ilmaiseksi",hasFade:!0})})})},c={Container:o.Ay.div.withConfig({componentId:"sc-b8c75ff3-0"})(["margin-top:var(--block-spacing);margin-bottom:var(--spacing-5xl);position:relative;"])}},95753:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var i=n(95155),o=n(12115),a=n(8395),r=n(69730),s=n.n(r),l=n(84731),c=n(64208),d=n(86816);function u(e){let t=(0,o.useRef)(),n=void 0!==e.value,[a,r]=(0,o.useState)(""),l=n?e.value:a,[u,p]=(0,o.useState)(!1),{translate:g}=(0,d.B)(),h=t=>{n?e.onChange?.(t):r(t)};(0,o.useEffect)(()=>{e.onFocus?.(u)},[u]),(0,o.useEffect)(()=>{n||e.onChange(l)},[l,n]),(0,o.useEffect)(()=>{e.searchFocusRequestId&&t.current?.focus?.()},[e.searchFocusRequestId]);let x=!e.isCloseable&&!e.hideResetButton&&(u||!!l),f="right"===e.closeButtonPosition,y=e.isCloseable?(0,i.jsx)(m.CloseButton,{icon:(0,c.K)({name:"xmark",style:"light"}),onClick:()=>{h(""),t.current?.blur?.(),e.onClose?.()}}):null;return(0,i.jsxs)(m.Component,{onClick:e.onClick,className:s()(e.isCloseable&&"is-closeable",e.className),children:[!f&&y,(0,i.jsxs)(m.InputWrapper,{children:[(0,i.jsx)(m.SearchIcon,{icon:(0,c.K)({name:"magnifying-glass",style:"light"})}),(0,i.jsx)(m.SearchInput,{type:"search",ref:t,placeholder:e.placeholder||g("Search.inputPlaceholder"),"aria-label":e.ariaLabel,enterKeyHint:e.enterKeyHint,value:l,onFocus:()=>p(!0),onBlur:()=>p(!1),onChange:e=>h(e.target.value),onKeyDown:t=>{if("Enter"===t.key){if(e.onSubmit){t.preventDefault(),e.onSubmit(l);return}t.target.blur()}}})]}),f&&y,x&&(0,i.jsx)(m.ResetButton,{onClick:()=>{h(""),t.current?.blur?.()},children:"Kumoa"})]})}let m={Component:a.Ay.div.withConfig({componentId:"sc-7c705a3d-0"})(["cursor:pointer;position:relative;display:flex;width:100%;height:41px;align-items:center;&.is-closeable{gap:var(--spacing-sm);}"]),InputWrapper:a.Ay.div.withConfig({componentId:"sc-7c705a3d-1"})(["position:relative;display:flex;flex:1;min-width:0;height:100%;align-items:center;"]),SearchIcon:(0,a.Ay)(l.g).withConfig({componentId:"sc-7c705a3d-2"})(["color:var(--navigation-menu--icon-color);font-size:var(--navigation-menu--icon-size);position:absolute;top:50%;left:10px;transform:translateY(-50%);z-index:1;.is-closeable &{left:14px;}"]),CloseButton:(0,a.Ay)(l.g).withConfig({componentId:"sc-7c705a3d-3"})(["flex-shrink:0;font-size:20px;width:20px;color:#202020;cursor:pointer;padding:10px;margin:-10px;"]),ResetButton:a.Ay.a.attrs({className:"is-body-s"}).withConfig({componentId:"sc-7c705a3d-4"})(["padding-left:10px;line-height:40px !important;color:var(--search--close-button-color);"]),CloseIcon:(0,a.Ay)(l.g).withConfig({componentId:"sc-7c705a3d-5"})([""]),SearchInput:a.Ay.input.withConfig({componentId:"sc-7c705a3d-6"})(["width:100%;border:var(--navigation-menu--search-input-border);outline:none;font-size:var(--body-s-font-size);line-height:var(--body-s-line-height);padding:var(--spacing-sm) var(--spacing-md);padding-left:42px;height:41px;border-radius:var(--radius-minimal);background-color:transparent;&::placeholder{color:var(--navigation-menu--search-input-placeholder-color);}::-webkit-search-cancel-button{appearance:none;height:15px;width:15px;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMzg0IDUxMiI+PCEtLSEgRm9udCBBd2Vzb21lIEZyZWUgNi40LjIgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjMgRm9udGljb25zLCBJbmMuIC0tPjxwYXRoIGQ9Ik0zNDIuNiAxNTAuNmMxMi41LTEyLjUgMTIuNS0zMi44IDAtNDUuM3MtMzIuOC0xMi41LTQ1LjMgMEwxOTIgMjEwLjcgODYuNiAxMDUuNGMtMTIuNS0xMi41LTMyLjgtMTIuNS00NS4zIDBzLTEyLjUgMzIuOCAwIDQ1LjNMMTQ2LjcgMjU2IDQxLjQgMzYxLjRjLTEyLjUgMTIuNS0xMi41IDMyLjggMCA0NS4zczMyLjggMTIuNSA0NS4zIDBMMTkyIDMwMS4zIDI5Ny40IDQwNi42YzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMMjM3LjMgMjU2IDM0Mi42IDE1MC42eiIvPjwvc3ZnPg==);background-size:15px 15px;}"])}},97735:(e,t,n)=>{"use strict";let i,o,a,r,s;n.d(t,{e:()=>sN,default:()=>sS});var l=n(95155),c=n(37206),d=n(12115),u=n(35799),m=n.n(u),p=n(36610);let g=["heading-one","heading-two","heading-three","heading-four","block-quote","mega-quote"],h=0;function x(e){return!!e&&("image"===e.type||"video"===e.type)&&e.data&&"full"===e.data.align&&!0===e.data.fullHeight}function f(e){let t=Object.keys(e)[0];return!Object.values(e)[0].disableAdjacentAds&&"StripeBannerBlock"!==t}var y=n(62953),v=n(11038),b=n(68562);let C="includesOneOf",A="equalsOneOf",k="notIncludesAnyOf",j="notEqualsAnyOf",w={};function I(e,t,n){if(!t)return!0;
120if(n)if(n===A){if(!Array.isArray(t))throw Error("Condition is not an array: "+t);if(!t.some(t=>e===t))throw w}else if(n===j){if(!Array.isArray(t))throw Error("Condition is not an array: "+t);if(t.some(t=>e===t))throw w}else if(n===C){if(!Array.isArray(e))throw Error("Value is not array: "+e);if(!Array.isArray(t))throw Error("Condition is not an array: "+t);if(!t.some(t=>e.some(e=>e===t)))throw w}else if(n===k){if(!Array.isArray(e))throw Error("Value is not array: "+e);if(!Array.isArray(t))throw Error("Condition is not an array: "+t);if(t.some(t=>e.some(e=>e===t)))throw w}else throw Error("Unknown check type: "+n);else throw Error("Missing check type")}var N=n(14562),S=n(8395),E=n(70195),T=n(55663);function P(e){let[t,n]=(0,d.useState)(null);return e.items&&0!==e.items.length?(0,l.jsx)(E.A,{children:(0,l.jsx)(L.Container,{children:e.items.map((e,i)=>e.title?(0,l.jsx)(L.Item,{children:(0,l.jsx)(T.A,{title:e.title,isOpen:t===i,onToggle:()=>{n(t===i?null:i)},children:e.content?(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:e.content}}):null})},i):null)})}):null}P.canLazyLoad=!1;let L={Container:S.Ay.div.withConfig({componentId:"sc-26b975fd-0"})(["display:flex;flex-direction:column;"]),Item:S.Ay.div.withConfig({componentId:"sc-26b975fd-1"})(["&:first-child details{border-radius:var(--radius-md,8px) var(--radius-md,8px) 0 0;}&:last-child details{border-radius:0 0 var(--radius-md,8px) var(--radius-md,8px);}&:only-child details{border-radius:var(--radius-md,8px);}&:not(:first-child):not(:last-child) details{border-radius:0;}&:not(:first-child) details{border-top:none;}"])};var M=n(34439),B=n(77186),R=n(20816);let D={Block:(0,S.Ay)(E.A).withConfig({componentId:"sc-6fec9860-0"})(["&.is-unknown-device{@media (max-width:","){display:none;}}"],e=>e.theme["breakpoint-tablet-max"]),Component:S.Ay.div.withConfig({componentId:"sc-6fec9860-1"})(["position:relative;border-bottom:1px solid var(--color-on-secondary-supportive);padding:var(--spacing-md) var(--spacing-xl);background-color:var(--color-secondary-lighten);"]),LogoAndText:S.Ay.div.withConfig({componentId:"sc-6fec9860-2"})(["display:flex;gap:10px;align-items:center;max-width:var(--width-wide);margin-inline:auto;"]),Logo:(0,S.Ay)(M.A).withConfig({componentId:"sc-6fec9860-3"})(["flex:0 0 auto;width:48px;height:48px;"]),Text:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-6fec9860-4"})(["flex:1 1;"]),StoreBadges:S.Ay.div.withConfig({componentId:"sc-6fec9860-5"})(["display:flex;flex-direction:row;flex:0 0 auto;gap:var(--spacing-sm);margin-top:var(--spacing-sm);@media (max-width:","){display:none;}"],e=>e.theme["breakpoint-tablet-max"]),StoreLink:S.Ay.a.withConfig({componentId:"sc-6fec9860-6"})([""]),StoreBadge:(0,S.Ay)(M.A).withConfig({componentId:"sc-6fec9860-7"})(["width:150px;height:auto;"]),MainLink:S.Ay.a.withConfig({componentId:"sc-6fec9860-8"})(["&::before{content:'';display:block;position:absolute;left:0;top:0;width:100%;height:100%;}@media (min-width:","){display:none;}"],e=>e.theme["breakpoint-desktop"])},O={Heading:S.Ay.div.withConfig({componentId:"sc-57e6ed8b-0"})(["margin-inline:var(--spacing-lg);padding-top:var(--spacing-xs);padding-bottom:var(--spacing-sm);border-bottom:1px solid var(--color-tone-light);"])};var z=n(39488),F=n(21084),U=n(10524);let $={Component:S.Ay.blockquote.withConfig({componentId:"sc-90f01a52-0"})(["box-sizing:border-box;margin:0;padding-top:calc(var(--spacing-2xl) + var(--blockquote--line-distance));padding-bottom:calc(var(--spacing-2xl) + var(--blockquote--line-distance));padding-inline:var(--blockquote--horizontal-padding);width:100%;text-align:var(--blockquote--text-align);color:var(--blockquote--text-color);&::after,&::before{content:'';position:relative;display:block;border-top:var(--blockquote--line-width) solid var(--content-color,var(--blockquote--line-color));margin-inline:auto;max-width:var(--blockquote--line-max-width);}&::before{top:calc(-1 * var(--blockquote--line-distance));}&::after{top:var(--blockquote--line-distance);}"])};var H=n(64208),V=n(84731);function q(e){let{Link:t}=(0,d.useContext)(R.A);return(0,l.jsx)(K.Component,{children:e.crumbs.map((e,n)=>(0,l.jsxs)(K.Crumb,{as:e.href?t:void 0,href:e.href,onClick:e.onClick,children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"angle-left",style:"solid"})}),e.label]},n))})}let K={Component:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-db77cdd6-0"})(["width:var(--width-column);max-width:100%;margin-inline:auto;"]),Crumb:S.Ay.a.withConfig({componentId:"sc-db77cdd6-1"})(["color:var(--color-on-surface-secondary);cursor:pointer;svg{margin-right:var(--spacing-xs);width:12px;}"])};var G=n(89217),W=n(62661);function Y(e){let[t,n]=(0,d.useState)();return e.items?(0,l.jsxs)(_.Component,{"data-element-name":"GridCarousel",children:[(0,l.jsx)(_.Carousel,{ref:e=>n(e),children:e.items.map((t,n)=>(0,l.jsx)(_.Slide,{children:(0,l.jsx)(_.SlideAnimationWrapper,{children:(0,l.jsx)(W.A,{title:t.title,body:t.body,imageUrl:t.image||t.imageUrl,imageName:t.imageName,url:t.url,cta:t.cta||e.cta,isOnBackgroun
120d:e.isOnBackground,superEmoji:t.superEmoji})})},n))}),(0,l.jsx)(_.PaginationContainer,{children:(0,l.jsx)(G.A,{carouselEl:t})})]}):null}let _={Component:S.Ay.div.withConfig({componentId:"sc-c9ed23c1-0"})(["position:relative;padding-bottom:var(--spacing-xl);--content-card--media-aspect-ratio:3/2;@media (min-width:","){max-width:calc(var(--width-extra-wide) + 2 * 16px);margin-inline:auto;}"],e=>e.theme["breakpoint-desktop"]),Carousel:S.Ay.div.withConfig({componentId:"sc-c9ed23c1-1"})(["display:flex;align-items:stretch;justify-content:flex-start;gap:var(--spacing-lg);max-width:100%;overflow-y:hidden;overflow-x:auto;scroll-padding:var(--spacing-lg);scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),Slide:S.Ay.div.withConfig({componentId:"sc-c9ed23c1-2"})(["display:flex;flex-grow:1;flex-shrink:0;flex-basis:258px;min-width:258px;max-width:calc((100% - 3 * var(--spacing-lg)) / 4);scroll-snap-align:start;&:first-child{margin-left:20px;}&:last-child{margin-right:20px;}&:only-child{margin-inline:auto;}> * > *{height:calc(100% - 2px);}"]),SlideAnimationWrapper:S.Ay.div.withConfig({componentId:"sc-c9ed23c1-3"})(["width:100%;height:100%;"]),PaginationContainer:S.Ay.div.withConfig({componentId:"sc-c9ed23c1-4"})(["margin-top:var(--spacing-lg);@media (min-width:","){margin-top:var(--spacing-xl);}"],e=>e.theme["breakpoint-tablet"])},J={Container:S.Ay.div.withConfig({componentId:"sc-c3f2a2fe-0"})(["&.has-background{padding-top:var(--spacing-4xl);padding-bottom:var(--spacing-xl);}"]),Title:S.Ay.h2.attrs({className:"is-heading-xxxl"}).withConfig({componentId:"sc-c3f2a2fe-1"})(["margin-bottom:var(--spacing-lg);margin-inline:auto;max-width:calc(var(--width-column));padding-inline:var(--block-gutter);text-align:center;",""],e=>e.$color&&`
121      color: ${e.$color};
122    `),Description:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-c3f2a2fe-2"})(["margin-bottom:var(--spacing-2xl);margin-inline:auto;max-width:calc(var(--width-column));padding-inline:var(--block-gutter);text-align:center;",""],e=>e.$color&&`
123      color: ${e.$color};
124    `)};var X=n(88136),Z=n(86816);let Q=0,ee=({clickElementName:e,switchStatus:t,onChange:n})=>{let i=(0,d.useMemo)(()=>++Q,[]),o=(0,d.useMemo)(()=>(e||"ToggleSwitch")+"-"+i,[i,e]);return(0,l.jsxs)(et.ToggleContainer,{"data-click-element-name":e,children:[(0,l.jsx)(et.ToggleInput,{id:o,checked:t,onChange:n}),(0,l.jsx)(et.ToggleTrack,{htmlFor:o,children:(0,l.jsx)(et.ToggleThumb,{})})]})},et=(o=S.Ay.div.withConfig({componentId:"sc-7ebc8d58-0"})(["position:relative;width:52px;height:32px;"]),a=S.Ay.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-7ebc8d58-1"})(["opacity:0;position:absolute;width:100%;height:100%;margin:0;cursor:pointer;"]),r=S.Ay.label.withConfig({componentId:"sc-7ebc8d58-2"})(["position:absolute;top:0;left:0;width:100%;height:100%;background-color:#e0e0e0;border-radius:18px;transition:background-color 0.2s ease;",":checked + &{background-color:var(--color-primary-lighten);}"],a),s=S.Ay.span.withConfig({componentId:"sc-7ebc8d58-3"})(["position:absolute;top:50%;left:4px;transform:translateY(-50%);width:27px;height:27px;background-color:white;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,0.2);transition:left 0.2s ease;",":checked + "," &{left:calc(100% - 30px);}"],a,r),{ToggleContainer:o,ToggleInput:a,ToggleTrack:r,ToggleThumb:s});var en=n(68621);function ei(){let e=(0,d.useContext)(en.A),{translate:t}=(0,Z.B)();return e&&e.isSupported?(0,l.jsxs)(eo.Component,{children:[(0,l.jsx)(ee,{clickElementName:"WakeLockToggle",switchStatus:e.isEnabled,onChange:()=>e.set(!e.isEnabled)}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eo.Title,{children:t("CookingModeBlock.cookingModeTitle")}),(0,l.jsx)(eo.Description,{children:t("CookingModeBlock.cookingModeDescription")})]})]}):null}let eo={Component:S.Ay.div.withConfig({componentId:"sc-11e81af7-0"})(["display:flex;flex-direction:row;align-items:center;gap:var(--spacing-md);color:var(--color-on-surface);div{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-sm);}"]),Title:S.Ay.div.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-11e81af7-1"})([""]),Description:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-11e81af7-2"})(["position:relative;top:1px;"])};function ea(){return(0,l.jsx)(E.A,{children:(0,l.jsx)(ei,{})})}ea.canLazyLoad=!1;var er=n(88903),es=n(88312),el=n(37952),ec=n(12174),ed=n(61953),eu=n(56175),em=n(23880);function ep(e){return/^\d+$/.test(e)}let eg=`
125  mutation ChangeCustomerNumber(
126    $viewerId: ID!
127    $customerNumber: String!
128    $firstName: String!
129    $lastName: String!
130    $postalCode: String
131    $countryName: String
132    $isPersonal: Boolean!
133  ) {
134    changeCustomerNumber(
135      viewerId: $viewerId
136      customerNumber: $customerNumber
137      postalCode: $postalCode
138      firstName: $firstName
139      lastName: $lastName
140      countryName: $countryName
141      isPersonal: $isPersonal
142    )
143  }
144`;function eh(){let e=(0,d.useContext)(er.Ay),t=(0,d.useContext)(em.A),[n,i]=(0,d.useState)(""),[o,a]=(0,d.useState)(!0),[r,s]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(""),[g,h]=(0,d.useState)(""),[x,f]=(0,d.useState)(void 0),y=(0,d.useMemo)(()=>!!n&&!!r&&!!c&&(!o||!!m)&&(!!o||!!g)&&"boolean"==typeof x,[n,o,r,c,m,g,x]),v=(0,eu.A)({api:t.aspaApiAuthenticated,query:eg});return(0,l.jsxs)(ex.Component,{"data-element-name":"CustomerNumberForm",children:[(0,l.jsx)(ex.Title,{children:"T\xe4ydenn\xe4 tietosi"}),(0,l.jsx)(ex.Description,{children:"N\xe4yt\xe4mme tilauksesi asiakasnumeron mukaan. L\xf6yd\xe4t asiakasnumerosi s\xe4hk\xf6postilla toimitetusta tilausvahvistuksesta tai laskulta."}),(0,l.jsx)(ex.Divider,{}),(0,l.jsx)(el.xv,{children:(0,l.jsxs)(el.wp,{onSubmit:async t=>{t.preventDefault(),await v.mutate({variables:{viewerId:e.customer.id,customerNumber:n,firstName:r,lastName:c,isPersonal:x,...o?{postalCode:m}:{countryName:g}}}),await e.refetch()},children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)(ex.CustomerNumberTextInput,{id:"asiakasnumero",type:"text",inputMode:"numeric",maxLength:12,label:"Asiakasnumero",value:n,onChange:e=>{(!e.target.value||ep(e.target.value))&&i(e.target.value)}}),(0,l.jsxs)("div",{children:[(0,l.jsx)(ex.InputHeading,{children:"Asiakasnumeron omistajan kotimaa"}),(0,l.jsxs)(ex.RadioLabel,{children:[(0,l.jsx)(ex.RadioInput,{type:"radio",checked:o,onChange:()=>a(!0)}),"Suomi, osoite kotimaassa"]}),(0,l.jsxs)(ex.RadioLabel,{children:[(0,l.jsx)(ex.RadioInput,{type:"radio",checked:!o,onChange:()=>a(!1)}),"Muu, osoite ulkomailla"]})]}),(0,l.jsx)(es.A,{id:"etunimi",maxLength:40,label:"Etunimi",value:r,onChange:e=>s(e.target.value)}),(0,l.jsx)(es.A,{id:"sukunimi",maxLength:40,label:"Sukunimi",value:c,onChange:e=>u(e.target.value)}),o?(0,l.jsx)(es.A,{id:"postinumero",inputMode:"numeric",minLength:5,maxLength:5,label:"Postinumero",value:m,onChange:e=>{let t=e.target.value;(!t||ep(t))&&p(t)}}):(0,l.jsxs)("div",{children:[(0,l.jsx)(ex.InputLabel,{children:"Maa"}),(0,l.jsxs)(ex.SelectInput,{value:g,onChange:e=>h(e.target.value),children:[(0,l.jsx)("option",{value:"",children:"Valitse maa"}),ec.A.map(e=>(0,l.jsx)("option",{value:e.countryName,children:e.countryName},e.countryCode))]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(ex.RadioLabel,{children:[(0,l.jsx)(ex.RadioInput,{type:"radio",checked:!0===x,onChange:()=>f(!0)}
144),"Vakuutan, ett\xe4 asiakasnumero on omani ja k\xe4ytt\xe4j\xe4tunnukseni tiedot voi p\xe4ivitt\xe4\xe4 asiakasnumeron tietoihin."]}),(0,l.jsxs)(ex.RadioLabel,{children:[(0,l.jsx)(ex.RadioInput,{type:"radio",checked:!1===x,onChange:()=>f(!1)}),"Vakuutan, ett\xe4 minulla on oikeus asioida henkil\xf6n puolesta, jolle asiakasnumero kuuluu. Tarvittaessa esit\xe4n todisteen asiasta."]})]})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeCustomerNumberButton",disabled:!y||v.loading,buttonType:"submit",children:"Tallenna"}),(v.error||v.errors?.length>0)&&(0,l.jsx)(ex.ErrorText,{children:"Jotain meni vikaan"})]})})]})}let ex={Component:S.Ay.div.withConfig({componentId:"sc-a78136a9-0"})(["border:1px solid var(--color-outline-secondary);border-radius:var(--radius-lg);padding:var(--spacing-2xl) var(--spacing-lg);background:var(--color-container);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);input{background:white;}"]),Title:S.Ay.h2.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-a78136a9-1"})(["margin-bottom:var(--spacing-xl);"]),Description:S.Ay.p.attrs({className:"is-body-s"}).withConfig({componentId:"sc-a78136a9-2"})([""]),Divider:S.Ay.div.withConfig({componentId:"sc-a78136a9-3"})(["background:var(--color-outline-secondary);height:1px;margin-top:var(--spacing-xl);margin-bottom:var(--spacing-xl);"]),InputHeading:S.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-a78136a9-4"})(["margin-bottom:var(--spacing-xs);padding-bottom:var(--spacing-md);border-bottom:2px solid var(--color-outline-secondary);"]),InputLabel:S.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-a78136a9-5"})(["margin-bottom:var(--spacing-xs);"]),RadioLabel:S.Ay.label.attrs({className:"is-body-s"}).withConfig({componentId:"sc-a78136a9-6"})(["display:block;border-bottom:1px solid var(--color-outline-secondary);padding-top:var(--spacing-lg);padding-bottom:var(--spacing-lg);"]),RadioInput:S.Ay.input.attrs({}).withConfig({componentId:"sc-a78136a9-7"})(["margin-right:var(--spacing-sm);"]),SelectInput:S.Ay.select.withConfig({componentId:"sc-a78136a9-8"})([""]),CustomerNumberTextInput:(0,S.Ay)(es.A).withConfig({componentId:"sc-a78136a9-9"})(["&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-a78136a9-10"})([""])};var ef=n(17913),ey=n(24272),ev=n(32681),eb=n(99934),eC=n(98308),eA=n(38402);let ek=(0,d.forwardRef)(function(e,t){let{containerStyle:n,helpText:i,label:o,icon:a,...r}=e;return(0,l.jsxs)(ej.Component,{onClick:e.onClick,style:n,children:[o||i?(0,l.jsxs)(ej.LabelRow,{children:[o?(0,l.jsx)(ej.Label,{htmlFor:e.id,children:o}):null,i?(0,l.jsx)(eA.A,{iconSize:"xs",iconName:"circle-question",iconStyle:"solid",iconColor:"var(--color-primary)",children:i}):null]}):null,(0,l.jsxs)(ej.InputContainer,{children:[(0,l.jsx)(ej.Select,{ref:t,className:"is-body-s",...r,children:e.children}),a]})]})}),ej={Component:S.Ay.div.withConfig({componentId:"sc-a11951a7-0"})(["cursor:pointer;position:relative;display:flex;flex-direction:column;width:100%;align-items:center;gap:var(--spacing-xs);"]),Select:S.Ay.select.withConfig({componentId:"sc-a11951a7-1"})(["height:54px;background-color:transparent;",""],e=>e.enableInvalid&&`
145      &:invalid {
146        border: 2px solid var(--color-universal-danger);
147      }
148    `),InputContainer:S.Ay.div.withConfig({componentId:"sc-a11951a7-2"})(["position:relative;width:100%;display:flex;align-items:center;"]),LabelRow:S.Ay.div.withConfig({componentId:"sc-a11951a7-3"})(["width:100%;display:flex;justify-content:space-between;align-items:center;"]),Label:S.Ay.label.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-a11951a7-4"})(["align-self:start;"])};function ew(e){let{iconName:t,iconStyle:n}=(0,d.useMemo)(()=>
148"success"===e.result?{iconName:"circle-check",iconStyle:"solid"}:"pending"===e.result?{iconName:"hourglass-half",iconStyle:"solid"}:"failure"===e.result?{iconName:"xmark",iconStyle:"solid"}:void 0,[e.result]);return(0,l.jsxs)(eI.Component,{children:[t&&(0,l.jsx)(eI.Icon,{icon:(0,H.K)({name:t,style:n||"regular"})}),e.title&&(0,l.jsx)(eI.Title,{children:e.title}),e.description&&(0,l.jsx)(eI.Description,{children:e.description})]})}let eI={Component:S.Ay.div.withConfig({componentId:"sc-3f7ebc8d-0"})(["color:var(--color-universal-success);text-align:center;"]),Icon:(0,S.Ay)(V.g).withConfig({componentId:"sc-3f7ebc8d-1"})(["font-size:100px;margin-bottom:var(--spacing-lg);"]),Title:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-3f7ebc8d-2"})([""]),Description:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-3f7ebc8d-3"})(["display:none;margin-top:var(--spacing-lg);"])},eN=`
149  mutation ChangeCustomerPrimaryAddress(
150    $viewerId: ID!
151    $address: AddressInput!
152  ) {
153    changeCustomerPrimaryAddress(
154      viewerId: $viewerId
155      address: $address
156    ) {
157      ...Address
158    }
159  }
160  ${eb.pV}
161`;function eS(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(""),[a,r]=(0,d.useState)(""),[s,c]=(0,d.useState)(""),[u,m]=(0,d.useState)(""),p=(0,eu.A)({api:t.aspaApiAuthenticated,query:eN}),g=(0,d.useMemo)(()=>!!p.data?.changeCustomerPrimaryAddress,[p.data]),h=(0,d.useCallback)(()=>{let e=n.customer?.primaryAddress;o(e?.street),r(e?.postalCode),c(e?.city),m(e?.countryCode||"FIN")},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(h(),p.reset())},[e.isOpen]);let x=(0,d.useMemo)(()=>{let e=n.customer?.primaryAddress;return i!==e?.street||a!==e?.postalCode||s!==e?.city||u!==e?.countryCode},[n.customer,i,a,s,u]),f=(0,d.useMemo)(()=>!!u&&("FIN"===u?!!i&&!!a&&!!s:!!i&&!!s),[i,a,s,u]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Osoitetiedot",onClose:()=>{p.loading||e.onClose?.()},children:(0,l.jsx)(eE.Container,{"data-element-name":"ChangeCustomerAddressForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async e=>{e.preventDefault(),await p.mutate({variables:{viewerId:n.customer.id,address:{street:i,postalCode:a,city:s,countryCode:u}}}),await n.refetch()},children:g?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Muutos tallennettu",description:"Osoitteenmuutos on nyt k\xe4sitelt\xe4v\xe4n\xe4.",result:"success"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",style:{marginBottom:0},children:"Kun osoitteesi muuttuu, riitt\xe4\xe4 ett\xe4 teet osoitteenmuutoksen Postiin. Lehti tulee n\xe4in automaattisesti uuuteen osoitteeseen."}),(0,l.jsx)(es.A,{id:"katuosoite",label:"Katuosoite",value:i||"",onChange:e=>o(e.target.value)}),(0,l.jsx)(es.A,{id:"postinumero",type:"text",..."FIN"===u?{minLength:5,maxLength:5,inputMode:"numeric"}:{maxLength:9},label:"Postinumero",value:a,onChange:e=>{let t=e.target.value;("FIN"!==u||!t||ep(t))&&r(e.target.value)}}),(0,l.jsx)(es.A,{id:"postitoimipaikka",label:"Postitoimipaikka",value:s||"",onChange:e=>c(e.target.value)}),(0,l.jsxs)(ek,{id:"country",label:"Maa",value:u,onChange:e=>m(e.target.value),children:[(0,l.jsx)("option",{value:"",children:"Valitse maa"}),ec.A.map(e=>(0,l.jsx)("option",{value:e.countryCode,children:e.countryName},e.countryCode))]})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeCustomerAddressButton",buttonType:"submit",disabled:!f||!x||p.loading,children:"Tallenna"}),(p.error||p.errors?.length>0)&&(0,l.jsx)(eE.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let eE={Container:S.Ay.div.withConfig({componentId:"sc-944559c3-0"})(["input,select{background-color:white;}"]),InputHeading:S.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-944559c3-1"})(["margin-bottom:var(--spacing-xs);"]),RadioLabel:S.Ay.label.attrs({className:"is-body-s"}).withConfig({componentId:"sc-944559c3-2"})(["display:block;margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);"]),RadioInput:S.Ay.input.attrs({}).withConfig({componentId:"sc-944559c3-3"})([""]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-944559c3-4"})([""])},eT=`
162  mutation RequestNameChange(
163    $viewerId: ID!
164    $name: NameInput!
165  ) {
166    requestNameChange(
167      viewerId: $viewerId
168      name: $name
169    ) {
170      ...Customer
171    }
172  }
173  ${eb.nD}
174`;function eP(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),{Link:i}=(0,d.useContext)(R.A),[o,a]=(0,d.useState)(""),[r,s]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(""),[g,h]=(0,d.useState)(""),x=(0,d.useMemo)(()=>n.customer?.customerType,[n.customer]),f=(0,d.useMemo)(()=>!n.customer?.emailAddress,[n.customer]),y=(0,eu.A)({api:t.aspaApiAuthenticated,query:eT}),v=(0,d.useMemo)(()=>!!y.data?.requestNameChange,[y.data]),b=(0,d.useCallback)(()=>{a(n.customer?.firstName),s(n.customer.lastName),u(n.customer?.companyName),p(n.customer?.department),h(n.customer?.emailAddress)},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(b(),y.reset())},[e.isOpen]);let C=(0,d.useMemo)(()=>o!==n.customer.firstName||r!==n.customer.lastName||c!==n.customer.companyName||m!==n.customer.department,[o,r,c,m,g,n.customer]),A=(0,d.useMemo)(()=>"IND"===x?!!o&&!!r&&!!g:"CMP"===x&&!!c&&!!m&&!!g,[x,o,r,c,m,g]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Nimenmuutos",onClose:()=>{y.loading||e.onClose?.()},children:(0,l.jsx)(eL.Container,{"data-element-name":"ChangeCustomerNameForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async e=>{e.preventDefault(),await y.mutate({variables:{viewerId:n.customer.id,name:{..."IND"===x?{firstName:o,lastName:r}:"CMP"===x?{companyName:c,department:m}:{},emailAddress:g}}}),await n.refetch()},children:v?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Muutos tallennettu",description:"Muutospyynt\xf6 on nyt k\xe4sitelt\xe4v\xe4n\xe4, ja se tulee n\xe4kyviin asiakaspalveluun noin viikon kuluessa.",result:"success"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsxs)("p",{className:"is-body-s",style:{marginBottom:0},children:["Ilmoita korjattu nimesi asiakaspalveluumme k\xe4sitelt\xe4v\xe4ksi t\xe4ll\xe4 lomakkeella. Jos haluat siirt\xe4\xe4 lehtitilauksesi toiselle henkil\xf6lle, tee"," ",(0,l.jsx)(i,{href:"/tilaukset",style:{color:"inherit"},children:"Omat tilaukset -sivulla"})," ","tilauksen saajan vaihto."]}),"CMP"===x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(es.A,{id:"companyName",required:!0,label:"Yrityksen nimi",value:c||"",onChange:e=>u(e.target.value)}),(0,l.jsx)(es.A,{id:"department",required:!0,label:"Osasto / yhteyshenkil\xf6",value:m||"",onChange:e=>p(e.target.value)}),(0,l.jsx)(es.A,{id:"email",required:!0,disabled:!f,label:"S\xe4hk\xf6postiosoite",value:g||"",onChange:e=>h(e.target.value)})]}):"IND"===x?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(es.A,{id:"firstName",required:!0,maxLength:40,label:"Etunimi",value:o||"",onChange:e=>a(e.target.value)}),(0,l.jsx)(es.A,{id:"lastName",maxLength:40,label:"Sukunimi",value:r||"",onChange:e=>s(e.target.value)}),(0,l.jsx)(es.A,{id:"email",helpText:"L\xe4het\xe4mme s\xe4hk\xf6postiosoitteeseesi tiedon, kun nimenmuutos on k\xe4sitelty.",required:!0,disabled:!f,label:"S\xe4hk\xf6postiosoite",value:g||"",onChange:e=>h(e.target.value)})]}):null]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeCustomerNameButton",buttonType:"submit",disabled:!A||!C||y.loading,children:"Tallenna"}),(y.error||y.errors?.length>0)&&(0,l.jsx)(eL.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let eL={Container:S.Ay.div.withConfig({componentId:"sc-9c3b886f-0"})(["input{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-9c3b886f-1"})([""])},eM=`
175  mutation changeCustomerTemporaryAddress(
176    $viewerId: ID!
177    $temporaryAddress: TemporaryAddressInput!
178  ) {
179    changeCustomerTemporaryAddress(
180      viewerId: $viewerId
181      temporaryAddress: $temporaryAddress
182    ) {
183      ...TemporaryAddress
184    }
185  }
186  ${eb.kF}
187`;function eB(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(""),[a,r]=(0,d.useState)(""),[s,c]=(0,d.useState)(""),[u,m]=(0,d.useState)(""),[p,g]=(0,d.useState)(""),[h,x]=(0,d.useState)(""),f=(0,eu.A)({api:t.aspaApiAuthenticated,query:eM}),y=(0,d.useMemo)(()=>!!f.data?.changeCustomerTemporaryAddress,[f.data]),v=(0,d.useCallback)(()=>{let e=n.customer?.temporaryAddress;o(e?.street),r(e?.postalCode),c(e?.city),m(e?.countryCode||"FIN"),g(e?.startDate),x(e?.endD
187ate)},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(v(),f.reset())},[e.isOpen]);let b=(0,d.useMemo)(()=>{let e=n.customer?.temporaryAddress;return i!==e?.street||a!==e?.postalCode||s!==e?.city||u!==e?.countryCode||p!==e?.startDate||h!==e?.endDate||e?.isEnabled!==!0},[n.customer,i,a,s,u,p,h]),C=(0,d.useMemo)(()=>{let e=new Date;e.setUTCHours(23,59,59,999),e.setDate(e.getDate()-1);let t=e.toISOString();return!!u&&!!p&&!!h&&!(h<=p)&&!(p<t)&&("FIN"===u?!!i&&!!a&&!!s:!!i&&!!s)},[i,a,s,u,p,h]),A=n.customer.temporaryAddress?.isEnabled;return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Tilap\xe4inen osoite",onClose:()=>{f.loading||e.onClose?.()},children:(0,l.jsx)(eR.Container,{"data-element-name":"ChangeCustomerTemporaryAddressForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async e=>{e.preventDefault(),await f.mutate({variables:{viewerId:n.customer.id,temporaryAddress:{street:i,postalCode:a,city:s,countryCode:u,startDate:p,endDate:h,isEnabled:!0}}}),await n.refetch()},children:y?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Muutos tallennettu",description:"Tilap\xe4inen osoitteenmuutos on nyt k\xe4sitelt\xe4v\xe4n\xe4.",result:"success"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",style:{marginBottom:0},children:"Jos haluat muuttaa osoitettasi tilap\xe4isesti esim. lomasi ajaksi, ilmoitathan siit\xe4 viimeist\xe4\xe4n 14 vrk etuk\xe4teen."}),(0,l.jsx)(es.A,{id:"katuosoite_temp",disabled:f.loading||A,label:"Katuosoite",value:i||"",onChange:e=>o(e.target.value)}),(0,l.jsx)(es.A,{id:"postinumero_temp",disabled:f.loading||A,type:"text",..."FIN"===u?{minLength:5,maxLength:5,inputMode:"numeric"}:{maxLength:9},label:"Postinumero",value:a||"",onChange:e=>{let t=e.target.value;("FIN"!==u||!t||ep(t))&&r(t)}}),(0,l.jsx)(es.A,{id:"postitoimipaikka_temp",disabled:f.loading||A,label:"Postitoimipaikka",value:s||"",onChange:e=>c(e.target.value)}),(0,l.jsxs)(ek,{id:"temporaryCountryCode",disabled:f.loading||A,label:"Maa",value:u||"",onChange:e=>m(e.target.value),children:[(0,l.jsx)("option",{value:"",children:"Valitse maa"}),ec.A.map(e=>(0,l.jsx)("option",{value:e.countryCode,children:e.countryName},e.countryCode))]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"is-heading-xs",children:"Muutos voimassa"}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)"},children:[(0,l.jsx)("input",{disabled:f.loading||A,type:"date",value:p||"",onChange:e=>g(e.target.value)}),"–",(0,l.jsx)("input",{disabled:f.loading||A,type:"date",value:h||"",onChange:e=>x(e.target.value)})]})]})]}),A?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitRemoveCustomerTemporaryAddressButton",type:"danger",buttonType:"button",disabled:f.loading,onClick:async()=>{await f.mutate({variables:{viewerId:n.customer.id,temporaryAddress:{street:i,postalCode:a,city:s,countryCode:u,startDate:p,endDate:h,isEnabled:!1}}}),await n.refetch()},children:"Poista tilap\xe4inen osoite k\xe4yt\xf6st\xe4"})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeCustomerTemporaryAddressButton",buttonType:"submit",disabled:!C||!b||f.loading,children:"Tallenna"})}),(f.error||f.errors?.length>0)&&(0,l.jsx)(eR.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let eR={Container:S.Ay.div.withConfig({componentId:"sc-ac15516-0"})(["input,select{background-color:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-ac15516-1"})([""]),RadioInput:S.Ay.input.attrs({}).withConfig({componentId:"sc-ac15516-2"})([""]),RadioLabel:S.Ay.label.attrs({className:"is-body-s"}).withConfig({componentId:"sc-ac15516-3"})(["display:block;margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);"]),InputHeading:S.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-ac15516-4"})(["margin-bottom:var(--spacing-xs);"])},eD=`
188  mutation ReleaseCustomerNumber(
189    $viewerId: ID!
190    $customerNumber: String!
191  ) {
192    releaseCustomerNumber(
193      viewerId: $viewerId
194      customerNumber: $customerNumber
195    )
196  }
197`;function eO(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),i=(0,eu.A)({api:t.aspaApiAuthenticated,query:eD}),o=(0,d.useMemo)(()=>n.customer?.customerNumbers?.[0],[n.customer]);return(0,l.jsx)(eC.A,{isBlocking:!0,title:"Asiakasnumero",isOpen:e.isOpen,onClose:()=>e.onClose?.(),children:(0,l.jsx)(ez.Component,{"data-element-name":"ReleaseCustomerNumberForm",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--spacing-xl)"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"is-body-s",children:"N\xe4yt\xe4mme tilauksesi asiakasnumeron mukaan. L\xf6yd\xe4t asiakasnumerosi s\xe4hk\xf6postilla toimitetusta tilausvahvistuksesta tai laskulta."}),(0,l.jsx)("p",{className:"is-body-s",children:"Jos haluat liitt\xe4\xe4 uuden asiakasnumeron, sinun tulee ensin poistaa nykyinen asiakasnumero. Halutessasi voit vaihtaa sen my\xf6hemmin takaisin."})]}),(0,l.jsx)(es.A,{id:"asiakasnumero",label:"Asiakasnumero",value:n.customerNumber,disabled:!0}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitReleaseCustomerNumberButton",disabled:i.loading,onClick:async()=>{await i.mutate({variables:{viewerId:n.customer.id,customerNumber:o}}),await n.refetch()},children:"Poista asiakasnumero"}),(i.error||i.errors?.length>0)&&(0,l.jsx)(ez.ErrorText,{children:"Jotain meni vikaan"}),(0,l.jsxs)("p",{className:"is-body-s",children:["Ongelmatilanteissa ota yhteys asiakaspalveluun: Puh. ",(0,l.jsx)("a",{href:"tel:09 759 6600",children:"09 759 6600"})]})]})})})}let ez={Component:S.Ay.div.withConfig({componentId:"sc-235972cd-0"})(["a{color:inherit;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-235972cd-1"})([""])};var eF=n(15423),eU=n(32463);function e$(){let e=(0,d.useContext)(er.Ay),[t,n]=(0,d.useState)(!1),[i,o]=(0,d.useState)(!1),[a,r]=(0,d.useState)(!1),[s,c]=(0,d.useState)(!1),u=(0,d.useMemo)(()=>
197{if(e.customer?.primaryAddress?.countryCode)return ec.A.find(t=>t.countryCode===e.customer.primaryAddress.countryCode)},[e.customer]);return(0,l.jsxs)("div",{"data-element-name":"CustomerInfoForm",children:[(0,l.jsx)(eS,{isOpen:t,onClose:()=>n(!1)}),(0,l.jsx)(eP,{isOpen:i,onClose:()=>o(!1)}),(0,l.jsx)(eB,{isOpen:a,onClose:()=>r(!1)}),(0,l.jsx)(eO,{isOpen:s,onClose:()=>c(!1)}),(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ev.A,{children:"Henkil\xf6tiedot"}),(0,l.jsx)(ey.A,{label:"Nimi",value:e.customerDisplayName,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>o(!0)}),(0,l.jsx)(ey.A,{label:"Asiakasnumero",value:e.customerNumber,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>c(!0)}),(0,l.jsx)(ey.A,{label:"Katuosoite",value:e.customer.primaryAddress?.street,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>n(!0)}),(0,l.jsx)(ey.A,{label:"Postinumero",value:e.customer.primaryAddress?.postalCode,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>n(!0)}),(0,l.jsx)(ey.A,{label:"Postitoimipaikka",value:e.customer.primaryAddress?.city,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>n(!0)}),(0,l.jsx)(ey.A,{label:"Maa",value:u?.countryName,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>n(!0)}),(0,l.jsx)(ey.A,{label:"Tilap\xe4inen osoitteenmuutos",value:e.customer?.temporaryAddress?.inProgress?(0,l.jsx)(l.Fragment,{children:"K\xe4sittelyss\xe4"}):e.customer?.temporaryAddress?.isEnabled?(0,l.jsxs)(l.Fragment,{children:["Voimassa",e.customer.temporaryAddress.startDate&&e.customer.temporaryAddress.endDate&&`
198             ${(0,eU.Yq)(e.customer.temporaryAddress.startDate)}–${(0,eU.Yq)(e.customer.temporaryAddress.endDate)}`]}):"Ei voimassa",linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})}),linkOnClick:()=>r(!0)})]})]})}function eH(){let e=(0,d.useContext)(S.Dx);return(0,l.jsx)("div",{"data-element-name":"CustomerInfoForm",children:(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ev.A,{children:"Henkil\xf6tiedot"}),(0,l.jsx)(ey.A,{label:"Nimi",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Asiakasnumero",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Katuosoite",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Postinumero",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Postitoimipaikka",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Maa",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})}),(0,l.jsx)(ey.A,{label:"Tilap\xe4inen osoitteenmuutos",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]}),linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"pen-to-square",style:"light"})})})]})})}var eV=n(14051),eq=n.n(eV),eK=n(922),eG=n(50274),eW=n(96925);function eY(e){return(0,l.jsx)(e_.Component,{src:e.src,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,$zIndex:e.zIndex,$position:e.position})}let e_={Component:S.Ay.video.withConfig({componentId:"sc-8006df9a-0"})(["position:absolute;left:0;top:0;width:100%;height:100%;z-index:",";object-fit:cover;object-position:",";"],e=>e.$zIndex||0,e=>e.$position||"center")};var eJ=n(88367);let eX=`
199  query ImageAsset(
200    $name: String!
201  ) {
202    asset(
203      name: $name
204    ) {
205      url
206      ... on ImageAsset {
207        id
208        url
209        width
210        height
211        frameright {
212          crops {
213            defId
214            x
215            y
216            outWidth
217            outHeight
218            width
219            height
220          }
221          metadataFormat
222        }
223      }
224    }
225  }
226`;function eZ({sections:e}){let[t,n]=(0,d.useState)(0),{height:i}=(0,eJ.A)(),o=(0,d.useCallback)(e=>{n(e)},[]),[a,r]=(0,d.useState)();return(0,d.useEffect)(()=>{a||i&&r(i)}
226,[a,i]),(0,l.jsx)(E.A,{align:"full",hasBackground:!0,children:(0,l.jsx)(e0.Component,{children:e?.map((n,i)=>(0,d.createElement)(eQ,{...n,key:i,index:i,visible:t>=i,totalSections:e.length,onEnter:()=>o(i),fixedScreenHeight:a}))})})}function eQ(e){console.log("props",e);let t=(0,eW.A)(),n=(0,d.useContext)(em.A),i=(0,eG.A)({api:n.contentApi,query:eX,variables:{name:e.backgroundImageName},skip:!e.backgroundImageName}),o=(0,d.useMemo)(()=>{if(t&&i?.data?.asset?.frameright)return"mobile"===t?"9-16-vertical":"16-9-horizontal"}),a=(0,d.useMemo)(()=>i?.data?.asset?i.data.asset:!e.backgroundImageName&&e.backgroundImageUrl?{url:e.backgroundImageUrl}:void 0,[e.backgroundImageUrl,e.backgroundImageName,i?.data]);return(0,l.jsxs)(e0.SectionContainer,{$fixedScreenHeight:e.fixedScreenHeight,children:[(0,l.jsx)(e0.BackgroundContainer,{children:(0,l.jsx)(e0.StickyBackgroundContainer,{className:e.visible?"visible":"hidden",$zIndex:e.index,children:e.backgroundVideoUrl?(0,l.jsx)(e0.BackgroundVideo,{src:e.backgroundVideoUrl,position:e.position}
226):a?(0,l.jsx)(e0.BackgroundImage,{...a,position:e.position,cover:!0,sizes:"100vw",crop:o}):null})}),(0,l.jsx)(eK.pL,{onChange:t=>{t&&e.onEnter()},children:({ref:t})=>(0,l.jsx)("div",{ref:t,children:e.images?(0,l.jsx)(l.Fragment,{children:e.images.map((e,t)=>(0,l.jsx)(e0.ImageContainer,{children:(0,l.jsx)(M.A,{alt:"",url:e},t)},t))}):e.paragraphs?(0,l.jsx)(l.Fragment,{children:e.paragraphs.map((t,n)=>(0,l.jsxs)(e0.TextContainer,{$zIndex:e.totalSections+1,$backgroundColor:e.backgroundColor,$color:e.color,children:[e.heading&&0===n&&(0,l.jsx)(e0.Heading,{className:"is-heading-xxl",dangerouslySetInnerHTML:{__html:e.heading}}),Array.isArray(t)?t.map((e,t)=>(0,l.jsx)(e0.Paragraph,{className:"is-body-l",dangerouslySetInnerHTML:{__html:e}},t)):(0,l.jsx)(e0.Paragraph,{className:"is-body-l",dangerouslySetInnerHTML:{__html:t}})]},n))}):e.heading?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(e0.TextContainer,{$zIndex:e.totalSections+1,$backgroundColor:e.backgroundColor,$color:e.color,children:(0,l.jsx)(e0.Heading,{className:"is-heading-xxl",dangerouslySetInnerHTML:{__html:e.heading}})},e.index)}):null})})]})}eZ.propTypes={sections:eq().array};let e0={Component:S.Ay.div.withConfig({componentId:"sc-93a54d51-0"})(["position:relative;"]),SectionContainer:S.Ay.div.withConfig({componentId:"sc-93a54d51-1"})([""," & + &{padding-top:0;}"],e=>e.$fixedScreenHeight?`
227      padding-top: ${e.$fixedScreenHeight}px;
228      padding-bottom: ${e.$fixedScreenHeight}px;
229    `:`
230      padding-top: 100vh;
231      padding-bottom: 100vh;
232    `),BackgroundContainer:S.Ay.div.withConfig({componentId:"sc-93a54d51-2"})(["position:absolute;top:0;left:0;width:100%;height:100%;transform:translate3d(0,0,0);"]),StickyBackgroundContainer:S.Ay.div.withConfig({componentId:"sc-93a54d51-3"})(["width:100%;height:100vh;top:0;position:sticky;z-index:",";transition:opacity 0.5s linear;&.visible{opacity:1;}&.hidden{opacity:0;}"],e=>e.$zIndex),BackgroundImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-93a54d51-4"})(["position:absolute;top:0;left:0;width:100%;height:100%;transform:translate3d(0,0,0);"]),BackgroundVideo:(0,S.Ay)(eY).withConfig({componentId:"sc-93a54d51-5"})(["transform:translate3d(0,0,0);"]),ImageContainer:S.Ay.div.withConfig({componentId:"sc-93a54d51-6"})(["box-sizing:border-box;position:relative;overflow:hidden;margin-left:auto;margin-right:auto;max-width:calc(100% - 2 * var(--block-gutter));width:var(--width-column);padding:var(--spacing-xl) 0 var(--spacing-xl) 0;text-align:center;& + &{margin-top:var(--dynamic-text--space-between-image-containers);}"]),TextContainer:S.Ay.div.withConfig({componentId:"sc-93a54d51-7"})([""," a{color:inherit;}"],e=>`
233      box-sizing: border-box;
234      position: relative;
235      overflow: hidden;
236      z-index: ${e.$zIndex};
237      margin-left: auto;
238      margin-right: auto;
239      max-width: calc(100% - 2 * var(--block-gutter));
240      width: var(--width-column);
241      padding:
242        var(--spacing-xl)
243        var(--spacing-2xl)
244        var(--spacing-xl)
245        var(--spacing-2xl);
246      text-align: center;
247      color: white;
248      background-color: #202020;
249      border-radius: var(--radius-rounded);
250
251      & + & {
252        margin-top: var(--dynamic-text--space-between-text-containers);
253      }
254
255      ${e.$backgroundColor?`
256        background-color: ${e.$backgroundColor};
257      `:""}
258      ${e.$color?`
259        color: ${e.$color};
260      `:""}
261    `),Heading:S.Ay.h2.withConfig({componentId:"sc-93a54d51-8"})(["margin:0;"]),Paragraph:S.Ay.p.withConfig({componentId:"sc-93a54d51-9"})(["margin:0;text-shadow:var(--dynamic-text--text-shadow);"," &:not(:last-child){margin-bottom:var(--spacing-xl);}"],()=>`
262      ${e0.Heading} + & {
263        margin-top: var(--spacing-md);
264      }
265    `)};var e1=n(5772);function e2({chapter:e,progression:t}){let{Link:n}=(0,d.useContext)(R.A);return(0,l.jsxs)(e3.Component,{as:n,href:e.url,contentType:"Game",content:e,target:"_self",children:[(0,l.jsxs)(e3.Content,{children:[(0,l.jsx)(e3.Title,{className:"is-heading-s",children:e.title}),(0,l.jsx)(e3.Description,{className:"is-body-xs",children:e.description}),(0,l.jsxs)(e3.Toolbar,{children:[(0,l.jsx)(e3.ToolbarItem,{className:"is-label-xs",children:(0,eU.Yq)(e.publishDate)}),(0,l.jsx)(e3.ToolbarItem,{className:"is-label-xs",children:t?"Kesken":""})]})]}),(0,l.jsx)(e3.ImageContainer,{children:(0,l.jsx)(e1.default,{src:e.image.url,alt:"",width:75,height:75})})]})}let e3={Component:S.Ay.div.withConfig({componentId:"sc-38586cc5-0"})(["color:var(--color-on-surface);display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;text-decoration:none;border:1px solid var(--color-outline-secondary);border-radius:var(--radius-rounded);overflow:hidden;box-shadow:var(--shadow-md);"]),ImageContainer:S.Ay.div.withConfig({componentId:"sc-38586cc5-1"})(["padding:var(--spacing-md);flex-basis:83px;flex-grow:0;flex-shrink:0;background-color:var(--color-apu-kaarija);aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;"]),Content:S.Ay.div.withConfig({componentId:"sc-38586cc5-2"})(["padding:var(--spacing-md);display:flex;flex-direction:column;gap:var(--spacing-xs);flex-grow:1;height:83px;"]),Title:S.Ay.div.withConfig({componentId:"sc-38586cc5-3"})(["overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;"]),Description:S.Ay.div.withConfig({componentId:"sc-38586cc5-4"})(["color:var(--title-color);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;flex:1;"]),Toolbar:S.Ay.div.withConfig({componentId:"sc-38586cc5-5"})(["display:flex;justify-content:space-between;gap:var(--spacing-xs);color:var(--color-on-surface-secondary);"]),ToolbarItem:S.Ay.div.withConfig({componentId:"sc-38586cc5-6"})([""])};function e5({game:e,chapterOverrides:t}){let n=[],i=new Date(e.firstGameDate),o=new Date,a=e=>new Intl.DateTimeFormat("sv-SE",{timeZone:"Europe/Helsinki",year:"numeric",month:"2-digit",day:"2-digit"}).format(e);for(;o>=i;)n.push(a(o)),o.setDate(o.getDate()-1);return(0,l.jsx)(e4.Component,{"data-element-name":"GameChapters",children:(0,l.jsx)(e4.Items,{children:n.map(n=>{let i=e.id+"-"+n,o=t.find(t=>t.gameId===e.id&&t.publishDate===n);return(0,l.jsx)(e2,{chapter:{id:i,url:e.url+(e.urlChapterPrefix||"/")+n,publishDate:n,...e.chapterDefinitions,...o}},i)})})})}let e4={Component:S.Ay.div.withConfig({componentId:"sc-13983c63-0"})(["box-sizing:border-box;max-width:var(--width-column);margin-inline:auto;"]),Items:S.Ay.div.withConfig({componentId:"sc-13983c63-1"})(["display:flex;flex-direction:column;gap:var(--spacing-md);"])};function e8(e){let{Link:t,getLinkUrl:n}=(0,d.useContext)(R.A),i=(0,d.useContext)(y.A),[o,a]=(0,d.useState)(void 0),r=e.linkUrl||n(e),s=e.archiveLinkUrl,c=!i.isApp||o;return(0,d.useEffect)(()=>{!i.isApp||window.alehdet?.appVersionInfo&&a(!0===window.alehdet.appVersionInfo.supportPuzzlePlayzGameArchivePages)},[i.isApp]),(0,l.jsxs)(e7.Component,{children:[(0,l.jsx)(e7.ImageContainer,{$backgroundColor:e.backgroundColor,children:(0,l.jsx)(M.A,{...e.image?e.image:{url:i.emptyPlaceholderImage?.src},sizes:"100px"})}),(0,l.jsxs)(e7.Content,{children:[(0,l.jsxs)(e7.Title,{children:[e.number?`${e.number}.`:""," ",e.title]}),(0,l.jsx)(e7.Button,{type:"secondary",size:"medium",href:r,contentType:"Game",content:{gameId:e.gameId,gameType:e.gameType,title:e.title,image:e.image},children:"Pelaa"}),s&&c&&(0,l.jsx)(e7.ArchiveLink,{as:t,href:s,contentType:"Game",content:{gameId:e.gameId,gameType:e.gameType,title:e.title,image:e.image},children:"Arkisto"})]})]})}let e7={Component:S.Ay.div.withConfig({componentId:"sc-fe3b1bfa-0"})(["position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;border:1px solid var(--color-outline-primary);border-radius:var(--radius-md);background-color:var(--color-surface);text-decoration:none;overflow:hidden;"]),ImageContainer:S.Ay.div.withConfig({componentId:"sc-fe3b1bfa-1"})(["box-sizing:border-box;padding:var(--spacing-2xl);width:100%;background-color:var(--color-placeholder);> *{max-width:100px;margin-inline:auto;}",""],e=>e.$backgroundColor&&`
266      background-color: ${e.$backgroundColor};
267    `),Content:S.Ay.div.withConfig({componentId:"sc-fe3b1bfa-2"})(["box-sizing:border-box;width:100%;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;overflow:hidden;flex-grow:1;gap:var(--spacing-md);padding:var(--spacing-lg);text-align:center;"]),Title:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-fe3b1bfa-3"})(["overflow:hidden;display:-webkit-box;color:var(--color-on-surface);-webkit-line-clamp:2;-webkit-box-orient:vertical;"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-fe3b1bfa-4"})(["&::before{content:'';position:absolute;
267left:0;top:0;width:100%;height:100%;}"]),ArchiveLink:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-fe3b1bfa-5"})(["color:var(--color-on-surface-secondary);position:relative;z-index:1;"])};var e6=n(99031);function e9(e){let[t,n]=(0,d.useState)();return(0,l.jsxs)(te.Component,{"data-element-name":"GameCarousel",children:[e.title&&(0,l.jsx)(te.TitleWithLink,{title:e.title,titleUrl:e.titleUrl,className:"is-heading-s"}),(0,l.jsx)(te.Carousel,{ref:e=>n(e),children:e.games.map((e,t)=>(0,l.jsx)(te.Slide,{children:(0,l.jsx)(e8,{linkUrl:e.url,archiveLinkUrl:e.archiveUrl,title:e.title,image:{url:e.imageUrl},backgroundColor:e.color,gameType:e.gameType,gameId:e.gameId})},t))}),(0,l.jsx)(te.PaginationContainer,{children:(0,l.jsx)(G.A,{carouselEl:t})})]})}let te={Component:S.Ay.div.withConfig({componentId:"sc-8431d7ea-0"})(["position:relative;padding:var(--spacing-xl) 0;@media (min-width:","){max-width:calc(var(--width-extra-wide) + 2 * 16px);margin-inline:auto;}"],e=>e.theme["breakpoint-desktop"]),TitleWithLink:(0,S.Ay)(e6.A).withConfig({componentId:"sc-8431d7ea-1"})(["max-width:calc(100% - 32px);"]),Carousel:S.Ay.div.withConfig({componentId:"sc-8431d7ea-2"})(["display:flex;align-items:stretch;gap:16px;max-width:100%;padding-top:4px;padding-bottom:4px;overflow-y:hidden;overflow-x:auto;scroll-padding:16px;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),Slide:S.Ay.div.withConfig({componentId:"sc-8431d7ea-3"})(["flex-grow:0;flex-shrink:0;width:258px;max-width:calc(100vw - 4 * 16px);scroll-snap-align:start;&:first-child{padding-left:16px;}&:last-child{padding-right:16px;}> *{height:100%;}"]),PaginationContainer:S.Ay.div.withConfig({componentId:"sc-8431d7ea-4"})(["margin-top:var(--spacing-lg);@media (min-width:","){margin-top:var(--spacing-xl);}"],e=>e.theme["breakpoint-tablet"])};function tt(e){return(0,l.jsx)(tn.Component,{children:(0,l.jsx)(tn.Items,{children:e.games.map((e,t)=>(0,l.jsx)(e8,{linkUrl:e.url,archiveLinkUrl:e.archiveUrl,title:e.title,image:{url:e.imageUrl},backgroundColor:e.color,gameType:e.gameType,gameId:e.gameId},t))})})}let tn={Component:S.Ay.div.withConfig({componentId:"sc-43e64768-0"})(["box-sizing:border-box;margin-inline:auto;padding-inline:var(--spacing-xl);"]),Items:S.Ay.div.withConfig({componentId:"sc-43e64768-1"})(["--gap:var(--spacing-md);display:flex;flex-wrap:wrap;flex-direction:row;gap:var(--gap);--numitems:2;@media (min-width:","){--numitems:3;}@media (min-width:","){--numitems:4;}> *{flex-basis:calc((100% - (var(--numitems) - 1) * var(--gap)) / var(--numitems));flex-grow:1;@media (min-width:","){flex-grow:0;}}"],e=>e.theme["breakpoint-tablet"],e=>e.theme["breakpoint-desktop"],e=>e.theme["breakpoint-tablet"])};function ti(e){return e.items?(0,l.jsxs)(to.Component,{"data-element-name":"GridGrid",children:[e.items.map((t,n)=>(0,l.jsx)(to.Item,{children:(0,l.jsx)(W.A,{title:t.title,body:t.body,imageUrl:t.image||t.imageUrl,imageName:t.imageName,url:t.url,cta:t.cta||e.cta,isOnBackground:e.isOnBackground,superEmoji:t.superEmoji},n)},n)),e.items.length>3&&e.items.length%3==2&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(to.Item,{})}),e.items.length>3&&e.items.length%3==1&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(to.Item,{}),(0,l.jsx)(to.Item,{})]})]}):null}let to={Component:S.Ay.div.withConfig({componentId:"sc-1a844494-0"})(["--content-card--media-aspect-ratio:3/2;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--spacing-lg);padding-bottom:var(--spacing-xl);width:var(--width-extra-wide);margin-inline:auto;max-width:calc(100% - 2 * var(--block-gutter));"]),Item:S.Ay.div.withConfig({componentId:"sc-1a844494-1"})(["--card-width:calc((1080px - 2 * var(--spacing-lg)) / 3);display:flex;flex-grow:1;flex-shrink:1;flex-basis:var(--card-width);min-width:var(--card-width);scroll-snap-align:center;@media (min-width:","){max-width:calc((100% - 3 * var(--spacing-lg)) / 3);}> *{flex-grow:1;}"],e=>e.theme["breakpoint-tablet"])},ta={Container:S.Ay.div.withConfig({componentId:"sc-bb083d2b-0"})(["&.has-background{padding-top:var(--spacing-4xl);padding-bottom:var(--spacing-xl);}"]),Title:S.Ay.h2.attrs({className:"is-heading-xxxl"}).withConfig({componentId:"sc-bb083d2b-1"})(["margin-bottom:var(--spacing-lg);margin-inline:auto;max-width:calc(var(--width-column));padding-inline:var(--block-gutter);text-align:center;",""],e=>e.$color&&`
268      color: ${e.$color};
269    `),Description:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-bb083d2b-2"})(["margin-bottom:var(--spacing-2xl);margin-inline:auto;max-width:calc(var(--width-column));padding-inline:var(--block-gutter);text-align:center;",""],e=>e.$color&&`
270      color: ${e.$color};
271    `)};var tr=n(69730),ts=n.n(tr);function tl(e){let t=`h${e.level||2}`;return(0,l.jsxs)(t,{className:ts()("is-block",e.size&&`is-heading-${e.size}`),children:[e.children||e.text,e.divider&&(0,l.jsx)("hr",{style:{border:"none",borderBottom:"1px solid var(--color-outline-secondary)"}})]})}function tc(e){let t=(0,d.useContext)(S.Dx),[n,i]=(0,d.useState)(!0),o=t["image--caption-body-size"],a="full"===e.align?"100vw":"wide"===e.align?"(max-width: 728px) 100vw, 940px":"(max-width: 600px) 100v
271w, 600px",r=(0,d.useMemo)(()=>{if(e.placeholderUrl)return e.placeholderUrl;if(!e.src||-1===e.src.indexOf("assets.terve.fi")&&-1===e.src.indexOf("assets.apu.fi")&&-1===e.src.indexOf("assets.eeva.fi")&&-1===e.src.indexOf("assets.meillakotona.fi")&&-1===e.src.indexOf("assets.kotona.com")&&-1===e.src.indexOf("assets.a-lehdet.fi"))return;let t=-1!==e.src.indexOf("?")?"&":"?";return e.src+t+"w=64&q=50&blur=20"},[e.placeholderUrl,e.src]);return(0,l.jsx)(E.A,{align:e.align,hasBackground:"full"===e.align&&!e.children&&!e.caption,children:(0,l.jsxs)(td.Figure,{children:[(0,l.jsx)(td.ImageContainer,{className:ts()(e.fullHeight&&"fullheight",e.placeholderMinHeight&&n&&!r&&"has-placeholder-min-height"),children:(0,l.jsx)(M.A,{url:e.src,alt:e.alt,cover:e.fullHeight,loading:e.loading,sizes:a,placeholderUrl:r,onLoad:()=>i(!1)})}),(e.children||e.caption)&&(0,l.jsx)(td.Caption,{className:`is-body-${o}`,$align:e.align,children:e.children||e.caption})]})})}tl.canLazyLoad=!1,tc.canLazyLoad=!1;let td={ImageContainer:S.Ay.div.withConfig({componentId:"sc-bb75cfe6-0"})(["&.fullheight{position:relative;height:100vh;}&.has-placeholder-min-height{position:relative;min-height:50vh;}"]),Figure:S.Ay.figure.withConfig({componentId:"sc-bb75cfe6-1"})(["margin:0;"]),Caption:S.Ay.figcaption.withConfig({componentId:"sc-bb75cfe6-2"})(["margin-top:var(--image--space-between-image-and-caption);color:var(--image--caption-text-color);font-style:var(--image--caption-font-style);&:empty{display:none;}",""],e=>("wide"===e.$align||"full"===e.$align)&&`
272      padding-left: 20px;
273      padding-right: 20px;
274    `)};function tu(e){let[t,n]=(0,d.useState)(!0);return(0,l.jsx)(tm.Component,{"data-element-name":"ImageCover",children:(0,l.jsx)(tm.Image,{...e.article.image,onLoad:()=>n(!1),className:t?"withPlaceholder":"",sizes:"(max-width: 600px) 100vw, 600px",priority:!0})})}let tm={Component:S.Ay.div.withConfig({componentId:"sc-7542f746-0"})(["margin-top:calc(-1 * var(--block-gutter));margin-inline:auto;max-width:calc(var(--width-wide) + 2 * var(--article-cover--gutter));@media (min-width:","){padding-top:var(--article-cover--gutter);padding-inline:var(--article-cover--gutter);}"],e=>e.theme["breakpoint-tablet"]),Image:(0,S.Ay)(M.A).withConfig({componentId:"sc-7542f746-1"})(["&.withPlaceholder{background-color:var(--color-placeholder);}"])};var tp=n(84398),tg=n(74375);let th={};var tx=n(1775),tf=n(90599);let ty={Container:S.Ay.div.withConfig({componentId:"sc-f846cd5b-0"})(["min-height:100vh;"]),NoConsent:S.Ay.div.withConfig({componentId:"sc-f846cd5b-1"})(["margin-inline:auto;max-width:var(--width-wide);padding-top:var(--block-spacing);padding-inline:var(--spacing-xl);"])};var tv=n(88499),tb=n(28456),tC=n(73321),tA=n(98554);function tk(){let e=(0,d.useContext)(tA.A),t=(0,tC.useSearchParams)().get("redirect"),n=(0,tb.A)({redirect:t}),i=(0,d.useMemo)(()=>!!e.user,[e.user]);return(0,d.useEffect)(()=>{!0===i&&(window.location.href=t||"/")},[i,t]),(0,l.jsx)(E.A,{children:(0,l.jsxs)(tj.Component,{children:[(0,l.jsx)(tj.Title,{children:"Kirjaudu sis\xe4\xe4n"}),(0,l.jsx)(tj.Description,{children:"L\xf6yd\xe4 tilaustietosi, hallitse osoitteenmuutoksia ja tutustu henkil\xf6kohtaisiin etuihisi helposti yhdess\xe4 paikassa."}),(0,l.jsxs)(tj.Buttons,{children:[(0,l.jsx)(ed.A,{href:n,target:"_self",children:"Kirjaudu sis\xe4\xe4n"}),(0,l.jsx)(ed.A,{href:n,target:"_self",children:"Luo A-tunnus"})]})]})})}let tj={Component:S.Ay.div.withConfig({componentId:"sc-4ee17049-0"})(["padding:var(--spacing-5xl) var(--spacing-xl);background-color:var(--color-container);border-radius:var(--radius-full);"]),Title:S.Ay.h2.attrs({className:"is-heading-xxl"}).withConfig({componentId:"sc-4ee17049-1"})(["margin-bottom:var(--spacing-md);text-align:center;"]),Description:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-4ee17049-2"})(["margin-bottom:var(--spacing-xl);text-align:center;"]),Buttons:S.Ay.div.withConfig({componentId:"sc-4ee17049-3"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:var(--spacing-md);> *{flex-basis:100%;}@media (min-width:","){> *{flex-basis:auto;}}"],e=>e.theme["breakpoint-tablet"])},tw={Grid:S.Ay.div.withConfig({componentId:"sc-fae2c415-0"})(["display:flex;flex-wrap:wrap;column-gap:20px;row-gap:20px;justify-content:center;padding:20px;background:",";@media (min-width:","){column-gap:80px;}"],e=>e.$background,e=>e.theme["breakpoint-tablet"]),Logo:S.Ay.img.withConfig({componentId:"sc-fae2c415-1"})(["width:","px;height:auto;@media (min-width:","){width:","px;}"],e=>e.$widthMobile||e.$width,e=>e.theme["breakpoint-tablet"],e=>e.$width)};var tI=n(8947);function tN(e){return(0,l.jsx)(tE.List,{style:e.style,children:e.children})}function tS(e){return(0,l.jsx)(tE.Item,{style:e.style,children:e.children})}let tE={List:S.Ay.div.withConfig({componentId:"sc-22b100db-0"})(["display:flex;flex-direction:column;border-radius:var(--radius-lg);border:1px solid var(--color-outline-secondary);padding:var(--spacing-md);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);&:not(:last-child){margin-bottom:var(--spacing-3xl);}"]),Item:S.Ay.div.withConfig({componentId:"sc-22b100db-1"})(["&:not(:first-child){margin-top:var(--spacing-md);border-top:1px solid var(--color-outline-secondary);padding-top:var(--spacing-md);}"])};var tT=n(36658);let tP=`
275  mutation UpdateInvoiceMethod(
276    $viewerId: ID!
277    $invoiceEmail: String
278    $invoiceMethod: InvoiceMethod
279  ) {
280    updateCustomer(
281      viewerId: $viewerId
282      customer: {
283        invoiceEmailAddress: $invoiceEmail
284        invoiceMethod: $invoiceMethod
285      }
286    ) {
287      ...Customer
288    }
289  }
290  ${eb.nD}
291`;function tL(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(n.customer?.invoiceMethod||n.customer?.latestInvoiceMethod||""),[a,r]=(0,d.useState)(n.customer.invoiceEmailAddress||""),s=(0,eu.A)({api:t.aspaApiAuthenticated,query:tP}),c=(0,d.useMemo)(()=>{let e="Email"===i,t=a!==n.customer.invoiceEmailAddress,o=i!==(n.customer.invoiceMethod||n.customer.latestInvoiceMethod);return e?!!a&&(o||t):o},[i,a,n.customer]),u=(0,d.useCallback)(()=>{o(n.customer?.invoiceMethod||n.customer?.latestInvoiceMethod||""),r(n.customer?.invoiceEmailAddress||"")},[n.customer]);return(0,d.useEffect)(()=>{s.reset()},[i]),(0,d.useEffect)(()=>{e.isOpen&&(u(),s.reset())},[e.isOpen]),(0,l.jsxs)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Laskujen toimitustapa",onClose:()=>{s.loading||e.onClose?.()},children:[(0,l.jsxs)(tM.Methods,{children:[(0,l.jsx)(tM.Method,{children:(0,l.jsxs)(tM.MethodLabel,{children:[(0,l.jsx)(tM.MethodRadio,{type:"radio",value:"Elasku",checked:"Elasku"===i,onChange:()=>o("Elasku"),disabled:s.loading}),(0,l.jsxs)(tM.MethodInfo,{children:[(0,l.jsx)(tM.MethodTitle,{children:"E-lasku"}),(0,l.jsx)(tM.MethodDetail,{children:"Vaatii e-laskusopimuksen pankkisi kanssa"})]})]})}),(0,l.jsx)(tM.Method,{children:(0,l.jsxs)(tM.MethodLabel,{children:[(0,l.jsx)(tM.MethodRadio,{type:"radio",value:"Netposti",checked:"Netposti"===i,onChange:()=>o("Netposti"),disabled:s.loading}),(0,l.jsxs)(tM.MethodInfo,{children:[(0,l.jsx)(tM.MethodTitle,{children:"Lasku OmaPostiin"}),(0,l.jsx)(tM.MethodDetail,{children:"Vaatii sopimuksen postin kanssa"})]})]})}),(0,l.jsxs)(tM.Method,{children:[(0,l.jsxs)(tM.MethodLabel,{children:[(0,l.jsx)(tM.MethodRadio,{type:"radio",value:"Email",checked:"Email"===i,onChange:()=>o("Email"),disabled:s.loading}),(0,l.jsxs)(tM.MethodInfo,{children:[(0,l.jsx)(tM.MethodTitle,{children:"S\xe4hk\xf6postilasku"}),(0,l.jsx)(tM.MethodDetail,{children:"S\xe4hk\xf6postilaskulis\xe4 
2910,90€/lasku"})]}),(0,l.jsx)(eA.A,{children:"Kun olet valinnut s\xe4hk\xf6postilaskun, saat kaikki laskusi s\xe4hk\xf6postiisi, paitsi niiden lehtien laskut, joissa maksutapana on luottokortti."})]}),"Email"===i&&(0,l.jsx)(tM.MethodInput,{children:(0,l.jsx)(es.A,{id:"invoiceEmail",label:"S\xe4hk\xf6postiosoite",value:a,onChange:e=>r(e.target.value)})})]}),(0,l.jsx)(tM.Method,{children:(0,l.jsxs)(tM.MethodLabel,{children:[(0,l.jsx)(tM.MethodRadio,{type:"radio",value:"Paper",checked:"Paper"===i,onChange:()=>o("Paper"),disabled:s.loading}),(0,l.jsxs)(tM.MethodInfo,{children:[(0,l.jsx)(tM.MethodTitle,{children:"Paperilasku"}),(0,l.jsx)(tM.MethodDetail,{children:"Paperilaskulis\xe4 4,90€/lasku"})]}),(0,l.jsx)(eA.A,{children:"Jos valitset paperilaskun, veloitamme paperilaskulis\xe4n. Ekologinen ja s\xe4\xe4st\xe4v\xe4 ratkaisu on valita e-lasku, s\xe4hk\xf6postilasku tai luottokorttimaksu."})]})})]}),(0,l.jsx)(tM.Button,{"data-click-element-name":"SubmitChangeInvoiceMethodButton",disabled:!c||s.loading,onClick:async()=>{await s.mutate({variables:{viewerId:n.customer.id,invoiceEmail:a,invoiceMethod:i}}),await n.refetch()},children:"Tallenna"}),s.error&&(0,l.jsx)(tM.ErrorMessage,{children:"Jotain meni vikaan."}),("Netposti"===n.customer.invoiceMethod||"Elasku"===n.customer.invoiceMethod)&&i!==n.customer.invoiceMethod?(0,l.jsx)(tM.MethodWarning,{children:"Olet saanut edellisen laskun E-laskuna/OmaPostiin. Huolehdithan sopimuksen lopettamisesta ennen seuraavaa laskua"}):"Elasku"===i&&i!==n.customer.invoiceMethod?(0,l.jsx)(tM.MethodWarning,{children:"Huolehdithan, ett\xe4 otat e-laskun k\xe4ytt\xf6\xf6n pankkisi kanssa. Jos sopimus ei ole voimassa laskun l\xe4hetyshetkell\xe4, l\xe4het\xe4mme laskun s\xe4hk\xf6postitse tai paperilaskuna"}):null]})}let tM={Methods:S.Ay.div.withConfig({componentId:"sc-43c74854-0"})(["margin-bottom:var(--spacing-lg);"]),Method:S.Ay.div.withConfig({componentId:"sc-43c74854-1"})(["border-radius:var(--radius-md);border:1px solid var(--color-outline-secondary);padding:var(--spacing-lg);background-color:var(--color-surface);&:not(:last-child){margin-bottom:var(--spacing-md);}"]),MethodLabel:S.Ay.label.withConfig({componentId:"sc-43c74854-2"})(["display:flex;flex-direction:row;align-items:center;gap:var(--spacing-md);"]),MethodRadio:S.Ay.input.withConfig({componentId:"sc-43c74854-3"})(["margin:0;height:var(--heading-m-line-height);"]),MethodInfo:S.Ay.div.withConfig({componentId:"sc-43c74854-4"})(["flex-grow:1;"]),MethodTitle:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-43c74854-5"})(["margin-bottom:var(--spacing-xs);"]),MethodDetail:S.Ay.div.attrs({className:"is-body-xs has-on-surface-color"}).withConfig({componentId:"sc-43c74854-6"})(["margin-bottom:var(--spacing-xs);"]),MethodInput:S.Ay.div.withConfig({componentId:"sc-43c74854-7"})(["margin-top:var(--spacing-lg);border-top:1px solid var(--color-outline-secondary);padding-top:var(--spacing-lg);padding-inline:var(--spacing-xs);padding-bottom:var(--spacing-xs);"]),MethodWarning:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-43c74854-8"})(["margin-top:var(--spacing-lg);"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-43c74854-9"})(["width:100%;"]),ErrorMessage:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-43c74854-10"})(["margin-top:var(--spacing-lg);color:var(--color-universal-danger);"])};var tB=n(95006);let tR=`
292  mutation RequestCreditCardUpdate(
293    $viewerId: ID!
294    $returnUrl: String!
295  ) {
296    requestCreditCardUpdate(
297      viewerId: $viewerId
298      returnUrl: $returnUrl
299    )
300  }
301`,tD={Elasku:"E-lasku",Email:"S\xe4hk\xf6postilasku",Netposti:"Omaposti",Paper:"Paperilasku","":""},tO={ExtraLink:S.Ay.a.attrs({className:"is-body-s"}).withConfig({componentId:"sc-9aedb163-0"})(["position:relative;display:block;padding-top:var(--spacing-xs);padding-bottom:var(--spacing-xs);color:inherit;text-decoration:none;&:last-child{padding-bottom:var(--spacing-lg);}"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-9aedb163-1"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--color-on-surface);"]),ExtraContent:S.Ay.div.withConfig({componentId:"sc-9aedb163-2"})(["flex-grow:1;display:flex;flex-direction:column;justify-content:flex-end;
301gap:var(--spacing-sm);margin-top:var(--spacing-xs);color:var(--color-on-surface-secondary);"])},tz=`
302  mutation RequestCreditCardUpdate(
303    $viewerId: ID!
304    $returnUrl: String!
305  ) {
306    requestCreditCardUpdate(
307      viewerId: $viewerId
308      returnUrl: $returnUrl
309    )
310  }
311`,tF={ExtraLink:S.Ay.a.attrs({className:"is-body-s"}).withConfig({componentId:"sc-e7027d83-0"})(["position:relative;display:block;padding-top:var(--spacing-xs);padding-bottom:var(--spacing-xs);color:inherit;text-decoration:none;&:last-child{padding-bottom:var(--spacing-lg);}"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-e7027d83-1"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--color-on-surface);"]),ExtraContent:S.Ay.div.withConfig({componentId:"sc-e7027d83-2"})(["flex-grow:1;display:flex;flex-direction:column;justify-content:flex-end;gap:var(--spacing-sm);margin-top:var(--spacing-xs);color:var(--color-on-surface-secondary);"])};function tU(e){let t=(0,d.useMemo)(()=>{switch(e.premium.deliveryStatus){case"WaitingForPayment":case"PaymentInProcess":if(e.premium.selectSiteUrl)return"Saat valita tilaajalahjan, kun maksusi on k\xe4sitelty.";return"Saat tilaajalahjan, kun maksusi on k\xe4sitelty.";case"PayedButNotConsumed":return null;case"PayedAndWaitingForDelivery":return"Toimitamme tilaajalahjasi mahdollisimman pian.";case"PayedAndDelivered":return"Tilaajalahjasi on l\xe4hetetty.";case"CancelInProcess":return"Peruutus k\xe4sittelyss\xe4."}},[e.premium]),n=(0,d.useMemo)(()=>{if("PayedAndDelivered"===e.premium.deliveryStatus)return e.premium.deliveryStatusText},[e.premium]),i=(0,d.useMemo)(()=>"WaitingForPayment"!==e.premium.deliveryStatus||e.noInvoiceLink?"PaymentInProcess"===e.premium.deliveryStatus?{text:"Maksu k\xe4sittelyss\xe4",url:e.premium.invoiceId?"/laskut/"+e.premium.invoiceId:"/laskut",isDisabled:!0,clickElementName:"PremiumPaymentInProcessButton"}:"PayedButNotConsumed"===e.premium.deliveryStatus&&e.premium.selectSiteUrl?{text:"Valitse tilaajalahjasi",url:e.premium.selectSiteUrl,clickElementName:"PremiumSelectGiftButton"}:void 0:{text:"Maksa tilauksesi",url:e.premium.invoiceId?"/laskut/"+e.premium.invoiceId:"/laskut",clickElementName:"PremiumPayInvoiceButton"},[e.premium,e.noInvoiceLink]);return(0,l.jsx)(tT.A,{className:e.className,style:"horizontal_subscription",title:e.premium.productTitle,image:{url:e.premium.productImageUrl},extraContent:(0,l.jsxs)(t$.ExtraContent,{children:[e.premium.valueText&&"Arvo 0,00 €"!==e.premium.valueText&&(0,l.jsx)(t$.ValueText,{children:e.premium.valueText}),t&&(0,l.jsx)(t$.DeliveryStatusText,{children:t}),n&&(0,l.jsx)(t$.DeliveryStatusText,{children:n}),i&&(0,l.jsx)(t$.Button,{size:"small","data-click-element-name":i.clickElementName,href:i.url,disabled:i.isDisabled,children:i.text}),e.premium.notificationText&&(0,l.jsx)(t$.DeliveryStatusText,{children:e.premium.notificationText})]})})}let t$={ExtraContent:S.Ay.div.withConfig({componentId:"sc-38f6a612-0"})(["flex-grow:1;display:flex;gap:var(--spacing-xs);flex-direction:column;align-items:flex-start;justify-content:flex-end;color:var(--color-on-surface-secondary);"]),ValueText:S.Ay.div.attrs({className:"is-label-s"}).withConfig({componentId:"sc-38f6a612-1"})(["position:absolute;left:0;bottom:0;margin-top:var(--spacing-xs);color:var(--color-on-primary);padding:var(--spacing-xs);border-bottom-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm);background-color:var(--color-universal-success);"]),DeliveryStatusText:S.Ay.div.attrs({className:"is-label-l"}).withConfig({componentId:"sc-38f6a612-2"})(["margin-top:var(--spacing-xs);"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-38f6a612-3"})(["margin-top:var(--spacing-sm);"])},tH=`
312  mutation InvoicePaymentRedirectUrl(
313    $itemReference: ID!
314    $returnUrl: String!
315    $paymentOption: PaymentOption!
316    $reason: CancelSubscriptionReason
317    $reasonMessage: String
318    $freeItem: String
319  ) {
320    invoicePaymentRedirectUrl(
321      itemReference: $itemReference
322      returnUrl: $returnUrl
323      paymentOption: $paymentOption
324      reason: $reason
325      reasonMessage: $reasonMessage
326      freeItem: $freeItem
327    )
328  }
329`;function tV(e){let t=(0,d.useContext)(em.A),n=(0,d.useMemo)(()=>e.invoice.isCreditCardPayment,[e.invoice]),i=(0,eu.A)({api:t.aspaApiAuthenticated,query:tH}),o=i.data?.invoicePaymentRedirectUrl,a=e.onStartLoading,r=e.onStopLoading,s=e.onStartRedirecting;(0,d.useEffect)(()=>{i.loading?a?.():r?.()},[i.loading,a,r]),(0,d.useEffect)(()=>{o&&s?.()},[o,s]);let c=(0,d.useCallback)(async t=>{let n=(await i.mutate({variables:{itemReference:e.invoice.id,returnUrl:"https://www.meillakotona.fi/bambora",paymentOption:t}})).invoicePaymentRedirectUrl;n&&(window.location.href=n)},[e.invoice,i]);return(0,l.jsx)(l.Fragment,{children:n?(0,l.jsxs)("div",{children:["Summa veloitetaan valitsemallasi maksutavalla er\xe4p\xe4iv\xe4n\xe4: ",e.invoice.amountDueText]}):(0,l.jsx)(l.Fragment,{children:e.invoice.totalInstallmentCount>1?(0,l.jsxs)(tK.PayBoxes,{children:[e.invoice.currentInstallmentNumber<e.invoice.totalInstallmentCount&&(0,l.jsxs)(tK.PayBox,{children:[(0,l.jsxs)(tK.PayBoxTitle,{children:["Maksa kaikki er\xe4t nyt, ",(0,l.jsx)(tK.PayBoxTitleHighlight,{children:"saat etusi heti!"})]}),(0,l.jsxs)(tK.ButtonAndPrice,{children:[(0,l.jsx)(tK.Button,{disabled:i.loading||o,"data-click-element-name":"StartPayInvoiceTotalButton",onClick:async()=>{await c("Total")},children:"Maksa"}),(0,l.jsx)(tK.Price,{children:e.invoice.totalOpenAmountForPaymentText})]})]}),(0,l.jsxs)(tK.PayBox,{$isSecondary:e.invoice.currentInstallmentNumber<e.invoice.totalInstallmentCount,$isOnly:e.invoice.currentInstallmentNumber===e.invoice.totalInstallmentCount,children:[(0,l.jsxs)(tK.PayBoxTitle,{children:["Maksa er\xe4 ",e.invoice.currentInstallmentNumber,"/",e.invoice.totalInstallmentCount," nyt"]}),(0,l.jsxs)(tK.ButtonAndPrice,{children:[(0,l.jsx)(tK.Button,{disabled:i.loading||o,"data-click-element-name":"StartPayInvoiceInstallmentButton",onClick:async()=>
329{await c("Partial")},children:"Maksa"}),(0,l.jsx)(tK.Price,{children:e.invoice.amountDueText})]})]})]}):(0,l.jsxs)(tK.PayBox,{$isOnly:!0,children:[(0,l.jsx)(tK.PayBoxTitle,{children:"Maksa summa nyt"}),(0,l.jsxs)(tK.ButtonAndPrice,{children:[(0,l.jsx)(tK.Button,{disabled:i.loading||o,"data-click-element-name":"StartPayInvoiceButton",onClick:async()=>{await c("Total")},children:"Maksa"}),(0,l.jsx)(tK.Price,{children:e.invoice.amountDueText})]})]})})})}function tq(){return(0,l.jsxs)(tK.PayBoxes,{children:[(0,l.jsx)(tK.PayBox,{$isPlaceholder:!0}),(0,l.jsx)(tK.PayBox,{$isPlaceholder:!0})]})}let tK={PayBoxes:S.Ay.div.withConfig({componentId:"sc-35b3f28b-0"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-lg);"]),PayBox:S.Ay.div.withConfig({componentId:"sc-35b3f28b-1"})(["flex:1 1 auto;box-sizing:border-box;width:calc((100% - var(--spacing-lg)) / 2);border:4px solid var(--color-universal-success);border-radius:var(--radius-lg);padding:var(--spacing-2xl) var(--spacing-lg);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);text-align:center;&:only-child{width:100%;}@media (max-width:","){flex-basis:100%;}"," "," ",""],e=>e.theme["breakpoint-mobile-max"],e=>e.$isPlaceholder&&`
330    border-color: var(--color-placeholder);
331    aspect-ratio: 7/4;
332    background-color: var(--color-placeholder);
333    `,e=>e.$isSecondary&&`
334
335// Secondary paybox
336border: 1px solid var(--color-outline-secondary);
337
338// Secondary paybox price
339${tK.Price} {
340  background-color: white;
341  color: black;
342  border-color: var(--color-outline-primary);
343}
344
345// Secondary paybox button
346${tK.Button} {
347background-color: var(--color-on-surface);
348}
349
350      `,e=>e.$isOnly&&`
351// Only paybox
352border: 1px solid var(--color-outline-secondary);
353
354// Only paybox price
355${tK.Price} {
356  background-color: white;
357  color: black;
358  border-color: var(--color-outline-primary);
359}
360
361// Only paybox button
362${tK.Button} {
363  background-color: var(--color-primary);
364}
365
366        `),PayBoxTitle:S.Ay.div.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-35b3f28b-2"})(["min-height:calc(2 * var(--heading-m-line-height));@media (max-width:","){min-height:unset;}"],e=>e.theme["breakpoint-mobile-max"]),PayBoxTitleHighlight:S.Ay.span.withConfig({componentId:"sc-35b3f28b-3"})(["color:var(--color-universal-success);"]),ButtonAndPrice:S.Ay.div.withConfig({componentId:"sc-35b3f28b-4"})(["display:flex;margin-top:var(--spacing-lg);gap:var(--spacing-lg);"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-35b3f28b-5"})(["flex-basis:var(--width-180);flex-grow:1;min-width:unset !important;"]),Price:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-35b3f28b-6"})(["padding:var(--spacing-sm) var(--spacing-lg);border-radius:var(--radius-lg);border:1px solid #7cc928;display:flex;align-items:center;justify-content:center;background-color:#7cc928;color:white;font-weight:bold;flex-grow:1;white-space:nowrap;"])};function tG(e){let t=(0,d.useMemo)(()=>e.invoice.premiums?.some(e=>"WaitingForPayment"===e.deliveryStatus||"PaymentInProcess"===e.deliveryStatus),[e.invoice]),n=(0,d.useMemo)(()=>"PaymentInProcess"!==e.invoice.statusCode&&"CancelInProcess"!==e.invoice.statusCode&&"Paid"!==e.invoice.statusCode,[e.invoice]);return e.invoice.id&&"0"!==e.invoice.id&&"0P"!==e.invoice.id?(0,l.jsxs)("div",{children:[(0,l.jsx)(tT.A,{style:"horizontal_invoice",title:e.invoice.rows.map(e=>e.productTitle).join(", "),image:null,extraContent:(0,l.jsx)(tY.ExtraContent,{$isPaid:"Paid"===e.invoice.statusCode,children:(0,l.jsx)(tY.StatusPill,{$isPaid:"Paid"===e.invoice.statusCode,children:"PaymentInProcess"===e.invoice.statusCode?"Maksu k\xe4sittelyss\xe4":"DueDateInProcess"===e.invoice.statusCode?"Er\xe4p\xe4iv\xe4 k\xe4sittelyss\xe4":"CancelInProcess"===e.invoice.statusCode?"Peruutus k\xe4sittelyss\xe4":"Paid"===e.invoice.statusCode?"Maksettu":"Avoin"})}),afterContent:(0,l.jsxs)(tY.AfterDetails,{children:[(0,l.jsxs)(ef.A,{children:["Paid"===e.invoice.statusCode?(0,l.jsx)(ey.A,{label:"Maksup\xe4iv\xe4",value:(0,eU.Yq)(e.invoice.latestPaymentDate)}):(0,l.jsx)(ey.A,{label:"Er\xe4p\xe4iv\xe4",value:(0,eU.Yq)(e.invoice.dueDate)}),e.invoice.totalInstallmentCount>1&&(0,l.jsx)(ey.A,{label:"Paid"===e.invoice.statusCode&&e.invoice.totalInstallmentCount>1?"Maksetut er\xe4t":"Er\xe4",value:`${e.invoice.currentInstallmentNumber} / ${e.invoice.totalInstallmentCount}`}),"Paid"===e.invoice.statusCode?(0,l.jsx)(ey.A,{label:"Maksettu summa",value:e.invoice.amountPaidText}):(0,l.jsx)(ey.A,{label:"Hinta",value:e.invoice.amountDueText})]}),t&&(0,l.jsx)(tY.PremiumMessage,{children:"Saat tilaajalahjan, kun maksusi on k\xe4sitelty."}),n&&(0,l.jsx)("div",{style:{marginTop:"var(--spacing-xl)"},children:(0,l.jsx)(tV,{invoice:e.invoice})}),(0,l.jsx)(tY.Buttons,{children:(0,l.jsx)(ed.A,{type:"secondary",isDisplayBlock:!0,"data-click-element-name":"InvoiceDetailsLink",href:"/laskut/"+e.invoice.id,children:"Tarkastele laskua"})})]})}),e.invoice.premiums?.length>0&&(0,l.jsx)(tN,{style:{marginTop:"var(--spacing-xl)"},children:e.invoice.premiums.map((t,n)=>(0,l.jsx)(tS,{children:(0,l.jsx)(tU,{premium:{...t,invoiceId:e.invoice.id}})}
366,n))})]}):null}function tW(){let e=(0,d.useContext)(S.Dx);return(0,l.jsx)(tT.A,{style:"horizontal_invoice",title:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-m-line-height"]}),image:null,extraContent:(0,l.jsx)(tY.ExtraContent,{children:(0,l.jsx)(tY.StatusPill,{style:{minWidth:"4em"},children:"\xa0"})}),afterContent:(0,l.jsxs)(tY.AfterDetails,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Er\xe4p\xe4iv\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Er\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Hinta",value:(0,l.jsx)(eF.A,{length:"short"})})]}),(0,l.jsx)("div",{style:{marginTop:"var(--spacing-xl)"},children:(0,l.jsx)(tq,{})}),(0,l.jsx)(tY.PremiumMessage,{children:(0,l.jsx)(eF.A,{length:"medium",lineHeight:e["body-l-line-height"]})}),(0,l.jsx)(tY.Buttons,{children:(0,l.jsx)(ed.A,{placeholder:!0})})]})})}let tY={ExtraContent:S.Ay.div.attrs(()=>({className:"is-label-l"})).withConfig({componentId:"sc-3707d139-0"})(["flex-grow:1;display:flex;align-items:flex-end;margin-top:var(--spacing-md);"]),StatusPill:S.Ay.div.attrs(()=>({className:"is-label-m"})).withConfig({componentId:"sc-3707d139-1"})(["border-radius:var(--radius-lg);padding:var(--spacing-xs) var(--spacing-sm);text-transform:uppercase;",""],e=>e.$isPaid?`
367      color: var(--color-on-surface-disabled);
368      background-color: var(--color-on-container-dim);
369      `:`
370      color: var(--color-primary);
371      background-color: var(--color-primary-lighten);
372    `),AfterDetails:S.Ay.div.withConfig({componentId:"sc-3707d139-2"})(["margin-top:var(--spacing-xl);border-top:1px solid var(--color-outline-secondary);"]),Buttons:S.Ay.div.withConfig({componentId:"sc-3707d139-3"})(["margin-top:var(--spacing-xl);display:flex;flex-direction:column;gap:var(--spacing-md);> *{width:100%;}"]),PremiumMessage:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-3707d139-4"})(["padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl);"])},t_={Invoices:S.Ay.div.withConfig({componentId:"sc-a5c23d41-0"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);margin-bottom:var(--spacing-xl);"]),ErrorMessage:S.Ay.p.attrs({className:"has-universal-danger-color"}).withConfig({componentId:"sc-a5c23d41-1"})([""])};var tJ=n(26969);function tX(e){if(e)return tQ(e.subscriptionStatusText)}function tZ(e){if(e)return e.endDate?"negative":tQ(e.status)}function tQ(e){return e?e.startsWith("Jatkuva tilaus")?"positive":e.startsWith("Tilauksesi on peruutettu")||e.startsWith("M\xe4\xe4r\xe4aikainen tilaus p\xe4\xe4ttynyt")||e.startsWith("Tilauksesi p\xe4\xe4ttyy")||e.startsWith("Olet lopettanut tilauksen")?"negative":"neutral":"neutral"}function t0(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=tZ(e.agreement);return(0,l.jsx)(tT.A,{as:n,href:`/digitilaukset/${e.agreement.id}`,style:"horizontal_subscription",title:e.agreement.productText,image:{url:e.agreement.productImageUrl},"data-click-element-name":"AgreementTeaserPromo","data-agreement-id":e.agreement.id,"data-product-code":e.agreement.product,"data-product-name":e.agreement.productText,"data-term-number":null,afterContent:e.afterContent,children:(0,l.jsxs)(t1.ExtraContent,{children:[(0,l.jsx)(t1.StatusText,{className:["is-label-l","is-color-"+i].join(" "),children:e.agreement.endDate?(0,l.jsxs)(l.Fragment,{children:["Tilauksesi p\xe4\xe4ttyy ",(0,eU.Yq)(e.agreement.endDate)]}):(0,l.jsx)(l.Fragment,{children:e.agreement.status})}),(0,l.jsxs)(t1.RecipientText,{children:["Saaja: ",e.agreement.recipientText||t.customerDisplayName]}),(0,l.jsx)(t1.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"light"})})})]})})}let t1={ExtraContent:S.Ay.div.withConfig({componentId:"sc-957ea6c0-0"})(["display:flex;flex-direction:column;flex-grow:1;justify-content:space-between;align-items:flex-start;color:var(--color-on-surface-secondary);margin-top:var(--spacing-xs);"]),RecipientText:S.Ay.div.attrs({className:"is-label-xs"}).withConfig({componentId:"sc-957ea6c0-1"})(["margin-top:var(--spacing-xs);"]),StatusText:S.Ay.div.withConfig({componentId:"sc-957ea6c0-2"})(["margin-top:var(--spacing-xs);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-957ea6c0-3"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);"])};function t2(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=tX(e.subscription);return(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:e.subscription.productTitle,image:e.subscription.productImageUrl?{url:e.subscription.productImageUrl}
372:null,href:"/tilaukset/"+e.subscription.id,as:n,afterContent:e.afterContent,"data-click-element-name":"SubscriptionTeaserPromo","data-subscription-reference":e.subscription.id,"data-product-code":e.subscription.productCode,"data-product-name":e.subscription.productTitle,"data-term-number":null,children:(0,l.jsxs)(t4.ExtraContent,{children:[(0,l.jsx)(t4.StatusText,{className:["is-label-l","is-color-"+i].join(" "),children:e.subscription.processingStatusText||e.subscription.subscriptionStatusText}),(0,l.jsxs)(t4.RecipientText,{children:["Saaja: ",e.subscription.shipToName||t.customerDisplayName]}),(0,l.jsx)(t4.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"light"})})})]})})}function t3(e){let{Link:t}=(0,d.useContext)(R.A);return(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:e.title,image:e.imageUrl?{url:e.imageUrl}:null,href:e.href,as:t,afterContent:e.afterContent,"data-click-element-name":"FakeSubscriptionTeaserPromo","data-term-number":null,children:(0,l.jsxs)(t4.ExtraContent,{children:[(0,l.jsx)(t4.StatusText,{className:"is-label-l is-color-positive",children:e.statusText}),(0,l.jsx)(t4.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})})}function t5(e){let t=(0,d.useContext)(S.Dx);return(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:(0,l.jsx)(eF.A,{length:"short",lineHeight:t["heading-m-line-height"]}),image:null,afterContent:e.afterContent,children:(0,l.jsx)(t4.ExtraContent,{children:(0,l.jsx)("div",{style:{flex:"1 1 auto"},children:(0,l.jsx)(eF.A,{length:"medium"})})})})}let t4={ExtraContent:S.Ay.div.withConfig({componentId:"sc-41379f93-0"})(["display:flex;flex-direction:column;flex-grow:1;justify-content:space-between;align-items:flex-start;color:var(--color-on-surface-secondary);margin-top:var(--spacing-xs);"]),RecipientText:S.Ay.div.attrs({className:"is-label-xs"}).withConfig({componentId:"sc-41379f93-1"})(["margin-top:var(--spacing-xs);"]),StatusText:S.Ay.div.withConfig({componentId:"sc-41379f93-2"})(["margin-top:var(--spacing-xs);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-41379f93-3"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);"])},t8={PromoList:S.Ay.div.withConfig({componentId:"sc-4cd962d4-0"})(["display:flex;flex-direction:column;margin-bottom:var(--spacing-xl);border-radius:var(--radius-lg);border:1px solid var(--color-outline-secondary);padding:var(--spacing-md);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);"]),PromoListItem:S.Ay.div.withConfig({componentId:"sc-4cd962d4-1"})(["&:not(:first-child){margin-top:var(--spacing-md);border-top:1px solid var(--color-outline-secondary);padding-top:var(--spacing-md);}"," ",""],e=>e.$isDigitalArchive&&`
373    --promo--media-border: 2px solid var(--color-on-surface);
374    `,e=>e.$isInvoicing&&`
375    --promo--media-background-color: transparent;
376    `),PlaceholderWrapper:S.Ay.div.withConfig({componentId:"sc-4cd962d4-2"})(["--promo--media-ratio:3/4;"])},t7={DigitalArchivePromoWrapper:S.Ay.div.withConfig({componentId:"sc-36f251bf-0"})(["--promo--media-border:2px solid var(--color-on-surface);"]),PlaceholderWrapper:S.Ay.div.withConfig({componentId:"sc-36f251bf-1"})(["--promo--media-ratio:3/4;"]),ImageIconContainer:S.Ay.div.withConfig({componentId:"sc-36f251bf-2"})(["display:flex;align-items:center;justify-content:center;aspect-ratio:8/10;font-size:60px;color:var(--color-primary);background-color:var(--color-container);"]),ExtraLink:S.Ay.a.attrs({className:"is-body-s"}).withConfig({componentId:"sc-36f251bf-3"})(["position:relative;display:block;padding-top:var(--spacing-xs);padding-bottom:var(--spacing-xs);color:inherit;text-decoration:none;"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-36f251bf-4"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);"])},t6=e=>"Pysyv\xe4sti reilu hinta"===e.productTitle,t9={BenefitStatus:S.Ay.div.attrs({className:"is-label-l"}).withConfig({componentId:"sc-7e60611b-0"})(["margin-top:var(--spacing-xs);color:var(--color-universal-success);flex-grow:1;display:flex;flex-direction:column;justify-content:flex-end;"]),ImageIconContainer:S.Ay.div.withConfig({componentId:"sc-7e60611b-1"})(["display:flex;align-items:center;justify-content:center;aspect-ratio:8/10;font-size:60px;color:var(--color-primary);background-color:var(--color-container);"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-7e60611b-2"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--color-on-surface-secondary);"])},ne=e=>"Pysyv\xe4sti reilu hinta"===e.productTitle,nt={BenefitStatus:S.Ay.div.attrs({className:"is-label-l"}).withConfig({componentId:"sc-a7807b4c-0"})(["margin-top:var(--spacing-xs);color:var(--color-universal-success);flex-grow:1;display:flex;flex-direction:column;justify-content:flex-end;"]),ImageIconContainer:S.Ay.div.withConfig({componentId:"sc-a7807b4c-1"})(["display:flex;align-items:center;justify-content:center;aspect-ratio:8/10;font-size:60px;color:var(--color-primary);background-color:var(--color-container);"]),LinkIcon:S.Ay.div.withConfig({componentId:"sc-a7807b4c-2"})(["position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--color-on-surface-secondary);"])},nn=`
377  mutation ChangeInvoiceDueDate(
378    $viewerId: ID!
379    $invoiceId: ID!
380    $dueDate: Date!
381    $emailAddress: String!
382  ) {
383    changeInvoiceDueDate(
384      viewerId: $viewerId
385      invoiceId: $invoiceId
386      dueDate: $dueDate
387      emailAddress: $emailAddress
388    )
389  }
390`;function ni(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),i=(0,d.useMemo)(()=>
390{if(n.openInvoices)return n.openInvoices.find(t=>t.id===e.invoiceId)||null},[e.invoiceId,n.openInvoices]),o=(0,d.useMemo)(()=>(0,eU.cM)(new Date),[]),a=(0,d.useMemo)(()=>{if(i)return i.dueDate&&i.dueDate>=o?i.dueDate:o},[i,o]),r=(0,d.useMemo)(()=>{if(!a)return;let e=new Date(a);return e.setDate(e.getDate()+14),(0,eU.cM)(e)},[a]),[s,c]=(0,d.useState)(""),[u,m]=(0,d.useState)(""),p=(0,d.useMemo)(()=>!n.customer?.emailAddress,[n.customer]),g=(0,eu.A)({api:t.aspaApiAuthenticated,query:nn}),h=(0,d.useMemo)(()=>g.data?.changeInvoiceDueDate,[g]),x=(0,d.useCallback)(()=>{c((0,eU.cM)(new Date)),m(n.customer?.emailAddress||"")},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(x(),g.reset())},[e.isOpen]);let f=(0,d.useMemo)(()=>!!s&&!!u&&(!a||!(s<a))&&(!r||!(s>r)),[a,r,s,u]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Er\xe4p\xe4iv\xe4n siirto",onClose:()=>{!g.loading&&(e.onClose?.(),h&&e.onCloseAfterSuccess?.())},children:(0,l.jsx)(no.Container,{"data-element-name":"ChangeInvoideDueDateForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async t=>{t.preventDefault(),await g.mutate({variables:{viewerId:n.customer.id,invoiceId:e.invoiceId,emailAddress:u,dueDate:s}}),await n.refetch()},children:h?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Pyynt\xf6 vastaanotettu",description:"Er\xe4p\xe4iv\xe4n siirto on nyt k\xe4sitelt\xe4v\xe4n\xe4. Saat tiedon muutoksesta s\xe4hk\xf6postiisi.",result:"pending"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",children:"Voit siirt\xe4\xe4 laskun er\xe4p\xe4iv\xe4\xe4 enint\xe4\xe4n 2 viikolla. Huomaathan, ett\xe4 er\xe4p\xe4iv\xe4n siirto vaikuttaa osamaksutilauksissa my\xf6s tuleviin er\xe4p\xe4iviin."}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{children:"Er\xe4p\xe4iv\xe4"}),(0,l.jsx)("input",{type:"date",min:a,max:r,value:s,onChange:e=>c(e.target.value)})]}),(0,l.jsx)(es.A,{id:"email",required:!0,disabled:!p,label:"S\xe4hk\xf6postiosoite",value:u,onChange:e=>m(e.target.value)})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeInvoiceDueDateButton",buttonType:"submit",disabled:!f||g.loading,children:"Tallenna"}),(g.error||g.errors?.length>0)&&(0,l.jsx)(no.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let no={Container:S.Ay.div.withConfig({componentId:"sc-222cc869-0"})(["input{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-222cc869-1"})([""])};function na(e){var t;let[n,i]=(0,d.useState)(!1),o=(0,d.useMemo)(()=>e.invoice.premiums?.some(e=>"WaitingForPayment"===e.deliveryStatus||"PaymentInProcess"===e.deliveryStatus),[e.invoice]),a=(0,d.useMemo)(()=>"PaymentInProcess"!==e.invoice.statusCode&&"CancelInProcess"!==e.invoice.statusCode&&"Paid"!==e.invoice.statusCode,[e.invoice]),[r,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(!1);return e.invoice.id&&"0"!==e.invoice.id&&"0P"!==e.invoice.id?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ni,{isOpen:n,onClose:()=>i(!1),invoiceId:e.invoice.id}),(0,l.jsx)(tT.A,{style:"horizontal_invoice",title:"Lasku: "+e.invoice.rows.map(e=>e.productTitle).join(", "),image:null,extraContent:(0,l.jsx)(ns.ExtraContent,{$isPaid:"Paid"===e.invoice.statusCode,children:(0,l.jsx)(ns.StatusPill,{$isPaid:"Paid"===e.invoice.statusCode,children:"PaymentInProcess"===e.invoice.statusCode?"Maksu k\xe4sittelyss\xe4":"DueDateInProcess"===e.invoice.statusCode?"Er\xe4p\xe4iv\xe4 k\xe4sittelyss\xe4":"CancelInProcess"===e.invoice.statusCode?"Peruutus k\xe4sittelyss\xe4":"Paid"===e.invoice.statusCode?"Maksettu":"Avoin"})}),afterContent:(0,l.jsxs)(ns.AfterDetails,{children:[(0,l.jsxs)(ef.A,{children:["Paid"===e.invoice.statusCode?(0,l.jsx)(ey.A,{label:"Maksup\xe4iv\xe4",value:(0,eU.Yq)(e.invoice.latestPaymentDate)}):(0,l.jsx)(ey.A,{label:"Er\xe4p\xe4iv\xe4",value:(0,eU.Yq)(e.invoice.dueDate)}),e.invoice.totalInstallmentCount>1&&(0,l.jsx)(ey.A,{label:"Paid"===e.invoice.statusCode&&e.invoice.totalInstallmentCount>1?"Maksetut er\xe4t":"Er\xe4",value:`${e.invoice.currentInstallmentNumber} / ${e.invoice.totalInstallmentCount}`}),"Paid"===e.invoice.statusCode?(0,l.jsx)(ey.A,{label:"Maksettu summa",value:e.invoice.amountPaidText}):(0,l.jsx)(ey.A,{label:"Hinta",value:e.invoice.amountDueText}),(0,l.jsx)(ey.A,{label:"Laskunumero",value:"P"===(t=e.invoice.id).charAt(t.length-1)?t.slice(0,-1):t})]}),a&&(0,l.jsx)("div",{style:{marginTop:"var(--spacing-xl)"},children:(0,l.jsx)(tV,{invoice:e.invoice,onStartLoading:()=>s(!0),onStopLoading:()=>s(!1),onStartRedirecting:()=>u(!0)})}),o&&(0,l.jsx)(ns.PremiumMessage,{children:"Saat tilaajalahjan, kun maksusi on k\xe4sitelty."}),(0,l.jsxs)(ef.A,{style:{marginTop:"var(--spacing-xl)"},children:[(0,l.jsx)(ev.A,{children:"Laskutus"}),(0,l.jsx)(ey.A,{label:"Laskutus yhteens\xe4",value:e.invoice.totalText}),(0,l.jsx)(ey.A,{label:"Hyvitykset ja maksut",value:e.invoice.amountPaidText}),(0,l.jsx)(ey.A,{label:"Huomautus- ja maksutapalis\xe4t",value:e.invoice.feesText}),(0,l.jsx)(ey.A,{label:"Yhteens\xe4",value:e.invoice.totalOpenAmountText})]}),(0,l.jsxs)(ef.A,{style:{marginTop:"var(--spacing-xl)"},children:[(0,l.jsx)(ev.A,{children:"Laskutettavat tuotteet"}),e.invoice.rows.map((e,t)=>(0,l.jsx)(ey.A,{label:e.productTitle,value:e.pricingText},t))]}),a&&(0,l.jsx)(ns.Buttons,{children:(0,l.jsx)(ed.A,{disabled:r||c,type:"secondary",onClick:()=>i(!0),children:"Siirr\xe4 er\xe4p\xe4iv\xe4\xe4"})})]})}),e.invoice.premiums?.length>0&&(0,l.jsx)(tN,{style:{marginTop:"var(--spacing-xl)"},children:e.invoice.premiums.map((t,n)=>(0,l.jsx)(tS,{children:(0,l.jsx)(tU,{premium:{...t,invoiceId:e.invoice.id},noInvoiceLink:!0}
390)},n))})]}):null}function nr(){let e=(0,d.useContext)(S.Dx);return(0,l.jsx)(tT.A,{style:"horizontal_invoice",title:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-m-line-height"]}),image:null,extraContent:(0,l.jsx)(ns.ExtraContent,{children:(0,l.jsx)(ns.StatusPill,{style:{minWidth:"4em"},children:"\xa0"})}),afterContent:(0,l.jsxs)(ns.AfterDetails,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Er\xe4p\xe4iv\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Er\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Hinta",value:(0,l.jsx)(eF.A,{length:"short"})})]}),(0,l.jsx)("div",{style:{marginTop:"var(--spacing-xl)"},children:(0,l.jsx)(tq,{})}),(0,l.jsx)(ns.PremiumMessage,{children:(0,l.jsx)(eF.A,{length:"medium",lineHeight:e["body-l-line-height"]})}),(0,l.jsx)(ns.Buttons,{children:(0,l.jsx)(ed.A,{placeholder:!0})})]})})}let ns={ExtraContent:S.Ay.div.attrs(()=>({className:"is-label-l"})).withConfig({componentId:"sc-b2389e60-0"})(["flex-grow:1;display:flex;align-items:flex-end;margin-top:var(--spacing-md);"]),StatusPill:S.Ay.div.attrs(()=>({className:"is-label-m"})).withConfig({componentId:"sc-b2389e60-1"})(["border-radius:var(--radius-lg);padding:var(--spacing-xs) var(--spacing-sm);text-transform:uppercase;",""],e=>e.$isPaid?`
391      color: var(--color-on-surface-disabled);
392      background-color: var(--color-on-container-dim);
393      `:`
394      color: var(--color-primary);
395      background-color: var(--color-primary-lighten);
396    `),AfterDetails:S.Ay.div.withConfig({componentId:"sc-b2389e60-2"})(["margin-top:var(--spacing-xl);border-top:1px solid var(--color-outline-secondary);"]),Buttons:S.Ay.div.withConfig({componentId:"sc-b2389e60-3"})(["display:flex;flex-direction:column;gap:var(--spacing-md);margin-top:var(--spacing-xl);> *{width:100%;}"]),PremiumMessage:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-b2389e60-4"})(["padding-top:var(--spacing-xl);"]),PremiumPromo:(0,S.Ay)(tU).withConfig({componentId:"sc-b2389e60-5"})(["margin-top:var(--spacing-lg);"])};var nl=n(52e3);function nc(e){return(0,l.jsx)(E.A,{children:(0,l.jsx)(nd.Component,{children:(0,l.jsx)(nl.A,{eventId:e.eventId,eventUrl:e.eventUrl,eventRecorded:e.eventRecorded,recordingLink:e.recordingLink})})})}nc.canLazyLoad=!0,nc.lazyPlaceholder=nl.H;let nd={Component:S.Ay.div.withConfig({componentId:"sc-ae5322ab-0"})([""])},nu=function({productId:e,productName:t}){let n,[{loading:o,error:a,data:r},s]=(0,d.useState)({loading:!1,error:void 0,data:void 0});return(0,d.useEffect)(()=>
396{l()},[]),r&&r.length&&(n=e?r.find(({magazineCode:t})=>t===e):t?r.find(({name:e})=>e.trim()===t.trim()):r),{loading:o,error:a,data:n};async function l(){if(s({loading:!0}),!i){let[e]=function({method:e="get",url:t,timeout:n=5e3,payload:i,headers:o}){let a;return[new Promise((r,s)=>{(a=new XMLHttpRequest).open(e,t,!0),a.timeout=n,o&&Object.keys(o).forEach(e=>{a.setRequestHeader(e,o[e])}),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){200!==a.status&&s(Error(`Incorrect status code ${a.status}`));try{let e=JSON.parse(a.responseText);r(e)}catch(e){s(e)}a=void 0}},a.ontimeout=function(){s(Error(`Request timeout after ${n} ms`))},a.onerror=function(e){s(e)},a.send(i)}),function(){a&&(a.onreadystatechange=void 0,a.ontimeout=void 0,a.onerror=void 0,a.abort())}]}({method:"get",url:"https://lehtitilaukset.a-lehdet.fi/lehtitarjoukset"});i=e}i.then(e=>{s({loading:!1,error:void 0,data:e})},e=>{console.error("Error getting dippi data",e),s({loading:!1,error:e,data:void 0})})}},nm=[{name:"Apu Juniori",id:"AJ"},{name:"Apu",id:"AP"},{name:"ApuRistikot",id:"AR"},{name:"Avotakka",id:"AT"},{name:"Eeva",id:"EV"},{name:"Image",id:"IM"},{name:"Kauneus & Terveys",id:"KT"},{name:"Kotivinkki",id:"KV"},{name:"ApuKrypto",id:"KY"},{name:"Maku",id:"MK"},{name:"Meid\xe4n M\xf6kki",id:"MM"},{name:"Mondo",id:"MO"},{name:"Meid\xe4n Talo",id:"MT"},{name:"Trendi",id:"TD"},{name:"Unelmien Talo&Koti",id:"TK"},{name:"Tuulilasi",id:"TL"},{name:"Apu Terveys",id:"TR"},{name:"Voi hyvin",id:"VH"},{name:"Viherpiha",id:"VP"}];function np(e){let t=nm.find(({name:t})=>e===t);return t?t.id:void 0}var ng=n(32481);let nh={Component:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-0"})([""]),Product:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-1"})(["display:grid;column-gap:var(--spacing-md);grid-template-areas:'name price' 'packageSize price';grid-template-columns:1fr auto;border-radius:8px;background-color:var(--color-universal-gray-0);padding:var(--spacing-md);margin-bottom:var(--spacing-lg);"]),ProductName:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-2"})(["color:var(--color-universal-gray-900);grid-area:name;text-align:left;"]),ProductPackageSize:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-3"})(["color:var(--color-universal-gray-900);text-transform:none;grid-area:packageSize;text-align:left;"]),ProductTerms:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-4"})(["grid-area:terms;text-align:center;letter-spacing:1px;text-transform:uppercase;color:var(--color-on-surface-secondary);"]),ProductPriceTag:S.Ay.div.withConfig({componentId:"sc-b1b80bd8-5"})(["grid-area:price;background-color:#7cc928;color:var(--color-universal-gray-0);letter-spacing:-0.5px;padding:var(--spacing-sm) var(--spacing-md);border-radius:8px;align-self:flex-start;display:flex;justify-content:center;align-self:unset;line-height:1;"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-b1b80bd8-6"})(["font-weight:400;width:100%;margin-bottom:var(--spacing-sm);",""],e=>e.$isBlockClickable&&`
397      ::before {
398        content: '';
399        position: absolute;
400        top: 0;
401        left: 0;
402        width: 100%;
403        height: 100%;
404    `)};function nx({magazineId:e,clickUrl:t,isPlacement:n,showDivider:i=!1,isBlockClickable:o=!1}){let{content:a}=(0,d.useContext)(F.A),r=e||np(a?.brand.name)||void 0,{data:s,loading:c,error:u}=nu({productId:r});return r&&!u&&s?c?(0,l.jsx)(nf,{}):(0,l.jsxs)(ny.Component,{"data-element-name":"MagazinePromoBlock",$isPlacement:n,className:"is-block align-wide",children:[i&&(0,l.jsx)(ng.A,{visible:!0,placement:"top"}),(0,l.jsxs)(ny.Content,{"data-click-element-name":o?"MagazinePromoBlockContentLink":void 0,children:[(0,l.jsx)(ny.Slogan,{className:"is-heading-l-alt",children:s.slogan}),(0,l.jsx)(ny.MagazineImage,{src:s.cover,alt:"",width:"145",height:"170"}),(0,l.jsx)(ny.MagazineProductDetails,{data:{...s,url:t,isBlockClickable:o}})]}),i&&(0,l.jsx)(ng.A,{visible:!0,placement:"bottom"})]}):null}function nf(){return null}let ny={Component:S.Ay.div.withConfig({componentId:"sc-6592110e-0"})(["",""],e=>e.$isPlacement&&`
405    margin: var(--block-spacing) auto var(--block-spacing) auto;
406  `),Content:S.Ay.div.withConfig({componentId:"sc-6592110e-1"})(["display:grid;grid-template-columns:1fr;row-gap:var(--spacing-md);column-gap:var(--spacing-xl);background-color:var(--color-universal-powder);padding:var(--spacing-lg) var(--spacing-xl);overflow:hidden;align-items:center;grid-template-areas:'img' 'desc' 'prod';text-decoration:none;position:relative;@media (min-width:","){padding:var(--spacing-2xl) var(--spacing-5xl);row-gap:var(--spacing-2xl);column-gap:var(--spacing-5xl);grid-template-columns:1fr 1fr;grid-template-areas:'desc img' 'prod img';}"],e=>e.theme["breakpoint-tablet"]),Slogan:S.Ay.div.withConfig({componentId:"sc-6592110e-2"})(["color:var(--color-universal-gray-900);text-align:center;grid-area:desc;@media (min-width:","){text-align:unset;align-self:end;}"],e=>e.theme["breakpoint-tablet"]),MagazineImage:(0,S.Ay)(e1.default).withConfig({componentId:"sc-6592110e-3"})(["display:block;width:auto;max-width:100%;max-height:200px;height:200px;object-fit:contain;object-position:center;margin-inline:auto;grid-area:img;@media (min-width:","){max-height:300px;height:300px;}@media (min-width:","){max-height:400px;height:400px;}"],e=>e.theme["breakpoint-tablet"],e=>e.theme["breakpoint-desktop"]),MagazineProductDetails:(0,S.Ay)(function({data:e,className:t}){return(0,l.jsxs)(nh.Component,{className:t,children:[(0,l.jsxs)(nh.Product,{children:[(0,l.jsx)(nh.ProductName,{className:"is-heading-l-alt",children:e.name}),(0,l.jsx)(nh.ProductPackageSize,{className:"is-label-xs",children:e.packageSize}),(0,l.jsx)(nh.ProductPriceTag,{className:"is-heading-l-alt",children:e.rate+" €"})]}),(0,l.jsx)(nh.Button,{"data-click-element-name":"MagazinePromoBlockOrderButton",href:e.url,$isBlockClickable:e.isBlockClickable,children:e.buttonText}),(0,l.jsx)(nh.ProductTerms,{className:"is-label-m",children:e.termsOfSubscription})]})}).withConfig({componentId:"sc-6592110e-4"})(["grid-area:prod;@media (min-width:","){align-self:start;}"],e=>e.theme["breakpoint-tablet"])};function nv(e){return(0,l.jsx)(nb.Component,{url:e.src,cover:!0,$zIndex:e.zIndex,sizes:e.sizes,className:e.fixedAttachment?"is-fixed":""})}let nb={Component:(0,S.Ay)(M.A).withConfig({componentId:"sc-f3d4a373-0"})(["position:absolute;
406left:0;top:0;width:100%;height:100%;z-index:",";@media (min-width:","){&.is-fixed{clip-path:inset(0);> *{object-fit:cover;object-position:center;position:fixed;left:0;top:0;width:100vw;height:100vh;}}}"],e=>e.$zIndex||0,e=>e.theme["breakpoint-desktop"])},nC={Component:S.Ay.blockquote.withConfig({componentId:"sc-623c1195-0"})(["position:relative;overflow:hidden;box-sizing:border-box;display:flex;align-items:center;justify-content:center;margin:0;width:100%;text-align:center;&.full-height{min-height:100vh;}padding-inline:var(--spacing-xl);padding-top:var(--spacing-7xl);padding-bottom:72px;&.without-media-background.without-color{color:black;}&.with-media-background.without-color{color:white;}"," ",""],e=>e.$backgroundColor&&`
407      background-color: ${e.$backgroundColor};
408    `,e=>e.$color&&`
409      color: ${e.$color};
410    `),Text:S.Ay.div.withConfig({componentId:"sc-623c1195-1"})(["max-width:var(--width-column);position:relative;z-index:3;"]),Quote:S.Ay.div.withConfig({componentId:"sc-623c1195-2"})([""]),Author:S.Ay.div.withConfig({componentId:"sc-623c1195-3"})(["margin-top:var(--spacing-md);"]),Overlay:S.Ay.div.withConfig({componentId:"sc-623c1195-4"})(["position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.4);z-index:1;"])};var nA=n(57173);function nk({className:e}){return(0,l.jsx)("svg",{className:e,viewBox:"0 0 1097.15 341.03",role:"img","aria-label":"Aivos\xe4\xe4ti\xf6",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M215.69,128.89c17.08-7.78,44.03-18.14,44.03-56.54C259.72,27.06,211.03,0,163.95,0C117.08,0,68.6,27.06,68.6,72.35 c0,20.29,9.93,38.66,26.56,49.15c18.26,11.51,41.97,11.42,65.25,0.31l-12.23-25.51c-14.26,6.81-27.71,6.7-37.47,0.54 c-8.11-5.12-12.96-14.27-12.96-24.49c0-20.77,25.09-43.56,66.2-43.56c41.1,0,66.61,22.5,66.61,43.56c0,18.8-8.38,23.46-25.83,31.4 c-16.47,7.49-39.02,17.76-39.02,49.98h29.15C194.87,141.31,199.1,136.44,215.69,128.89 M1063.22,206.59 c9.56,0,17.32-7.75,17.32-17.32s-7.75-17.32-17.32-17.32c-9.56,0-17.32,7.75-17.32,17.32S1053.66,206.59,1063.22,206.59 M998.28,189.27c0-9.57,7.75-17.32,17.32-17.32c9.56,0,17.32,7.75,17.32,17.32s-7.75,17.32-17.32,17.32 C1006.04,206.59,998.28,198.84,998.28,189.27 M944.55,206.59c9.57,0,17.32-7.75,17.32-17.32s-7.75-17.32-17.32-17.32 c-9.56,0-17.32,7.75-17.32,17.32S934.98,206.59,944.55,206.59 M769.85,189.27c0-9.57,7.75-17.32,17.32-17.32 c9.57,0,17.32,7.75,17.32,17.32s-7.75,17.32-17.32,17.32C777.6,206.59,769.85,198.84,769.85,189.27 M660.3,206.59 c9.57,0,17.32-7.75,17.32-17.32s-7.75-17.32-17.32-17.32c-9.56,0-17.32,7.75-17.32,17.32S650.74,206.59,660.3,206.59 M721.55,189.27 c0-9.57,7.75-17.32,17.32-17.32s17.32,7.75,17.32,17.32s-7.75,17.32-17.32,17.32S721.55,198.84,721.55,189.27 M612.68,206.59 c9.56,0,17.32-7.75,17.32-17.32s-7.75-17.32-17.32-17.32c-9.57,0-17.32,7.75-17.32,17.32S603.12,206.59,612.68,206.59 M162.98,189.27c0-9.57,7.75-17.32,17.32-17.32s17.32,7.75,17.32,17.32s-7.75,17.32-17.32,17.32S162.98,198.84,162.98,189.27 M1059.11,256.41c-5.62-5.69-12.15-8.54-19.59-8.54c-7.74,0-14.39,2.85-19.93,8.54c-5.55,5.69-8.31,14.16-8.31,25.4 c0,11.24,2.77,19.7,8.31,25.4c5.54,5.69,12.11,8.54,19.7,8.54c7.59,0,14.2-2.85,19.81-8.54c5.62-5.69,8.43-14.16,8.43-25.4 C1067.54,270.58,1064.73,262.11,1059.11,256.41 M1089.52,312.67c-5.09,8.88-12.04,15.83-20.84,20.84 c-8.81,5.01-18.6,7.52-29.38,7.52c-10.93,0-20.77-2.5-29.5-7.52c-8.73-5.01-15.64-11.96-20.73-20.84 c-5.09-8.88-7.63-19.17-7.63-30.86c0-11.69,2.58-21.98,7.74-30.86c5.16-8.88,12.11-15.83,20.84-20.84 c8.73-5.01,18.56-7.52,29.5-7.52c10.78,0,20.54,2.51,29.27,7.52c8.73,5.01,15.64,11.96,20.73,20.84c5.09,8.88,7.63,19.17,7.63,30.86 C1097.15,293.51,1094.61,303.79,1089.52,312.67 M959.12,225.32h-29.15V338.3h29.15V225.32z M887.83,338.3 c-11.84,0-21.34-2.88-28.47-8.65c-7.14-5.77-10.71-16.02-10.71-30.75v-49.2H829.3v-24.37h19.36l3.42-30.29h25.74v30.29h30.52v24.37 h-30.52v49.43c0,5.47,1.17,9.22,3.53,11.27c2.35,2.05,6.41,3.07,12.19,3.07h14.12v24.83H887.83z M786.02,289.78 c-1.22,8.05-4.14,14.8-8.77,20.27c-4.63,5.47-11.12,8.2-19.47,8.2c-5.47,0-9.87-1.21-13.21-3.64c-3.34-2.43-5.01-5.84-5.01-10.25 c0-4.1,1.67-7.55,5.01-10.36c3.34-2.81,8.88-4.21,16.63-4.21H786.02z M815.86,338.3v-69.47c0-14.73-4.63-26.11-13.89-34.17 c-9.26-8.05-21.94-12.07-38.04-12.07c-9.42,0-17.92,1.63-25.51,4.9c-7.6,3.27-13.78,7.94-18.56,14.01 c-4.78,6.07-7.56,13.21-8.31,21.41h28.47c1.06-5.47,3.79-9.6,8.2-12.41c4.4-2.81,9.57-4.21,15.49-4.21c6.53,0,11.99,1.82,16.4,5.47 c4.4,3.64,6.61,9.34,6.61,17.08v2.73h-28.7c-16.4,0-28.7,3.27-36.9,9.79c-8.2,6.53-12.3,15.03-12.3,25.51 c0,6.23,1.52,11.92,4.55,17.08c3.04,5.16,7.67,9.3,13.89,12.41c6.22,3.11,14.2,4.67,23.92,4.67c9.41,0,17.12-1.97,23.12-5.92 c6-3.95,10.67-8.96,14.01-15.03l2.73,18.22H815.86z M634.33,289.78c-7.74,0-13.29,1.41-16.63,4.21c-3.34,2.81-5.01,6.26-5.01,10.36 c0,4.41,1.67,7.82,5.01,10.25c3.34,2.43,7.74,3.64,13.21,3.64c8.35,0,14.84-2.73,19.47-8.2c4.63-5.47,7.55-12.22,8.77-20.27H634.33z M664.17,338.3l-2.73-18.22c-3.34,6.08-8.01,11.09-14.01,15.03c-6,3.95-13.71,5.92-23.12,5.92c-9.72,0-17.69-1.56-23.92-4.67 c-6.23-3.11-10.86-7.25-13.89-12.41c-3.04-5.16-4.55-10.85-4.55-17.08c0-10.48,4.1-18.98,12.3-25.51c8.2-6.53,20.5-9.79,36.9-9.79 h28.7v-2.73c0-7.74-2.2-13.44-6.61-17.08c-4.41-3.64-9.87-5.47-16.4-5.47c-5.92,0-11.09,1.4-15.49,4.21 c-4.41,2.81-7.14,6.95-8.2,12.41h-28.47c0.76-8.2,3.53-15.34,8.31-21.41c4.78-6.07,10.97-10.74,18.56-14.01 c7.59-3.26,16.09-4.9,25.51-4.9c16.09,0,28.77,4.03,38.04,12.07c9.26,8.05,13.89,19.44,13.89,34.17v69.47H664.17z M542.31,336.25 c7.14-3.19,12.6-7.59,16.4-13.21c3.79-5.62,5.62-11.92,5.47-18.9c0-8.05-1.98-14.24-5.92-18.56c-3.95-4.33-9.23-7.59-15.83-9.79 c-6.61-2.2-13.86-4.21-21.75-6.04c-7.29-1.67-13.14-3.49-17.54-5.47c-4.41-1.97-6.61-4.63-6.61-7.97c0-3.19,1.48-5.84,4.44
410-7.97 c2.96-2.12,7.17-3.19,12.64-3.19c10.93,0,17.23,4.18,18.9,12.53h27.56c-1.52-10.93-6.26-19.51-14.24-25.74 c-7.97-6.22-18.64-9.34-32-9.34c-14.43,0-25.62,3.42-33.6,10.25c-7.97,6.83-11.96,15.26-11.96,25.28c0,5.47,1.29,10.06,3.87,13.78 c2.58,3.72,5.96,6.76,10.14,9.11c4.17,2.36,8.77,4.29,13.78,5.81c5.01,1.52,9.94,2.81,14.8,3.87c7.59,1.67,13.51,3.38,17.77,5.12 c4.25,1.75,6.38,5.05,6.38,9.91c0,3.34-1.48,6.3-4.44,8.88c-2.96,2.58-7.63,3.87-14.01,3.87c-6.38,0-11.58-1.55-15.6-4.67 c-4.02-3.11-6.49-6.87-7.4-11.27h-29.38c0.91,7.6,3.64,14.27,8.2,20.04c4.55,5.77,10.63,10.29,18.22,13.55 c7.59,3.26,16.4,4.9,26.42,4.9C526.74,341.03,535.17,339.44,542.31,336.25 M410.89,256.41c-5.62-5.69-12.15-8.54-19.59-8.54 c-7.74,0-14.39,2.85-19.93,8.54c-5.55,5.69-8.31,14.16-8.31,25.4c0,11.24,2.77,19.7,8.31,25.4c5.54,5.69,12.11,8.54,19.7,8.54 c7.59,0,14.2-2.85,19.82-8.54c5.62-5.69,8.43-14.16,8.43-25.4C419.32,270.58,416.51,262.11,410.89,256.41 M441.3,312.67 c-5.09,8.88-12.04,15.83-20.84,20.84c-8.81,5.01-18.6,7.52-29.38,7.52c-10.93,0-20.77-2.5-29.5-7.52 c-8.73-5.01-15.64-11.96-20.73-20.84c-5.09-8.88-7.63-19.17-7.63-30.86c0-11.69,2.58-21.98,7.74-30.86 c5.16-8.88,12.11-15.83,20.84-20.84c8.73-5.01,18.56-7.52,29.5-7.52c10.78,0,20.53,2.51,29.27,7.52 c8.73,5.01,15.64,11.96,20.73,20.84c5.09,8.88,7.63,19.17,7.63,30.86C448.93,293.51,446.38,303.79,441.3,312.67 M286.76,338.3 l41.68-112.97h-30.52l-28.7,85.41l-28.7-85.41H210l41.45,112.97H286.76z M165.81,225.32h29.15V338.3h-29.15V225.32z M97.71,278.62 H51.48l23-66.28L97.71,278.62z M149.42,338.3L91.11,178.86h-32.8L0,338.3h30.52l12.98-36.9h62.18l12.75,36.9H149.42z"})})}var nj=n(33461),nw=n(5135),nI=n.n(nw);let nN=nj.Iq.filter(e=>e.isReady);function nS({baseUrl:e,gameUrls:t}){let{Link:n}=(0,d.useContext)(R.A),i="string"!=typeof n,o=(0,d.useId)(),[a,r]=(0,d.useState)(null);return(0,d.useEffect)(()=>{var e;r(nN.length>0?Math.floor((Date.UTC((e=new Date).getFullYear(),e.getMonth(),e.getDate())-Date.UTC(e.getFullYear(),0,0))/864e5)%nN.length:null)},[]),(0,l.jsxs)("section",{className:nI().portal,"aria-labelledby":o,children:[(0,l.jsxs)("header",{className:nI().header,children:[(0,l.jsx)("h2",{id:o,children:"Muistipelit"}),(0,l.jsx)("p",{className:nI().lead,children:"Pieni hetki itsellesi. Muutama minuutti kerrallaan, ei kiirett\xe4."})]}),(0,l.jsx)("ul",{className:nI().table,children:nN.map((o,r)=>
410(0,l.jsx)("li",{children:(0,l.jsxs)(n,{className:nI().photo,href:function(e,t,n){if(t?.[n])return t[n];let i=e.replace(/\/+$/,"");return`${i}/${n}`}(e,t,o.slug),...i?{contentType:"Game",content:{gameType:o.slug,title:o.name}}:{},children:[(0,l.jsx)("span",{className:nI().todayBadge,hidden:a!==r,children:"T\xe4n\xe4\xe4n"}),(0,l.jsx)(e1.default,{src:o.image,alt:"",width:800,height:600,sizes:"(min-width: 1024px) 190px, (min-width: 576px) 33vw, 50vw",unoptimized:!0}),(0,l.jsxs)("span",{className:nI().caption,children:[(0,l.jsx)("span",{className:nI().name,children:o.hyphenatedName??o.name}),(0,l.jsxs)("span",{className:nI().category,children:[o.category," \xb7 ",o.duration]})]})]})},o.slug))}),(0,l.jsxs)("p",{className:nI().credit,children:[(0,l.jsx)("span",{children:"Yhteisty\xf6ss\xe4:"}),(0,l.jsx)(n,{className:nI().creditLink,href:"https://www.aivosaatio.fi/",children:(0,l.jsx)(nk,{className:nI().creditLogo})})]})]})}var nE=n(51627);function nT(e){let t,n,i,o,{content:a}=(0,d.useContext)(F.A),{translate:r}=(0,Z.B)(),s=(0,d.useMemo)(()=>(0,nE.fv)(a),[a]);e.title?t=e.title:a?.type==="Person"||a?.type==="Brand"?t=a.name:a?.title&&(t=a.title),e.description?n=e.description:a?.type==="Person"?n=a.description?.plain:a?.description&&(n=a.description),void 0!==e.image?i=e.image:a?.image&&(i=a.image),e.kicker?o=e.kicker:a?.kicker?o=a.kicker:a?.type==="Person"&&(o=a.jobTitle);let c=0===e.blockIndex,u=e.brand?.slug||a?.brand?.slug;return(0,l.jsx)(E.A,{children:(0,l.jsxs)(nP.Component,{$isAlignLeft:e.alignLeft,children:[i&&(0,l.jsx)(nP.Image,{...i,sizes:"200px",width:200,height:200}),s?(0,l.jsx)(nP.Kicker,{className:"is-label-ads_m is-commercial",children:(0,l.jsxs)("span",{children:[r("ContentCard.adLabel"),a?.partner?`: ${a.partner.name}`:""]})}):(0,l.jsx)(l.Fragment,{children:o&&(0,l.jsx)(nP.Kicker,{className:"is-label-m",$brand:u,children:o})}),t&&(0,l.jsx)(nP.Title,{as:c?"h1":"h2",className:"is-heading-xxxl",children:t}),n&&(0,l.jsx)(nP.Description,{className:"is-body-l",children:n})]})})}let nP={Component:S.Ay.div.withConfig({componentId:"sc-e0c514a3-0"})(["padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl);",""],e=>e.$isAlignLeft?`
411      text-align: left;
412      `:`
413      text-align: center;
414      `),Image:(0,S.Ay)(M.A).withConfig({componentId:"sc-e0c514a3-1"})(["border:1px solid var(--color-outline-secondary);border-radius:50%;max-width:calc(100% - 2 * var(--block-gutter));width:200px;height:200px;margin-inline:auto;overflow:hidden;&:not(:last-child){margin-bottom:var(--spacing-xl);}"]),Title:S.Ay.div.withConfig({componentId:"sc-e0c514a3-2"})(["&:not(:last-child){margin-bottom:var(--spacing-xl);}"]),Kicker:S.Ay.div.withConfig({componentId:"sc-e0c514a3-3"})(["margin-bottom:var(--spacing-md);white-space:nowrap;color:var(--brand-","--kicker-color,var(--color-primary-darken));&.is-commercial{color:var(--color-ads-secondary);}"],e=>e.$brand),Description:S.Ay.div.withConfig({componentId:"sc-e0c514a3-4"})([""])};var nL=n(47297),nM=n(66119);function nB({passwordHash:e,title:t="Salasanasuojaus",description:n="T\xe4m\xe4 sis\xe4lt\xf6 on salasanasuojattu. Sy\xf6t\xe4 salasana n\xe4hd\xe4ksesi sis\xe4ll\xf6n.",blocks:i,iconUrl:o,productUrl:a,productText:r,productPrice:s,productLogo:c,buttonText:u="Avaa",salesText:m}){let{translate:p}=(0,Z.B)(),[g,h]=(0,d.useState)(""),[x,f]=(0,d.useState)(void 0),[y,v]=(0,d.useState)(!1),b=e?`password_unlock_${e}`:null;(0,d.useEffect)(()=>{b&&sessionStorage.getItem(b)?f(!0):f(!1)},[b]);let C=async t=>{if(t.preventDefault(),!e)return void f(!0);let n=new TextEncoder().encode(g.toUpperCase());Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",n))).map(e=>e.toString(16).padStart(2,"0")).join("")===e?(b&&sessionStorage.setItem(b,"true"),f(!0),v(!1)):v(!0)};return!0===x&&i?(0,l.jsx)(nR.UnlockedContainer,{children:(0,l.jsx)(nM.default,{children:(0,l.jsx)(sS,{blocks:i})})}):void 0===x?(0,l.jsx)(E.A,{children:(0,l.jsx)("div",{style:{minHeight:"400px"}})}):(0,l.jsx)(E.A,{children:(0,l.jsx)(nR.Component,{children:(0,l.jsxs)(nR.Content,{children:[o&&(0,l.jsx)(nR.Icon,{width:50,height:50,src:o,alt:"",unoptimized:!0}),!o&&!1,(0,l.jsx)(nR.Title,{className:"is-heading-xxl",children:t}),(0,l.jsx)(nR.Description,{className:"is-body-s",dangerouslySetInnerHTML:{__html:n}}),(0,l.jsxs)(nR.Form,{onSubmit:C,autoComplete:"off",children:[(0,l.jsx)("input",{type:"hidden",value:"prayer"}),(0,l.jsx)(nR.Input,{type:"password",name:"password-field-do-not-save",value:g,onChange:e=>h(e.target.value),placeholder:p("PasswordProtectionBlock.passwordInputPlaceholder"),className:"is-body-s",autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true"}),(0,l.jsx)(nR.Button,{buttonType:"submit",className:"",children:u})]}),y&&(0,l.jsx)(nR.Error,{className:"is-body-s",children:p("PasswordProtectionBlock.wrongPassword")}),m&&(0,l.jsx)(nR.SalesText,{className:"is-body-s",children:m}),a&&(0,l.jsxs)(nR.ProductBox,{href:a,target:"_blank","data-click-element-name":"PasswordProtectionBlockProductLink",children:[c&&(0,l.jsx)(nR.ProductLogo,{src:c,alt:"",width:44,height:44,unoptimized:!0}),(0,l.jsxs)(nR.ProductInfo,{children:[(0,l.jsx)(nR.ProductText,{className:"is-body-s",children:r}),s&&(0,l.jsx)(nR.ProductPrice,{className:"is-label-s",children:s})]}),(0,l.jsx)(nR.CartIcon,{children:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"shopping-cart",style:"regular"})})})]})]})})})}nB.canLazyLoad=!1;let nR={UnlockedContainer:S.Ay.div.withConfig({componentId:"sc-1775f316-0"})(["min-height:400px;"]),Component:S.Ay.div.withConfig({componentId:"sc-1775f316-1"})(["box-sizing:border-box;margin-inline:auto;border-radius:var(--radius-rounded);width:var(--width-column);max-width:100%;padding:var(--spacing-xs);background:var(--color-primary);position:relative;min-height:400px;"]),Content:S.Ay.div.withConfig({componentId:"sc-1775f316-2"})(["display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xl);align-self:stretch;box-sizing:border-box;border-radius:calc(var(--radius-rounded) - 4px);padding:var(--spacing-3xl) var(--spacing-xl);text-align:center;background:var(--color-container-secondary);color:var(--color-on-surface);"]),Icon:(0,S.Ay)(e1.default).withConfig({componentId:"sc-1775f316-3"})([""]),Title:S.Ay.div.withConfig({componentId:"sc-1775f316-4"})([""]),Description:S.Ay.div.withConfig({componentId:"sc-1775f316-5"})(["a{color:inherit;}"]),ProductBox:S.Ay.a.withConfig({componentId:"sc-1775f316-6"})(["display:flex;align-items:center;gap:var(--spacing-md);padding:var(--spacing-md);background:var(--color-container);color:var(--color-on-surface);border-radius:var(--radius-rounded);text-decoration:none;width:100%;max-width:400px;box-sizing:border-box;&:hover{opacity:0.9;}"]),ProductLogo:(0,S.Ay)(e1.default).withConfig({componentId:"sc-1775f316-7"})(["border-radius:var(--radius-minimal);background:#fff;padding:2px;"]),ProductInfo:S.Ay.div.withConfig({componentId:"sc-1775f316-8"})(["flex:1;display:flex;flex-direction:column;align-items:flex-start;overflow:hidden;"]),ProductText:S.Ay.div.withConfig({componentId:"sc-1775f316-9"})(["font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;text-align:left;"]),ProductPrice:S.Ay.div.withConfig({componentId:"sc-1775f316-10"})(["color:var(--color-on-surface-tertiary);"]),CartIcon:S.Ay.div.withConfig({componentId:"sc-1775f316-11"})(["font-size:20px;line-height:1;color:var(--color-on-surface);display:flex;align-items:center;"]),Form:S.Ay.form.withConfig({componentId:"sc-1775f316-12"})(["display:flex;flex-direction:column;align-items:center;gap:var(--spacing-md);width:100%;"]),Input:S.Ay.input.withConfig({componentId:"sc-1775f316-13"})(["padding:var(--spacing-sm) var(--spacing-md);border:1px solid var(--color-outline-secondary);border-radius:var(--radius-minimal);width:100%;max-width:300px;text-align:center;font-size:20px;&:focus{outline:1px solid var(--color-primary);border-color:var(--color-primary);}"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-1775f316-14"})(["&.is-special-style{background:var(--color-on-surface) !important;color:var(--color-on-primary) !important;}"]),Error:S.Ay.p.withConfig({componentId:"sc-1775f316-15"})(["color:var(--color-universal-danger,#d0021b);margin-top:var(--spacing-sm);"]),SalesText:S.Ay.div.withConfig({componentId:"sc-1775f316-16"})(["margin-top:var(--spacing-md);"])};var nD=n(10703),nO=n(8072),nz=n.n(nO);let nF=({slotId:e,triggered:t,disabledByScrolling:n,disabledByOthers:i,disabledByAboveTheFold:o})=>"debug"!==(0,tC.useSearchParams)().get("ads")?null:(0,l.jsx)("div",{className:"is-body-xs",style:{background:n||i||o?"red":"green",color:"white",padding:"3px",textAlign:"center",whiteSpace:"nowrap",position:"absolute",fontSize:"12px",zIndex:999999},children:`[${e}] ${n?"disabledByScrolling":i?`disabled by ${i}`:o?"disabled by above the fold":t?"triggered":"tracking"}`});var nU=n(20224);let n$=({onTrigger:e})=>{let t=(0,N.A)(e=>e.scrollVelocity),n=(0,N.A)(e=>e.scrollDeltaY),[i,o]=(0,d.useState)(!1),[a,r]=(0,d.useState)(!1);if((0,d.useEffect)(()=>{r(!0)},[]),!a||i)return null;let s=window.innerHeight;return(0,l.jsx)(v.A,{rootMarginVertical:Math.floor(1.5*s),onEnterOnce:()=>{t<Math.floor(+s)&&n>=0?e(!0):e(!1),o(!0)}})},nH=[{type:"NativeAd",amount:1,position:1},{type:"Feed",amount:2,filters:[{field:"toplist",value:"pageviews_7d"},{field:"metadata.commercialType",value:"non-commercial"}]}],nV=({slotId:e,content:t,placementName:n,blocks:i})=>{let o=(0,d.useRef)(null),a=(0,N.A)(e=>e.startTrackingPlacement),r=(0,N.A)(e=>e.disableNearbyPlacements),s=(0,N.A)(e=>e.isPlacementDisabled),c=(0,N.A)(e=>e.disablePlacementByScrolling),u=(0,N.A)(e=>e.triggerPlacement),m=(0,N.A)(t=>t.placements.find(t=>t.slotId===e)),g=(0,N.A)(t=>t.ads[e]),h=m?.disabledByOthers,x=m?.disabledByScrolling,f=m?.disabledByAboveTheFold,y=x||!!h||f,v=m?.triggered,[b,C]=(0,d.useState)(!1),[A,k]=(0,d.useState)(!1);(0,d.useEffect)(()=>{o.current&&a({slotId:e,content:t,blocks:i,element:o.current})},[e,a,t,i,n]),(0,d.useEffect)(()=>{g?.hasAd&&C(!0)},[g?.hasAd]),(0,d.useEffect)(()=>{v&&("recommendation"===t||i?.length)&&C(!0)},[v,t,i]);let j=(0,d.useMemo)(()=>v&&"recommendation"===t?nz()(nH).map(e=>("NativeAd"===e.type&&(e.elementName="Recommendation",e.placementName=n),e)):null,[v,t,n]),w=(0,d.useCallback)(n=>{(p.A.debug(`=> PlacementBlock.onTrigger: slotId=${e} isScrollingSlowly=${n}`),s(e))?p.A.debug(`=> PlacementBlock.onTrigger: slotId=${e} has already been disabled, so don't trigger it.`):n?(r(e),u(e)):"recommendation"===t||i?.length?u(e):c(e)},[e,t,i,r,u,c,s]);return i?.length?(0,l.jsx)(sS,{blocks:i}):(0,l.jsx)(E.A,{align:A?"full":"wide",margin:b?void 0:"0",className:"hide-on-print",children:(0,l.jsxs)("div",{ref:o,children:[(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(nF,{slotId:e,triggered:v,disabledByScrolling:x,disabledByOthers:h,disabledByAboveTheFold:f})}),y?null:v?"recommendation"===t?(0,l.jsx)(X.A,{layout:"recommendation",title:"Suosittelemme",sources:j,loadMore:!1}):"magazine-promo"===t?(0,l.jsx)(nx,{isPlacement:!0}):(0,l.jsx)(nU.A,{slotId:e,onFallbackAdReady:e=>C(e),onFullWidth:k}):(0,l.jsx)(n$,{onTrigger:w})]})})};function nq(e){if(!e.podcast)return null;let t=e.podcast.episodes?.length;return(0,l.jsxs)(nK.Component,{children:[(0,l.jsxs)(nK.MediaAndContent,{children:[(0,l.jsx)(nK.Image,{url:e.podcast.imageUrl,alt:"",width:"180",height:"180"}),(0,l.jsx)(nK.Title,{className:"is-heading-xxxl",children:e.podcast.title}),(0,l.jsx)(nK.Description,{className:"is-body-xs",children:e.podcast.description})]}),(0,l.jsx)(nK.CoverFooter,{children:t&&(0,l.jsxs)(nK.AmountOfEpisodes,{className:"is-label-s",children:[t," jaksoa"]})})]})}nV.canLazyLoad=!1;let nK={Component:S.Ay.div.withConfig({componentId:"sc-73cb61a8-0"})(["width:100%;background-color:var(--color-universal-gray-900);color:var(--color-universal-gray-0);padding:var(--spacing-lg);box-sizing:border-box;@media (min-width:","){width:var(--width-column);max-width:100%;margin:var(--spacing-4xl) auto;border-radius:20px;}"],e=>e.theme["breakpoint-tablet"]),MediaAndContent:S.Ay.div.withConfig({componentId:"sc-73cb61a8-1"})(["display:grid;align-items:center;grid-template-areas:'image title' 'description description';grid-template-columns:104px 1fr;column-gap:var(--spacing-lg);row-gap:var(--spacing-md);color:inherit;text-decoration:none;@media (min-width:","){grid-template-columns:180px 1fr;}"],e=>e.theme["breakpoint-tablet"]),Image:(0,S.Ay)(M.A).withConfig({componentId:"sc-73cb61a8-2"})(["grid-area:image;border-radius:8px;overflow:hidden;"]),Title:S.Ay.h1.withConfig({componentId:"sc-73cb61a8-3"})(["grid-area:title;margin:0;"]),Description:S.Ay.div.withConfig({componentId:"sc-73cb61a8-4"})(["grid-area:description;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;
414"]),AmountOfEpisodes:S.Ay.div.withConfig({componentId:"sc-73cb61a8-5"})(["font-weight:400;text-transform:lowercase;"]),CoverFooter:S.Ay.div.withConfig({componentId:"sc-73cb61a8-6"})(["margin-top:var(--spacing-md);display:flex;gap:var(--spacing-sm);align-items:center;"]),FollowButton:S.Ay.div.withConfig({componentId:"sc-73cb61a8-7"})(["display:flex;align-items:center;gap:var(--spacing-xs);border:1px solid var(--color-universal-gray-400);padding:var(--spacing-xs) var(--spacing-sm);border-radius:12px;svg{font-size:10px;}"]),FollowButtonLabel:S.Ay.div.withConfig({componentId:"sc-73cb61a8-8"})(["line-height:1;"])};var nG=n(23779),nW=n(29435),nY=n(56512),n_=n(14537);function nJ(e){let t,n=(0,d.useContext)(y.A),i=(0,d.useContext)(tA.A);(0,d.useContext)(b.A);let o=Math.ceil(e.episode?.duration/60)||0,a=(0,eU.bU)(e.episode?.publishedAt)||"",[r,s]=(0,d.useState)(!1),c=e.episode?.image?.url||e.episode?.imageUrl||e.episode?.podcast?.imageUrl||"",u=`/podcastit/${e.episode.podcast.podcastId}`,{Link:m}=(0,d.useContext)(R.A);return((0,d.useMemo)(()=>!!i.user?.email&&i.user?.email?.indexOf("@a-lehdet.fi")!==-1,[i.user?.email]),!0===e.episode.podcast.behindPaywall||e.episode.behindPaywall,n.isApp,t=!1,e.episode)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(nX.Component,{children:[(0,l.jsx)(nX.Card,{children:(0,l.jsxs)(nX.MediaAndContent,{children:[(0,l.jsx)(nX.Image,{url:c,alt:"",width:"180",height:"180"}),(0,l.jsxs)(nX.Content,{children:[(0,l.jsx)(nX.Title,{className:"is-heading-l-alt",as:e.isH1?"h1":"h2",children:e.episode.title}),(0,l.jsxs)(nX.PodcastTitle,{className:"is-body-xs",as:m,href:u,children:[e.episode.podcast.title," ",(0,l.jsx)(V.g,{icon:(0,H.K)({name:"chevron-right",style:"solid"}),size:"xs"})]}),(0,l.jsxs)(nX.Player,{children:[!1!==t&&(0,l.jsx)(nX.PlayerOverlay,{onClick:e=>{e.preventDefault(),!0===t&&s(!0)}}),(0,l.jsxs)(nX.EmbedContainer,{className:"is-body-xs",children:[(0,l.jsxs)(nX.DurationAndPublishedDate,{className:"is-label-xs",children:[(0,l.jsxs)("span",{children:[o," min"]}),(0,l.jsx)("span",{children:" • "}),(0,l.jsx)("time",{dateTime:e.episode.publishedAt,children:a})]}),n.isApp?(0,l.jsx)(nW.A,{episodeId:e.episode.episodeId,size:"xl"}):e.episode.audioUrl?(0,l.jsx)(nY.A,{audioUrl:e.episode.audioUrl,duration:e.episode.duration}):null]})]})]})]})}),!e.hideDescription&&(0,l.jsx)(nX.Description,{className:"is-body-xs is-block",dangerouslySetInnerHTML:{__html:e.episode.longDescription}})]}),r&&(0,l.jsx)(n_.A,{onClose:()=>s(!1),children:(0,l.jsx)(nX.PayWall,{title:"Kuuntele podcast Apu360-tilauksella",hasFade:!1,description:"Tilaa Apu360 ja saat rajattoman luku- ja kuunteluoikeuden, alkaen 12,90 €/kk.",hideRecommendations:!0})})]}):null}let nX={Component:S.Ay.div.withConfig({componentId:"sc-543f76ab-0"})([""]),Card:S.Ay.div.withConfig({componentId:"sc-543f76ab-1"})(["box-sizing:border-box;background:linear-gradient(180deg,#315d65 0%,#202020 100%);color:var(--color-universal-gray-0);padding:var(--spacing-lg);margin:var(--spacing-4xl) auto 0;border-radius:20px;"]),MediaAndContent:S.Ay.div.withConfig({componentId:"sc-543f76ab-2"})(["display:grid;grid-template-areas:'image' 'content';grid-template-columns:1fr;column-gap:var(--spacing-lg);row-gap:var(--spacing-md);color:inherit;text-decoration:none;text-align:center;@media (min-width:","){grid-template-columns:180px 1fr;grid-template-areas:'image content';text-align:left;}"],e=>e.theme["breakpoint-tablet"]),Image:(0,S.Ay)(M.A).withConfig({componentId:"sc-543f76ab-3"})(["grid-area:image;border-radius:8px;overflow:hidden;max-width:180px;margin-inline:auto;"]),Content:S.Ay.div.withConfig({componentId:"sc-543f76ab-4"})(["grid-area:content;display:flex;flex-direction:column;gap:var(--spacing-sm);"]),Title:S.Ay.div.withConfig({componentId:"sc-543f76ab-5"})(["grid-area:title;margin:0;"]),Description:S.Ay.div.withConfig({componentId:"sc-543f76ab-6"})(["grid-area:description;margin-top:var(--spacing-4xl);"]),EmbedContainer:S.Ay.div.withConfig({componentId:"sc-543f76ab-7"})(["display:flex;flex-direction:column;"]),DurationAndPublishedDate:S.Ay.div.withConfig({componentId:"sc-543f76ab-8"})(["color:var(--color-universal-gray-400);margin-bottom:var(--spacing-md);"]),PodcastTitle:S.Ay.div.withConfig({componentId:"sc-543f76ab-9"})(["grid-area:podcast-title;text-decoration:none;color:var(--color-universal-gray-400);"]),Player:S.Ay.div.withConfig({componentId:"sc-543f76ab-10"})(["position:relative;margin-top:4px;"]),PlayerOverlay:S.Ay.div.withConfig({componentId:"sc-543f76ab-11"})(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;"]),PayWall:(0,S.Ay)(nD.A).withConfig({componentId:"sc-543f76ab-12"})(["margin:0 !important;"])};var nZ=n(75013);let nQ=`
415  query GetPodcastEpisode(
416    $episodeId: ID!
417  ) {
418    getEpisode(
419      episodeId: $episodeId
420      clientType: Web
421    ) {
422      __typename
423      audioUrl
424      duration
425      episodeId
426      imageUrl
427      longDescription
428      publishedAt
429      shortDescription
430      title
431      behindPaywall
432      podcast {
433        description
434        episodeCount
435        imageUrl
436        podcastId
437        title
438        behindPaywall
439      }
440    }
441  }
442`;var n0=n(70760),n1=n(24940);let n2={Container:S.Ay.div.withConfig({componentId:"sc-b0882585-0"})(["color:var(--color-on-surface,#202020);background:var(--color-surface,#ffffff);border-radius:var(--radius-full);border:1px solid var(--color-secondary,#315d65);padding:var(--spacing-2xl) var(--spacing-xl);display:flex;flex-direction:column;gap:var(--spacing-lg);align-items:flex-start;align-self:stretch;"]),TextContainer:S.Ay.div.withConfig({componentId:"sc-b0882585-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xs);"]),OptionsContainer:S.Ay.div.withConfig({componentId:"sc-b0882585-2"})(["display:flex;flex-direction:column;gap:var(--spacing-md);align-items:flex-start;align-self:stretch;width:100%;"]),Option:S.Ay.button.withConfig({componentId:"sc-b0882585-3"})(["position:relative;background:var(--color-container-secondary,#ffffff);border-radius:var(--radius-md,8px);border:",";padding:var(--spacing-md) var(--spacing-lg);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;align-self:stretch;height:70px;min-height:70px;width:100%;cursor:",";text-align:left;transition:transform 0.4s ease-out,border 0.3s ease-out;overflow:hidden;&:hover:not(:disabled){transform:translateY(-2px);}&.selected{animation:pulseSelection 0.3s ease;}&.voted::before{content:'';position:absolute;top:0;left:0;width:",";height:100%;background:var(--color-secondary-lighten);transition:width 0.8s ease-out;z-index:0;}&.animate.voted::before{width:",";}&.placeholder{position:relative;overflow:hidden;&::after{content:'';position:absolute;top:0;left:-100%;width:50%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent);animation:shimmer 1.5s infinite;}@keyframes shimmer{100%{left:100%;}}}@keyframes pulseSelection{0%{transform:scale(1);}50%{transform:scale(1.02);}100%{transform:scale(1);}}"],e=>e.className?.includes("selected")?"4px solid var(--color-secondary, #315d65)":"1px solid var(--color-outline-secondary, #d3d3d3)",e=>e.isDisabled?"default":"pointer",e=>`${e.percentage}%`,e=>`${e.percentage}%`),OptionInfo:S.Ay.div.withConfig({componentId:"sc-b0882585-4"})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex:1;width:100%;position:relative;z-index:1;"]),OptionText:S.Ay.span.withConfig({componentId:"sc-b0882585-5"})(["color:var(--color-on-surface,#202020);flex:1;"]),OptionCount:S.Ay.span.withConfig({componentId:"sc-b0882585-6"})(["color:var(--color-on-surface,#202020);text-align:right;font-weight:500;transition:opacity 0.4s ease-in;animation:fadeIn 0.6s ease-in;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]),Footer:S.Ay.div.withConfig({componentId:"sc-b0882585-7"})(["display:flex;flex-direction:column;gap:var(--spacing-xs);align-items:flex-start;align-self:stretch;animation:fadeIn 0.6s ease-in;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]),FooterText:S.Ay.div.withConfig({componentId:"sc-b0882585-8"})(["color:var(--color-on-surface,#202020);"]),FooterLink:S.Ay.a.withConfig({componentId:"sc-b0882585-9"})(["color:var(--color-on-surface,#202020);font-weight:600;text-decoration:underline;text-underline-offset:3px;&:hover{text-decoration:none;}"]),Message:S.Ay.div.withConfig({componentId:"sc-b0882585-10"})(["padding:var(--spacing-2xl);text-align:center;color:var(--color-on-surface-tertiary);"]),ErrorMessage:S.Ay.div.withConfig({componentId:"sc-b0882585-11"})(["padding:var(--spacing-2xl);text-align:center;color:var(--color-universal-danger,#e53935);"])};var n3=n(74971);function n5(e){let t=(0,tC.useSearchParams)().get("date"),n=(0,d.useMemo)(()=>`https://puzzleplayz.com/x/${e.gameId}`+(t?`/${t}`:""),[e.gameId,t]);return(0,l.jsx)(n4.Block,{align:"wide",children:(0,l.jsx)(n3.default,{src:n,align:"wide",noConsentTitle:"Pelit k\xe4ytt\xe4v\xe4t ev\xe4steit\xe4",noConsentDescription:"A-lehtien palveluissa k\xe4ytett\xe4v\xe4t pelit ker\xe4\xe4v\xe4t tilastodataa pelien k\xe4
442yt\xf6st\xe4. Datan ker\xe4\xe4minen toimii ev\xe4steiden avulla. Pelataksesi pelej\xe4, sinun on hyv\xe4ksytt\xe4v\xe4 pelikumppanimme ev\xe4steet."})})}n5.canLazyLoad=!1;let n4={Block:(0,S.Ay)(E.A).withConfig({componentId:"sc-45546795-0"})(["aspect-ratio:1/1;min-height:100vh;iframe{aspect-ratio:1/1;min-height:100vh;}"])};var n8=n(93573),n7=n(71145),n6=n(97490),n9=n(90143);let ie=`
443  query GetRecipes($filters: [FeedFilterInput!]) {
444    feed(first: 100, types: [Recipe], filters: $filters) {
445      total
446      edges {
447        node {
448          ...RecipeFeed
449        }
450      }
451    }
452  }
453  ${n7.fs}
454`,it={Component:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-0"})(["@media (max-width:","){margin-inline:var(--spacing-lg);}border:1px solid var(--color-outline-secondary,#d3d3d3);box-shadow:0 0 12px 0 rgba(32,32,32,0.12);border-radius:12px;overflow:hidden;padding:var(--spacing-xl) 0;",""],e=>e.theme["breakpoint-tablet-max"],e=>!e.$shouldFetchRecipes&&`
455      padding-bottom: 0;
456    `),ImageSection:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-1"})(["margin-bottom:var(--spacing-lg);display:flex;"]),ImageWrapper:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-2"})(["width:100%;height:auto;margin:0 auto;padding-inline:var(--spacing-lg);img{width:460px;max-width:100%;height:auto;display:block;margin-inline:auto;}"]),FilterSection:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-3"})(["margin-bottom:var(--spacing-lg);"]),FilterPills:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-4"})(["display:flex;gap:8px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none;}padding-inline:var(--spacing-lg);"]),FilterPill:(0,S.Ay)(ed.A).withConfig({componentId:"sc-eb67e0a4-5"})(["min-width:max-content;"]),FilterButtons:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-6"})(["display:grid;grid-template-columns:",";@media (min-width:","){grid-template-columns:repeat(4,1fr);}gap:8px;margin-inline:var(--spacing-lg);"],e=>1===e.columns?"1fr":"1fr 1fr",e=>e.theme["breakpoint-tablet-max"]),FilterButton:(0,S.Ay)(ed.A).withConfig({componentId:"sc-eb67e0a4-7"})(["font-weight:500;min-width:unset !important;&.is-secondary{color:#757575;background-color:#e7e7e7;}"]),CarouselContainer:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-8"})(["display:flex;flex-direction:column;"]),Carousel:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-9"})(["display:flex;align-items:stretch;justify-content:flex-start;gap:var(--spacing-lg);max-width:100%;overflow-y:hidden;overflow-x:auto;scroll-padding:var(--spacing-lg);scroll-behavior:smooth;scroll-snap-type:x mandatory;padding-inline:var(--spacing-lg);padding-bottom:2px;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),PaginationContainer:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-10"})(["display:grid;grid-template-columns:200px 1fr 200px;align-items:center;margin-top:var(--spacing-lg);padding-inline:var(--spacing-lg);@media (max-width:","){display:flex;justify-content:center;}"],e=>e.theme["breakpoint-tablet-max"]),PaginationWrapper:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-11"})(["display:flex;justify-content:center;@media (max-width:","){display:none;}"],e=>e.theme["breakpoint-tablet-max"]),StartOverButton:(0,S.Ay)(ed.A).withConfig({componentId:"sc-eb67e0a4-12"})(["justify-self:end;@media (max-width:","){justify-self:auto;}"],e=>e.theme["breakpoint-tablet-max"]),RecipeCardWrapper:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-13"})(["--promo--media-ratio:1/1;--promo--title-min-lines:4;--promo--title-max-lines:4;flex-grow:0;flex-shrink:0;flex-basis:258px;min-width:258px;width:258px;scroll-snap-align:start;box-shadow:0 0 4px 0 rgba(32,32,32,0.1);border:1px solid var(--color-outline-secondary,#d3d3d3);overflow:hidden;border-radius:8px;"]),RecipeCardPlaceholder:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-14"})(["background:var(--color-surface);border-radius:8px;overflow:hidden;
456box-shadow:var(--box-shadow-8);width:100%;display:flex;flex-direction:column;"]),PlaceholderImage:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-15"})(["width:100%;aspect-ratio:1/1;background:var(--color-placeholder);flex-shrink:0;"]),PlaceholderContent:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-16"})(["padding:12px;flex:1;display:flex;flex-direction:column;gap:8px;"]),NoResults:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-17"})(["text-align:center;padding:40px 20px;color:var(--color-on-surface-variant);"]),EmptySpace:S.Ay.div.withConfig({componentId:"sc-eb67e0a4-18"})([""])};var ii=n(95753),io=n(45499),ia=n(45079);function ir(e){let t=e.title||"Hae resepti\xe4",n=e.placeholder||"Kakku, mokkapalat tai vaikka suklaa",i=e.submitLabel||"Hae",o=e.searchTab||"Reseptit",a=e.categorySlug??"ruoka",r=e.backgroundColor||"#F9F1F0",[s,c]=(0,d.useState)(""),u=(0,d.useContext)(io.A),m=(0,d.useContext)(ia.A),p=e=>{let t=e.trim();t&&(m.openSearch({query:t,tabName:o,contentTypes:["Recipe"],sortOrder:"publishedAtDescending",filters:a?[{field:"category.slug",values:[a.toLowerCase()],type:"filterTypeOr"}]:void 0}),u.openLeftSidebar())};return(0,l.jsx)(E.A,{align:"full",backgroundColor:r,children:(0,l.jsxs)(is.Component,{role:"search","aria-label":t,children:[(0,l.jsx)(is.Title,{className:"is-label-m",children:t}),(0,l.jsx)(is.Form,{onSubmit:e=>{e.preventDefault(),p(s)},children:(0,l.jsxs)(is.FieldRow,{children:[(0,l.jsx)(ii.A,{value:s,placeholder:n,ariaLabel:t,enterKeyHint:"search",hideResetButton:!0,onChange:c,onSubmit:p}),(0,l.jsx)(is.SubmitButton,{type:"submit",children:i})]})})]})})}ir.canLazyLoad=!1;let is={Component:S.Ay.div.withConfig({componentId:"sc-8f5ba25c-0"})(["box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xl);width:100%;padding:var(--spacing-5xl) var(--spacing-xl);@media screen and (min-width:768px){padding:56px var(--spacing-2xl);gap:var(--spacing-2xl);}"]),Title:S.Ay.h2.withConfig({componentId:"sc-8f5ba25c-1"})(["margin:0;text-align:center;color:var(--color-text-primary);"]),Form:S.Ay.form.withConfig({componentId:"sc-8f5ba25c-2"})(["width:100%;max-width:720px;"]),FieldRow:S.Ay.div.withConfig({componentId:"sc-8f5ba25c-3"})(["display:flex;flex-direction:column;gap:var(--spacing-sm);@media screen and (min-width:640px){flex-direction:row;align-items:center;gap:var(--spacing-md);> :first-child{flex:1;min-width:0;}}"]),SubmitButton:S.Ay.button.attrs({className:"is-label-m"}).withConfig({componentId:"sc-8f5ba25c-4"})(["box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:100%;height:41px;margin:0;padding:0 var(--spacing-xl);border:1px solid var(--color-primary);border-radius:var(--radius-minimal);background-color:var(--color-primary);color:var(--color-on-primary);line-height:1;text-transform:uppercase;cursor:pointer;appearance:none;@media screen and (min-width:640px){width:auto;min-width:120px;}&:hover{background-color:var(--color-primary-darken);border-color:var(--color-primary-darken);}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px;}"])};function il(){let{content:e}=(0,d.useContext)(F.A);return"Recipe"===e.type&&e.coverVideo&&e.image?(0,l.jsx)(E.A,{pageSection:e?.slug,children:(0,l.jsx)(M.A,{...e.image})}):null}function ic(){let{content:e}=(0,d.useContext)(F.A);return e?(0,l.jsxs)(E.A,{pageSection:e?.slug,children:[(0,l.jsxs)(id.TitleRow,{children:[(0,l.jsx)(id.Title,{children:"Reseptin ainekset"}),e.portions&&(0,l.jsx)(id.Portions,{children:e.portions})]}),(0,l.jsx)(id.IngredientLists,{children:e.ingredients?.map(e=>(0,l.jsxs)(id.IngredientList,{children:[e.name&&(0,l.jsx)(id.IngredientListName,{children:e.name}),e.ingredients?.map(e=>(0,l.jsxs)(id.Ingredient,{children:[(0,l.jsx)(id.IngredientAmount,{children:e.amount}),(0,l.jsxs)(id.IngredientName,{children:[e.name," ",e.description?`(${e.description})`:""]})]},e.name))]},e.name))})]}):null}il.canLazyLoad=!1,ic.canLazyLoad=!1;let id={TitleRow:S.Ay.div.withConfig({componentId:"sc-6569562a-0"})(["display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--spacing-xl);border-bottom:2px solid var(--color-outline-secondary);padding-bottom:var(--spacing-md);"]),Title:S.Ay.h2.attrs({className:"is-heading-l"}).withConfig({componentId:"sc-6569562a-1"})(["margin:0;"]),Portions:S.Ay.div.attrs({className:"is-body-xs has-secondary-color"}).withConfig({componentId:"sc-6569562a-2"})(["font-weight:var(--bold-font-weight-for-body-xs);"]),IngredientLists:S.Ay.div.withConfig({componentId:"sc-6569562a-3"})(["display:flex;flex-direction:column;flex-wrap:nowrap;gap:var(--spacing-xl);"]),IngredientList:S.Ay.div.withConfig({componentId:"sc-6569562a-4"})([""]),IngredientListName:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-6569562a-5"})(["border-bottom:1px solid var(--color-outline-secondary);margin-bottom:var(--spacing-md);padding-bottom:var(--spacing-md);"]),Ingredient:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-6569562a-6"})(["display:flex;"]),IngredientAmount:S.Ay.div.withConfig({componentId:"sc-6569562a-7"})(["flex:0 0 auto;border-right:1px solid var(--color-outline-secondary);padding:var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 0;width:108px;text-align:right;"]),IngredientName:S.Ay.div.withConfig({componentId:"sc-6569562a-8"})(["padding:var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-md);"])};function iu(e){return null}function im(e){let{translate:t}=(0,Z.B)(),[n,i]=(0,d.useState)(!0===e.hasReadMore),o=(0,d.useRef)(null),{width:a}=(0,eJ.A)(),r=(0,d.useMemo)(()=>!!e.hasReadMore&&!!o.current&&o.current.scrollHeight>o.current.clientHeight,[e.hasReadMore,e.text,a]),s=(0,d.useMemo)(()=>{let t=e.text;if(e.isPreview){let e=5;for(let n=0;n<t.length;n++){let i=t[n];if("block"===i.kind&&"wall-marker"===i.type){e=n;break}}t=t.slice(0,e)}return t.map((t,n)=>(0,l.jsx)(ig,{...t,numberedListPhases:e.numberedListPhases},n))},[e.text,e.isPreview]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iv.Component,{forwardRef:o,"data-element-name":"RichText",className:ts()(e.className,n&&"is-collapsed"),children:s}),n&&r&&(0,l.jsx)(iv.TransitionOverlay,{}),r&&(0,l.jsx)(iv.ReadMoreContainer,{children:(0,l.jsxs)(ed.A,{size:"medium",type:"secondary",onClick:()=>i(e=>!e),children:[t(n?"RichText.buttonLabelCollapsed":"RichText.buttonLabelExpanded"),n?(0,l.jsx)(iv.Icon,{icon:(0,H.K)({style:"solid",name:"arrow-down"})}):(0,l.jsx)(iv.Icon,{icon:(0,H.K)({style:"solid",name:"arrow-up"})})]})})]})}function ip(e){return(0,l.jsx)(l.Fragment,{children:e.nodes.map((e,t)=>(0,l.jsx)(ig,{...e},t))})}function ig(e){return"text"===e.kind?(0,l.jsx)(ih,{...e}):"inline"===e.kind?(0,l.jsx)(ix,{...e}):"block"===e.kind?(0,l.jsx)(iy,{...e,numberedListPhases:e.numberedListPhases}):(console.info("Unsupported node",e),null)}function ih(e){let t,n=(0,l.jsx)(l.Fragment,{children:e.ranges?e.ranges.map((e,t)=>(0,l.jsx)(ih,{...e},t)):e.text?e.text:null});if(e.marks?t=e.marks:e.mark&&(t=[e.mark]),t)for(let e of t)n=function(e,t){let n;if(!t)return e;let i={},o="string"==typeof t?t:t?.type;return("bold"===o?n="strong":"italic"===o?n="em":"underlined"===o?(n="span",i.className="underlined"):"lead-text"===o?(n="span",i.className="lead-text"):console.info("Unsupported mark",t),n)?(0,l.jsx)(n,{...i,children:e}):e}(n,e);return n}function ix(e){let t=(0,d.useContext)(y.A).isApp,{Link:n}=(0,d.useContext)(R.A);return"anchor"===e.type||"link"===e.type?(0,l.jsxs)(iv.Anchor,{"data-click-element-name":"RichTextAnchor",href:t?function(e){let t=e.match(/^.*apu.fi\/artikkelit\/(.*)$/);if(t){let[,n]=t;e=`/app/artikkelit/${n}`}return e}(e.data.href):e.data.href,as:n,children:[(0,l.jsx)(ip,{nodes:e.nodes}),(0,l.jsx)(iu,{href:e.data.href})]}):(console.info("Unsupported inline",e),null)}function iy(e){let t=(0,d.useContext)(S.Dx);if("paragraph"===e.type)return(0,l.jsx)(sN,{blockName:"ParagraphBlock",size:t["richtext--body-size"],hasDropCap:e.data?.hasDropCap,children:(0,l.jsx)(ip,{nodes:e.nodes})});if("heading-two"===e.type)return(0,l.jsx)(sN,{blockName:"HeadingBlock",size:t["richtext--heading-two-size"],level:2,children:(0,l.jsx)(ip,{nodes:e.nodes})});if("heading-three"===e.type)return(0,l.jsx)(sN,{blockName:"HeadingBlock",size:t["richtext--heading-three-size"],level:3,children:(0,l.jsx)(ip,{nodes:e.nodes})});if("embed"===e.type)return(0,l.jsx)(sN,{blockName:"EmbedBlock",src:e.data.src,align:e.data.align});if("iframe"===e.type)return(0,l.jsx)(sN,{blockName:"IframeBlock",src:e.data.src,height:e.data.height,heightMobile:e.data.heightMobile});if("image"===e.type)return(0,l.jsx)(sN,{blockName:"ImageBlock",src:e.data.src,alt:e.data.altText,align:e.data.align,fullHeight:e.data.fullHeight,placeholderUrl:e.data.placeholderUrl,placeholderMinHeight:!0,loading:"lazy",children:(0,l.jsx)(ip,{nodes:e.nodes})});if("video"===e.type)return(0,l.jsx)(sN,{blockName:"VideoBlock",src:e.data.src,alt:e.data.altText,align:e.data.align,fullHeight:e.data.fullHeight,children:(0,l.jsx)(ip,{nodes:e.nodes})});if("bulleted-list"===e.type)return(0,l.jsx)(sN,{blockName:"ListBlock",type:"unordered",children:(0,l.jsx)(ip,{nodes:e.nodes})});if("numbered-list"===e.type)return e.numberedListPhases?(0,l.jsx)(sN,{blockName:"RecipeInstructionPhasesBlock",nodes:e.nodes}):(0,l.jsx)(sN,{blockName:"ListBlock",type:"ordered",children:(0,l.jsx)(ip,{nodes:e.nodes})});if("list-item"===e.type)return(0,l.jsx)("li",{children:(0,l.jsx)(ip,{nodes:e.nodes})});if("block-quote"===e.type)return(0,l.jsx)(sN,{blockName:"BlockQuoteBlock",children:(0,l.jsx)(ip,{nodes:e.nodes})});if("mega-quote"===e.type)return(0,l.jsx)(sN,{blockName:"MegaQuoteBlock",quote:e.data.quote,author:e.data.author,align:e.data.align,fullHeight:e.data.fullHeight,color:e.data.color,backgroundColor:e.data.backgroundColor,backgroundImageUrl:e.data.backgroundImageUrl,backgroundVideoUrl:e.data.backgroundVideoUrl});if("tip"===e.type)return(0,l.jsx)(sN,{blockName:"TipBoxBlock",children:(0,l.jsx)(ip,{nodes:e.nodes})});if("page-element"===e.type){let t;try{if((t=JSON.parse(e.data.configuration)).blocks)return(0,l.jsx)(sS,{blocks:t.blocks});return(0,l.jsx)(sN,{configuration:t})}catch(e){console.error("Invalid block configuration",e)}}return"placement"===e.type?(0,l.jsx)(sN,{blockName:"PlacementBlock",slotId:e.data.slotId,content:e.data.content,placementName:e.data.placementName,blocks:e.data.blocks}
456):"shopify-product"===e.type?(0,l.jsx)(sN,{blockName:"ShopifyProductBlock",productId:e.data.id,title:e.data.title}):"shopify-collection"===e.type?(0,l.jsx)(sN,{blockName:"ShopifyCollectionBlock",collectionId:e.data.id,title:e.data.title}):("wall-marker"===e.type||console.info("Unsupported block",e),null)}S.Ay.span.attrs({className:"is-label-xs"}).withConfig({componentId:"sc-e55f8825-0"})(["display:inline-block;margin-left:5px;color:var(--color-on-surface-tertiary);text-transform:none !important;text-decoration:none;"]);let iv={Component:(0,S.Ay)(nM.default).withConfig({componentId:"sc-8d7ef996-0"})(["--richtext--h2-top-margin:var(--spacing-4xl);--richtext--h3-top-margin:var(--spacing-3xl);--richtext--h2-bottom-margin:var(--spacing-xl);--richtext--h3-bottom-margin:var(--spacing-xl);--richtext--p-top-margin:var(--spacing-lg);--richtext--p-bottom-margin:var(--spacing-sm);--richtext--block-top-margin:var(--spacing-3xl);--richtext--block-bottom-margin:var(--spacing-3xl);@media (min-width:","){--richtext--block-top-margin:var(--spacing-4xl);--richtext--block-bottom-margin:var(--spacing-4xl);}@media (min-width:","){--richtext--block-top-margin:var(--spacing-4xl);--richtext--block-bottom-margin:var(--spacing-4xl);}.is-block{margin-top:var(--richtext--block-top-margin);}.is-block.has-background-color:first-child{margin-top:0;}.is-block.has-background-color + .is-block.has-background-color{margin-top:calc(-1 * var(--richtext--block-bottom-margin));}.is-block:not(:last-child){margin-bottom:var(--richtext--block-bottom-margin);}.is-block:first-child:not(.has-background-color){margin-top:0;}.is-block:last-child:not(.has-background-color){margin-bottom:0;}p.is-block:not(:first-child){margin-top:var(--richtext--p-top-margin);}p.is-block:not(:last-child){margin-bottom:var(--richtext--p-bottom-margin);}h2.is-block:not(:first-child){margin-top:var(--richtext--h2-top-margin);}h3.is-block:not(:first-child){margin-top:var(--richtext--h3-top-margin);}h2.is-block:not(:last-child){margin-bottom:var(--richtext--h2-bottom-margin);}h3.is-block:not(:last-child){margin-bottom:var(--richtext--h3-bottom-margin);}> ul.is-block,> ol.is-block{margin-top:var(--spacing-2xl);}&.is-collapsed{max-height:calc(4 * var(--body-m-line-height));overflow:hidden;}"],e=>e.theme["breakpoint-tablet"],e=>e.theme["breakpoint-desktop"]),Anchor:S.Ay.a.withConfig({componentId:"sc-8d7ef996-1"})(["color:var(--content-color,var(--richtext--link-text-color));text-decoration:var(--richtext--link-text-decoration);&:hover{color:var(--content-color,var(--richtext--link-hover-text-color));}"]),ReadMoreContainer:S.Ay.div.withConfig({componentId:"sc-8d7ef996-2"})(["margin-top:var(--spacing-xl);display:flex;justify-content:center;"]),TransitionOverlay:S.Ay.div.withConfig({componentId:"sc-8d7ef996-3"})(["--read-more-overlay-height:calc(3 * var(--body-m-line-height));position:relative;margin-top:calc(-1 * var(--read-more-overlay-height));height:var(--read-more-overlay-height);background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#fff 100%);"]),Icon:(0,S.Ay)(V.g).withConfig({componentId:"sc-8d7ef996-4"})(["font-size:10px;color:inherit;z-index:1;width:12px;height:12px;"])};function ib(e){return(0,l.jsxs)(iC.Phase,{className:ts()(e.isEnabled&&e.isCurrent&&"is-current",e.isEnabled&&e.isPast&&"is-past",e.isEnabled&&e.isCurrent?"is-body-l":"is-body-s",e.onComplete?"is-clickable":""),onClick:()=>{e.onComplete?.()},children:[(0,l.jsx)(iC.Number,{children:e.isPast?(0,l.jsx)(n6.A,{name:"circle-check"}):(0,l.jsxs)("div",{className:"fa-layers",children:[(0,l.jsx)(iC.NumberCircle,{children:e.number<10?(0,l.jsx)(n6.A,{name:`circle-${e.number}`,style:e.isCurrent?"regular":"solid"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n6.A,{name:"circle",style:e.isCurrent?"regular":"solid"}),(0,l.jsx)(iC.CustomNumber,{children:(0,l.jsx)("span",{children:e.number})})]})}),e.isCurrent&&(0,l.jsx)(iC.CurrentCheckIcon,{})]})}),(0,l.jsx)("div",{children:(0,l.jsx)(ip,{nodes:e.nodes})})]})}let iC={CookingModeContainer:S.Ay.div.withConfig({componentId:"sc-764bb22d-0"})(["margin-bottom:var(--block-spacing);"]),Phases:S.Ay.ol.withConfig({componentId:"sc-764bb22d-1"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);margin:0;padding:0;list-style:none;&.is-cooking-mode-supported{border-top:1px solid var(--color-outline-primary);padding-top:var(--spacing-3xl);}"]),Phase:S.Ay.li.withConfig({componentId:"sc-764bb22d-2"})(["display:flex;gap:var(--spacing-lg);color:var(--color-on-surface);&.is-clickable{cursor:pointer;}&.is-past{color:var(--color-on-surface-disabled);}&.is-current{font-weight:var(--bold-font-weight-for-body-l);}"]),NumberCircle:S.Ay.div.withConfig({componentId:"sc-764bb22d-3"})([".is-current:hover &{opacity:0;}"]),Number:S.Ay.div.withConfig({componentId:"sc-764bb22d-4"})(["flex:0 0 auto;display:flex;justify-content:center;align-items:center;width:20px;border-radius:50%;color:var(--color-primary);font-weight:bold;font-size:20px;.is-disabled &{color:var(--color-on-surface-tertiary);}
456.is-past &{color:var(--color-primary-lighten);}height:var(--body-s-line-height);.is-current &{height:var(--body-l-line-height);}"]),CustomNumber:S.Ay.div.attrs({className:"fa-layers-text"}).withConfig({componentId:"sc-764bb22d-5"})(["font-size:12px;color:#ffffff;.is-current &{color:var(--color-primary);}> span{position:relative;top:var(--recipe-instruction-phases--custom-number-vertical-offset,0px);}"]),CurrentCheckIcon:(0,S.Ay)(n6.A).attrs({name:"circle-check",style:"regular"}).withConfig({componentId:"sc-764bb22d-6"})(["opacity:0;.is-current:hover &{opacity:1;}"])},iA=[["calories","Energia","kcal"],["protein","Proteiini","g"],["carbohydrates","Hiilihydraatit","g",["sugar","josta sokereita","g"]],["fat","Rasva","g",["saturatedFat","josta tyydyttynytt\xe4","g"]],["fiber","Ravintokuitu","g"],["salt","Suola","g"]];function ik(e){let t=e.isSubRow?ij.SubRowContainer:ij.RowContainer,n=e.isSubRow?ij.SubLeftText:ij.LeftText,i=e.isSubRow?ij.SubRightText:ij.RightText,o=e.value??"–";return e.children?(0,l.jsxs)("div",{children:[(0,l.jsxs)(t,{children:[(0,l.jsx)(n,{children:e.label}),(0,l.jsxs)(i,{children:[o," ",e.unit]})]}),e.children]}):(0,l.jsxs)(t,{children:[(0,l.jsx)(n,{children:e.label}),(0,l.jsxs)(i,{children:[o," ",e.unit]})]})}let ij={};ij.Box=S.Ay.div.withConfig({componentId:"sc-a4ec564d-0"})(["box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;border:1px solid var(--color-secondary);border-radius:var(--radius-full);width:100%;padding:var(--spacing-lg);background:var(--color-container);"]),ij.Title=S.Ay.h2.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-a4ec564d-1"})(["width:100%;margin-bottom:var(--spacing-md);color:var(--color-on-surface);"]),ij.RowContainer=S.Ay.div.withConfig({componentId:"sc-a4ec564d-2"})(["display:flex;padding:var(--spacing-xs) 0px;justify-content:space-between;align-items:flex-start;align-self:stretch;"]),ij.SubRowContainer=(0,S.Ay)(ij.RowContainer).withConfig({componentId:"sc-a4ec564d-3"})(["padding-left:var(--spacing-lg);"]),ij.RowsContainer=S.Ay.div.withConfig({componentId:"sc-a4ec564d-4"})(["display:flex;gap:var(--spacing-xs);flex-direction:column;align-self:stretch;border-top:2px solid var(--color-outline-secondary);border-bottom:2px solid var(--color-outline-secondary);padding-top:var(--spacing-xs);padding-bottom:var(--spacing-sm);& > *:not(:last-child){border-bottom:1px solid var(--color-outline-secondary);}"]),ij.Row=S.Ay.div.withConfig({componentId:"sc-a4ec564d-5"})(["padding-top:var(--spacing-xs);padding-bottom:var(--spacing-xs);"]),ij.LeftText=S.Ay.span.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-a4ec564d-6"})(["color:var(--color-on-surface);"]),ij.SubLeftText=(0,S.Ay)(ij.LeftText).withConfig({componentId:"sc-a4ec564d-7"})(["color:var(--color-on-surface-secondary);"]),ij.RightText=S.Ay.span.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-a4ec564d-8"})(["color:var(--color-on-surface);font-weight:var(--bold-font-weight-for-body-xs);"]),ij.SubRightText=(0,S.Ay)(ij.RightText).withConfig({componentId:"sc-a4ec564d-9"})(["color:var(--color-on-surface-secondary);"]),ij.CollapsibleContainer=S.Ay.div.withConfig({componentId:"sc-a4ec564d-10"})(["position:relative;max-height:",";overflow:hidden;width:100%;"],({isExpanded:e})=>e?"none":"80px"),ij.FadeEffect=S.Ay.div.withConfig({componentId:"sc-a4ec564d-11"})(["position:absolute;bottom:0;left:0;right:0;height:100%;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,rgba(250,241,239,0.85) 100%);pointer-events:none;"]),ij.ToggleButton=S.Ay.button.attrs({className:"is-body-s"}).withConfig({componentId:"sc-a4ec564d-12"})(["background:transparent;border:none;cursor:pointer;padding:0;display:flex;align-items:center;gap:var(--spacing-xs);margin-top:var(--spacing-md);color:var(--color-on-surface);text-decoration:underline;& > span{display:block;text-decoration:underline;}"]),ij.ToggleIcon=(0,S.Ay)(n6.A).withConfig({componentId:"sc-a4ec564d-13"})(["position:relative;top:2px;font-size:12px;"]);var iw=n(19565);let iI={Component:S.Ay.div.withConfig({componentId:"sc-6815d736-0"})(["padding-top:var(--spacing-xl);padding-bottom:var(--spacing-2xl);@media (min-width:","){max-width:calc(var(--width-extra-wide) + 2 * 16px);margin-inline:auto;}"],e=>e.theme["breakpoint-desktop"]),Heading:S.Ay.h2.attrs({className:"is-heading-xl"}).withConfig({componentId:"sc-6815d736-1"})(["margin-bottom:var(--spacing-lg);text-align:center;"]),Phase:S.Ay.div.withConfig({componentId:"sc-6815d736-2"})(["border-radius:var(--radius-md);width:262px;min-height:100%;background-color:white;overflow:hidden;"]),PhaseImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-6815d736-3"})([""]),PhaseContent:S.Ay.div.attrs({className:"is-body-l"}).withConfig({componentId:"sc-6815d736-4"})(["display:flex;column-gap:var(--spacing-sm);padding:var(--spacing-lg) var(--spacing-lg) var(--spacing-xl) var(--spacing-md);"]),PhaseIndex:S.Ay.div.attrs({className:"has-primary-color"}).withConfig({componentId:"sc-6815d736-5"})(["padding-inline:var(--spacing-xs);text-align:center;text-overflow:ellipsis;font-family:var(--body--drop-cap-font-family);font-size:50px;font-style:normal;font-weight:400;line-height:40px;letter-spacing:-0.75px;"])};var iN=n(34668);function iS(e){let{value:t}=(0,iN.A)([e.name],{skip:!e.name||!!e._blocks}
456),n=(0,d.useMemo)(()=>{let n=e._blocks||function(e){if(e){if(Array.isArray(e))return e;if(e.blocks&&Array.isArray(e.blocks))return e.blocks;if("object"==typeof e)return[e]}}(t);for(let t of n||[]){if(!t)continue;let n=Object.values(t)[0];e.overrideProps&&Object.assign(n,e.overrideProps)}return n},[e._blocks,e.overrideProps,t]);return n?(0,l.jsx)(sS,{blocks:n}):null}n(11240),n(97802),n(89243),iS.canLazyLoad=!1;var iE=n(92392),iT=n(58521);let iP={Article:`
457    query GetArticleBodyText($slug: Slug!) {
458      entity: article(slug: $slug) {
459        ...ArticleBodyText
460      }
461    }
462    ${n7._h}
463  `,Video:`
464    query GetVideoBodyText($slug: Slug!) {
465      entity: video(slug: $slug) {
466        ...VideoBodyText
467      }
468    }
469    ${n7.zE}
470  `,Brand:`
471    query GetBrandBodyText($slug: Slug!) {
472      entity: brand(slug: $slug) {
473        ...BrandBodyText
474      }
475    }
476    ${n7.jx}
477  `,Theme:`
478    query GetThemeBodyText($slug: Slug!) {
479      entity: theme(slug: $slug) {
480        ...ThemeBodyText
481      }
482    }
483    ${n7.VG}
484  `,Category:`
485    query GetCategoryBodyText($slug: Slug!) {
486      entity: category(slug: $slug) {
487        ...CategoryBodyText
488      }
489    }
490    ${n7.o0}
491  `,Page:`
492    query GetPageBodyText($slug: Slug!) {
493      entity: page(slug: $slug) {
494        ...PageBodyText
495      }
496    }
497    ${n7.Tb}
498  `,Recipe:`
499    query GetRecipeBodyText($slug: Slug!) {
500      entity: recipe(slug: $slug) {
501        ...RecipeBodyText
502      }
503    }
504    ${n7.eY}
505  `};function iL(e){let t,n,i,{content:o}=(0,d.useContext)(F.A),{isApp:a}=(0,d.useContext)(y.A),r=(0,d.useContext)(n0.A),s=(0,d.useContext)(em.A),c=(0,iT.A)();"Automatic"===e.type?(t=o?.[e.field]||e._preloaded||o?.body,n=o?.type,i=o?.slug):(n=e.type,i=e.slug);let u=iP[n]||iP.Article,{data:p,loading:f}=(0,eG.A)({api:s.contentApi,query:u,variables:{slug:i},skip:!n||!i||!!t}),v=(0,d.useMemo)(()=>{let e=t?.raw||p?.entity?.body?.raw||p?.entity?.instructions?.raw;if(e&&"[]"!==e)return"string"==typeof e?JSON.parse(e):e},[p,t]),b=!(0,nE.yF)(o),C=v?.nodes||v?.document?.nodes,A=(0,d.useMemo)(()=>C?b||a?C:((e,t={})=>{let n,i=1,o=t.placements||[],{onlyInjectBetween:a}=t.adSetup||{};if(e.length<=5)return e;let r=[];for(var s=0;s<e.length;s++){let t=e[s],l=!0,c=o.find(e=>e.position===i);if(s<1||e.length-s<1||n&&g.includes(n.type)||a&&(n&&!a.includes(n.type)||!a.includes(t.type))||x(n)&&x(t)?l=!1:"paragraph"===t.type&&5>function(e){let t=0;return e.forEach(e=>{e&&"text"===e.kind&&e.text?t+=e.text.length:e.ranges&&e.ranges.forEach(e=>{t+=e.text.length})}),t}(m()(t,"nodes",[]))&&(l=!1),!l&&c?.blocks?.length&&(l=!0),l){let e=o.find(e=>e.position===i)?.content,n=o.find(e=>e.position===i)?.placementName,a=c?.blocks,s={kind:"block",type:"placement",data:{slotId:`ad-richtext-${h++}`,content:e,placementName:n,blocks:a}};r.push(s),r.push(t),i++}else r.push(t);n=t}return r})(C,{placements:e.placements}):null,[a,C,b,e.placements]),k=(0,d.useMemo)(()=>!0===c.isLocked||!1!==c.isLocked&&null!==c.isLocked&&void 0,[c]),j=(0,d.useMemo)(()=>({configuration:r.configuration}),[r.configuration]);return!A&&f?(0,l.jsx)(iM,{}):A?(0,l.jsx)(n0.A.Provider,{value:j,children:(0,l.jsxs)(E.A,{align:"full",pageSection:o?.slug,children:[(0,l.jsx)(im,{text:A,isPreview:k,hasReadMore:e.hasReadMore,numberedListPhases:e.numberedListPhases}),"login"===c.wall&&c.isLocked&&(0,l.jsx)(iB.LoginWallContainer,{children:(0,l.jsx)(iE.A,{})}),"subscription"===c.wall&&c.isLocked&&(0,l.jsx)(iB.LoginWallContainer,{children:(0,l.jsx)(nD.A,{})})]})}):null}function iM(){return(0,l.jsx)(nM.default,{children:Array(10).fill().map((e,t)=>(0,l.jsx)(eF.A,{className:"is-block",lines:t%3==2?3:5},t))})}iL.canLazyLoad=!1;let iB={LoginWallContainer:S.Ay.div.withConfig({componentId:"sc-ed2cf2f8-0"})(["max-width:calc(100% - 2 * var(--block-gutter));margin-inline:auto;"])};var iR=n(56005),iD=n(20771);let iO=`
506  query GetArticle($slug: Slug!) {
507    article(slug: $slug) {
508      ...ArticleFull
509    }
510  }
511  ${n7.gF}
512`,iz=`
513  query GetRecipe($slug: Slug!) {
514    recipe(slug: $slug) {
515      ...RecipeFull
516    }
517  }
518  ${n7.GL}
519`,iF=`
520  query GetQuestion($slug: Slug!) {
521    question(slug: $slug) {
522      ...QuestionFull
523    }
524  }
525  ${n7.Mn}
526`,iU=`
527  query GetVideo($slug: Slug!) {
528    video(slug: $slug) {
529      ...VideoFull
530    }
531  }
532  ${n7.L1}
533`;async function i$(e,{revalidate:t}={}){return await (0,iD.o)({query:iO,variables:{slug:e},revalidate:t})}async function iH(e,{revalidate:t}={}){return await (0,iD.o)({query:iF,variables:{slug:e},revalidate:t})}async function iV(e,{revalidate:t}={}){return await (0,iD.o)({query:iz,variables:{slug:e},revalidate:t})}async function iq(e,{revalidate:t}={}){return await (0,iD.o)({query:iU,variables:{slug:e},revalidate:t})}function iK(){return(0,l.jsx)(iM,{})}var iG=n(2696),iW=n(54553),iY=n(56441);
533function i_(e){let{content:t,loading:n}=function(e,t){let[n,i]=(0,d.useState)(null),[o,a]=(0,d.useState)(!0);return(0,d.useEffect)(()=>{if(!e){i(void 0),a(!1);return}switch(t){case"Article":i$(e,{revalidate:iR.gX}).then(({data:e})=>{i(e?.article),a(!1)});break;case"Video":iq(e,{revalidate:iR.gX}).then(({data:e})=>{i(e?.video),a(!1)});break;case"Question":iH(e,{revalidate:iR.gX}).then(({data:e})=>{i(e?.question),a(!1)});break;case"Recipe":iV(e,{revalidate:iR.gX}).then(({data:e})=>{i(e?.recipe),a(!1)});break;default:console.error("useQueryFullContent: Unknown type",t)}},[e,t]),{content:n,loading:o}}(e.slug,e.type||"Article"),{translate:i}=(0,Z.B)(),{contentUnlockedBy:o}=(0,iW.A)({content:t}),a=(0,N.A)(e=>e.setPageSectionContent);(0,d.useEffect)(()=>{t&&!n&&a(t.slug,t,{content_embedded:!0,content_unlocked_by:o})},[t,n,o,a]);let r=(0,d.useMemo)(()=>({Article:[{ArticleCoverBlock:{pageSection:t?.slug}},{RichTextBlock:{type:"Automatic",pageSection:t?.slug}},{TaxonomiesBlock:{}},{ContentBlock:{layout:"series"}},{ContentBlock:{layout:"related",entityType:"Article",title:i("EmbeddedPageBlock.articleRelatedDefaultTitle"),skipMainEntity:!0}},{CommentsBlock:{}},{ContentBlock:{layout:"recommendation",title:i("EmbeddedPageBlock.articleRecommendedDefaultTitle")}}],Question:[{ArticleCoverBlock:{pageSection:t?.slug}},{QuestionQuestionBlock:{}},{QuestionResponseBlock:{}},{TaxonomiesBlock:{}},{ContentBlock:{layout:"related",entityType:"Question",title:i("EmbeddedPageBlock.recipeRelatedDefaultTitle"),skipMainEntity:!0}}],Recipe:[{ArticleCoverBlock:{pageSection:t?.slug}},{RichTextBlock:{type:"Automatic",pageSection:t?.slug}},{RecipeIngredientsBlock:{pageSection:t?.slug}},{RichTextBlock:{type:"Automatic",field:"instructions",pageSection:t?.slug}},{RecipePhasesBlock:{pageSection:t?.slug}},{ContentBlock:{layout:"related",entityType:"Recipe",title:i("EmbeddedPageBlock.recipeRelatedDefaultTitle"),skipMainEntity:!0}},{CommentsBlock:{}},{ContentBlock:{title:i("EmbeddedPageBlock.recipeRecommendedDefaultTitle"),layout:"recommendation"}}],Video:[{ArticleCoverBlock:{pageSection:t?.slug}},{RichTextBlock:{type:"Automatic",pageSection:t?.slug}},{TaxonomiesBlock:{}},{ContentBlock:{layout:"series"}},{ContentBlock:{layout:"related",entityType:"Video",title:i("EmbeddedPageBlock.videoRelatedDefaultTitle"),skipMainEntity:!0}},{CommentsBlock:{}},{ContentBlock:{layout:"recommendation",title:i("EmbeddedPageBlock.videoRecommendedDefaultTitle")}}]}),[i,t?.slug]),s=(0,d.useMemo)(()=>{if(t)return{content:t,isEmbedded:!0,unlockedBy:o}},[t,o]);return n?(0,l.jsx)(iK,{}):t?(0,l.jsx)(F.A.Provider,{value:s,children:(0,l.jsx)(iY.A,{onEnterOnce:()=>{(0,n1.jc)(t,N.A.getState().isApp,{content_embedded:!0,content_unlocked_by:o})},children:(0,l.jsx)(iG.A,{slug:t.slug,children:(0,l.jsx)(iJ.BlockContainer,{children:(0,l.jsx)(sS,{blocks:r[t.type]})})})})}):null}let iJ={BlockContainer:(0,S.Ay)(nM.default).attrs(()=>({"data-nosnippet":!0})).withConfig({componentId:"sc-e91eac50-0"})(["margin-top:var(--spacing-3xl);margin-bottom:var(--block-spacing);border-top:2px solid #afafaf;padding-top:var(--spacing-sm);"])};var iX=n(49071),iZ=n(62634);let iQ=["Article","Video","Recipe"],i0={type:"Feed",types:["Article","Video","Recipe"],amount:1,contextualFilters:["category.slug"],filters:[{field:"toplist",value:"pageviews_48h"}]};function i1(e){let t=e.fallbackSource||i0,n=e.types??iQ,i=(0,d.useMemo)(()=>{let e=N.A.getState()._brazeRecommendations,t=N.A.getState().hasVisitedContentSlug,i=new Set(n);return e.find(e=>!!i.has(e.type)&&!t(e.slug))},[]);return i?(0,l.jsx)(i_,{slug:i.slug,type:i.type}):(0,l.jsx)(i2,{fallbackSource:t})}function i2({fallbackSource:e}){let{content:t}=(0,d.useContext)(F.A),{sources:n,sourceOptions:i}=(0,d.useMemo)(()=>{let n=N.A.getState().getVisitedContentIdListSorted().slice(0,40);return{sources:[(0,iZ.n)(e,t)],sourceOptions:{exclude:n}}},[]),{items:o,loading:a}=(0,iX.A)(n,i),r=(0,d.useMemo)(()=>a?null:o?.[0],[o,a]);return!0===a?(0,l.jsx)(iK,{}):!r||r.loading?null:(0,l.jsx)(i_,{slug:r.slug,type:r.type})}var i3=n(82978);let i5=["embedded-advertorial-configuration"],i4=(0,d.memo)(function({fallbackSource:e}){let{content:t}=(0,d.useContext)(F.A),n=(0,N.A)(e=>e.audienceIds),i=(0,i3.A)(),{value:o,loading:a}=(0,iN.A)(i5),r=function({content:e,audienceIds:t,advertorialConfiguration:n}){let{hasVisitedContentSlug:i}=(0,N.A)();return(0,d.useMemo)(()=>
533{if((0,nE.yF)(e)&&n)try{let o=(0,nE.$D)(e),a=n.advertorials.find(e=>{if(i(e.slug))return p.A.debug("useBoostedContent: content already seen, skipping",e.type,e.slug),!1;if(e.themeSlugs){if(!e.themeSlugs.some(e=>o.some(t=>e===t.slug)))return p.A.debug("useBoostedContent: themes not matching, skipping",e.type,e.slug),!1;p.A.debug("useBoostedContent: themes matching, proceeding",e.type,e.slug)}if(e.audienceIds){if(!e.audienceIds.some(e=>t?.some(t=>e===t)))return p.A.debug("useBoostedContent: audiences not matching, skipping",e.type,e.slug),!1;p.A.debug("useBoostedContent: audiences matching, proceeding",e.type,e.slug)}return p.A.debug("useBoostedContent: all rules matching, content is a match \uD83D\uDC49",e.type,e.slug),!0});if(a)if(e.slug!==a.slug)return{slug:a.slug,type:a.type};else p.A.debug("useBoostedContent: ignoring match because it is the same as main content");else p.A.debug("useBoostedContent: no matching content found")}catch(e){p.A.error("useBoostedContent: Failed",e)}},[e,t,n,i])}({content:t,audienceIds:n,advertorialConfiguration:o}),s=(0,d.useMemo)(()=>{if((0,nE.fv)(t)&&t.relatedContent?.length>0)return t.relatedContent.filter(e=>e.type===(t.type||"Article")).map(e=>({type:e.type,slug:e.slug}))},[t]);return a?(0,l.jsx)(iK,{}):i?null:s?.length>0?s.map((e,t)=>(0,l.jsx)(i_,{slug:e.slug,type:e.type},t)):r?(0,l.jsx)(i_,{slug:r.slug,type:r.type}):(0,l.jsx)(i1,{fallbackSource:e})}),i8=e=>(function(){let[e,t]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{t(!0)},[]),e})()?(0,l.jsx)(v.A,{rootMargin:"0px 0px 200% 0px",placeholder:(0,l.jsx)(iK,{}),children:(0,l.jsx)(i4,{...e})}):(0,l.jsx)(iK,{});i8.canLazyLoad=!1;var i7=n(40240);let i6={Component:S.Ay.div.withConfig({componentId:"sc-650fab6c-0"})([""]),Container:S.Ay.div.withConfig({componentId:"sc-650fab6c-1"})(["padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl);background-color:",";",""],e=>e.$backgroundColor||"transparent",e=>e.$backgroundColor&&`
534      &:not(:empty) {
535        padding-top: var(--spacing-xl);
536      }
537    `),Title:S.Ay.h2.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-650fab6c-2"})(["margin-bottom:var(--spacing-md);"]),VideoContainer:S.Ay.div.withConfig({componentId:"sc-650fab6c-3"})([""])};var i9=n(84503);let oe=`
538  mutation ChangeSubscriptionRecipient(
539    $viewerId: ID!
540    $subscriptionId: ID!
541    $firstName: String!
542    $lastName: String!
543    $emailAddress: String!
544    $address: AddressInput!
545  ) {
546    changeSubscriptionRecipient(
547      viewerId: $viewerId
548      subscriptionId: $subscriptionId
549      firstName: $firstName
550      lastName: $lastName
551      emailAddress: $emailAddress
552      address: $address
553    ) {
554      ...Subscription
555    }
556  }
557  ${eb.yU}
558`;function ot(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(""),[a,r]=(0,d.useState)(""),[s,c]=(0,d.useState)(""),[u,m]=(0,d.useState)(""),[p,g]=(0,d.useState)(""),[h,x]=(0,d.useState)(""),[f,y]=(0,d.useState)("FIN"),v=(0,eu.A)({api:t.aspaApiAuthenticated,query:oe}),b=(0,d.useMemo)(()=>v.data?.changeSubscriptionRecipient,[v.data]),C=(0,d.useCallback)(()=>{o(""),r(""),c(n.customer?.emailAddress||""),m(""),g(""),x(""),y("FIN")},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(C(),v.reset())},[e.isOpen]);let A=(0,d.useMemo)(()=>![i,a,s,u,p,h,f].some(e=>!e),[i,a,s,u,p,h,f]),k=(0,d.useMemo)(()=>!n.customer?.emailAddress,[n.customer]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Vaihda lehden saaja",onClose:()=>{!v.loading&&(e.onClose?.(),b&&e.onCloseAfterSuccess?.())},children:(0,l.jsx)(on.Container,{"data-element-name":"ChangeSubscriptionRecipientForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async t=>{t.preventDefault(),await v.mutate({variables:{viewerId:n.customer.id,subscriptionId:e.subscriptionId,firstName:i,lastName:a,emailAddress:s,address:{street:u,postalCode:p,city:h,countryCode:f}}}),await n.refetch()},children:b?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Pyynt\xf6 vastaanotettu",description:"Pyynt\xf6 saajan vaihdosta on vastaanotettu. Saat vahvistuksen s\xe4hk\xf6postiisi, kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si.",result:"pending"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",children:"Olet vaihtamassa lehden s
558aajaa. Saat vahvistuksen saajan vaihdosta s\xe4hk\xf6postiisi kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si."}),(0,l.jsx)(es.A,{id:"firstName",required:!0,maxLength:40,label:"Etunimi",value:i,onChange:e=>o(e.target.value)}),(0,l.jsx)(es.A,{id:"lastName",maxLength:40,label:"Sukunimi",value:a,onChange:e=>r(e.target.value)}),(0,l.jsx)(es.A,{id:"street",label:"Katuosoite",value:u,onChange:e=>m(e.target.value)}),(0,l.jsx)(es.A,{id:"postalCode",type:"text",..."FIN"===f?{minLength:5,maxLength:5,inputMode:"numeric"}:{maxLength:9},label:"Postinumero",value:p,onChange:e=>{let t=e.target.value;("FIN"!==f||!t||ep(t))&&g(e.target.value)}}),(0,l.jsx)(es.A,{id:"city",label:"Kaupunki",value:h,onChange:e=>x(e.target.value)}),(0,l.jsx)(ek,{id:"country",label:"Valitse maa",value:f,onChange:e=>y(e.target.value),children:ec.A.map(e=>(0,l.jsx)("option",{value:e.countryCode,children:e.countryName},e.countryCode))}),(0,l.jsx)(es.A,{id:"email",helpText:"L\xe4het\xe4mme s\xe4hk\xf6postiosoitteeseesi tiedon, kun asiakaspalvelumme on k\xe4sitellyt pyynn\xf6n.",required:!0,disabled:!k,label:"S\xe4hk\xf6postiosoite",value:s,onChange:e=>c(e.target.value)})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeSubscriptionRecipientButton",buttonType:"submit",disabled:!A||v.loading,children:"Tallenna"}),(v.error||v.errors?.length>0)&&(0,l.jsx)(on.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let on={Container:S.Ay.div.withConfig({componentId:"sc-b8db473a-0"})(["input,select{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-b8db473a-1"})([""])},oi=[{name:"Apu",productCode:"AP"},{name:"Apu-digilehti",productCode:"APP"},{name:"Apu Terveys",productCode:"TR"},{name:"Apu Terveys -digilehti",productCode:"TRP"},{name:"ApuKrypto",productCode:"KY"},{name:"ApuRistikot",productCode:"AR"},{name:"Avotakka",productCode:"AT"},{name:"Avotakka-digilehti",productCode:"ATP"},{name:"Eeva",productCode:"EV"},{name:"Eeva-digilehti",productCode:"EVP"},{name:"Kauneus & Terveys",productCode:"KT"},{name:"Kauneus & Terveys -digilehti",productCode:"KTP"},{name:"Kotivinkki",productCode:"KV"},{name:"Kotivinkki-digilehti",productCode:"KVP"},{name:"Maku",productCode:"MK"},{name:"Maku-digilehti",productCode:"MKP"},{name:"Meid\xe4n M\xf6kki",productCode:"MM"},{name:"Meid\xe4n M\xf6kki -digilehti",productCode:"MMP"},{name:"Mondo",productCode:"MO"},{name:"Mondo-digilehti",productCode:"MOP"},{name:"Tuulilasi",productCode:"TL"},{name:"Tuulilasi-digilehti",productCode:"TLP"},{name:"Unelmien Talo&Koti",productCode:"TK"},{name:"Unelmien Talo&Koti -digilehti",productCode:"TKP"},{name:"Viherpiha",productCode:"VP"},{name:"Viherpiha -digilehti",productCode:"VPP"},{name:"Voi Hyvin",productCode:"VH"},{name:"Voi Hyvin -digilehti",productCode:"VHP"}],oo=`
559  mutation ChangeSubscriptionProduct(
560    $viewerId: ID!
561    $subscriptionId: ID!
562    $emailAddress: String!
563    $productCode: String!
564  ) {
565    changeSubscriptionProduct(
566      viewerId: $viewerId
567      subscriptionId: $subscriptionId
568      emailAddress: $emailAddress
569      productCode: $productCode
570    ) {
571      ...Subscription
572    }
573  }
574  ${eb.yU}
575`;function oa(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(""),[a,r]=(0,d.useState)(""),s=(0,eu.A)({api:t.aspaApiAuthenticated,query:oo}),c=(0,d.useMemo)(()=>s.data?.changeSubscriptionProduct,[s.data]),u=(0,d.useCallback)(()=>{o(n.customer?.emailAddress||""),r("")},[n.customer]);(0,d.useEffect)(()=>{e.isOpen&&(u(),s.reset())},[e.isOpen]);let m=(0,d.useMemo)(()=>![i,a].some(e=>!e)&&a!==e.productCode,[i,a,e.productCode]),p=(0,d.useMemo)(()=>!n.customer?.emailAddress,[n.customer]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Vaihda lehti toiseen",onClose:()=>{!s.loading&&(e.onClose?.(),c&&e.onCloseAfterSuccess?.())},children:(0,l.jsx)(or.Container,{"data-element-name":"ChangeSubscriptionProductForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async t=>{t.preventDefault(),await s.mutate({variables:{viewerId:n.customer.id,subscriptionId:e.subscriptionId,emailAddress:i,productC
575ode:a}}),await n.refetch()},children:c?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Pyynt\xf6 vastaanotettu",description:"Pyynt\xf6 lehden vaihdosta on vastaanotettu. Saat vahvistuksen s\xe4hk\xf6postiisi, kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si.",result:"pending"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",children:"Olet vaihtamassa lehte\xe4 toiseen. Valitse sinulle mieluinen lehti ja l\xe4het\xe4 toiveesi meille. Asiakaspalvelumme k\xe4sittelee pyynt\xf6si ja saat tiedon toivomasi lehden numeroiden m\xe4\xe4r\xe4st\xe4 s\xe4hk\xf6postiisi."}),(0,l.jsxs)(ek,{id:"productCode",label:"Valitse haluamasi lehti",onChange:e=>r(e.target.value),children:[(0,l.jsx)("option",{children:"Valitse lehti"}),oi.map(e=>(0,l.jsx)("option",{value:e.productCode,children:e.name},e.productCode))]}),(0,l.jsx)(es.A,{id:"email",helpText:"L\xe4het\xe4mme s\xe4hk\xf6postiosoitteeseesi tiedon, kun asiakaspalvelumme on k\xe4sitellyt pyynn\xf6n.",required:!0,disabled:!p,label:"S\xe4hk\xf6postiosoite",value:i,onChange:e=>o(e.target.value)})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitChangeSubscriptionProductButton",buttonType:"submit",disabled:!m||s.loading,children:"Tallenna"}),(s.error||s.errors?.length>0)&&(0,l.jsx)(or.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let or={Container:S.Ay.div.withConfig({componentId:"sc-966ea833-0"})(["input,select{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-966ea833-1"})([""])},os=`
576  query GetProductIssueDates(
577    $productId: ID!
578  ) {
579    product(
580      productId: $productId
581    ) {
582      issueDates {
583        date
584      }
585    }
586  }
587`,ol=`
588  mutation PauseSubscription(
589    $viewerId: ID!
590    $subscriptionId: ID!
591    $startDate: Date!
592    $endDate: Date!
593  ) {
594    pauseSubscription(
595      viewerId: $viewerId
596      subscriptionId: $subscriptionId
597      startDate: $startDate
598      endDate: $endDate
599    ) {
600      ...Subscription
601    }
602  }
603  ${eb.yU}
604`;function oc(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),[i,o]=(0,d.useState)(!1);(0,d.useEffect)(()=>{e.isOpen&&o(!0)},[e.isOpen]);let a=(0,d.useMemo)(()=>{if(n.subscriptions)return n.subscriptions.find(t=>t.id===e.subscriptionId)},[e.subscriptionId,n.subscriptions]),[r,s]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),m=(0,eG.A)({api:t.aspaApiAuthenticated,query:os,variables:{productId:a?.productCode},skip:!a||!i}),p=(0,d.useMemo)(()=>m.data?.product?.issueDates?.map(({date:e})=>e),[m.data]),g=(0,d.useMemo)(()=>new Date,[]),h=(0,d.useMemo)(()=>{let e=new Date(g);return e.setMonth(e.getMonth()+6),e},[g]),x=(0,d.useMemo)(()=>{if(p)return p.filter(e=>new Date(e)<=h)},[p,h]),f=(0,eu.A)({api:t.aspaApiAuthenticated,query:ol}),y=f.data?.pauseSubscription,v=(0,d.useCallback)(()=>{s(""),u("")},[]);(0,d.useEffect)(()=>{e.isOpen&&(v(),f.reset())},[e.isOpen]);let b=(0,d.useMemo)(()=>![r,c].some(e=>!e)&&r!==c,[r,c]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Tauko lehtitilaukseen",onClose:()=>{!f.loading&&(e.onClose?.(),y&&e.onCloseAfterSuccess?.())},children:(0,l.jsx)(od.Container,{"data-element-name":"PauseSubscriptionForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async t=>{t.preventDefault(),await f.mutate({variables:{viewerId:n.customer.id,subscriptionId:e.subscriptionId,startDate:r,endDate:c}}),await n.refetch()},children:y?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Pyynt\xf6 vastaanotettu",description:"Pyynt\xf6 tilauksen asettamisesta tauolle on vastaanotettu. Saat vahvistuksen s\xe4hk\xf6postiisi, kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si.",result:"pending"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)("p",{className:"is-body-s",children:"Olet asettamassa lehden tilausta tauolle. Huomioithan, ett\xe4 voit tehd\xe4 jakelunkeskeytyksen enint\xe4\xe4n 6 kk p\xe4\xe4h\xe4n ja ett\xe4 jakelunkeskeytys ei muuta laskutusaikataulua. Saat vahvistuksen s\xe4hk\xf6postiisi, kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si."}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"is-heading-xs",style:{display:"block",marginBottom:"var(--spacing-xs)"},children:"Tauko voimassa"}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)"},children:[(0,l.jsxs)(ek,{disabled:m.loading||f.loading,id:"startDate",value:r,onChange:e=>s(e.target.value),children:[(0,l.jsx)("option",{value:"",children:"Valitse alkup\xe4iv\xe4"}),x?.map(e=>(0,l.jsx)("option",{value:e,children:(0,eU.Yq)(e)},e))]}),"–",(0,l.jsxs)(ek,{disabled:m.loading||f.loading,id:"endDate",value:c,onChange:e=>u(e.target.value),children:[(0,l.jsx)("option",{value:"",children:"Valitse loppup\xe4iv\xe4"}),x?.map(e=>(0,l.jsx)("option",{value:e,children:(0,eU.Yq)(e)},e))]})]})]})]}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitPauseSubscriptionButton",buttonType:"submit",disabled:!b||f.loading||m.loading,children:"Tallenna"}),(f.error||f.errors?.length>0)&&(0,l.jsx)(od.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let od={Container:S.Ay.div.withConfig({componentId:"sc-3881e841-0"})(["input,select{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-3881e841-1"})([""])},ou=`
605  mutation SetSubscriptionToAutoRenew(
606    $viewerId: ID!
607    $subscriptionId: ID!
608  ) {
609    setSubscriptionToAutoRenew(
610      viewerId: $viewerId
611      subscriptionId: $subscriptionId
612    ) {
613      ...Subscription
614    }
615  }
616  ${eb.yU}
617`;function om(e){let t=(0,d.useContext)(em.A),n=(0,d.useContext)(er.Ay),i=(0,eu.A)({api:t.aspaApiAuthenticated,query:ou}),o=(0,d.useMemo)(()=>i.data?.setSubscriptionToAutoRenew,[i.data]),a=(0,d.useCallback)(()=>{},[]);(0,d.useEffect)(()=>{e.isOpen&&(a(),i.reset())},[e.isOpen]);let r=(0,d.useMemo)(()=>!0,[]);return(0,l.jsx)(eC.A,{isOpen:e.isOpen,isBlocking:!0,title:"Muuta tilaus jatkuvaksi",onClose:()=>{i.loading||e.onClose?.()},children:(0,l.jsx)(op.Container,{"data-element-name":"AutoRenewSubscriptionForm",children:(0,l.jsx)(el.xv,{children:(0,l.jsx)(el.wp,{onSubmit:async t=>{t.preventDefault(),await i.mutate({variables:{viewerId:n.customer.id,subscriptionId:e.subscriptionId}}),await n.refetch()},children:o?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{title:"Muutos tallennettu",description:"Pyynt\xf6 tilauksen muuttamisesta jatkuvaksi on vastaanotettu. Saat vahvistuksen s\xe4hk\xf6postiisi, kun asiakaspalvelumme on k\xe4sitellyt pyynt\xf6si.",result:"success"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(el.wu,{children:(0,l.jsx)("p",{className:"is-body-s",children:"Olet muuttamassa lehden tilausta jatkuvaksi. Mukavaa, ett\xe4 olet viihtynyt lehden parissa. Iloisia lukuhetki\xe4 my\xf6s jatkossa!"})}),(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitAutoRenewSubscriptionButton",buttonType:"submit",disabled:!r||i.loading,children:"Muuta tilaus jatkuvaksi"}),(i.error||i.errors?.length>0)&&(0,l.jsx)(op.ErrorText,{children:"Jotain meni vikaan"})]})})})})})}let op={Container:S.Ay.div.withConfig({componentId:"sc-32e32201-0"})(["input,select{background:white;}"]),ErrorText:S.Ay.div.attrs({className:"has-universal-danger-color is-body-xs"}).withConfig({componentId:"sc-32e32201-1"})([""])};function og(e){let t=(0,d.useContext)(er.Ay),[n,i]=(0,d.useState)(!1),[o,a]=(0,d.useState)(!1),[r,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(!1),m=tX(e.subscription),p=(0,d.useCallback)(t=>{if(e.subscription)return e.subscription.editOptions.find(e=>e.code===t)},[e.subscription]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ot,{isOpen:n,onClose:()=>i(!1),subscriptionId:e.subscription.id}),(0,l.jsx)(oa,{isOpen:o,onClose:()=>
617a(!1),subscriptionId:e.subscription.id,productCode:e.subscription.productCode}),(0,l.jsx)(oc,{isOpen:r,onClose:()=>s(!1),subscriptionId:e.subscription.id}),(0,l.jsx)(om,{isOpen:c,onClose:()=>u(!1),subscriptionId:e.subscription.id}),(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:e.subscription.productTitle,image:e.subscription.productImageUrl?{url:e.subscription.productImageUrl}:null,"data-click-element-name":"SubscriptionDetailsPromo","data-subscription-reference":e.subscription.id,"data-product-code":e.subscription.productCode,"data-product-name":e.subscription.productTitle,"data-term-number":null,extraContent:(0,l.jsx)(ox.ExtraContent,{children:(0,l.jsx)(ox.StatusText,{className:["is-label-l","is-color-"+m].join(" "),children:e.subscription.processingStatusText||e.subscription.subscriptionStatusText})}),afterContent:(0,l.jsxs)(ox.AfterContent,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Saaja",value:e.subscription.shipToName||t.customerDisplayName}),e.subscription.periodStartDate&&(0,l.jsx)(ey.A,{label:"Jakson alkamisp\xe4iv\xe4",value:(0,eU.Yq)(e.subscription.periodStartDate)}),e.subscription.pricingText&&(0,l.jsx)(ey.A,{label:"Hinta",value:e.subscription.pricingText})]}),(0,l.jsxs)(ox.ActionButtons,{children:[e.subscription.isActive&&!e.subscription.isLocked&&(0,l.jsxs)(l.Fragment,{children:[p("SetAutoRenewal")&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartAutoRenewButton",type:"primary",size:"medium",onClick:()=>{u(!0)},children:"Muuta jatkuvaksi"}),p("ChangeProduct")&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeProductButton",type:"secondary",size:"medium",onClick:()=>{a(!0)},children:"Vaihda lehti toiseen"}),p("ChangeRecipient")&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeRecipientButton",type:"secondary",size:"medium",onClick:()=>{i(!0)},children:"Vaihda lehden saaja"}),p("TemporarySuspend")&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartTemporarySuspendButton",type:"secondary",size:"medium",onClick:()=>{s(!0)},children:"Tauko lehtitilaukseen"})]}),e.subscription.isActive&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ed.A,{"data-click-element-name":"InvoicesLink",type:"secondary",size:"medium",href:"/laskut",children:"Laskutus"}),(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeAddressButton",type:"secondary",size:"medium",href:"/tili",children:"Muokkaa osoitetietojasi"})]}),!e.subscription.isActive&&e.subscription.redirectUrl&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ed.A,{size:"medium","data-click-element-name":"OrderAgainLink",href:e.subscription.redirectUrl,children:"Tilaa uudelleen"}),(0,l.jsx)(ed.A,{size:"medium","data-click-element-name":"OrderAgainLink",href:e.subscription.redirectUrl,children:"Tilaa lahjaksi"})]}),e.subscription.suspendOptions?.length>0&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartCancelSubscriptionButton",href:`/tilaukset/${e.subscription.id}/soittopyynto`,type:"secondary",size:"medium",children:"Peruuta tilaus"})]})]})})]})}function oh(){let e=(0,d.useContext)(S.Dx);return(0,l.jsx)(tT.A,{placeholder:!0,style:"horizontal_subscription",title:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-m-line-height"]}),extraContent:(0,l.jsx)(ox.ExtraContent,{children:(0,l.jsx)("div",{style:{flex:"1 1 auto"},children:(0,l.jsx)(eF.A,{length:"medium",lineHeight:e["label-l-line-height"]})})}),afterContent:(0,l.jsxs)(ox.AfterContent,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Saaja",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Jakson alkamisp\xe4iv\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Hinta",value:(0,l.jsx)(eF.A,{length:"short"})})]}),(0,l.jsxs)(ox.ActionButtons,{children:[(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0})]})]})})}let ox={ExtraContent:S.Ay.div.withConfig({componentId:"sc-d69754c4-0"})(["flex-grow:1;display:flex;align-items:flex-end;color:var(--color-on-surface-secondary);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),StatusText:S.Ay.div.withConfig({componentId:"sc-d69754c4-1"})(["margin-top:var(--spacing-xs);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),AfterContent:S.Ay.div.withConfig({componentId:"sc-d69754c4-2"})(["margin-top:var(--spacing-lg);border-top:1px solid var(--color-outline-secondary);"]),ActionButtons:S.Ay.div.withConfig({componentId:"sc-d69754c4-3"})(["display:flex;flex-direction:column;gap:var(--spacing-md);margin-top:var(--spacing-xl);&:empty{display:none;}"])},of={Container:S.Ay.div.withConfig({componentId:"sc-b30e4b59-0"})(["border-radius:var(--radius-lg);border:1px solid var(--color-outline-secondary);padding:var(--spacing-md);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);"]),PlaceholderWrapper:S.Ay.div.withConfig({componentId:"sc-b30e4b59-1"})(["--promo--media-ratio:3/4;"])};function oy(e){let{Link:t}=(0,d.useContext)(R.A);return e.tabs?.length?(0,l.jsx)(ov.Component,{children:(0,l.jsx)(ov.Menu,{children:e.tabs.map((e,n)=>(0,l.jsx)("li",{children:(0,l.jsx)(ov.Link,{as:t,href:e.url,className:e.isActive&&"is-active",children:e.label})},n))})}):null}let ov={Component:S.Ay.div.withConfig({componentId:"sc-aea2fac9-0"})(["color:var(--color-surface);background-color:var(--color-on-surface);"]),Menu:S.Ay.ul.withConfig({componentId:"sc-aea2fac9-1"})(["display:flex;margin:0;padding:0;max-width:calc(1180px + 2 * var(--spacing-md));margin-inline:auto;list-style:none;overflow-x:auto;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),Link:S.Ay.a.attrs({className:"is-label-m"}).withConfig({componentId:"sc-aea2fac9-2"})(["border-bottom:2px solid transparent;display:block;padding:var(--spacing-md) var(--spacing-md) calc(var(--spacing-md) - 2px) var(--spacing-md);color:inherit;text-decoration:none;white-space:nowrap;&.is-active{border-bottom-color:var(--color-apu-kaarija);}"])};function ob(e){let t=(0,d.useContext)(S.Dx),n=(0,d.useMemo)(()=>
617({...t,"richtext--heading-two-size":t["tipbox--heading-two-size"],"richtext--heading-three-size":t["tipbox--heading-three-size"],"richtext--body-size":t["tipbox--body-size"]}),[t]);return(0,l.jsx)(E.A,{children:(0,l.jsx)(oC.Component,{children:(0,l.jsx)(S.Dx.Provider,{value:n,children:e.children||e.text})})})}ob.canLazyLoad=!1;let oC={Component:S.Ay.div.withConfig({componentId:"sc-a342b73f-0"})(["--richtext--h2-bottom-margin:var(--spacing-md);--richtext--h2-top-margin:var(--spacing-xl);--richtext--h3-bottom-margin:var(--spacing-md);--richtext--h3-top-margin:var(--spacing-lg);--richtext--p-bottom-margin:var(--spacing-sm);--richtext--p-top-margin:var(--spacing-md);--richtext--block-top-margin:var(--spacing-xl);--richtext--block-bottom-margin:var(--spacing-xl);@media (min-width:","){--richtext--block-top-margin:var(--spacing-2xl);--richtext--block-bottom-margin:var(--spacing-2xl);}@media (min-width:","){--richtext--block-top-margin:var(--spacing-2xl);--richtext--block-bottom-margin:var(--spacing-2xl);}border:var(--tipbox--border-size) solid var(--content-color,var(--tipbox--border-color));padding:var(--spacing-3xl) var(--spacing-xl) var(--spacing-3xl) var(--spacing-xl);> *:last-child{margin-bottom:0;}"],e=>e.theme["breakpoint-tablet"],e=>e.theme["breakpoint-desktop"])};var oA=n(72354);let ok={Component:S.Ay.div.attrs({className:"is-body-m"}).withConfig({componentId:"sc-7d210523-0"})(["font-style:italic;a{color:inherit;}"])};function oj({title:e,description:t,buttonText:n,lists:i}){let{Link:o}=(0,d.useContext)(R.A);return["kotonacom","terve"].includes("meillakotona")?null:(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)("div",{style:{marginInline:"auto",paddingInline:"var(--block-gutter)",maxWidth:"var(--width-wide)"},children:(0,l.jsx)("div",{style:{padding:"var(--spacing-5xl) 20px",backgroundColor:"var(--color-container)",borderRadius:"var(--newsletter-border-radius)",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,l.jsxs)("div",{className:"is-body-l",children:["Tilaa uutiskirjeit\xe4"," ",(0,l.jsx)(o,{style:{textDecoration:"underline",color:"inherit"},href:"/uutiskirjeet",children:"uutiskirjeet-sivulta"})]})})})})}var ow=n(51352);let oI=(0,d.forwardRef)(function(e,t){let{onChange:n,onBlur:i,onValidationChange:o,value:a,...r}=e,s=null!=a?String(a):"",c=!!s&&!!s&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);return(0,d.useEffect)(()=>{o?.(c)},[c,o]),(0,l.jsx)(es.A,{ref:t,type:"email",onChange:e=>{n?.(e)},onBlur:e=>{i?.(e)},value:a,style:{backgroundColor:"var(--color-surface)"},...r})});var oN=n(22118);function oS({title:e,description:t,lists:n,buttonText:i,brandName:o,logoUrl:a,unsubscribe:r=!1,email:s,externalId:c,onConversion:u}){let{translate:m}=(0,Z.B)(),[p,g]=(0,d.useState)(!1),[h,x]=(0,d.useState)(!1),[f,y]=(0,d.useState)(null),[v,b]=(0,d.useState)(""),[C,A]=(0,d.useState)(!1),[k,j]=(0,d.useState)(!1),[w,I]=(0,d.useState)(!1),N=(0,d.useContext)(tA.A),[S,E]=(0,d.useState)([]),T=(0,d.useMemo)(()=>n.filter((e,t)=>1===n.length||S[t]),[n,S]),P=(0,d.useMemo)(()=>T.map(e=>"object"==typeof e?e.id:e),[T]),L=(0,d.useMemo)(()=>T.filter(e=>"object"==typeof e&&!!e.brazeSubscriptionGroupId).map(e=>({id:e.id,label:e.label,brazeSubscriptionGroupId:e.brazeSubscriptionGroupId})),[T]);(0,d.useEffect)(()=>{s?b(s):!N?.user||N?.userLoading||!w&&N.user.email&&b(N.user.email)},[s,N.user,N.userLoading,w]);let M=async({email:e,allowPromotions:t})=>{let n=s||e;if(r&&N?.user?.email&&(n=N.user.email),L.length>0){g(!0),y(null);try{let e=[];for(let[i,o]of L.entries()){let a={brazeSubscriptionGroupId:o.brazeSubscriptionGroupId,brazeSubscriptionGroupName:o.label,email:n};if(c&&(a.externalId=c),!r){let e=i===L.length-1;a.allowPromotions=t&&e}let s=await fetch(r?"/api/braze/unsubscribe":"/api/braze/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok&&200!==s.status){let t=await s.json().catch(()=>({error:"Unknown error"}));e.push(t.error||`HTTP ${s.status}`);break}if(u)try{await u()}catch(e){console.error("Error in onConversion callback:",e)}}if(e.length>0){y(e.join(", ")),g(!1),x(!1);return}x(!0),g(!1)}catch(e){console.error("Error calling Braze subscription API:",e),y("An unexpected error occurred. Please try again."),g(!1)}}};
617return(0,l.jsx)(oE.Component,{"data-element-name":"BrazeNewsletterSubscription",children:(0,l.jsx)(oE.Card,{children:(0,l.jsxs)(oE.Form,{onSubmit:async e=>{e.preventDefault();try{await M({email:v,allowPromotions:k})}catch(e){console.error(e)}},children:[a&&(0,l.jsx)(oE.LogoImage,{src:a,alt:o||"Logo"}),h?(0,l.jsx)(oE.ConfirmMessage,{children:m(r?"NewsletterSubscription.unsubscribeConfirmationMessage":"NewsletterSubscription.confirmationMessage")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(oE.Header,{children:[e?(0,l.jsx)(oE.Title,{children:e}):null,t?(0,l.jsx)(oE.Description,{children:t}):null]}),!r&&(0,l.jsx)(l.Fragment,{children:n?.length>1&&(0,l.jsx)(oE.NewsletterSelectionList,{children:n&&n.map((e,t)=>(0,l.jsxs)(oE.ListItem,{className:"is-label-m",$isChecked:S[t],children:[(0,l.jsx)(oE.ListCheckbox,{type:"checkbox",className:S[t]?"is-checked":"",value:e.id,name:e.label,checked:S[t],onChange:e=>{let n=[...S];n[t]=e.target.checked,E(n)}}),(0,l.jsx)("span",{children:"object"==typeof e?e.label:e})]},t))})}),!s&&(0,l.jsx)(oE.Fields,{children:(0,l.jsx)(oI,{id:"email",name:"email",value:v,onChange:e=>{w||I(!0),b(e.target.value)},onValidationChange:A,label:m("NewsletterSubscription.emailInputLabel"),placeholder:m("NewsletterSubscription.emailPlaceholder")})}),!r&&(0,l.jsx)(oN.A,{id:"allowPromotions",value:k,onChange:j,label:m("NewsletterSubscription.consentLabel")}),f&&(0,l.jsxs)(oE.ErrorMessage,{children:[m("NewsletterSubscription.errorMessage")," (",f,")"]}),(0,l.jsxs)(ed.A,{size:"large",type:"primary",buttonType:"submit",disabled:p||!r&&(!s&&(!v||!C)||0===P.length)||r&&0===P.length,children:[i||m(r?"NewsletterSubscription.unsubscribeButtonText":"NewsletterSubscription.subscribeButtonText"),r?(0,l.jsx)(n6.A,{name:"xmark",style:"light"}):(0,l.jsx)(n6.A,{name:"send",style:"solid"})]}),s&&!h&&(0,l.jsx)(oE.InfoText,{children:(0,l.jsx)(ow.x,{i18nKey:"NewsletterSubscription.emailInfoMessage",values:{email:(0,l.jsx)("strong",{children:s})}})})]})]})})})}let oE={Component:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-0"})(["padding-inline:var(--block-gutter);max-width:var(--width-wide);"]),Card:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-1"})(["padding:20px;background-color:var(--color-container,#eef0eb);border-radius:20px;outline:1px solid var(--color-outline-secondary,#d3d3d3);outline-offset:-1px;display:flex;flex-direction:column;gap:16px;"]),Form:S.Ay.form.withConfig({componentId:"sc-3c6e0ea8-2"})(["--checkbox-size:18px;display:flex;flex-direction:column;gap:16px;"]),LogoImage:S.Ay.img.withConfig({componentId:"sc-3c6e0ea8-3"})(["display:block;height:42px;width:auto;max-width:100%;align-self:flex-start;"]),BrandLogoApu:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-4"})(["display:flex;align-items:center;gap:4px;font-weight:700;font-size:24px;line-height:1;color:var(--color-on-surface-primary);align-self:flex-start;"]),BrandLogoNumber:S.Ay.span.withConfig({componentId:"sc-3c6e0ea8-5"})(["width:24px;height:24px;border:1px solid var(--color-on-surface-primary);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:400;margin-left:2px;"]),BrandLogoAitio:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-6"})(["font-style:italic;font-weight:400;font-size:24px;line-height:1;color:var(--color-on-surface-primary);align-self:flex-start;"]),BrandLogoImage:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-7"})(["font-family:serif;font-weight:700;font-size:24px;line-height:1;color:var(--color-on-surface-primary);text-transform:uppercase;align-self:flex-start;"]),BrandLogoDefault:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-8"})(["font-weight:700;font-size:24px;line-height:1;color:var(--color-on-surface-primary);align-self:flex-start;"]),Header:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-9"})(["display:flex;flex-direction:column;gap:12px;"]),Title:S.Ay.h2.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-3c6e0ea8-10"})(["margin:0;align-self:stretch;color:var(--color-on-surface,#202020);"]),Description:S.Ay.p.attrs({className:"is-body-s"}).withConfig({componentId:"sc-3c6e0ea8-11"})(["margin:0;align-self:stretch;color:var(--color-on-surface,#202020);"]),Fields:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-12"})(["display:flex;flex-direction:column;gap:16px;"]),NewsletterSelectionList:S.Ay.div.withConfig({componentId:"sc-3c6e0ea8-13"})(["display:flex;flex-direction:column;gap:var(--spacing-sm);"]),ListItem:S.Ay.label.withConfig({componentId:"sc-3c6e0ea8-14"})(["display:flex;flex-direction:row;align-items:center;gap:var(--spacing-sm);cursor:pointer;"]),ListCheckbox:S.Ay.input.withConfig({componentId:"sc-3c6e0ea8-15"})(["-webkit-appearance:none;-moz-appearance:none;appearance:unset;position:relative;margin:0;width:var(--checkbox-size);height:var(--checkbox-size);border:1px solid var(--newsletter--input-border-color,var(--color-outline-primary));border-radius:3px;background-color:var(--color-surface);cursor:pointer;flex-shrink:0;&::before{content:'';box-sizing:border-box;display:none;width:9px;height:5px;position:absolute;top:64%;left:25%;transform:rotate(-45deg) translate(4px,-4px);border:1.5px solid var(--color-black);border-top:none;border-right:none;}&:checked::before{display:block;}"]),ConfirmMessage:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-3c6e0ea8-16"})(["color:'var(--color-on-surface-primary)';margin-top:var(--spacing-md);"]),ErrorMessage:S.Ay.div.attrs({className:"is-body-m"}
617).withConfig({componentId:"sc-3c6e0ea8-17"})(["color:var(--color-error,#d32f2f);margin-top:var(--spacing-md);padding:12px;background-color:var(--color-error-background,#ffebee);border-radius:8px;border:1px solid var(--color-error,#d32f2f);"]),InfoText:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-3c6e0ea8-18"})(["text-align:center;color:var(--color-on-surface-secondary,#606060);"])},oT={Component:S.Ay.div.withConfig({componentId:"sc-3be88807-0"})(["display:flex;flex-direction:column;gap:24px;margin-inline:auto;max-width:var(--width-column);"]),HeaderContent:S.Ay.div.withConfig({componentId:"sc-3be88807-1"})(["padding-inline:var(--block-gutter);display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xl);"]),HeaderImage:S.Ay.img.withConfig({componentId:"sc-3be88807-2"})(["display:block;width:180px;height:180px;"]),Title:S.Ay.h2.attrs({className:"is-heading-xxxl"}).withConfig({componentId:"sc-3be88807-3"})(["margin:0;"]),Description:S.Ay.p.attrs({className:"is-body-l"}).withConfig({componentId:"sc-3be88807-4"})(["text-align:center;"]),NewsletterList:S.Ay.div.withConfig({componentId:"sc-3be88807-5"})(["display:flex;flex-direction:column;gap:24px;"]),LoadingMessage:S.Ay.div.attrs({className:"is-body-m"}).withConfig({componentId:"sc-3be88807-6"})(["text-align:center;padding:24px;color:var(--color-on-surface-secondary,#606060);"])};var oP=n(69906),oL=n(26339),oM=n.n(oL);let oB=S.Ay.div.withConfig({componentId:"sc-b9442d8c-0"})([".ab-feed{position:static;width:auto;max-width:none;border:none;border-radius:0;box-shadow:none;background:transparent;.ab-feed-body{padding:0;border:none;}.ab-feed-buttons-wrapper{display:none;}.ab-card{margin:0;border-radius:var(--radius-full);box-shadow:none;.ab-title{font-family:var(--heading-m-font-family);font-size:var(--heading-m-font-size);font-weight:var(--heading-m-font-weight);line-height:var(--heading-m-line-height);letter-spacing:var(--heading-m-letter-spacing);text-transform:var(--heading-m-text-transform);}.ab-description,.ab-url-area{font-family:var(--body-s-font-family);font-size:var(--body-s-font-size);font-weight:var(--body-s-font-weight);line-height:var(--body-s-line-height);letter-spacing:var(--body-s-letter-spacing);text-transform:var(--body-s-text-transform);}}.ab-no-cards-message{display:none;}}"]);function oR({card:e}){let t=(0,d.useRef)(null),n=(0,d.useRef)(!1),{content:i}=(0,d.useContext)(F.A),o=e.extras?.block,a=(0,d.useMemo)(()=>{if(!e.extras)return{};let{block:t,...n}=e.extras;return Object.entries(n).reduce((e,[t,n])=>(oM()(e,t,n),e),{})},[e.extras]);p.A.debug("CustomBrazeContentCardRenderer: blockProps",a),(0,d.useEffect)(()=>{if(!t.current||n.current)return;let i=new IntersectionObserver(i=>{i.forEach(i=>{i.isIntersecting&&!n.current&&t.current?.firstElementChild&&!(t.current.offsetHeight<=10)&&(n.current=!0,oP.Ay.logContentCardImpression(e),p.A.debug("CustomBrazeContentCardRenderer: Logged impression",e.id))})},{threshold:.5});return i.observe(t.current),()=>i.disconnect()},[e]);let r=(0,d.useCallback)(t=>{let n=t.target;n.dataset.clickElementName?(p.A.debug("CustomBrazeContentCardRenderer: Clicked",n.dataset.clickElementName,e),oP.Ay.logContentCardClick(e),e.pinned||oP.Ay.logCardDismissal(e)):p.A.debug("CustomBrazeContentCardRenderer: Clicked but no click element name found",t.target,e)},[e]),s=(0,d.useCallback)(async()=>{await oP.Ay.logNbaConversion({nbaTargetId:e.extras?.nba_target_id,nbaTrackingId:e.extras?.nba_tracking_id},i)},[e,i]);return o?(0,l.jsx)(nM.default,{forwardRef:t,onClick:r,children:(0,l.jsx)(sN,{blockName:o,...a,onConversion:s})}):null}let oD=S.Ay.div.withConfig({componentId:"sc-cf19c924-0"})(["width:100%;"]);var oO=n(89977);let oz={commercialType:"commercial"},oF=S.Ay.div.withConfig({componentId:"sc-401e7c8c-0"})(["--block-gutter:0px;display:flex;flex-direction:column;gap:var(--spacing-md);"]),oU={commercialType:"commercial"},o$=S.Ay.div.withConfig({componentId:"sc-324fd480-0"})(["--block-gutter:0px;display:flex;flex-direction:column;gap:var(--spacing-md);"]);function oH(e){let t=oV(e.productCode);return t?t.endsWith("P")?[t,t.slice(0,-1)]:[t]:[]}function oV(e){return e?.trim().toUpperCase()||""}function oq(e,t){if(!e?.trim())return null;let n=e.trim(),i=n.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(i){let[,e,n,o]=i,a=new Date(Number(e),Number(n)-1,Number(o));return"end"===t&&a.setHours(23,59,59,999),oK(a)?a:null}let o=new Date(n);return oK(o)?o:null}function oK(e){return!Number.isNaN(e.getTime())}let oG=`
618  mutation SubmitFeedback($feedback: FeedbackInput!) {
619    submitFeedback(feedback: $feedback)
620  }
621`,oW=function({title:e,description:t,buttonText:n,feedbackTopics:i,forceFeedbackTopic:o,forceFromEmail:a}){let r=(0,d.useContext)(em.A),{translate:s}=(0,Z.B)(),{mutate:c,data:u}=(0,eu.A)({api:r.contentApi,query:oG}),[m,p]=(0,d.useState)(a||""),[g,h]=(0,d.useState)(""),[x,f]=(0,d.useState)(""),[y,v]=(0,d.useState)(o||"");void 0===n&&console.error("FeedbackForm: buttonText is undefined");let b=async({name:e,email:t,message:n})=>{await c({variables:{feedback:{topic:y,name:e,email:t,body:n}}})};return u?.submitFeedback?(0,l.jsx)(oY.Component,{"data-element-name":"FeedbackForm",children:(0,l.jsx)(oY.Form,{children:(0,l.jsxs)("div",{children:[(0,l.jsx)(oY.Title,{className:"is-heading-xxl",children:s("FeedbackForm.confirmationMessage")}),(0,l.jsx)("p",{className:"is-body-l",children:s("FeedbackForm.thankYouMessage")})]})})}):(0,l.jsx)(oY.Component,{"data-element-name":"FeedbackForm",children:(0,l.jsxs)(oY.Form,{onSubmit:e=>{e.preventDefault();try{b({name:g,email:m,message:x})}catch(e){console.error(e)}},children:[(0,l.jsxs)("div",{children:[e?(0,l.jsx)(oY.Title,{className:"is-heading-xxl",children:e}):null,t?(0,l.jsx)("p",{className:"is-body-l",children:t}):null]}),(0,l.jsxs)(oY.Fields,{children:[i&&(0,l.jsxs)(oY.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"select-topic",children:s("FeedbackForm.feedbackSubjectLabel")}),(0,l.jsxs)("select",{onChange:e=>{e.preventDefault(),e.target[0].hidden=!0,v(e.target.value)},id:"select-topic",children:[(0,l.jsx)("option",{value:null,children:s("FeedbackForm.selectLabel")}),i?.map((e,t)=>(0,l.jsx)("option",{value:e.value,children:e.label},t))]})]}),(0,l.jsxs)(oY.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"name",children:s("FeedbackForm.nameLabel")}),(0,l.jsx)("input",{onChange:({target:{value:e}})=>{h(e)},className:"is-body-s",type:"text",name:"name",id:"name",value:g})]}),!a&&(0,l.jsxs)(oY.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"email",children:s("FeedbackForm.emailLabel")}),(0,l.jsx)("input",{onChange:({target:{value:e}})=>{p(e)},className:"is-body-s",type:"email",name:"email",id:"email",value:m})]}),(0,l.jsxs)(oY.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"message",children:s("FeedbackForm.messageLabel")}),(0,l.jsx)("textarea",{onChange:({target:{value:e}})=>{f(e)},className:"is-body-s",rows:"4",name:"message",id:"message",form:"feedbackform",value:x})]})]}),(0,l.jsxs)(ed.A,{size:"large",type:"primary",children:[n,(0,l.jsx)(V.g,{icon:(0,H.K)({name:"send",style:"solid"})})]})]})})},oY={Component:S.Ay.div.withConfig({componentId:"sc-716b7e0d-0"})(["margin-inline:auto;padding-inline:var(--block-gutter);"]),Form:S.Ay.form.withConfig({componentId:"sc-716b7e0d-1"})(["--checkbox-size:18px;padding:var(--spacing-5xl) 20px;background-color:#faf7f4;border-radius:12px;display:flex;flex-direction:column;gap:var(--spacing-xl);justify-content:center;align-items:center;text-align:center;"]),Title:S.Ay.h2.withConfig({componentId:"sc-716b7e0d-2"})(["margin:0;& + p{margin-top:var(--spacing-md);}"]),Fields:S.Ay.div.withConfig({componentId:"sc-716b7e0d-3"})(["box-sizing:border-box;display:flex;flex-direction:column;gap:var(--spacing-xl);justify-content:center;align-items:center;width:100%;max-width:600px;"]),Input:S.Ay.div.withConfig({componentId:"sc-716b7e0d-4"})(["display:flex;flex-direction:column;justify-content:center;align-items:start;width:100%;gap:var(--spacing-sm);"])},o_=`
622  mutation SubmitQuestion($question: QuestionInput!) {
623    submitQuestion(question: $question)
624  }
625`,oJ=function(e){let{title:t,description:n,buttonText:i,questionTopics:o}=e,a=(0,d.useContext)(em.A),{mutate:r,data:s,loading:c}=(0,eu.A)({api:a.contentApi,query:o_}),[u,m]=(0,d.useState)(""),[p,g]=(0,d.useState)(""),[h,x]=(0,d.useState)(""),[f,y]=(0,d.useState)("");void 0===i&&console.error("QuestionForm: buttonText is undefined");let v=async({name:e,email:t,message:n})=>{await r({variables:{question:{topic:f,name:e,email:t,body:n}}}),m(""),g(""),x(""),y("")},b=(0,d.useContext)(F.A),C=!(e.themes?.length>0)||b.content?.themes?.edges.some(t=>e.themes?.includes(t.node.slug));return b.content?.type!=="Article"||C?s?.submitQuestionForm?(0,l.jsx)(oX.Component,{"data-element-name":"QuestionForm",children:(0,l.jsx)(oX.Form,{children:(0,l.jsxs)("div",{children:[(0,l.jsx)(oX.Title,{className:"is-heading-xxl",children:"Kysymyksesi on nyt l\xe4hetetty."}),(0,l.jsx)("p",{className:"is-body-l",children:"Kiitos kysymyksest\xe4si."})]})})}):(0,l.jsx)(oX.Component,{"data-element-name":"QuestionForm",children:(0,l.jsxs)(oX.Form,{onSubmit:e=>{e.preventDefault();
625try{v({name:p,email:u,message:h})}catch(e){console.error(e)}},children:[(0,l.jsxs)("div",{children:[t?(0,l.jsx)(oX.Title,{className:"is-heading-xxl",children:t}):null,n?(0,l.jsx)("p",{className:"is-body-l",children:n}):null]}),(0,l.jsxs)(oX.Fields,{children:[(0,l.jsxs)(oX.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"select-topic",children:"Palautteeni koskee"}),(0,l.jsxs)("select",{onChange:e=>{e.preventDefault(),e.target[0].hidden=!0,y(e.target.value)},id:"select-topic",disabled:c,children:[(0,l.jsx)("option",{value:null,children:"Valitse"}),o?.map((e,t)=>(0,l.jsx)("option",{value:e.value,children:e.label},t))]})]}),(0,l.jsxs)(oX.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"name",children:"Nimi"}),(0,l.jsx)("input",{onChange:({target:{value:e}})=>{g(e)},className:"is-body-s",type:"text",name:"name",id:"name",value:p,disabled:c})]}),(0,l.jsxs)(oX.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"email",children:"S\xe4hk\xf6postiosoite"}),(0,l.jsx)("input",{onChange:({target:{value:e}})=>{m(e)},className:"is-body-s",type:"email",name:"email",id:"email",value:u,disabled:c})]}),(0,l.jsxs)(oX.Input,{children:[(0,l.jsx)("label",{className:"is-label-s",htmlFor:"message",children:"Viesti"}),(0,l.jsx)("textarea",{onChange:({target:{value:e}})=>{x(e)},className:"is-body-s",rows:"4",name:"message",id:"message",form:"questionform",value:h,disabled:c})]})]}),(0,l.jsxs)(ed.A,{size:"large",type:"primary",disabled:c||!u||!p||!h,children:[i,(0,l.jsx)(V.g,{icon:(0,H.K)({name:"send",style:"solid"})})]})]})}):null},oX={Component:S.Ay.div.withConfig({componentId:"sc-f664b56-0"})(["margin-inline:auto;padding-inline:var(--block-gutter);"]),Form:S.Ay.form.withConfig({componentId:"sc-f664b56-1"})(["--checkbox-size:18px;padding:var(--spacing-5xl) 20px;background-color:#faf7f4;border-radius:12px;display:flex;flex-direction:column;gap:var(--spacing-xl);justify-content:center;align-items:center;text-align:center;"]),Title:S.Ay.h2.withConfig({componentId:"sc-f664b56-2"})(["margin:0;& + p{margin-top:var(--spacing-md);}"]),Fields:S.Ay.div.withConfig({componentId:"sc-f664b56-3"})(["box-sizing:border-box;display:flex;flex-direction:column;gap:var(--spacing-xl);justify-content:center;align-items:center;width:100%;max-width:600px;"]),Input:S.Ay.div.withConfig({componentId:"sc-f664b56-4"})(["display:flex;flex-direction:column;justify-content:center;align-items:start;width:100%;gap:var(--spacing-sm);"])};n(13481);var oZ=n(41463);let oQ=`
626  fragment CommentsFields on CommentConnection {
627    pageInfo {
628      hasPreviousPage
629      hasNextPage
630    }
631    edges {
632      node {
633        id
634        name
635        createdAt
636        body
637        hasChildren
638        children: comments {
639          edges {
640            node {
641              id
642              name
643              createdAt
644              body
645              hasParent
646            }
647          }
648        }
649      }
650    }
651  }
652`,o0=`
653  query GetComments($id: ID!) {
654    node(id: $id) {
655      __typename
656      type
657      ... on Article {
658        articleComments: comments {
659          ...CommentsFields
660        }
661      }
662      ... on Question {
663        questionComments: comments {
664          ...CommentsFields
665        }
666      }
667      ... on Video {
668        videoComments: comments {
669          ...CommentsFields
670        }
671      }
672      ... on Recipe {
673        recipeComments: comments {
674          ...CommentsFields
675        }
676      }
677    }
678  }
679  ${oQ}
680`,o1=`
681  mutation createComment($nodeId: ID!, $comment: CommentInput!) {
682    createComment(nodeId: $nodeId, comment: $comment) {
683      id
684      name
685      body
686      createdAt
687    }
688  }
689`;function o2(e){let{translate:t}=(0,Z.B)(),{content:n,isEmbedded:i}=(0,d.useContext)(F.A),o=(0,d.useContext)(tA.A),a=void o.user,r=(0,d.useMemo)(()=>a?.username,[a]),s=(0,tC.usePathname)(),c="#kommentoi",u=`${s}${c}`;(0,tb.A)({redirect:u});let[m,p]=(0,d.useState)(!1),[g,h]=(0,d.useState)(""),[x,f]=(0,d.useState)(""),[y,v]=(0,d.useState)(!1),[b,C]=(0,d.useState)(),[A,k]=(0,d.useState)(),[j,w]=(0,d.useState)([]),[I,N]=(0,d.useState)("oldest"),[S,T]=(0,d.useState)(!1),P=(0,d.useContext)(em.A),{mutate:L}=(0,eu.A)({api:P.contentApi,query:o1});"Automatic"===e.type?(n?.type,n?.slug):(e.type,e.slug);let{data:M,refetch:B}=(0,eG.A)({api:P.contentApi,query:o0,variables:{id:n?.id},skip:!n?.id||n?.metadata?.commentsEnabled===!1}),R=n.numComments,D=(0,d.useRef)();(0,d.useEffect)(()=>{let e=setInterval(()=>{B()},6e4);return()=>clearInterval(e)},[B]),(0,d.useEffect)(()=>{!o?.user||y||r&&f(r)},[r,y,o?.user]),(0,d.useEffect)(()=>{i||window.location.hash===c&&(p(!0),setTimeout(()=>{D.current&&D.current.scrollIntoView({behavior:"auto",block:"center"})},0))},[D.current]);let O=(0,d.useMemo)(()=>{let e=[],t=M?.node?.articleComments||M?.node?.questionComments||M?.node?.videoComments||M?.node?.recipeComments;return t?.edges&&(e=t.edges.reduce((e,t)=>
689(e.push(t),t?.node?.children?.edges&&t?.node?.children?.edges?.forEach(n=>{e.push({node:n?.node,parent:{name:t?.node.name,id:t?.node.id,body:t?.node.body}})}),e),[])),j.length>0&&(e=[...e,...j]),e},[M,j]),z=(0,d.useMemo)(()=>O?.sort((e,t)=>"newest"===I?t.node.createdAt?.localeCompare(e.node.createdAt):e.node.createdAt?.localeCompare(t.node.createdAt)),[O,I]),U=z&&z.length>0,$=(0,d.useMemo)(()=>{let n=U?e.buttonLabelShowComments||t("CommentsBlock.buttonLabelShowComments"):e.buttonLabelComment||t("CommentsBlock.buttonLabelComment");return n.includes("{{count}}")?n.replaceAll("{{count}}",String(R||0)):U&&!1!==e.showCommentCount?`${n} (${R})`:n},[U,R,e.buttonLabelShowComments,e.buttonLabelComment,e.showCommentCount,t]),q=async(e,t)=>{e.preventDefault(),C(t);try{T(!0);let e=await L({variables:{nodeId:t||n.id,comment:{name:x,body:g}}});T(!1);let i=e?.createComment;w(e=>i?[...e,{node:i,parent:A?{id:A.nodeId,name:A.name,body:A.body}:void 0}]:e)}catch(e){console.error("Error creating comment:",e)}};return n?.metadata?.commentsEnabled===!1||"false"===oZ.env.NEXT_PUBLIC_HAS_COMMENTS?null:(0,l.jsx)(E.A,{id:`comments-block-${n.id}`,children:(0,l.jsxs)(o3.Component,{children:[(0,l.jsxs)(o3.Button,{type:"primary",onClick:()=>p(!m),children:[$,m?(0,l.jsx)(o3.Icon,{icon:(0,H.K)({name:"angle-up",style:"solid"})}):(0,l.jsx)(o3.Icon,{icon:(0,H.K)({name:"angle-down",style:"solid"})})]}),(0,l.jsxs)(o3.Comments,{className:m?"is-style-visible":"is-style-hidden",children:[(0,l.jsxs)(o3.Header,{children:[(0,l.jsx)("h2",{className:"is-heading-s",style:{margin:0},children:t("CommentsBlock.headerTitle")}),(0,l.jsx)("button",{className:"is-label-m",onClick:()=>"newest"===I?N("oldest"):N("newest"),children:"newest"===I?t("CommentsBlock.sortOrderLabelOldest"):t("CommentsBlock.sortOrderLabelNewest")})]}),U?z.map((e,n)=>(0,l.jsxs)("div",{children:[e.parent&&!!e.parent.id&&(0,l.jsx)(o3.Parent,{children:(0,l.jsxs)("p",{className:"is-body-s",children:[(0,l.jsxs)("span",{children:[e.parent.name,": "]}),e.parent.body]})}),(0,l.jsxs)(o3.Comment,{children:[(0,l.jsxs)(o3.MetaContainer,{children:[(0,l.jsx)("span",{className:"is-body-s username",children:e?.node?.name}),(0,l.jsx)("span",{className:"is-body-s comment-date",children:new Date(e?.node?.createdAt).toLocaleDateString("fi-FI",{year:"numeric",month:"2-digit",day:"2-digit"})})]}),(0,l.jsx)(o3.Content,{className:"is-body-s",children:(0,l.jsx)("div",{children:e?.node?.body})},e?.node?.id),!e.parent&&(0,l.jsx)(o3.Controls,{children:(0,l.jsx)("button",{className:"is-label-m",onClick:()=>{k({nodeId:e.node.id,name:e.node.name,body:e.node.body}),D.current?.scrollIntoView({behavior:"smooth"})},children:t("CommentsBlock.replyButtonLabel")})})]})]},n)):(0,l.jsx)(o3.MetaContainer,{children:(0,l.jsx)("span",{className:"is-body-s",children:t("CommentsBlock.noCommentsNotice")})})]}),m&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(o3.Form,{onSubmit:e=>{q(e,A?.nodeId),k(),h(""),r||f("")},ref:D,children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(o3.Header,{children:[A?.nodeId?(0,l.jsx)("h2",{className:"is-heading-s",style:{margin:0},children:t("CommentsBlock.answerCommentHeading")}):(0,l.jsx)("h2",{className:"is-heading-s",style:{margin:0},children:t("CommentsBlock.writeCommentHeading")}),A?.nodeId?(0,l.jsx)("button",{className:"is-label-m",onClick:()=>{k()},children:t("CommentsBlock.cancelButtonLabel")}):null]}),!!A?.nodeId&&(0,l.jsx)(o3.Parent,{style:{marginBottom:0},children:(0,l.jsxs)("p",{className:"is-body-s",children:[(0,l.jsxs)("span",{children:[A.name,": "]}),A.body]})}),(0,l.jsxs)(o3.Fields,{children:[(0,l.jsx)("span",{className:"is-label-s",children:t("CommentsBlock.formFieldLabelName")}),(0,l.jsx)("input",{type:"text",className:"is-body-s",value:x,onChange:e=>{y||v(!0),f(e.target.value)},disabled:o.loading,readOnly:!!r})]}),(0,l.jsxs)(o3.Fields,{children:[(0,l.jsx)("span",{className:"is-label-s",children:t("CommentsBlock.formFieldLabelComment")}),(0,l.jsx)("textarea",{rows:3,className:"is-body-s",value:g,onChange:e=>h(e.target.value),placeholder:t("CommentsBlock.formFieldLabelCommentPlaceholder")})]})]}),(0,l.jsxs)(o3.Button,{type:"primary",disabled:!g||!x||S,children:[t("CommentsBlock.submitButtonLabel"),(0,l.jsx)(V.g,{icon:(0,H.K)({name:"send",style:"solid"})})]})]})})]})})}o2.canLazyLoad=!1;let o3={Component:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-0"})(["display:flex;flex-direction:column;gap:var(--spacing-2xl);"]),Comments:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);&.is-style-hidden{display:none;}"]),Parent:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-2"})(["margin-bottom:var(--spacing-lg);padding:var(--spacing-md);background-color:var(--comments--quote-background-color);border:1px solid var(--comments--border-color);border-radius:var(--radius-rounded);p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--comments--color-grey);white-space:pre-wrap;}span{font-weight:500;}"]),Comment:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-3"})(["display:flex;flex-direction:column;gap:var(--spacing-sm);padding-bottom:var(--spacing-lg);border-bottom:1px solid var(--comments--border-color);.username{color:var(--comments--username-color);font-weight:500;}.comment-date{color:var(--comments--color-grey);}"]),Header:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-4"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:var(--spacing-md);border-bottom:3px solid var(--comments--border-color);color:var(--comments--color-black);button{background-color:transparent;border:none;margin:0;padding:0;color:var(--comments--color-grey);cursor:pointer;border:1px solid var(--comments--border-color);border-radius:var(--radius-full);padding:var(--spacing-xs) var(--spacing-sm);}"]),Select:S.Ay.select.withConfig({componentId:"sc-4c5f1b86-5"})([""]),MetaContainer:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-6"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;"]),Content:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-7"})(["color:var(--comments--color-black);white-space:pre-wrap;"]),Controls:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-8"})(["color:var(--comments--color-grey);button{background-color:transparent;border:none;margin:0;padding:0;color:var(--comments--color-grey);cursor:pointer;}"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-4c5f1b86-9"})(["padding:var(--spacing-lg) var(--spacing-5xl);"]),Form:S.Ay.form.withConfig({componentId:"sc-4c5f1b86-10"})(["display:flex;flex-direction:column;gap:var(--spacing-2xl);> div{display:flex;flex-direction:column;gap:var(--spacing-lg);}"]),Fields:S.Ay.label.withConfig({componentId:"sc-4c5f1b86-11"})(["display:flex;flex-direction:column;gap:var(--spacing-xs);color:var(--comments--color-black);input,textarea{padding:var(--spacing-sm) var(--spacing-md);color:var(--comments--color-black);border:1px solid var(--comments--input-border-color);border-radius:var(--radius-minimal);}textarea::placeholder{color:var(--comments--placeholder-color);}"]),WallContainer:S.Ay.div.withConfig({componentId:"sc-4c5f1b86-12"})(["margin-top:var(--block-spacing);margin-bottom:var(--spacing-5xl);position:relative;"]),Icon:(0,S.Ay)(V.g).withConfig({componentId:"sc-4c5f1b86-13"})(["margin-top:3px;"])};function o5(e){return(0,l.jsxs)(o4.Component,{children:[(0,l.jsx)(o4.Content,{children:e.content}),(0,l.jsx)(o4.Image,{children:e.image})]})}let o4={Component:S.Ay.div.withConfig({componentId:"sc-a4348b3a-0"})(["max-width:var(--width-extra-wide);margin-inline:auto;display:flex;flex-wrap:wrap;flex-direction:column;gap:40px;text-align:center;align-items:center;justify-content:center;align-items:center;@media (min-width:","){flex-wrap:nowrap;flex-direction:row;text-align:unset;align-items:flex-start;}"],e=>e.theme["breakpoint-desktop"]),Content:S.Ay.div.withConfig({componentId:"sc-a4348b3a-1"})(["position:relative;flex-basis:100%;flex-grow:0;flex-shrink:0;max-width:var(--width-column);align-self:center;@media (min-width:","){max-width:100%;flex-basis:410px;flex-grow:0;flex-shrink:0;}"],e=>e.theme["breakpoint-desktop"]),Image:S.Ay.div.withConfig({componentId:"sc-a4348b3a-2"})(["flex-basis:auto;flex-grow:0;flex-shrink:0;width:100%;height:100%;max-height:unset;max-width:480px;align-self:center;@media (min-width:","){max-width:100%;flex-basis:480px;flex-grow:0;flex-shrink:0;}"],e=>e.theme["breakpoint-desktop"])};
689function o8(e){let{content:t}=(0,d.useContext)(F.A),n=e.magazineAd.productId||np(t?.brand)||void 0,{data:i,loading:o,error:a}=nu({productId:n});return!n||a?null:o?(0,l.jsx)(o7,{}):i?(0,l.jsx)(o5,{content:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o6.Logo,{src:i.logo,alt:"",width:"400",height:"100",$logoWidth:e.logoWidth||e.$logoWidth}),(0,l.jsx)(o6.Title,{className:"is-heading-xxl",children:i.slogan}),(0,l.jsx)(o6.Description,{className:"is-body-l",children:i.shortDescription}),(0,l.jsxs)(o6.Product,{children:[(0,l.jsx)(o6.ProductName,{className:"is-heading-l-alt",children:i.name}),(0,l.jsx)(o6.ProductPackageSize,{className:"is-label-xs",children:i.packageSize}),(0,l.jsx)(o6.ProductPriceTag,{className:"is-heading-l-alt",children:i.rate+" €"})]}),(0,l.jsx)(o6.Button,{"data-click-element-name":"OrderPromoCoverMagazineAdButton",href:i.url,children:i.buttonText}),(0,l.jsx)(o6.ProductTerms,{className:"is-label-m",children:i.termsOfSubscription})]}),image:(0,l.jsx)(o6.MagazineImage,{src:i.cover,alt:"",width:"280",height:"342"})}):null}function o7(){return(0,l.jsx)(tB.A,{})}let o6={Logo:(0,S.Ay)(e1.default).withConfig({componentId:"sc-685afdc3-0"})(["display:block;width:",";height:auto;max-width:100%;margin-inline:auto;margin-bottom:32px;@media (min-width:","){margin-inline:unset;}"],e=>e.$logoWidth?e.$logoWidth:"auto",e=>e.theme["breakpoint-desktop"]),Title:S.Ay.h2.withConfig({componentId:"sc-685afdc3-1"})(["color:var(--color-universal-gray-900);margin-bottom:var(--spacing-lg);@media (min-width:","){text-align:unset;}"],e=>e.theme["breakpoint-desktop"]),Product:S.Ay.div.withConfig({componentId:"sc-685afdc3-2"})(["display:grid;grid-template-areas:'name price' 'packageSize price';grid-template-columns:1fr auto;border-radius:8px;background-color:var(--color-universal-gray-0);padding:var(--spacing-md);margin-bottom:var(--spacing-lg);"]),ProductName:S.Ay.div.withConfig({componentId:"sc-685afdc3-3"})(["color:var(--color-universal-gray-900);grid-area:name;text-align:left;"]),ProductPackageSize:S.Ay.div.withConfig({componentId:"sc-685afdc3-4"})(["color:var(--color-universal-gray-900);text-transform:none;grid-area:packageSize;text-align:left;"]),ProductTerms:S.Ay.div.withConfig({componentId:"sc-685afdc3-5"})(["grid-area:terms;text-align:center;letter-spacing:1px;text-transform:uppercase;color:var(--color-on-surface-secondary);"]),ProductPriceTag:S.Ay.div.withConfig({componentId:"sc-685afdc3-6"})(["grid-area:price;background-color:#7cc928;color:var(--color-universal-gray-0);letter-spacing:-0.5px;padding:var(--spacing-sm) var(--spacing-md);border-radius:8px;display:flex;justify-content:center;align-self:unset;line-height:1;"]),Description:S.Ay.div.withConfig({componentId:"sc-685afdc3-7"})(["color:var(--color-universal-gray-900);margin-bottom:var(--spacing-3xl);@media (min-width:","){text-align:unset;}"],e=>e.theme["breakpoint-desktop"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-685afdc3-8"})(["font-weight:400;width:100%;margin-bottom:var(--spacing-sm);"]),MagazineImage:(0,S.Ay)(e1.default).withConfig({componentId:"sc-685afdc3-9"})(["display:block;max-width:280px;height:auto;object-fit:contain;object-position:center;margin-inline:auto;margin-top:var(--spacing-3xl);"])};function o9(e){let{isApp:t}=(0,d.useContext)(y.A),n=(0,d.useRef)();return(0,d.useEffect)(()=>{t&&n.current&&n.current.querySelectorAll("a").forEach(e=>{e.onclick=e=>{e.preventDefault(),e.stopPropagation(),(0,tf.sq)({event:"navigate",payload:{url:e.target.href,target:e.target.target}})}})},[t]),(0,l.jsx)("div",{ref:n,dangerouslySetInnerHTML:{__html:e.html}})}function ae(e){let{translate:t}=(0,Z.B)(),[n,i]=(0,d.useState)(""),[o,a]=(0,d.useState)(!1),[r,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(!1),[m,p]=(0,d.useState)(!1),[g,h]=(0,d.useState)(null),x=(0,d.useContext)(tA.A),f=e.newsletter?.brazeSubscriptionGroupId||e.newsletter?.listBrazeSubscriptionGroupId,y=e.newsletter?.label;(0,d.useEffect)(()=>{!x?.user||x?.userLoading||!o&&x.user.email&&i(x.user.email)},[x.user,x.userLoading,o]);let v=async()=>{if(!f)return void h("brazeSubscriptionGroupId is required");u(!0),h(null);try{let e=await fetch("/api/braze/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({brazeSubscriptionGroupId:f,brazeSubscriptionGroupName:y,email:n,allowPromotions:r})});if(!e.ok&&200!==e.status){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));h(t.error||`HTTP ${e.status}`),p(!1);return}p(!0)}catch(e){console.error("Error calling Braze subscription API:",e),h("An unexpected error occurred. Please try again."),p(!1)}finally{u(!1)}};return e.newsletter?(0,l.jsx)(o5,{content:(0,l.jsxs)(l.Fragment,{children:[e.logoUrl&&(0,l.jsx)(at.NewsletterLogo,{src:e.logoUrl,$logoWidth:e.logoWidth}),(0,l.jsx)(at.NewsletterTitle,{className:"is-heading-xxl",color:e.color,children:e.title}),(0,l.jsx)(at.NewsletterDescription,{className:"is-body-l",color:e.color,children:e.descriptionHtml?(0,l.jsx)(o9,{html:e.descriptionHtml}):(0,l.jsx)(l.Fragment,{children:e.description})}),m?(0,l.jsx)(at.NewsletterMessage,{$color:e.color,children:e.newsletter.confirmationMessageHtml?(0,l.jsx)(o9,{html:e.newsletter.confirmationMessageHtml}):(0,l.jsx)(l.Fragment,{children:e.newsletter.confirmationMessage||t("PromoCoverNewsLetter.confirmationMessage")})}):(0,l.jsxs)(at.NewsletterForm,{onSubmit:e=>{e.preventDefault(),v()},children:[(0,l.jsx)(at.NewsletterInputLabel,{className:"is-label-m",color:e.color,children:t("PromoCoverNewsLetter.emailInputLabel")}),(0,l.jsx)(at.NewsletterInput,{type:"email",value:n,onChange:e=>{o||a(!0),i(e.target.value)}}),(0,l.jsx)(at.NewsletterButton,{type:"submit",$backgroundColor:e.newsletter.buttonBackgroun
689dColor,$color:e.newsletter.buttonColor,"data-click-element-name":"SubscribeNewsletterButton",disabled:c,children:e.newsletter.buttonText}),(0,l.jsxs)(at.NewsletterCheckboxLabel,{$color:e.color,children:[(0,l.jsx)("input",{type:"checkbox",checked:r,className:r?"is-checked":"",onChange:()=>s(!r)}),(0,l.jsx)("span",{className:"is-body-xs",children:t("PromoCoverNewsLetter.consentLabel")})]}),g&&(0,l.jsxs)(at.NewsletterErrorMessage,{className:"is-body-xs",children:[t("NewsletterSubscription.errorMessage")," (",g,")"]})]})]}),image:(0,l.jsx)(at.Image,{src:e.imageUrl})}):null}let at={NewsletterForm:S.Ay.form.withConfig({componentId:"sc-f4e05bbf-0"})(["margin-top:28px;text-align:left;"]),NewsletterLogo:S.Ay.img.withConfig({componentId:"sc-f4e05bbf-1"})(["display:block;margin-bottom:28px;height:65px;width:",";max-width:100%;margin-inline:auto;@media (min-width:","){margin-inline:unset;margin-bottom:32px;}"],e=>e.$logoWidth?e.$logoWidth:"auto",e=>e.theme["breakpoint-desktop"]),NewsletterTitle:S.Ay.h2.withConfig({componentId:"sc-f4e05bbf-2"})(["margin-bottom:16px;"]),NewsletterDescription:S.Ay.div.withConfig({componentId:"sc-f4e05bbf-3"})(["a{color:inherit;}"]),NewsletterInputLabel:S.Ay.div.withConfig({componentId:"sc-f4e05bbf-4"})(["margin-bottom:4px;"]),NewsletterInput:S.Ay.input.withConfig({componentId:"sc-f4e05bbf-5"})(["input&{margin-bottom:16px;border-radius:8px;}"]),NewsletterButton:(0,S.Ay)(ed.A).withConfig({componentId:"sc-f4e05bbf-6"})(["display:block;margin-bottom:16px;border-radius:8px;text-align:center;height:52px;width:100%;"," > span{letter-spacing:1px;}"],e=>`
690      ${e.$backgroundColor?`
691        background-color: ${e.$backgroundColor} !important;
692        border-color: ${e.$backgroundColor} !important;
693      `:""};
694      ${e.$color?`color: ${e.$color} !important;`:""}
695    `),NewsletterCheckboxLabel:S.Ay.label.withConfig({componentId:"sc-f4e05bbf-7"})(["display:flex;align-items:flex-start;justify-content:flex-start;gap:var(--spacing-sm);input[type='checkbox']{flex-shrink:0;-webkit-appearance:none;-moz-appearance:none;appearance:unset;position:relative;margin:0;width:16px;height:16px;margin:0;margin-top:1px;border:1px solid var(--newsletter--input-border-color);border-radius:3px;background-color:var(--color-surface);cursor:pointer;&::before{content:'';box-sizing:border-box;display:none;width:9px;height:5px;position:absolute;top:64%;left:25%;transform:translate(-50%,0);border:1.5px solid var(--color-black);border-top:none;border-right:none;transform:rotate(-45deg) translate(4px,-4px);}&:checked::before{display:block;}}"]),NewsletterMessage:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-f4e05bbf-8"})(["margin-top:28px;color:",";a{color:inherit;}"],e=>e.$color),NewsletterErrorMessage:S.Ay.div.withConfig({componentId:"sc-f4e05bbf-9"})(["margin-top:8px;color:var(--color-error,#d32f2f);"]),Image:S.Ay.img.withConfig({componentId:"sc-f4e05bbf-10"})(["display:block;object-fit:contain;object-position:center;margin-inline:auto;width:100%;height:100%;max-height:540px;max-width:480px;"])};var an=n(45697),ai=n(24944),ao=n(90927);function aa(e){return(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(ar,{...e})})}function ar(e){let t=(0,tC.useSearchParams)();return(0,d.useEffect)(()=>{let e=t.get("external_offers_token");e&&(0,ao.Us)("external_offers_token",e)},[t]),(0,l.jsx)(o5,{content:(0,l.jsxs)(l.Fragment,{children:[e.logoUrl&&(0,l.jsx)(al.Logo,{unoptimized:!0,src:e.logoUrl,alt:"",width:"400",height:"100",$logoWidth:e.logoWidth}),e.isPlaceholder&&(0,l.jsx)(al.LoadingSpinnerContainer,{$spinnerTopColor:e.buttonBackgroundColor,$spinnerBottomColor:e.buttonColor,children:(0,l.jsx)(tB.A,{})}),(0,l.jsx)(al.Title,{className:"is-heading-xxl",children:e.title}),(0,l.jsx)(al.Description,{className:"is-body-l",children:e.descriptionHtml?(0,l.jsx)(o9,{html:e.descriptionHtml}):(0,l.jsx)(l.Fragment,{children:e.description})}),e.buttonText&&e.buttonUrl&&(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(as,{...e})}),(0,l.jsxs)(al.StoreLinks,{children:[e.app.appStoreUrl&&(0,l.jsx)(al.StoreLink,{onClick:()=>(window.location.href=e.app.appStoreUrl,"_blank"),"data-click-element-name":e.app.appStoreClickElementName||"AppStoreLink",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:ac}})}),e.app.playStoreUrl&&(0,l.jsx)(al.StoreLink,{onClick:()=>(window.location.href=e.app.playStoreUrl,"_blank"),"data-click-element-name":e.app.playStoreClickElementName||"PlayStoreLink",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:ad}})})]})]}),image:(0,l.jsx)(al.PodcastCoverImage,{src:e.imageUrl,alt:"",width:"500",height:"500"})})}function as(e){let t,n=(0,d.useContext)(tA.A),i=(0,tC.useSearchParams)(),o=(0,tC.usePathname)(),a=i.get("redirect")||"/"!==o&&"/apu360-tilaus"!==o&&o||void 0,r=a||o,s=i.get("mav"),c=i.get("sasid"),u=(0,d.useMemo)(()=>e.buttonUrl+(-1===e.buttonUrl.indexOf("?")?"?":"&")+(0,ai.Ws)({redirect:a,mav:s,sasid:c,sourceUrl:r}),[r,s,c,a,e.buttonUrl]),m=(0,tb.A)({redirect:u});return e.buttonRequiresLogin?n.user?t=u:n.userLoading||(t=m):t=u,(0,l.jsx)(al.Button,{"data-click-element-name":e.buttonClickElementName,$backgroundColor:e.buttonBackgroun
695dColor,$color:e.buttonColor,href:t,target:"_self",children:e.buttonText})}let al={LoadingSpinnerContainer:S.Ay.div.withConfig({componentId:"sc-c50fb071-0"})(["@media (min-width:","){> *{margin-inline:0;}}"," ",""],e=>e.theme["breakpoint-desktop"],e=>e.$spinnerTopColor&&`
696      --loading-spinner--top-color: ${e.$spinnerTopColor};
697      `,e=>e.$spinnerBottomColor&&`
698      --loading-spinner--bottom-color: ${e.$spinnerBottomColor};
699      `),Logo:(0,S.Ay)(e1.default).withConfig({componentId:"sc-c50fb071-1"})(["display:block;width:",";height:auto;max-width:100%;margin-inline:auto;margin-bottom:24px;@media (min-width:","){margin-inline:unset;}"],e=>e.$logoWidth||"190px",e=>e.theme["breakpoint-desktop"]),Title:S.Ay.h2.withConfig({componentId:"sc-c50fb071-2"})(["margin-bottom:var(--spacing-lg);@media (min-width:","){text-align:unset;}"],e=>e.theme["breakpoint-desktop"]),Description:S.Ay.div.withConfig({componentId:"sc-c50fb071-3"})(["margin-bottom:32px;@media (min-width:","){text-align:unset;}"],e=>e.theme["breakpoint-desktop"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-c50fb071-4"})([""," ",""],e=>e.$backgroundColor&&`
700      border-color: ${e.$backgroundColor} !important;
701      background-color: ${e.$backgroundColor} !important;
702    `,e=>e.$color&&`
703      color: ${e.$color} !important;
704    `),StoreLinks:S.Ay.div.withConfig({componentId:"sc-c50fb071-5"})(["display:flex;justify-content:center;gap:16px;margin-top:32px;@media (min-width:","){justify-content:flex-start;}"],e=>e.theme["breakpoint-desktop"]),StoreLink:(0,S.Ay)(an.A).withConfig({componentId:"sc-c50fb071-6"})(["height:40px;width:auto;"]),PodcastCoverImage:(0,S.Ay)(e1.default).withConfig({componentId:"sc-c50fb071-7"})(["display:block;object-fit:contain;object-position:center;margin-inline:auto;width:100%;height:100%;max-height:540px;max-width:480px;"])},ac=`
705<svg width="143" height="40" viewBox="0 0 143 40" fill="none" xmlns="http://www.w3.org/2000/svg">
706<g clip-path="url(#clip0_6959_7390)">
707<path d="M133.322 0.00013H9.53468C9.16798 0.00013 8.80568 0.00013 8.43995 0.00213C8.1338 0.00413 7.83009 0.00994 7.521 0.01483C6.84951 0.0227318 6.17961 0.0818063 5.5171 0.19154C4.85552 0.303663 4.21467 0.515046 3.61622 0.81854C3.0185 1.1246 2.47235 1.5223 1.99757 1.9972C1.5203 2.47077 1.12246 3.01815 0.81935 3.61829C0.5154 4.21724 0.304641 4.85907 0.19435 5.52161C0.0830109 6.18332 0.0230984 6.85265 0.01515 7.52361C0.00587 7.83021 0.00489 8.13783 0 8.44447V31.5587C0.00489 31.8692 0.00587 32.17 0.01515 32.4806C0.0231008 33.1516 0.0830134 33.8209 0.19435 34.4825C0.304336 35.1455 0.515108 35.7877 0.81935 36.3868C1.12233 36.985 1.52022 37.5302 1.99757 38.0011C2.47054 38.4781 3.01705 38.8761 3.61622 39.1798C4.21467 39.4841 4.85545 39.6968 5.5171 39.8106C6.17972 39.9195 6.84956 39.9786 7.521 39.9874C7.83009 39.9942 8.1338 39.9981 8.43995 39.9981C8.80567 40.0001 9.168 40.0001 9.53468 40.0001H133.322C133.682 40.0001 134.047 40.0001 134.406 39.9981C134.711 39.9981 135.023 39.9942 135.328 39.9874C135.998 39.9791 136.667 39.92 137.328 39.8106C137.992 39.696 138.635 39.4834 139.236 39.1798C139.835 38.8759 140.381 38.478 140.854 38.0011C141.33 37.5284 141.728 36.9836 142.035 36.3868C142.337 35.7872 142.546 35.1451 142.654 34.4825C142.766 33.8208 142.828 33.1516 142.84 32.4806C142.844 32.17 142.844 31.8692 142.844 31.5587C142.852 31.1954 142.852 30.8341 142.852 30.4649V9.53626C142.852 9.17005 142.852 8.80677 142.844 8.44447C142.844 8.13783 142.844 7.83021 142.84 7.52357C142.828 6.85255 142.766 6.18337 142.654 5.52157C142.546 4.85941 142.337 4.21763 142.035 3.61825C141.418 2.41533 140.439 1.43616 139.236 0.81845C138.635 0.515697 137.992 0.30437 137.328 0.19145C136.667 0.0812328 135.998 0.0221378 135.328 0.01469C135.023 0.00981 134.711 0.00395 134.406 0.002C134.047 0 133.682 0.00013 133.322 0.00013Z" fill="#A6A6A6"/>
708<path d="M8.4448 39.125C8.14013 39.125 7.8428 39.1211 7.54052 39.1143C6.9143 39.1061 6.28954 39.0516 5.67138 38.9512C5.09497 38.8519 4.53658 38.6673 4.01464 38.4033C3.49748 38.1415 3.02579 37.7983 2.61764 37.3867C2.20358 36.98 1.85885 36.5082 1.59713 35.9902C1.33252 35.4688 1.14939 34.9099 1.05413 34.333C0.95125 33.7131 0.89559 33.0863 0.887626 32.458C0.881286 32.2471 0.872986 31.5449 0.872986 31.5449V8.44434C0.872986 8.44434 0.881826 7.75293 0.887676 7.5498C0.895302 6.92248 0.950635 6.29665 1.0532 5.67773C1.14864 5.09925 1.33191 4.53875 1.59667 4.01563C1.85743 3.49795 2.20024 3.02586 2.6118 2.61768C3.0229 2.20562 3.49611 1.86061 4.01415 1.59521C4.53489 1.33209 5.09222 1.14873 5.66747 1.05127C6.28766 0.949836 6.91459 0.894996 7.54298 0.88721L8.4453 0.875H134.401L135.314 0.8877C135.937 0.895099 136.558 0.94945 137.173 1.05029C137.754 1.14898 138.317 1.33362 138.844 1.59814C139.882 2.13299 140.726 2.97916 141.259 4.01807C141.519 4.53758 141.7 5.09351 141.794 5.667C141.898 6.291 141.956 6.92175 141.968 7.55421C141.971 7.83741 141.971 8.14161 141.971 8.44435C141.979 8.81935 141.979 9.17628 141.979 9.53614V30.4648C141.979 30.8281 141.979 31.1826 141.971 31.54C141.971 31.8652 141.971 32.1631 141.967 32.4697C141.955 33.0909 141.898 33.7104 141.796 34.3232C141.703 34.9043 141.52 35.4675 141.256 35.9932C140.992 36.5056 140.65 36.9733 140.24 37.3789C139.832 37.7927 139.359 38.1379 138.841 38.4014C138.316 38.6674 137.753 38.8527 137.173 38.9512C136.555 39.0522 135.93 39.1067 135.304 39.1143C135.011 39.1211 134.704 39.125 134.406 39.125L133.322 39.127L8.4448 39.125Z" fill="black"/>
709<path d="M24.7718 20.3008C24.7826 19.4662 25.0043 18.6478 25.4163 17.9218C25.8283 17.1959 26.4173 16.5859 27.1284 16.1488C26.6766 15.5036 26.0807 14.9727 25.3878 14.5981C24.695 14.2236 23.9244 14.0157 23.1372 13.9911C21.458 13.8148 19.83 14.9959 18.9743 14.9959C18.102 14.9959 16.7845 14.0086 15.3658 14.0378C14.4481 14.0674 13.5538 14.3343 12.7699 14.8123C11.986 15.2904 11.3393 15.9633 10.8929 16.7656C8.95888 20.1141 10.4015 25.0351 12.2541 27.7417C13.181 29.0671 14.2643 30.5475 15.6817 30.495C17.0688 30.4375 17.5868 29.6105 19.2611 29.6105C20.9199 29.6105 21.4059 30.495 22.8521 30.4616C24.3405 30.4375 25.2782 29.1304 26.1726 27.7925C26.8386 26.8481 27.351 25.8044 27.691 24.7C26.8263 24.3343 26.0884 23.7221 25.5693 22.9398C25.0502 22.1575 24.7728 21.2397 24.7718 20.3008Z" fill="white"/>
710<path d="M22.0402 12.2108C22.8517 11.2366 23.2515 9.98445 23.1547 8.72021C21.9149 8.85044 20.7696 9.44299 19.9471 10.3798C19.545 10.8375 19.237 11.3699 19.0408 11.9467C18.8445 12.5235 18.7639 13.1333 18.8034 13.7412C19.4236 13.7476 20.0371 13.6132 20.5977 13.3481C21.1584 13.083 21.6516 12.6942 22.0402 12.2108Z" fill="white"/>
711<path d="M39.3955 14.7017H35.6738V8.73486H36.6006V13.8496H39.3955V14.7017Z" fill="white"/>
712<path d="M40.332 13.4282C40.332 12.6177 40.9355 12.1504 42.0068 12.084L43.2265 12.0137V11.625C43.2265 11.
7121494 42.9121 10.8809 42.3046 10.8809C41.8085 10.8809 41.4648 11.063 41.3661 11.3813H40.5058C40.5966 10.6079 41.3242 10.1118 42.3456 10.1118C43.4745 10.1118 44.1113 10.6738 44.1113 11.625V14.7017H43.2558V14.0688H43.1855C43.0428 14.2958 42.8424 14.4809 42.6047 14.6051C42.3671 14.7293 42.1008 14.7882 41.833 14.7758C41.6439 14.7955 41.4529 14.7753 41.2721 14.7166C41.0913 14.6579 40.9249 14.562 40.7835 14.435C40.642 14.3081 40.5288 14.1529 40.451 13.9795C40.3733 13.8061 40.3327 13.6183 40.332 13.4282ZM43.2265 13.0434V12.667L42.127 12.7373C41.5068 12.7788 41.2256 12.9897 41.2256 13.3867C41.2256 13.792 41.5772 14.0278 42.0606 14.0278C42.2022 14.0421 42.3453 14.0278 42.4813 13.9858C42.6173 13.9437 42.7435 13.8746 42.8522 13.7828C42.961 13.691 43.0502 13.5782 43.1145 13.4512C43.1788 13.3241 43.2169 13.1855 43.2265 13.0434Z" fill="white"/>
713<path d="M46.7061 9.07764V10.2192H47.6816V10.9678H46.7061V13.2832C46.7061 13.7549 46.9004 13.9614 47.3428 13.9614C47.456 13.9611 47.5692 13.9542 47.6816 13.9409V14.6811C47.5221 14.7097 47.3604 14.7249 47.1982 14.7265C46.21 14.7265 45.8164 14.3789 45.8164 13.5107V10.9677H45.1016V10.2192H45.8164V9.07764H46.7061Z" fill="white"/>
714<path d="M48.5977 13.4282C48.5977 12.6177 49.2012 12.1504 50.2725 12.084L51.4922 12.0137V11.625C51.4922 11.1494 51.1777 10.8809 50.5703 10.8809C50.0742 10.8809 49.7305 11.063 49.6318 11.3813H48.7715C48.8623 10.6079 49.5898 10.1118 50.6113 10.1118C51.7402 10.1118 52.377 10.6738 52.377 11.625V14.7017H51.5215V14.0688H51.4512C51.3085 14.2958 51.1081 14.4809 50.8704 14.6051C50.6328 14.7293 50.3665 14.7882 50.0986 14.7758C49.9096 14.7955 49.7185 14.7753 49.5378 14.7166C49.357 14.6579 49.1906 14.562 49.0492 14.435C48.9077 14.3081 48.7945 14.1529 48.7167 13.9795C48.639 13.8061 48.5984 13.6183 48.5977 13.4282ZM51.4922 13.0434V12.667L50.3926 12.7373C49.7725 12.7788 49.4912 12.9897 49.4912 13.3867C49.4912 13.792 49.8428 14.0278 50.3262 14.0278C50.4679 14.0422 50.6109 14.0279 50.7469 13.9858C50.8829 13.9437 51.0091 13.8747 51.1179 13.7828C51.2267 13.691 51.3159 13.5782 51.3802 13.4512C51.4445 13.3242 51.4826 13.1855 51.4922 13.0434Z" fill="white"/>
715<path d="M53.5117 13.4282C53.5117 12.6177 54.1152 12.1504 55.1865 12.084L56.4062 12.0137V11.625C56.4062 11.1494 56.0918 10.8809 55.4844 10.8809C54.9883 10.8809 54.6445 11.063 54.5459 11.3813H53.6855C53.7764 10.6079 54.5039 10.1118 55.5254 10.1118C56.6543 10.1118 57.291 10.6738 57.291 11.625V14.7017H56.4355V14.0688H56.3652C56.2225 14.2958 56.0221 14.4809 55.7845 14.6051C55.5469 14.7293 55.2805 14.7882 55.0127 14.7758C54.8237 14.7955 54.6326 14.7753 54.4518 14.7166C54.2711 14.6579 54.1046 14.562 53.9632 14.435C53.8218 14.3081 53.7086 14.1529 53.6308 13.9795C53.553 13.8061 53.5125 13.6183 53.5117 13.4282ZM56.4062 13.0434V12.667L55.3066 12.7373C54.6865 12.7788 54.4053 12.9897 54.4053 13.3867C54.4053 13.792 54.7568 14.0278 55.2403 14.0278C55.3819 14.0422 55.525 14.0279 55.661 13.9858C55.797 13.9437 55.9232 13.8747 56.0319 13.7828C56.1407 13.691 56.2299 13.5782 56.2942 13.4512C56.3585 13.3242 56.3966 13.1855 56.4062 13.0434Z" fill="white"/>
716<path d="M42.3076 27.1289H37.5742L36.4375 30.4854H34.4326L38.916 18.0669H40.999L45.4824 30.4854H43.4434L42.3076 27.1289ZM38.0645 25.5801H41.8165L39.9669 20.1323H39.915L38.0645 25.5801Z" fill="white"/>
717<path d="M55.165 25.9592C55.165 28.7727 53.6591 30.5803 51.3867 30.5803C50.811 30.6104 50.2385 30.4778 49.7347 30.1977C49.2309 29.9175 48.8162 29.5012 48.5381 28.9963H48.4951V33.4807H46.6367V21.4314H48.4355V22.9372H48.4697C48.7606 22.4348 49.1823 22.0206 49.69 21.7387C50.1976 21.4569 50.7722 21.3179 51.3525 21.3366C53.6504 21.3367 55.165 23.153 55.165 25.9592ZM53.2548 25.9592C53.2548 24.1257 52.3076 22.9206 50.8623 22.9206C49.4423 22.9206 48.4873 24.1511 48.4873 25.9592C48.4873 27.7834 49.4423 29.0051 50.8623 29.0051C52.3076 29.0051 53.2548 27.8088 53.2548 25.9592Z" fill="white"/>
718<path d="M65.1294 25.9592C65.1294 28.7727 63.624 30.5803 61.3515 30.5803C60.7759 30.6104 60.2034 30.4778 59.6996 30.1977C59.1958 29.9175 58.7811 29.5012 58.5029 28.9963H58.46V33.4807H56.6016V21.4314H58.4004V22.9372H58.4345C58.7255 22.4348 59.1472 22.0206 59.6549 21.7387C60.1625 21.4569 60.737 21.3179 61.3174 21.3366C63.6152 21.3367 65.1294 23.153 65.1294 25.9592ZM63.2197 25.9592C63.2197 24.1257 62.2724 22.9206 60.8271 22.9206C59.4072 22.9206 58.4521 24.1511 58.4521 25.9592C58.4521 27.7834 59.4072 29.0051 60.8271 29.0051C62.2724 29.0051 63.2197 27.8088 63.2197 25.9592Z" fill="white"/>
719<path d="M71.7143 27.0254C71.852 28.2568 73.0483 29.0654 74.6831 29.0654C76.2495 29.0654 77.3764 28.2568 77.3764 27.1464C77.3764 26.1826 76.6967 25.6054 75.0874 25.2099L73.478 24.8218C71.1977 24.271 70.1391 23.2046 70.1391 21.4741C70.1391 19.3315 72.0063 17.8599 74.6567 17.8599C77.2817 17.8599 79.0805 19.3315 79.1411 21.4741H77.2651C77.1528 20.2349 76.1283 19.4868 74.6313 19.4868C73.1342 19.4868 72.1098 20.2437 72.1098 21.3452C72.1098 22.2232 72.7641 22.7398 74.3647 23.1352L75.7328 23.4712C78.2807 24.0737 79.3383 25.0976 79.3383 26.914C79.3383 29.2373 77.4887 30.6924 74.5453 30.6924C71.7914 30.6924 69.932 29.2715 69.8119 27.0254L71.7143 27.0254Z" fill="white"/>
720<path d="M83.3511 19.2886V21.4312H85.0728V22.9028H83.3511V27.8945C83.3511 28.6699 83.6958 29.0313 84.4526 29.0313C84.657 29.0277 84.8611 29.0133 85.064 28.9883V30.4511C84.7237 30.5147 84.3778 30.5435 84.0317 30.5371C82.1987 30.5371 81.4839 29.8486 81.4839 28.0927V22.9028H80.1675V21.4312H81.4839V19.2886H83.3511Z" fill="white"/>
721<path d="M86.0688 25.959C86.0688 23.1099 87.7466 21.3198 90.3628 21.3198C92.9878 21.3198 94.6577 23.1098 94.6577 25.959C94.6577 28.8154 92.9966 30.5977 90.3628 30.5977C87.73 30.5976 86.0688 28.8154 86.0688 25.959ZM92.7642 25.959C92.7642 24.0044 91.8686 22.8511 90.3628 22.8511C88.8569 22.8511 87.9614 24.0132 87.9614 25.959C87.9614 27.9209 88.8569 29.0654 90.3628 29.0654C91.8686 29.0654 92.7642 27.9209 92.7642 25.959Z" fill="white"/>
722<path d="M96.19 21.4313H97.9625V22.9723H98.0055C98.1254 22.491 98.4073 22.0657 98.8039 21.7678C99.2005 21.4699 99.6875 21.3176 100.183 21.3365C100.397 21.3358 100.611 21.359 100.82 21.4059V23.1441C100.55 23.0615 100.267 23.0236 99.9849 23.0318C99.7149 23.0209 99.4457 23.0685 99.1958 23.1714C98.946 23.2744 98.7213 23.4301 98.5374 23.6281C98.3534 23.826 98.2144 24.0614 98.13 24.3182C98.0456 24.5749 98.0178 24.8468 98.0484 25.1153V30.4854H96.19V21.4313Z" fill="white"/>
723<path d="M109.388 27.8262C109.138 29.4697 107.538 30.5977 105.49 30.5977C102.856 30.5977 101.221 28.833 101.221 26.002C101.221 23.1616 102.865 21.3198 105.412 21.3198C107.917 21.3198 109.492 23.0405 109.492 25.7861V26.4229H103.097V26.5352C103.068 26.8684 103.109 27.204 103.22 27.5199C103.33 27.8357 103.506 28.1245 103.736 28.367C103.967 28.6096 104.246 28.8003 104.556 28.9266C104.865 29.053 105.198 29.1119 105.533 29.0996C105.972 29.1408 106.413 29.039 106.789 28.8096C107.166 28.5802 107.459 28.2352 107.624 27.8262L109.388 27.8262ZM103.106 25.124H107.632C107.649 24.8244 
723107.604 24.5245 107.499 24.2433C107.394 23.962 107.233 23.7054 107.024 23.4896C106.816 23.2738 106.565 23.1034 106.287 22.9891C106.01 22.8749 105.712 22.8192 105.412 22.8257C105.109 22.8239 104.809 22.882 104.529 22.9968C104.249 23.1116 103.994 23.2807 103.78 23.4944C103.566 23.7081 103.396 23.9621 103.28 24.2418C103.164 24.5215 103.105 24.8213 103.106 25.124Z" fill="white"/>
724<path d="M114.406 21.3286C116.412 21.3286 117.848 22.438 117.891 24.0386H116.144C116.067 23.2388 115.387 22.7486 114.354 22.7486C113.347 22.7486 112.676 23.2125 112.676 23.9185C112.676 24.4605 113.124 24.8219 114.062 25.0548L115.585 25.4083C117.41 25.8468 118.098 26.5177 118.098 27.8438C118.098 29.4786 116.549 30.5977 114.337 30.5977C112.203 30.5977 110.766 29.504 110.628 27.8517H112.469C112.599 28.7208 113.295 29.1857 114.423 29.1857C115.534 29.1857 116.231 28.7296 116.231 28.0069C116.231 27.4474 115.886 27.1466 114.94 26.9054L113.322 26.5099C111.686 26.1134 110.86 25.2784 110.86 24.0221C110.86 22.4214 112.297 21.3286 114.406 21.3286Z" fill="white"/>
725<path d="M122.047 19.2886V21.4312H123.769V22.9028H122.047V27.8945C122.047 28.6699 122.392 29.0313 123.149 29.0313C123.353 29.0277 123.557 29.0133 123.76 28.9883V30.4511C123.42 30.5147 123.074 30.5435 122.728 30.5371C120.895 30.5371 120.18 29.8486 120.18 28.0927V22.9028H118.864V21.4312H120.18V19.2886H122.047Z" fill="white"/>
726<path d="M124.955 27.9121C124.955 26.3291 126.167 25.373 128.319 25.2441L130.797 25.1064V24.4174C130.797 23.4106 130.135 22.8422 129.008 22.8422C128.59 22.7865 128.167 22.8853 127.816 23.1199C127.466 23.3546 127.213 23.709 127.106 24.1167H125.368C125.419 22.481 126.942 21.3198 129.059 21.3198C131.219 21.3198 132.648 22.4985 132.648 24.2798V30.4854H130.867V28.9961H130.824C130.538 29.5011 130.123 29.9201 129.62 30.2094C129.117 30.4987 128.546 30.6476 127.966 30.6406C127.585 30.6779 127.201 30.6351 126.838 30.515C126.474 30.3948 126.14 30.2 125.856 29.9431C125.573 29.6862 125.346 29.3727 125.191 29.023C125.035 28.6732 124.955 28.2948 124.955 27.9121ZM130.797 27.0947V26.3975L128.569 26.5352C127.458 26.6045 126.831 27.0859 126.831 27.8604C126.831 28.6524 127.485 29.1689 128.483 29.1689C128.772 29.1885 129.062 29.1501 129.336 29.0558C129.61 28.9615 129.862 28.8133 130.078 28.62C130.293 28.4267 130.468 28.1921 130.592 27.9302C130.715 27.6682 130.785 27.3841 130.797 27.0947Z" fill="white"/>
727</g>
728<defs>
729<clipPath id="clip0_6959_7390">
730<rect width="142.852" height="40" fill="white"/>
731</clipPath>
732</defs>
733</svg>
734`,ad=`
735<svg width="136" height="40" viewBox="0 0 136 40" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
736<rect x="0.851562" width="134.459" height="40" fill="url(#pattern0)"/>
737<defs>
738<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
739<use xlink:href="#image0_6959_7421" transform="matrix(0.00154799 0 0 0.00520351 0 -0.150439)"/>
740</pattern>
741<image id="image0_6959_7421" width="646" height="250" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoYAAAD6CAYAAAA89YbqAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nO3de1xUdf4/8JeaaSNq3nJiWqWMWioSU/niDfMa7CIPFJz6pQyClbZeltXlu5nLRl8ja1ldN7ViLQlQVwmSr7ILeS3ywqImSn4pyRRtaDS1VBw1JX5/yLDDzJwztzNzzgyv5+PB46HnzJzz5swAr/mcz6VdU1MTiIiIiIjay10AERERESkDgyERERERAWAwJCIiIqJmDIZEREREBIDBkIiIiIiaMRgSEREREQAGQyIiIiJqxmBIRERERAAYDImIiIioGYMhEREREQFgMCQiIiKiZgyGRERERASAwZCIiIiImjEYEhEREREABkMiIiIiasZgSEREREQAGAyJiIiIqBmDIREREREBYDAkIiIiomYMhkREREQEgMGQiIiIiJoxGBIRERERAAZDIiIiImrGYEhEREREABgMiYiIiKgZgyERERERAWAwJCIiIqJmDIZEREREBAC4Q6oDPf20dtydd3QM7XBHh8BOnTrdL9VxiYiIiMjajRs3Tjbeaqz/6dbN6k2bCnZKccx2TU1NLj95ZkrKe2p1318HBT2gDujaRYp6iIiIiMhJDVeu4tSpbwwGw9l/vr927XOuHsfpYJgQH9+/b9++uYOeeCKySxdVO1dPTERERETSu3rV2HT488/Lz549m1RYVFTnzHOdCoYzU1LeGzZ8eAoDIREREZGyXb1qbNq/b99aZ1oQHQqGT2unjnzs0ce2PvhQ8N1ij6s+chR1p0/jwsWLqK+vd7QGIiIiInJCYGAgevXsif79+iF04OOij/36eO2PXxz7YtKmgg/32Duu3WCYOG1a6ugxY5YLtRJWHzmKfRX78fnhKly7ccPe+YiIiIhIQnd16oQnBoVheMQwwZB49aqx6dPduxfkr1+/QuxYosFwZkrKe+MnjJ9pa1/F/gp8WFSE7y9ccKZ2IiIiIvKQPr16YWp8PCKGRdjcv2P7jvfFbi0LBkOhUGj47ixyPshBzfHjrtZMRERERB4U8tBDSJ6RDPW9fa32iYVDm8EwSadbGhUd9ZLl9l07d2LTh4W8ZUxERESkcHd16oSnpyZg7LhxVvvKSsveyM3LW2S53SoYPvvMM0+PHT/+H5Z9Cku2lqDgo4+krpmIiIiIPEg7ZQpiJsW02nb1qrFp144d/2/Dxo2bzLdbLYkXFhaWYxkKPywoYCgkIiIi8kEFH32EDwsKWm3r0kXVLiwsLMfysa2C4Zzf/OaTX/Tvd5f5tl07d2JraZlHCiUiIiIiz9taWoZdO1uvmveL/v3umvOb33xivq0lGD6tnTpy5KiRo813fvP1CXywbr0n6yQiIiIiL/hg3Xp88/WJVttGjho5+mnt1JGm/7cEw379+n1geYCc/HxP1kdEREREXmQr25lnwPbA7dbCJwYPHmD+oA8LClB3+rSn6yMiIiIiL6k7fdqqv+ETgwcPMLUatgeA3r37vGb+gIYrV7Fj126vFUlERERE3rFj1240XLnaapspC7YHgF/+8pcjzHd+8sluzlVIRERE5Ieu3biBTz5p3QBoyoLtn33mmad79+l9h/nO3Z9+6sXyiIiIiMibLLNe7z6973j2mWeebt+1W9dnzHd88/UJrn9MRERE5Me+v3DBaoRy125dn2nfu3fvVqss/19NjVcLIyIiIiLvs8x8vXv3jmjfvVv37uYbvz7ROj0SERERkf+xzHzdu3Xv3t5ypZMLP/zg1aKIiIiIyPssM98v+ve7y2qtZM5dSEREROT/bGU+q2BIRERERG0TgyERERERAWAwJCIiIqJmDIZEREREBIDBkIiIiIiaMRgSEREREQAGQyIiIiJqxmBIRERERAAYDImIiIioGYMhEREREQFgMCQiIiKiZnfIXYA3dOvTDb0euhd39rwLd/a+C+1734mfz/+En85fw08Xr+HC8e9w+fvLcp
741dJREREJCu/Dob3j3gY3Yar0RjatWVbE4DG5n93bP7qgmB0qL6Cy/sMOLn3KxkqJSIiIpKfXwbDPkF9ETjjUTQ+oGoJgfY0hnZFl9CuGDhBg3ObjuO7mm89WiMRERGR0vhdMLx/xMPoMivY4UBoqfEBFXotCsM9/w7CyYKjvMVMREREbYZfDT4xhUIpNP7X3bj/1RF4eFIYOnb2u/xMREREZMVvgqGUodCkMaADOk69D4/9z1jcP+JhSY9NREREpDR+EQy79emGbtMe8Njxb6rvRJdZwRiYNhp9gvp67DxEREREcvKLYHj/jEFoDOjg8fM0hnZF3/8ZitDkYby9TERERH7H59NNn6C+raaj8YamMb3wyNAJMH50BrU7vvDquYnIt4wZNRKaewMxdty4lm0Xzl/AkSNVOHT4MGpqa2WsjoioNZ9vMVSP8dwtZDGNAR3QSReEQX+eiHtD7pOlBvK86Votbl6/3urLW4aGhVmd++b165iu1Tp8DFvPd/fL0fNLUb+r5Dy3yXStFvvLy7Ft+w7k5OUhMSmp5St14QLk5OXhaHU11mZnY2hYmMPHXZyWJsnruDgtzYPfPRH5Kp8PhndE9JL1/DfVd6LXojAMTBuNbn26yVoL+ZeJEybY3K71Yrhxh5z1y3nuAJUKa7OzkZOXhyHh4XYfn5iUhH0VFYiNjvJ4bURE9vh0MFQHBuGeH34ldxkAbvc/7LcsktPbkCQCVCq8MHu2zX3RMTEICZZ2BL7U5Kxf7mu3obl10FlFm4sZDolIdj4dDDt1UuGuiw9AU6+McAgAHafeh0eWT+D0NuSWsaMjEajRCO9/8knvFeMCOeuX89zTtVpEx8RYba/X65GRno5knQ7JOh1WLFtu8/lFm4sVH/qJyL/5dNPW3ff0A4Db4RC/gj7wXzJXdFtjQIfb09tweT1yUVzc5Fb/Ly0paRU4/vull7B6zRq7xxkeESG6f+KECchYssSp59QbDHbPK1X9rpDr3AEqFTKXLrXanqzTYV1BQatt6woKsGLlW3hn1SqrIJn2+98jZdYsp87dsXNn5wsmIrLBp4Nhx06qln8rLRwC/1ler/fuX6Cu5BiX1yOHaNRqq1uRf1i0CAMHDWppCQvUaDBm1Ejs/myP6LEOVFWJ7n/4oYecfo49UtbvS+e21VJpKxSa6A0GPKvTYUNeXqtweOH8BQSoVGgwGiWtj4jIET59K9mS0m4rmzSN6dWyvB6RPWMiI1v9/2BlJWpqa/H3d99ttf1XUcp7rwPy1i/nubt1tR58VlxSIvqcBqMRS157DfV6PVLnzUNQUBDSFr/MUEhEsvGrYAgoNxyaltcb9OeJ6PeEPFPskG+YM3duq/+vy88HAOyr2N9qe+rCBQhQqaA0ctavtGvnSMA7UFWFR0NDsXrNGugduE1PRORJfhcMAeWGQ+D29DbdUh/h8npk09CwMKspTnZ98gkAYPdne1Cv17faF2djoIOc5KxfiddOo1Y79Di2EBKRUvhlMASUHQ6B/yyvF/L0EE5vQy0s598z3Qo1sbwlqrQ5DeWsX4nXLnXefI+fg4hISn4bDAHlh0MA6PBrNR5ZPgHB4x+TuxSSma3590y3Qk0sb4kqaU5DOetXwrXbXV5utS114QJsKSxUzGtERGSPXwdDwDfCIZfXI8D2qFbTrVATW7dElTKnoZz1K+Ha6Q0GpM6bZ7U9OiYGR6urkZX5OsaMGinZ+YiIPMHvgyHgG+EQMFteb85ILq/XBlnOv2d5K9TE8pbof7/0kkfrcpSc9Svl2uWuX49SgZHIqQsXYNv2Hag7cQKL09LYikhEitQmgiHgO+EQABr/624ur9fG2Jp/b/WqVTYfa3lLNFCjkX0pNTnrV9K1azAa8axOh4z0dMHHBGo0yFiyBEerq7G/vFyS89+8ft2pr6FhnDqLiGxrM8EQ8K1wCHB5vbbEcv49ADh0+LDNx9ocYWvRYuZtctavtGvXYDQiMysLEyeMx8HKStHHDgkPR9HmYvZDJCLFaFPBEPC9cNiyvF7aaPY/9GOW8++VlpTYvBVqYnlLNDEpyeGpUTxBzvqVeu12f7YHwyIjET85TvD2sompH6LcLb9ERG0uGAK3w2HQN9PQsfFOuUtxWGNoV/RaFIbQ5GG8vexnbM2/VyCwjJrJtu3brbbZajnzBjnr94Vrt6W0DLEJCQgKCkLqvHmirYhFm4sZDolIVm0yGALAHcYe0NRN9alwCNxeXu+R5RO4vJ4fsZx/DxC+FWpyoKrK6paoZcuZt8hZvy9dO73BgNVr1thtRVy5arXTq7J07NzZqS9318MmIv/VZoMh4LvhkMvr+Q9b8+8BwNHqarsDCCynZxkSHu71QQVy1u/L187Uipis01ntC9RoFLeiDRG1HW06GAK+Gw6B1svrcXob32Rr/j132GpB8yQ56/f1awcA6woKED85zmq70la0IaK2o80HQ8C3wyFwu/9hv2WRXF7PBz038zlJj/fC7NlO34Z0h5z1+/q1M9lSWmZ1WzmaLYZEJBMGw2a+Hg4BLq/na0KCgyUPAIEaDcaO9s4gFDnrV+q1i42OwtrsbGwpLHTqefYGzBAReQuDoRl/CIem5fUGZozl9DYKZ2s5tokTxjs1iKBHz55Wx/DWnIZy1q+0azddq8X+8nIUbS5GYlISomNiOIk0EfkkBkML/hAOAaDxARWX11M4y+XY6vV67P5sj1PHaDAakZ+b22qbt+Y0lLN+JV47y2lzXnzxRYefO3bcOJfOSUQkNQZDG/wlHAJcXk+pxowaaTVwwnLiZUcVF2+2Pr6H5zSUs34lXrvikhKrKXASk5KwOC3N7nOHhoVZLem3Ytlyp2sgIpICk4IAUzjU9/8QNzv8JHc5bus49T48Nuoe/Pi/dTi59yu5y/Fpzt4ibLh61Woljl9FWa++Y7mOr6N2fVputW3O3LlY58F+a3LWr8Rr12A0YvGiRcjJy2u1PWPJEtx9dw+8mvkaGoxGq+dN12qRuXSp1fbP9ljXRUTkDe02bFjfZL5Bl5wiVy1OGxI5BfdFvODRc9xS/eA34dDknm+uQp9Tja/qzstdiuJN12qt/tg7Kz83FymzZrX8P0Clwg8XL7Z6TL1ej/4DBrh8jqzM15G6cEGrbcMjIuxOZGzr++vYubPoc+SsX0nXzpYthYWCg2JWLFuOI0duH7N///6ImTTJ6vYzcHtJv9iEBMFzLE5LQ8aSJU7XZikjPR2ZWVluH4eIfFteztpW/+etZDv86bayyR8G/oCqt69hycyHEdCpg9zltDm2Ji/+8xtvuHXMf5X9y2qbdqpn5sKTs36lX7tndTrBFU1SFy5ATl4ecvLykLFkic1QWK/X40WZVrAhIgIYDB3iT+FwWddvEXnn7duav5/yLY7l9MbT47l6ijfZmry48sABt4554NDnVn3cUhcu8Mi8fHLWr/Rr12A04lmdzqU+gqUlJYiKioLeYHD6uUREUmEwdJA/hEPzUGhyT/cGfPC7s6h8+34M/qXnR7K2dbbm3ztYWen22rUNRiMKNm6y2i710mpy1u8r167BaETa4pcxccJ4HKystPv4g5WVSNbpEJuQYNUXlYjI29jH0Em+2ufQVii05aN99yEtW4/68w1eqIrI/4UEB2PwoEEYODAMvXr3AgBcOH8BR45U4dDhwwyDRCQryz6GHJXsJF8crexoKASAKcO/xZThwPx3g/GPbd+g4Uajh6sj8m81tbWoqa316ChxIiKp8FayC3zptrIzodDcW7PrcSynN349Ikj6ooiIiEiRGAxd5Avh0NVQaHJP9wYUvvw9St8IZv9DIiKiNoDB0A1KDofuhkJzT4bWY8+yK1gy82EE9g6Q5JhERESkPAyGblJiOJQyFJr7/ZRvsf+tLnh+UrDkxyYiIiL5MRhKQEnh0FOh0OSe7g14a3Y9Kt++H6MH3eex8xAREZH3MRhKRAnh0NOh0Fxo/3Moe+0HrF/8MB7u39sr5yQiIiLPYjCUkJzh0Juh0NyU4d+i6u1r+P0zD3F5PSIiIh/HYCgxOcKhXKHQ3JJEPZfXIyIi8nEMhh7gzXCohFBowuX1iIiIfBuDoYd4IxwqKRSaC+1/DnuWXcHK3z7M28tEREQ+hMHQgzwZDpUaCs09N/FbHMvpzcEpREREPoLB0MM8EQ59IRSa3NO9AduWdmA4JCIi8gEMhl4gZTj0pVBoYgqHXDWFiIhI2RgMvUSKcOiLodDknu4NyJqlkbsMIiIiEsFg6EXuhENfDoUmU4Z/i1+PCJK7DCIiIhLAYOhlroRDfwiFJq9Mayd3CURERCSAwVAGzoRDfwqFwO2pbDgQhYiISJkYDGXiSDj0t1BoEvl4D7lLICIiIhvukLuAtswUDvX9P8TNDj+12uevoRAAnny8PdZslbsKz5qu1QIAxo4bh8SkJJuPqdfrsXjRIgDAV8eP40BVldfqI2UyvW8sXb5yGVtKy7xcTdvAa07UGoOhzGyFQ38OhQAQrPnJ/oN80HStFnPmzsWQ8HCHHh+o0SAnL6/Vtoz0dOyr2I/dn+3xRImkcJbvB5P83Fy/Cyk3r1+X5Dip8+bh0qVL2F1eDr3B4PTz29I1J3IEg6ECmIfDZHRD5J275S7Jo0L7n5O7BMkEqFRImjYNK1aulOR4GUuWAAAOVlZi6dLX+YeJyA7zn7383Fzkr8vnBysiN7CPoULcYeyBVw/3wHN3/6/cpZCDpmu1+OHiRclCobkh4eEo2lyMLYWFGBoWJvnxifxRYlIStm3fgbXZ2dCo1XKXQ+STGAwVYnZ9AYZ+fgANBfeh6Sfp11ZWknOXfHsFFI1ajS2FhYK3oKQUHRODfRUVgv2giMhaYlIS9u3dyw9VfmhtdjZuXr9u84ukwWCoALPrCzDw1EEAQOOZdn4fDvccu1vuElw2NCwM+/buRXRMjFfPm5OXh7XZ2V49J5EvC9RosK+iguGQyEkMhjIzD4Um/h4OD59okrsElwwNC8O+igoEahxb2i913jwk63To0bMnOnbubPWVrNMhWafDwcpKh46XmJSE2Ogod74FojansKiIt5WJnMBgKCNbodDEn8Phga+McpfgNFMotKe0pATxk+PQsXNnrF6zBusKCtBgtP39risowLqCAgyLjMTjoaHISE8XPXayTsfBKOT3DlZW2vwgZevr8dBQJOt0oscL1GjwzqpVXqqeyPcxGMpELBSa+GM4PHcpAJ8e/lbuMpwSEhyMwqIi0cfU6/WYOGE8YhMSXApvNbW1yMzKwuOhoSgtKbHan6zTYV1BgdPHJfJnNbW1WFdQgKCgIOTn5go+Ljomhq3tRA5iMJSBI6HQxN/C4Wv/6CZ3CU4JUKmw9v33RW8f5+fm4tHQUEmmyKiprUVsQgJWLFveso2hkEic3mBAyqxZNj9UmSxa9LIXKyLyXZzH0MucCYUmpnAYoP0W7e703cmhq+vuwT+2fSN3GU5JmjZNdMLq/NxcpMyaJfl50xa/jB9//AF1dXUMhUQOenHuXJwSGBg2JDwcIcHBqKn138UDiKTAFkMvciUUmvhDy2Him1fQcKNR7jIcFhIcLDpHoadCoUlmVhZDIZET9AYDUufNE9w/eNAgL1ZD5JvYYugl7oRCE19uOUx4vQ++qjsldxlOSfv97wX3HaysxPzf/c6L1XjO0LAwPPzQQ+jevTsGDxnSat+unTtx+cplHDpc5dJyY75cT4BKhaGDn4Dm3kAMHBiGXr17WdWx69NywcFFSmOaCzNz6VKbXSPcXVpOKXZ98ongvv79+3v8/Pauc35ubsv7x58Gk2nUagweFIZuXbth7LhxrfYdOngQly5d8qk14dvq6wgwGHqFFKHQxBfDYcLrffDPvafkLsMpQ8PCkJiUJLj/5cUv+0wgsEWjVmNGYiJemD1btP+k+TU4WFmJ1atWobikRPLvXUn1OFKLeR0Z6en4qLi41S3KkOBgwQ8WnmxltuTMko3mjyktKcFf/7bCJ5eWO6PXC+4b8OCDHjnn0LAwaKdqkbpwgd3HJiYltXr/pM6bh+KtWwXD+NCwMLz44ouCx0t/5RVJgrzYPKliywzGRkfhuZnPic7tav791uv1+Pu77+KD/HzRuh2dCcKc2CTXjtzh8eTr6EvabdiwvtWkcrrkFLlqcdqQyCm4L+IFucsQJWUoNNfhF02KD4fVdffgxbeu4dCXvveDsjgtrWXdYkuevoXsSabQI/S9OaJer8fiRYskuc2tpHrcXfc6dd48rF6zBoD4H7WOnTsLHkPoD5sr77nY6CgUbS526jm2zitV8LAk9
741L0erKzEsMhIjxzb1nV055oHqFR4ZfEfHQoS9ogNMqs7cULwQ4oUg9PE3iv1ej0eDQ21+vAVEhyMte+/L9oH256M9HT8bfVqmx/sXAmGYsReT2+9jkqVl7O21f/Zx9CDPBUKAWX3OTx3KQDz3w3E2N+d9slQGKBS4YXZswX3v/POO16sRjqx0VHYt3evWyEMuD0vXE5eHrYUFro1cbCS6gkJDsaGvDy31r1esXIlthQWIkClcvkYUlmbne12KAR8c2k5b13/kOBgbC8rkyRMALdXN8rKfN3mvsWLFgk+b87cuW6fOy5usuC+v7/7rlVwi42OwtHqardCIQBkLFmC7WVlCAkOdus47vDm6+grGAw9xJOh0ESJ4fAvH92HYfOvYs3WWp8aaGJu6OAnBD+dl5aU+EwfGXPTtVoUbS52eNUWR0THxGDf3r0u/VJXUj0hwcEoKyuTZJnD6JgYvLL4j24fx1UBKhW2FBaKdoNwlq8tLfcLkffUia+/luQcpveMu8HIUurCBTZDRbHINDxDwsPdmqNRo1aLvl8+yM9v9f8xo0ZK8qHDZEh4OMrKymRZncbbr6OvYDD0AG+EQhOlhMNPqgMxcmFXpL//FerPN8hai7se+WWI4L4CH7tFANwOYTl5eR45dqBGgzInP/ErqZ4AlQplZWWSBtTUhQvw1ltvSXY8Z7z11796bB3vwqIiWVt2HDX2yScF99XV1bl9fI1aLfl7xlzqwgVWQa/BaBRdGUmsxc+eGYmJgvvyc3NbdSMIUKnwwQfCE4m7KlCjwZJXX5X8uGLkeB19BYOhxLwZCk1M4bDxhvfD4blLAUh4vQ+iX6r1ydvGtjz11FOC+w4dPuzFStw3ZtRIh0NYfm5uy/rOyTodMtLTHVrHOVCjwdr333foFp7S6nnrr3+1+4ehXq9HRno6knU6DI+IaPlK1ukEJ1SWugXCEdO1WrsthRnp6S1LNpp/mb6fepGBG4EaDd5culTqsiWlUatFuwNI8fMbN2mS3fdMsk6HiRPGW13n+Mlxdpe+BICVq1ZbvX8/KhZupUtMSnKpxc3ZbjNxMTF2J/uPnxyHoKCglu+5R8+eGB4RYff79vZa8HK9jr6Ag08kJEcoNNfhF01QTf0WHTp5Z0DK/HcD8Y9t3/jsLWMhQh296/V69B8wQIaKXBOgUuFYdbXoLz/TwA2xkb0hwcGYEhdnty/gimXLkbZYeHUJpdXjyOCMZJ3O7qhn06hRR2/femLwiUatxqlTpwT3l5aU4MW5cx0aRCI28AoA4ifHSTI9hycGn2wpLBRsMRU6rivXXKjV23wAkpiQ4GC8uXSpaOuurUEMa7OzBd9nGenpyMzKsntuc2I/A7aul9j1deR716jVeGfVKpvHyM/NxTvvvGO3q47YNRD72bJFrtdRaTj4xEPkDoXA7ZZD44f34dZ1z7YcvrftPgxIaufT/QiFBKhUgsHliI+1Fv52zhzREFZaUoLhI0ZgXUGBaPAxreM8PCJCtEUpdeEC0X5oSqtn5arVgvvq9Xo8HhpqtxYAOFBVhZRZsxxqQfAUsdtw+bm5iE1IcHhkcWZWFuInxwnuV+LSchq1Gmuzs0X/QC9dKl2fr3UFBa3ef/V6PYZHRDgUJoD/LH0ptoSftnkePXP56/JtPPK2F2bPdrp16rmZzwnus3W9hK5vaUmJQ9+73mDAszpdq5b/jPR0BAUFIWXWLK/335brdVQ6BkMJKCEUmjSeaYdrhffh5nXnPjk5orruHoxc2BXz/ub7/QiFdO8mvJbz+QsX3D7+zevXJf9anJZmdR6NWi3a6uNsWABuB6CoqCjRMCY035rS6omNjhINqVFRUU4vnZaZlSVLOAwJDhZsQSktKXFpaqUtpWWCK4gMCQ/HmFEjnT6mJ4QEB2O6VotTp06JttiWlpRIPgnxgaoqDB8xAvm5uYiKinIp1Lw4d67g+zc6JsYq6O3+bI9gd4pAjQZxTvQvDQkOFgx69Xo9dn1a7vCxnOl73WA0Yv78+UjW6RAUFITMrCxZ5/6T43VUOgZDNykpFJo0nmmH64WBkoXDc5cCMOOvfRH+m5N+049QSKBIPx2pRjRKzdakvXGTJgk+3p1VW2pqa5EQHy+4PzEpyeYABaXVI9ZSkqzTubye7t9Wr3aoH6SUpsQJt+79QWSaE3ty168X/GM3PGKYy8e1Z0h4uMMfio5WV9vts1qv1+NFCaZ0sUVvMCBl1iyX3y96gwF/fuMNwf22RliLtXw6M3WN2Pvmz2+84dSk8c62ih2oqsK6ggLFTAYtx+uoZAyGblBiKDQxhcMb1zq5dZz0fA0eTT6PTTu+kagyklpIiPUo6v9+6SXBx8+fP9+tlUIOVFWJtozZGhWqpHo0arVoS4k7/YEajEZJb1k6QmjwwIply13+Qwfc/l6E/tiJDVhQmoT4eMUEEFv+78sawX1qdV+rbbs+LRcM7EPCwx2aVsjeoJPirVttbhf60BMdE+OzI3Cl4uzrqGQMhi5Scig0aTzTDj8VaXDtmvMthx/tu92P8C8bj/tdP0Ix9SJ/QDy1nJbUQoKDPT4Po+XcZuamW0x/obR6HgoWfh3FPvU7SuwPt9TEru2/yv7l9vGF/tgFajSKvz1m6i+m9HlHj9cK34noGhBgta3BaBSd8Fo71X7r3djRkYLvmxXLlgsG6XUiP2dFm4uxOC1NlvkIlcDZ11HJGAxd4Auh0KTxTDvcKkdV4ZMAABeXSURBVAp0OBxW192DqD/2wLRM/+1HKObS5cuC+3r36uXFSlw3eNAgwX3vvf+eJOfQGwzIz7U9n9mQ8PBWoUFp9WjuDRQ8TuWBA27X0mA0omDjJreP4wixa7tt+w63+69u275D8PghDz3kiW9JEvm5uRg+YoTXQ+F0rRbTtVrUnThh83ruLy9veYw7wXp3uXD/v9SFC+yGM7GuFAUfCreYC7UkmmQsWYJTp05hS2Ehpmu1PjMpuiVvvY5KxWDoJF8KhSamcNhwVTgcmpaxC//NSXx6+FsvVqcsDUajYGvPQJE/wkrSvXt3wX21X5+Q7Dy7du4U3GceGpRWz8CBwn+spAoSR454J5D079/fK+exJaCr8lpB8nNzMXHCeKTMmuW128dDw8KQlfk6bl6/jpy8POTk5Qm2xg0JD295zA8XL2J/eblo/1sheoNBtPvEGJHpfoaGhYmOLhb7GdAbDEjW6ezWFx0Tg5y8POyrqMDN69exNjtb8UFRjtdRqe6QuwBf4ouh0KTxTDt02ByIy5O/Q7cu11rt+8tH9+HNdV+j4cZZmapTliOHD9v8hRCo0SAkONitflvOzrNlTmgOsZqa1rf7Bg8ZIngMd2q3pP+uXnCfeWhQWj29evtGy68j7r67h2znVsrtsYz0dNTV1WF3ebnX+xJmZb7u1hq7Q8LDXZ4Mfdv27YIj/TOXLhXsKztxwgTBYzrSgr+uoAD9+/d3ao3zxKSkllHj9Xo9/v7uu/iouFjSn393yPk6KhFbDB3ky6HQpPFMO7TbfC8uX70LwO1+hGG/uQvp73/VpvoR2vPxxx8L7hO7dedJASqV4Kd8uUZLN1wR7mogdrvWU5RUz1fHj3vlPP4Uck0OVlZarTQh9pWZleX1Ea4atRpbCgvdChPuOlBVJdh9IlCjsTkYJEClEgx09Xq9w1P6mOa6dKUvbaBGg4wlS3C0uhprs7Nl7ZOohNdRiRgMHeAPodCk8Uw7nC5QI+H1PpiW+RW+qjsvd0mKIza6TK7JSocOfkJwnxTrv5K0HlZw/zupXGloe32QTYRW7/C24uLNgvts9SMUm+dQbECLLVtKy/BoaKhbc3cmJiVh3969so1oVsrrqDQMhnb4Uyi8AOBPP17F2OIa/HPvKbnLUawDhz4XnaxUjn4yj/zSekoaEyWu33z5ivAgHjkorR5Pc7bVzZWv3Z/tkfvblMWc55+3GyaE1tg1rbObbLH6h6u2lJaJTiFjOYen2DyHYgNahDQYjcjMykKPnj0RPzkOK5Ytd7oVMVCjQdHmYq+HQyW9jkrDYCjCn0Lhpp8a8dSRb7DmixO4cou3jcU0GI34+7vvCu4XWk3DUwJUKsF5AOv1eqt+OmK3lqW8bSPWKvbdd/+5rae0ekQHqdiYDNsV3hoUInRt/am/k5Jo1GqsWLlScH9+bi569OyJdQUFgsF5S2kZ1hUUYFhkJB4PDcWKZcvdqmn1qlWC+8wnsR4aFib4vshIT3frVnyD0YgtpWVIW/wy+g8YgMdDQxE/OQ4Z6ekOB6eizcVe+9CtxNdRSRgMBfhLKPz3z02IPWlAauUx6EX6YFFr27ZvF9yXmJTk1SXBxOYcsxVgxW4ti83h5yyx0b3m80EqrR4xUvUhjfHSCEWxaytVyKX/EBvta1p+0JnJ2mtqa7Fi5Vtu1VRcUiLYSpexZEnLdCpig07Eft+5oqa2FltKy5CZlYVhkZEICgpCsk5ntzXRWx+6lfg6KgmDoQ3+EAovAHjh7I+I21eNA/pzcpfjc8Q6dgPA65mve2X+qgCVCitXrRbcb+sXutjAh19F/UqyurTPPG1zX71e36r1QWn1iN16d2ZJMSFjRo30Woud2EhsWyvQkHvEPnz89W8rXDqm2DKcjhBboQa43a9QbNBJfm6ux+d71BsMWFdQYLdPYmJSklcGoyjxdVQSBkML/hAK/
741/TjVQyrOIattaflLsWnZf3lL4L7hoSHY4OdNVql8MriPwq2Fh6srLT5C13sl7wjk986Ii4mxuFWTKXVU1NbK3h7a0h4uNutwb/7bapbz3fGgUOfC+4TW4aQXDNS4L1Rr9e73OdSioFKYhNPz5k7V3TQidgAFnuc/XBs6pModtt18CDP305W6uuoFAyGZnw9FH5862cMYT9CydTU1iJ13jzB/dExMVibne2x80/XakWnUXh58cuC+8Q+lS959VW36tKo1chculRw/76K/YqvR2xprw8+yHW5NXi6VuvVUY4NRqPgH9lAjQbT3RxFr1GrW1Z5IGHuLIEoRSu13mAQfB+YJmO25WBlpcNT1JgbM2ok1mZn41h1tUs/K2Krq3Tr2s3p40lF7tdRKRgMm/lyKDwOIPakATMqvmA/Qonlrl8v2nk6MSkJWwoLJb/9sTgtTfCXOXD79o/YJ1t7fSTnPP+8S3UFqFR4Z9Uq0VZMW3UprR6xFpZAjQYb8vKc/oMXGx0l+pp5itgf2Zy8PLf6Gr6zalVLsKg7cYIBUYDQ+88eKbsdiL0PhIgNXLEUoFJhulaL/eXl2LZ9BxKTkhCo0eC3c+Y4fV5Pcbd7jxJeRyVgMITvhsILABacv4LRe46yH6GHNBiNSJk5U/Qx0TEx2Ld3ryQDUkKCg7GlsFB0VYF6vR7pr7wiehx7fSRXrFzpdBgLUKmwIS9PtEVs6dLXfaIevcFgtzV4e1mZQ6MkA1QqzHn+eRRtLrZftAccqKoS/fBSVlbmdDgMUKmwNju71bUN1GhaAqI3B18pyR6BD2OBGo3THw4DVCq8nmn7/emKA1VVKC0pceo5xQ4+PiQ4GMeqq5GTl2cVgDKWLHF6qhl3brteOH9BcJ/YfK/mlPw6KkGbD4a+Ggr/0nAdwyqO4R9fnpS7FL9XU1uL4RERoo8J1GiwbfsObCksdGk+Lo1ajcVpaThaXW33VmRCfLxDU0uI9ZEEboexLYWFDoWf2OgoHLNTW2lJiehtKaXVY681eEh4OPZVVGBtdjZio6NahasAlQpDw8Iw5/nncay6WnTqC2+YP3++4L5AjQZHq6sdbu0bGhaG7WVlLUuY2TqewdA2l88UWwN7RmKiw8cxfaiRupXJkSXtTDLS0x0eeVtTWyt6m7VoczHmPP+8Qy12Y0aNFO36YW9e1lOnhP/mJU537DVQ+usot3YbNqxvMt+gS06RqxanDYmcgvsiXnD5+b4YCj++9TPe/KYeNecuyl1KmzNm1Ehs277D4cenzpuHS5cuobikxOYv4NjoKHTr2g1aJ/qlxU+Oc6pP0HSt1qHbm6UlJSgoKID+u/qWpeXuvVeN0MdC8cLs2Q7dYnk8NNTu2qdKq2doWBj2VVTYPZaUxNbLvnn9us3t+bm5SJk1S/S4c55/3m5APVhZidWrVtlcV3i6Voux48YJBkKT1HnzsHrNGtHHOELoez1YWYlhItOJSM2Za65Rq3Hq1CnBYyXrdIJrFJsMDQvDW2+95VCYcPbnHQD2l5c7dOygoCCn5i6MjY6y2yper9fjz2+8gcoDB1oNOgsJDkbwgwMQFzdZ9P3lyGtv7/dwfm4u3nnnnVbnn67VQqvVIjYhAYBvvI7elJezttX/22ww9LVQeBzAK/rz+OSk8PQU5HlDw8JQWFTkcl8Ud0ycMN6lEXPuLhDvCGd+8SmtHkf+4DnjYGUlXl78suAfL08FQwDYUljo0cEvjtbhCF8MhsDt/r9iXT1MH2osg8V0rRYDB4Y59d53JVA48uHL1dfR0z+7jvyOC1CpcKy62unfwZbvK6W/jt5kGQzb5K1kXwqFpmXsRu85ylCoAAeqqjB8xAin+/K4o16vx/CICJenUXg18zXR/n3ucvaXntLq2VJahvjJcfYf6IB6vR4pM2e2tHJ627M6ncfem6UlJZj/u9955Ni+5IP8fNHbqtExMcjJy8PN69dbfeXk5dkMExMnjJe0PrEJr03y1wmPyhfzauZrHnt/ZaSnO/Q7rsFodHpdZ1uU/jrKqc0FQ18KhWuu3cSwimNY88UJuUshM3qDAbEJCUjW6Tx+rhXLluPR0FC3JqBtMBqRMmuWW4vd21Kv17v0SVhp9QC3w+HjoaFu/dErLSlBVFSU3dvXntRgNOJZnU7y4L1i2XLEJiQ4tRqEv9IbDEiIj5fkWPGT43C8VnjJSFfYW9JTaKS+o8f2xIePjPR0ZGZlOfz44pISt9coVvrrKKc2FQx9JRR+fOtnxJ404E+HajgfoYKtKyhAj549RUe3uqq0pATDIyKQtvhlyf4YZ2ZlYeKE8ZIs+p6fm4vhI0a4dXtEafXU1NYiNiEB8ZPjnKqpXq9Hsk6H2IQEWUOhiSl4S9UKGj85Dmkic2a2RQeqqjA8IsKt9+7ECeM9dnux+otqwX3OTFFjS4PRiNiEBEl+75l+dpwJhaYaErRat393KP11lEubCYa+EAqP4/YydjMqvuD0Mz6iwWjE6jVr0LFzZyRL8Ek6dd48DI+IQGxCgkeWqdr92R4Mi4x0OvyY5OfmYnhEBFJmzXKq47qv1APcbj0cFhmJiRPGI3XePOTn5lrdcsrPzUVGejriJ8eh/4ABVv2QlLAKwpbSMrc+uKTOm4cePXv63R89qRyoqsKwyEinr29GejqCgoJcbrVzRFzcZJvb6/V6h6eosWf1mjUICgpyqeW/Xq9HRno6ho8YYXeQhxC9wYAJUVGiq6g4Qsmvo1zaxOATpYfCCwD+9uNVbPzyFFsI/YRpahCxUZ71en1LX5mvjh/3+HqltoQEB2PwoEEYO24cevfqZTVwIT83FxfOX8CRI1U2R7L6ez2uEhsAIDb4xJPsjYLPz83Frp07cfnKZYZBF5h+5m297iuWLceRI1WCMxRISWykvbO3bB0VoFJh7OhIhD4WigEPPohx48e3GhxSr9dj544dOHTwIP7vyxrJw5RGrcaYyEib723TIJJDhw871KKvlNfRm9rcqGSlh8JNPzUiq6aOK5YQ+ZG12dk2PxCUlpS0TJlB5AlC7z3A+SlqqG2wDIZ3yFSHVyg5FP775yZk1p3lLWMiPzRuvO0Ril99ddzLlVBbolGrBUPhimXLGQrJIX7bx1CpofACbvcjjNtXzVBIpBAhwcFYnJaGuhMn3F5vNTY6SnCONbEVF4jcJbZqhytrKVPb5JcthkoNhX9iP0IiRYmNjsJzM59r1S8pado0l1f2CFCpsGiR8Ahee8t9EblKo1YLTth8sLJSlj7M5Jv8LhgqMRR+fOtnLD52iv0IiRRCbAWbFStX4sy3Z1wagPHbOXMEl8gqLSlRxHQ25J/GiKwWs3Tp616shHydT99Kvnmj9aggpYXC4wBiTxowo+ILhkIiBak3GESX1CraXIzY6Cinjmlvia333n/PqeMROSpApULm0qU299Xr9dj1abmXKyJf5tPB8Mdzp1v+raRQeAHAgvNXMHrPUfYjJFIgvcFgd96yos3FWJudjaFhYaKPGzNqJPaXl9tdd5VTwJCnxMXECH7Q+fMbb/jV1CrkeT59K/lGc4uhkkLhmms3kXXkOPsREilc7vr1eOqpp2zO6WeSmJSExKQkHKysRMnWrairq2vZN3bcOKv52oT8QYK1XYmEzJk7V3Bf8datXqyE/IFPB0ND/Sk8800OBhpq5C4FH9/6GW9+U4+acxflLoWIHNBgNOIPixZh4KBBdsPdkPBwwb6D9sRPjmPfQvKY2OgowfdmRno6p6ghp/n0rWQAOH7yqLznB/D/9Ocxo+ILhkIiH1NTW4uoqCirJe+kEj85jreQyaPERsFv277di5WQv/D5YPiPM2dlOe8F3J5+ZvSeo/jkZL0sNRCR+2pqa/FoaCjyc3MlO2a9Xo+JE8YzFJJHjRk1UnQUPKeoIVf4fDCsOXcRH9/62avnXHPtJp468g3WfHHCq+clIs9oMBqRMmsW4ifHud16mJGejkdDQyVfD5bIUuJ04QmtOQqeXOXTfQxNFh87hSEDH0AvD5/n41s/Y/WZcxxpTOSntpSWYcuAAYiNjsKokZFIXbjAoeeVlpSgoKAAu8vL2aeLvCJApcKunTuxa+dOm/vZWk2uardhw/om8w265BS5anHLpOB++Hvfuz1y7OMA/nL2R2ytPW33sUTkX0KCg6FW94Xm3sBW2y9fuYzvvjOg5vhxTgdCRD4rL2dtq//7RYshAGytPY0/deqI/7m7i6TH5TJ2RG1bTW0tRxUTUZvhN8EQANZ8cQIGiVoON/3UiKyaOq5YQkRERG2Gzw8+sbS19jTGHv8W//65yf6Dbfj3z02IPWlAauUxhkIiIiJqU/yqxdCk5txFxJ27iEnB/TCzT3f8V/t2dp/z75+b8P73l9iPkIiIiNosvwyGJltrT2NrLaDpGoAn1D2h7tQRj6o64+727fDjz004ZrwOw42b+Nxwka2DRERE1Ob5dTA00V9pYPAjIiIissPv+hgSERERkWsYDImIiIgIAIMhERERETVjMCQiIiIiAAyGRERERNSMwZCIiIiIADAYEhEREVEzBkMiIiIiAsBgSERERETNGAyJiIiICACDIRERERE1swqG/fv1k6MOIiIiIvIiW5mv/Zm609fMN/Tq0cNrBRERERGRPCwz35m609faX7p86ZL5xgcH
741DPBqUURERETkfZaZ79LlS5fanz9/vsJ84yMhIV4tioiIiIi8zzLznT9/vqL9lctXNppvfODBAejTq5dXCyMiIiIi7+nTqxceeLB1i+GVy1c2tt+wceOm89+fv2W+Y8zo0V4tjoiIiIi8xzLrnf/+/K0NGzduag8AX3755V7znU8+OQZ3derkxfKIiIiIyBvu6tQJTz45ptU2UxZsDwDnz3//R/OdAV27YPzY1k8gIiIiIt83fuwYBHTt0mqbKQu2B4BNBR/u+fzQoRPmD5iq1XJOQyIiIiI/0r9fP0zValtt+/zQoRObCj7cA5hNcH369OkZlk9OTkz0dH1ERERE5CW2sp15BmwJhpsKPtyz57M9n5o/8IEHB2DG9GmerI+IiIiIvGDG9GlWI5H3fLbnU1NrIWCxJN7qt99+0nIllLHjxmFSdJRHCyUiIiIiz5kUHYWx48a12nam7vS11W+//aT5Nqu1kquqqpKvXjU2mW+bqtVCO2WKJ+okIiIiIg/STpli1a/w6lVjU1VVVbLlY62C4YaNGzd9Vl7+puX2mEkxmDF9GqexISIiIvIBd3XqhBnTpyFmUozVvs/Ky9/csHHjJsvt7ZqamqweDAAzU1LeGz9h/EzL7YbvziLngxzUHD8uRc1EREREJLGQhx5C8oxkqO/ta7Vvx/Yd77+/du1ztp4nGAwB4XAIABX7K/BhURG+v3DB1ZqJiIiISEJ9evXC1Ph4RAyLsLlfLBQCdoIhACROm5Y6esyY5V26qNrZ2l995Cj2VezH54ercO3GDWdqJyIiIiI33dWpE54YFIbhEcMQOvBxm4+5etXY9Onu3Qvy169fIXYsu8EQAJ7WTh352KOPbX3woeC7xR5XfeQo6k6fxoWLF1FfX2/3uERERETkvMDAQPTq2RP9+/UTDIMmXx+v/fGLY19MMp+WRohDwdBkZkrKe8OGD08Raj0kIiIiImW4etXYtH/fvrVit44tORUMASAhPr5/3759cwc98UQkAyIRERGRsly9amw6/Pnn5WfPnk0qLCqqc+a5TgdDczNTUt5Tq/v++v4HBvRlSCQiIiKSzxfV1QaD4ew/nWkhtORWMDT39NPacXfe0TG0wx0dAjt16nS/JAclIiIiIptu3LhxsvFWY/1Pt25Wb9pUsFOKY0oWDImIiIjIt1mtfEJEREREbRODIREREREBYDAkIiIiomYMhkREREQEgMGQiIiIiJoxGBIRERERAAZDIiIiImrGYEhEREREABgMiYiIiKgZgyERERERAWAwJCIiIqJmDIZEREREBIDBkIiIiIiaMRgSEREREQAGQyIiIiJqxmBIRERERAAYDImIiIioGYMhEREREQFgMCQiIiKiZgyGRERERASAwZCIiIiImjEYEhEREREABkMiIiIiasZgSEREREQAGAyJiIiIqBmDIREREREBYDAkIiIiomYMhkREREQEAPj/+EvTKdK7R/IAAAAASUVORK5CYII="/>
742</defs>
743</svg>
744`;var au=n(30016),am=n(61776);let ap=`
745  <svg viewBox="0 1 337 39" fill="none" xmlns="http://www.w3.org/2000/svg">
746    <path
747      fill-rule="evenodd"
748      clip-rule="evenodd"
749      d="M20 20.7415C20 20.7271 20 20.7127 20 20.6982C20 20.6838 20 20.6694 20 20.655L20 0.698242L-3.49691e-06 0.698244C11.0313 0.698243 19.9766 9.62918 20 20.655L20 20.7415ZM-3.8147e-06 40.6982C11.0313 40.6982 19.9766 31.7673 20 20.7415L20 40.6982L-3.8147e-06 40.6982ZM-4.74488e-05 21.5678L-3.8147e-06 40.6982L-4.57764e-05 40.6982L-4.74488e-05 21.5678Z"
750      fill="#FFD434"
751    />
752    <rect width="295" height="40" transform="translate(20 0.698242)" fill="#FFD434" />
753    <g style="mix-blend-mode: multiply;">
754      <line
755        x1="31"
756        y1="20.6982"
757        x2="304"
758        y2="20.6982"
759        stroke="#FFD434"
760        stroke-width="6"
761        stroke-linecap="round"
762        stroke-dasharray="0.1 16"
763      />
764    </g>
765    <path
766      fill-rule="evenodd"
767      clip-rule="evenodd"
768      d="M315 20.655C315 20.6694 315 20.6838 315 20.6982C315 20.7127 315 20.7271 315 20.7415L315 40.6982L335 40.6982C323.969 40.6982 315.023 31.7673 315 20.7415L315 20.655ZM335 0.69824C323.969 0.698241 315.023 9.62918 315 20.655L315 0.698242L335 0.69824ZM335 19.8287L335 0.69824L335 0.69824L335 19.8287Z"
769      fill="#FFD434"
770    />
771  </svg>
772`;function ag(e){let t=(0,d.useContext)(b.A),[n,i]=(0,d.useState)(""),[o,a]=(0,d.useState)(!1),[r,s]=(0,d.useState)(),c=(0,d.useContext)(tA.A),u=!!c.user||!!c.userLoading&&void 0,m=(0,d.useCallback)(()=>{for(let t of(a(!1),e.offers||[]))try{if(atob(t.codeHash)===n)return void s(t)}catch(e){}a(!0)},[n,e.offers]),p=(0,au.A)({params:{choice:r?.choiceCode,voucherCode:n}}),g=(0,tb.A)({redirect:p});return t.hasOngoingSubscription?(0,l.jsx)(am.A,{title:"Tilauksesi on voimassa",description:"Onneksi olkoon, k\xe4ytt\xe4j\xe4tilill\xe4, jolla olet kirjautunut on voimassa oleva tilaus. Voit nauttia Apu360:n sis\xe4ll\xf6ist\xe4 rajoituksetta!",buttonUrl:"/",buttonText:"Siirry etusivulle",isLight:!0}):(0,l.jsxs)(ah.Component,{children:[(0,l.jsxs)(ah.TopPart,{onSubmit:e=>{e.preventDefault(),m()},children:[(0,l.jsx)(ah.CodeInput,{placeholder:"Kirjoita koodi t\xe4h\xe4n",value:n,onChange:e=>i(e.target.value.toUpperCase()),disabled:!!r}),(0,l.jsx)(ed.A,{type:"submit",disabled:!n||!!r,children:"Tarkista koodi"}),o&&(0,l.jsx)(ah.WrongCode,{children:"Virheellinen koodi, yrit\xe4 uudestaan"})]}),(0,l.jsx)(ah.MiddlePart,{dangerouslySetInnerHTML:{__html:ap}}),(0,l.jsx)(ah.BottomPart,{children:r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ah.OfferHeading,{children:r.heading}),r.imageUrl&&(0,l.jsx)(ah.OfferImage,{url:r.imageUrl,sizes:"250px"}),(0,l.jsxs)(ah.OfferRows,{children:[(0,l.jsxs)(ah.OfferRow,{children:[(0,l.jsx)(ah.OfferRowTitle,{children:r.productLabel}),(0,l.jsx)(ah.OfferRowSubtitle,{children:"Normaali hinta"}),(0,l.jsx)(ah.OfferRowOldPrice,{children:r.regularPriceLabel})]}),(0,l.jsxs)(ah.OfferRow,{children:[(0,l.jsx)(ah.OfferRowTitle,{children:r.productLabel}),(0,l.jsx)(ah.OfferRowSubtitle,{children:"Hinta sinulle!"}),(0,l.jsx)(ah.OfferRowNewPrice,{children:r.discountedPriceLabel})]})]}),r.conditions&&(0,l.jsx)(ah.Conditions,{children:r.conditions}),u?(0,l.jsx)(ed.A,{href:p,children:"Lunasta"}):(0,l.jsx)(ed.A,{href:g,children:"Kirjaudu ja lunasta"})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ah.TeaserImage,{url:"/images/coupon-prize.svg",sizes:"250px"})})})]})}let ah={Component:S.Ay.div.withConfig({componentId:"sc-217e807f-0"})(["margin-inline:auto;border-radius:var(--radius-xl);color:var(--color-on-surface);max-width:410px;overflow:hidden;"]),TopPart:S.Ay.form.withConfig({componentId:"sc-217e807f-1"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);padding:var(--spacing-xl);background-color:var(--color-universal-message-sale);"]),MiddlePart:S.Ay.div.withConfig({componentId:"sc-217e807f-2"})(["position:relative;svg{display:block;width:100%;}"]),BottomPart:S.Ay.div.withConfig({componentId:"sc-217e807f-3"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);padding:var(--spacing-xl);background-color:var(--color-universal-message-sale);"]),CodeInput:(0,S.Ay)(es.A).withConfig({componentId:"sc-217e807f-4"})(["text-align:center;background-color:var(--color-surface);"]),WrongCode:S.Ay.div.attrs({className:"is-body-s has-universal-danger-color"}).withConfig({componentId:"sc-217e807f-5"})(["text-align:center;"]),TeaserImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-217e807f-6"})(["mix-blend-mode:multiply;"]),OfferHeading:S.Ay.div.attrs({className:"is-heading-xxl"}).withConfig({componentId:"sc-217e807f-7"})(["text-align:center;"]),OfferImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-217e807f-8"})(["margin-inline:auto;width:250px;max-width:100%;"]),OfferRows:S.Ay.div.withConfig({componentId:"sc-217e807f-9"})(["border-radius:var(--radius-md);background-color:var(--color-surface);padding:var(--spacing-lg);text-align:left;"]),OfferRow:S.Ay.div.withConfig({componentId:"sc-217e807f-10"})(["display:grid;column-gap:var(--spacing-lg);grid-template-columns:1fr auto;grid-template-areas:'title    price' 'subtitle price';align-items:center;&:not(:first-child){border-top:1px solid var(--color-outline-secondary);margin-top:var(--spacing-lg);padding-top:var(--spacing-lg);}"]),OfferRowTitle:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-217e807f-11"})(["grid-area:title;margin-bottom:var(--spacing-xs);"]),OfferRowSubtitle:S.Ay.div.attrs({className:"is-label-xs"}).withConfig({componentId:"sc-217e807f-12"})(["grid-area:subtitle;"]),OfferRowOldPrice:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-217e807f-13"})(["grid-area:price;text-decoration:line-through;border-radius:var(--radius-minimal);padding:var(--spacing-sm) var(--spacing-md);background-color:var(--color-container-tertiary);"]),OfferRowNewPrice:S.Ay.div.attrs({className:"is-heading-l-alt"}).withConfig({componentId:"sc-217e807f-14"})(["grid-area:price;border-radius:var(--radius-minimal);padding:var(--spacing-sm) var(--spacing-md);text-align:right;color:var(--color-container);background-color:#7cc928;"]),Conditions:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-217e807f-15"})(["margin-top:calc(-1 * (var(--spacing-lg) - var(--spacing-md)));text-align:left;"])};function ax(e){return(0,l.jsx)(o5,{content:(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(d.Suspense,{children:[(0,l.jsx)(af,{title:e.title,color:e.color}),(0,l.jsx)(ag,{...e.campaign})]})}),image:(0,l.jsx)(ay.Image,{src:e.imageUrl})})}function af(e){return(0,d.useContext)(b.A).hasOngoingSubscription?null:(0,l.jsx)(l.Fragment,{children:e.title&&(0,l.jsx)(ay.Title,{$color:e.color,children:e.title})})}let ay={Title:S.Ay.h2.attrs({className:"is-heading-xxl"}).withConfig({componentId:"sc-dbf97bea-0"})(["color:var(--color-universal-gray-900);margin-bottom:var(--spacing-4xl);text-align:center;",""],e=>e.$color&&`
773      color: ${e.$color};
774    `),Image:S.Ay.img.withConfig({componentId:"sc-dbf97bea-1"})(["display:block;object-fit:contain;object-position:center;margin-inline:auto;width:100%;height:100%;"])};function av(e){let{automaticallyRedirectToAppStore:t}=e;return!function({skip:e=!0,playStoreUrl:t,appStoreUrl:n}={}){(0,d.useEffect)(()=>{let i,o,a;if(e)return;let r="hasRedirectedToAppStore";if(sessionStorage.getItem(r))return;let{isMobile:s,platform:l}=(i=navigator.userAgent.toLowerCase().includes("android"),a=!!((o=navigator.userAgent.toLowerCase()).includes("iphone")||o.includes("ipad")||o.includes("ios")),{isMobile:i||a,platform:i?"android":a?"ios":null});if(!s||!l)return;let c=null;"android"===l&&t?c=t:"ios"===l&&n&&(c=n),c&&(sessionStorage.setItem(r,"true"),window.location.href=c)},[e,t,n])}({skip:!t,playStoreUrl:e.app?.playStoreUrl,appStoreUrl:e.app?.appStoreUrl}),(0,l.jsx)(E.A,{align:"full",backgroundColor:e.isNarrow?void 0:"white",children:(0,l.jsx)(ab.Component,{$background:e.background,$backgroundBlendMode:e.backgroundBlendMode,$color:e.color,$isNarrow:e.isNarrow,children:e.magazineAd?(0,l.jsx)(o8,{magazineAd:e.magazineAd,...e}):e.newsletter?(0,l.jsx)(ae,{...e}):e.app?(0,l.jsx)(aa,{...e}):e.campaign?(0,l.jsx)(ax,{...e}):null})})}av.lazyPlaceholder=function(e){return(0,l.jsx)(E.A,{align:"full",backgroundColor:e.isNarrow?void 0:"white",children:(0,l.jsx)(ab.Component,{$background:"var(--color-placeholder)",$backgroundBlendMode:e.backgroundBlendMode,$color:e.color,$isNarrow:e.isNarrow,children:(0,l.jsx)(ab.Placeholder,{})})})};let ab={Component:S.Ay.div.withConfig({componentId:"sc-70d72c68-0"})(["box-sizing:border-box;padding:40px 20px 20px 20px;background:",";background-blend-mode:",";color:",";@media (min-width:","){padding:var(--spacing-6xl) var(--spacing-xl);}",""],e=>e.$background,e=>e.$backgroundBlendMode,e=>e.$color,e=>e.theme["breakpoint-desktop"],e=>e.$isNarrow&&`
775      width: var(--width-extra-wide);
776      margin-inline: auto;
777      max-width: 100%;
778
779      @media (min-width: ${e.theme["breakpoint-tablet"]}) {
780        max-width: calc(100% - 2 * var(--block-gutter));
781        border-radius: 20px;
782      }
783    `),Placeholder:S.Ay.div.withConfig({componentId:"sc-70d72c68-1"})(["aspect-ratio:16/9;"])}
783,aC={Like:"https://cdn.a-lehdet.fi/production/platta/images/emoji-like.png",Curious:"https://cdn.a-lehdet.fi/production/platta/images/emoji-curious.png",Empower:"https://cdn.a-lehdet.fi/production/platta/images/emoji-empower.png",Yikes:"https://cdn.a-lehdet.fi/production/platta/images/emoji-yikes.png"},aA=`
784  mutation CreateReaction(
785    $nodeId: ID!
786    $clientIdentifier: String
787    $type: ReactionType
788  ) {
789    createReaction(
790      nodeId: $nodeId
791      clientIdentifier: $clientIdentifier
792      type: $type
793    ) {
794      type
795      count
796    }
797  }
798`,ak=`
799  mutation DeleteReaction(
800    $nodeId: ID!
801    $clientIdentifier: String
802  ) {
803    deleteReaction(
804      nodeId: $nodeId
805      clientIdentifier: $clientIdentifier
806    ) {
807      type
808      count
809    }
810  }
811`,aj={Component:S.Ay.div.withConfig({componentId:"sc-d5341eb8-0"})(["display:flex;justify-content:flex-end;gap:4px;"]),EmojiButton:S.Ay.button.withConfig({componentId:"sc-d5341eb8-1"})(["display:flex;align-items:center;justify-content:center;color:#000 !important;background:#fff;min-width:47px;padding:4px 8px;border:1px solid blue;border-radius:13px;font-size:16px;height:25px;"," &.emoji-alternatives-button{background:var(--color-primary);color:#fff !important;font-size:16px;padding:3.5px 10px;height:25px;","}"],e=>e.isSelected&&`
812      border: 1px solid darkgrey;
813      background: var(--color-primary);
814      color: #fff !important;
815    `,e=>e.active&&`
816        background: var(--color-primary-darken);
817      `),ReactionEmojisContainer:S.Ay.div.withConfig({componentId:"sc-d5341eb8-2"})(["position:relative;"]),ReactionEmojis:S.Ay.div.withConfig({componentId:"sc-d5341eb8-3"})(["display:flex;gap:4px;position:absolute;top:-45px;right:-10px;padding:4px 8px;box-shadow:0px 0px 6px #00000033;border-radius:24px;background:#fff;"]),Emoji:S.Ay.div.withConfig({componentId:"sc-d5341eb8-4"})(["width:18px;height:18px;margin-left:-2px;img{width:18px;}"]),Count:S.Ay.span.withConfig({componentId:"sc-d5341eb8-5"})(["&.reaction-count{margin-left:3px;.number{display:block;width:7px;height:11px;letter-spacing:0px;color:#000;","}}"],e=>e.isSelected&&`
818          color: #ffffff;
819        `)},aw=function(e){let t=(0,d.useContext)(em.A),[n,i]=(0,d.useState)((e.reactions||[]).reduce((e,t)=>(e[t.type]=t.count,e),{})),[o,a]=(0,d.useState)(e.ownReaction),[r,s]=(0,d.useState)(!1),c=(0,N.A)(e=>e.clientIdentifier),u=(0,d.useRef)(null),m=(0,d.useRef)(null),{mutate:p}=(0,eu.A)({api:t.contentApi,query:aA}),{mutate:g}=(0,eu.A)({api:t.contentApi,query:ak,variables:{nodeId:e.nodeId,clientIdentifier:c}});(0,d.useEffect)(()=>(document.addEventListener("click",h,!0),()=>{document.removeEventListener("click",h,!0)}),[]);let h=e=>{m.current?.contains(e.target)||u.current?.contains(e.target)||s(!1)},x=async t=>{let l=o===t;a(t),l?(g({nodeId:e.nodeId}),i({...n,[t]:(n[t]||1)-1}),a(null)):o||l?o&&n[o]&&!l&&(p({variables:{clientIdentifier:c,nodeId:e.nodeId,type:t}}),i({...n,[o]:n[o]-1,[t]:(n[t]||0)+1})):(p({variables:{clientIdentifier:c,nodeId:e.nodeId,type:t}}),i({...n,[t]:(n[t]||0)+1})),r&&s(!1)};if(!n)return null;let f=Object.keys(aC).filter(e=>n[e]>0),y=f.length>0,v=4===f.length,b=Object.keys(aC);return(0,l.jsxs)(aj.Component,{children:[y&&f.map(e=>(0,l.jsxs)(aj.EmojiButton,{isSelected:o===e,onClick:()=>x(e),children:[(0,l.jsx)(aj.Emoji,{children:(0,l.jsx)(e1.default,{src:aC[e],alt:"",width:18,height:18})}),(0,l.jsx)(aj.Count,{className:"reaction-count is-label-s",isSelected:o===e,children:(0,l.jsx)("span",{className:"number",children:n[e]})})]},e)),(0,l.jsxs)(aj.ReactionEmojisContainer,{children:[r&&(0,l.jsx)(aj.ReactionEmojis,{ref:u,children:b.map(e=>(0,l.jsx)(aj.EmojiButton,{isSelected:o===e,onClick:()=>x(e),children:(0,l.jsx)(aj.Emoji,{children:(0,l.jsx)(e1.default,{src:aC[e],alt:"",width:18,height:18})})},e))}),!v&&(0,l.jsx)(aj.EmojiButton,{ref:m,className:"emoji-alternatives-button",active:r,onClick:()=>s(!r),children:(0,l.jsx)(aj.Emoji,{children:(0,l.jsx)(e1.default,{src:"https://cdn.a-lehdet.fi
819/production/platta/images/emoji-react.png",width:18,height:18,alt:""})})})]})]})};function aI(e){let t=(0,d.useContext)(tA.A),n=t.user?.eevaProfile?.username;return(0,l.jsxs)(aN.Component,{className:e.message.name===n?"is-own-comment":"",children:[(0,l.jsxs)(aN.MetaContainer,{className:"is-body-xs",children:[(0,l.jsx)(aN.Date,{className:"is-label-s",children:function(e){var t=Math.floor((new Date-e)/1e3),n=t/86400;if(n>1){let t=new Date(e).getFullYear()===new Date().getFullYear(),n=new Intl.DateTimeFormat("fi-FI",{...t?{}:{year:"numeric"},month:"2-digit",day:"2-digit"}).format(e),i=new Intl.DateTimeFormat("fi-FI",{hour:"2-digit",minute:"2-digit"}).format(e);return n.toString()+" "+i.replace(".",":").toString()}return(n=t/3600)>1?Math.floor(n)+" tuntia":(n=t/60)>1?Math.floor(n)+" minuuttia":" < 1 minuutti"}(Date.parse(e.message.createdAt))}),(0,l.jsx)(aN.Username,{className:"is-body-xs",children:e.message.name})]}),e.message.parent&&(0,l.jsx)(aN.Parent,{children:(0,l.jsxs)("p",{className:"is-body-xs",children:[(0,l.jsxs)("span",{children:[e.message.parent.name,": "]}),e.message.parent.body]})}),(0,l.jsx)(aN.Body,{className:"is-body-xs",children:e.message.body}),e.canReply&&(0,l.jsxs)(aN.Controls,{children:[n&&e.message.name!==n&&!e.message.parent?(0,l.jsx)("button",{onClick:()=>{e.onReply?.(e.message)},children:"Vastaa"}):null,(0,l.jsx)(aw,{nodeId:e.message.id,reactions:e.message.reactions,ownReaction:e.message.hasReacted})]})]})}let aN={Component:S.Ay.div.withConfig({componentId:"sc-845f2f1b-0"})(["border-radius:8px;padding:16px;box-shadow:rgba(216,172,158,0.2) 0px 6px 12px;background-color:white;&.is-own-comment{align-self:end;background-color:var(--color-primary);> div,> div > *{color:var(--color-on-primary);}}"]),MetaContainer:S.Ay.div.withConfig({componentId:"sc-845f2f1b-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xs);margin-bottom:var(--spacing-md);color:#606060;"]),Date:S.Ay.span.withConfig({componentId:"sc-845f2f1b-2"})([""]),Username:S.Ay.span.withConfig({componentId:"sc-845f2f1b-3"})(["font-weight:700;color:#3e8b77;"]),Parent:S.Ay.div.withConfig({componentId:"sc-845f2f1b-4"})(["border:1px solid #dedede;border-radius:var(--radius-rounded);padding:var(--spacing-md);position:relative;margin-bottom:var(--spacing-md);p{margin:0;padding:0;color:#a9a9a9;span{font-weight:700;}}"]),Body:S.Ay.div.withConfig({componentId:"sc-845f2f1b-5"})([""]),Controls:S.Ay.div.withConfig({componentId:"sc-845f2f1b-6"})(["margin-top:var(--spacing-lg);color:var(--comments--color-grey);> button{background-color:transparent;border:none;margin:0;padding:0;color:var(--comments--color-grey);cursor:pointer;}"])};function aS(e){return(0,l.jsx)(aE.Component,{children:e.messages.map(t=>(0,l.jsx)(aI,{message:t,onReply:t=>e.onReply?.(t),canReply:e.canReply},t.id))})}let aE={Component:S.Ay.div.withConfig({componentId:"sc-443ff65a-0"})(["max-width:780px;width:100%;margin-inline:auto;display:flex;flex-direction:column;gap:var(--spacing-xl);box-sizing:border-box;padding:var(--spacing-xl) var(--block-gutter) var(--spacing-2xl);> *{width:87%;}"])},aT=`
820  mutation createComment($nodeId: ID!, $comment: CommentInput!) {
821    createComment(nodeId: $nodeId, comment: $comment) {
822      id
823      name
824      body
825      createdAt
826    }
827  }
828`;function aP(e){let t=(0,d.useContext)(em.A),{Link:n,getLinkUrl:i}=(0,d.useContext)(R.A),o=(0,d.useContext)(tA.A),a=(0,d.useRef)(),[r,s]=(0,d.useState)(!1),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(),g=(0,tC.usePathname)(),h=(0,d.useContext)(S.Dx),x=(0,d.useMemo)(()=>o.user?.eevaProfile?.username,[o.user]),f=(0,tb.A)(),y=(0,d.useMemo)(()=>"/taydenna-tietosi?"+(0,ai.Ws)({redirect:g}),[g]),{mutate:v,loading:b}=(0,eu.A)({api:t.contentApi,query:aT});(0,d.useEffect)(()=>{!m&&e.messageBeingRepliedTo&&a.current?.focus(),p(e.messageBeingRepliedTo)},[a,m,e.messageBeingRepliedTo]);let C=(0,d.useMemo)(()=>!!o.user||!!o.userLoading&&void 0,[o.user,o.userLoading]);return e.hidden?null:e.discussionEnded?(0,l.jsx)(aL.Component,{children:(0,l.jsxs)(aL.DiscussionEndedMessage,{children:["T\xe4m\xe4 keskustelu on p\xe4\xe4ttynyt, mutta lis\xe4\xe4 puheenaiheita l\xf6yd\xe4t"," ",(0,l.jsx)(n,{href:i({type:"Theme",slug:"eeva-puhe"}),children:"t\xe4\xe4lt\xe4"}),". Kiitos kun osallistut!"]})}):void 0===C?null:!1===C?(0,l.jsx)(aL.Component,{children:(0,l.jsx)(ed.A,{size:"small",href:f,target:"_self",children:"Kirjaudu ja keskustele"})}):o.user&&!o.user.eevaProfile?(0,l.jsx)(aL.Component,{children:(0,l.jsx)(ed.A,{size:"small",href:y,children:"Luo profiili ja keskustele"})}):(0,l.jsx)(aL.Component,{children:(0,l.jsxs)(aL.QuoteAndInputAndButton,{children:[(0,l.jsxs)(aL.QuoteAndInput,{children:[e.messageBeingRepliedTo&&(0,l.jsxs)(aL.Quote,{children:[e.messageBeingRepliedTo.body,(0,l.jsx)(aL.ClearQuoteButton,{onClick:()=>{e.onClearQuote?.(),a.current?.focus()},children:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"xmark",style:"solid"})})})]}),(0,l.jsx)(aL.Input,{rows:1,className:"is-body-xs",value:c,onChange:e=>{var t;let n;u(e.target.value),t=e.target,n=parseInt(h["body-xs-line-height"],10),t.style.height="auto",t.style.height=t.scrollHeight+"px",t.style.maxHeight=4*n+"px"},placeholder:"Kirjoita kommentti!",ref:a,onFocus:()=>{s(!0)},onBlur:()=>{s(!1)}})]}),(0,l.jsx)(aL.Button,{size:"medium",shape:"round",type:"primary",disabled:!c||b,onClick:async()=>{await v({variables:{nodeId:e.messageBeingRepliedTo?.id||e.nodeId,comment:{name:x,body:c}}}),u(""),e.onCommentCreated?.()},children:r||c?(0,l.jsx)(V.g,{icon:(0,H.K)({name:"send",style:"solid"})}):o.user.eevaProfile?.profileImage?(0,l.jsx)(aL.ProfileImage,{url:o.user.eevaProfile.profileImage,alt:"L\xe4het\xe4",width:38,height:38,cover:!0}):(0,l.jsx)(V.g,{icon:(0,H.K)({name:"user",style:"solid"})})})]})})}let aL={Component:S.Ay.div.withConfig({componentId:"sc-85a3f1e3-0"})(["box-sizing:border-box;display:flex;justify-content:center;position:fixed;bottom:0;z-index:11;width:100%;padding:16px;background-color:var(--color-primary-lighten);"]),DiscussionEndedMessage:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-85a3f1e3-1"})(["a{color:inherit;}"]),QuoteAndInputAndButton:S.Ay.div.withConfig({componentId:"sc-85a3f1e3-2"})(["display:flex;flex-direction:row;align-items:flex-end;
828gap:var(--spacing-xs);width:100%;max-width:var(--width-column);color:var(--color-black);"]),QuoteAndInput:S.Ay.div.withConfig({componentId:"sc-85a3f1e3-3"})(["position:relative;display:flex;flex-direction:column;gap:var(--spacing-md);width:100%;background-color:var(--color-surface);padding:var(--spacing-md);border-radius:var(--radius-rounded);"]),Quote:S.Ay.div.attrs({className:"is-body-xs"}).withConfig({componentId:"sc-85a3f1e3-4"})(["border:1px solid #dedede;border-radius:var(--radius-rounded);padding:var(--spacing-md);position:relative;margin-bottom:var(--spacing-md);color:#a9a9a9;"]),Input:S.Ay.textarea.withConfig({componentId:"sc-85a3f1e3-5"})(["padding:0;color:var(--color-black);border:none;resize:none;&::placeholder{color:var(--comments--placeholder-color);}&:focus{outline:none;}"]),ClearQuoteButton:S.Ay.button.withConfig({componentId:"sc-85a3f1e3-6"})(["position:absolute;right:-5px;top:-5px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;border:none;font-size:12px;background-color:#f15c22;color:var(--color-on-primary);cursor:pointer;"]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-85a3f1e3-7"})(["position:relative;overflow:hidden;bottom:","px;"],4),ProfileImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-85a3f1e3-8"})(["position:absolute;top:0;left:0;"])},aM=`
829  fragment CommentsFields on CommentConnection {
830    pageInfo {
831      hasPreviousPage
832      hasNextPage
833    }
834    edges {
835      node {
836        id
837        name
838        createdAt
839        body
840        reactions {
841          type
842          count
843        }
844        hasReacted(clientIdentifier: $clientIdentifier)
845        hasChildren
846        children: comments {
847          edges {
848            node {
849              id
850              name
851              createdAt
852              body
853              hasParent
854            }
855          }
856        }
857      }
858    }
859  }
860`,aB=`
861  query GetComments(
862    $id: ID!
863    $clientIdentifier: String!
864  ) {
865    node(id: $id) {
866      __typename
867      type
868      ... on Article {
869        articleComments: comments {
870          ...CommentsFields
871        }
872      }
873      ... on Question {
874        questionComments: comments {
875          ...CommentsFields
876        }
877      }
878      ... on Video {
879        videoComments: comments {
880          ...CommentsFields
881        }
882      }
883    }
884  }
885  ${aM}
886`,aR={Component:S.Ay.div.withConfig({componentId:"sc-9f051e2d-0"})([""]),NoMessages:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-9f051e2d-1"})(["box-sizing:border-box;margin-inline:auto;width:var(--width-column);max-width:calc(100% - 2 * var(--block-gutter));border-radius:8px;padding:16px;box-shadow:rgba(216,172,158,0.2) 0px 6px 12px;background-color:white;text-align:center;"])},aD={Component:S.Ay.div.withConfig({componentId:"sc-7f77c0d8-0"})(["margin-top:var(--spacing-lg);margin-bottom:var(--spacing-lg);margin:auto;"]),Title:S.Ay.h2.withConfig({componentId:"sc-7f77c0d8-1"})(["margin-bottom:var(--spacing-md);"]),DownloadItem:S.Ay.div.withConfig({componentId:"sc-7f77c0d8-2"})(["display:flex;flex-direction:column;align-items:flex-start;padding:var(--spacing-lg);gap:var(--spacing-md);border-radius:var(--radius-md,8px);border:1px solid var(--color-outline-secondary);background:var(--color-container-tertiary);&:not(:last-child){margin-bottom:var(--spacing-md);}"]),FileName:S.Ay.p.withConfig({componentId:"sc-7f77c0d8-3"})(["display:flex;align-items:center;gap:var(--spacing-sm);margin:0;"]),Filetype:S.Ay.span.withConfig({componentId:"sc-7f77c0d8-4"})([""]),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-7f77c0d8-5"})(["background-color:var(--color-on-surface) !important;"])};function aO(){let{content:e}=(0,d.useContext)(F.A);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E.A,{align:"column",style:{marginBottom:"var(--spacing-lg"},children:(0,l.jsx)(az.Title,{children:"Kysymys"})}),(0,l.jsx)(iL,{type:"Automatic",_preloaded:e?.question})]})}aO.canLazyLoad=!1;let az={Title:S.Ay.h2.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-b72d9601-0"})(["margin-bottom:var(--spacing-lg);border-bottom:2px solid #d3d3d3;padding-bottom:var(--spacing-md);"])};function aF(){let{content:e}=(0,d.useContext)(F.A);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E.A,{align:"column",style:{marginBottom:"var(--spacing-lg"},children:(0,l.jsx)(aU.Title,{children:"Vastaus"})}),e?.respondent&&(0,l.jsx)(E.A,{align:"column",style:{marginBottom:"var(--spacing-lg"},children:(0,l.jsxs)(aU.Respondent,{children:[e.respondent.image&&(0,l.jsx)(aU.RespondentImage,{...e.respondent.image,cover:!0}),(0,l.jsxs)(aU.RespondentInfo,{children:[(0,l.jsxs)(aU.RespondentName,{className:"is-heading-xs",children:["Vastaaja ",(0,l.jsx)("strong",{children:e.respondent.name})]}),(0,l.jsx)(aU.RespondentTitle,{className:"is-label-s",children:e.respondent.jobTitle})]})]})}),(0,l.jsx)(iL,{type:"Automatic",_preloaded:e?.response})]})}aF.canLazyLoad=!1;let aU={Title:S.Ay.h2.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-fb7b5fde-0"})(["margin-bottom:var(--spacing-lg);border-bottom:2px solid #d3d3d3;padding-bottom:var(--spacing-md);"]),Respondent:S.Ay.div.withConfig({componentId:"sc-fb7b5fde-1"})(["display:flex;align-items:center;gap:var(--spacing-sm);"]),RespondentImage:(0,S.Ay)(M.A).withConfig({componentId:"sc-fb7b5fde-2"})(["width:40px;height:40px;flex-basis:auto;flex-grow:0;flex-shrink:0;border-radius:100%;overflow:hidden;"]),RespondentInfo:S.Ay.div.withConfig({componentId:"sc-fb7b5fde-3"})([""]),RespondentName:S.Ay.div.withConfig({componentId:"sc-fb7b5fde-4"})(["color:#202020;"]),RespondentTitle:S.Ay.div.withConfig({componentId:"sc-fb7b5fde-5"})(["color:#606060;"])};var a$=n(29924),aH=n(15750),aV=n(50901),aq=n(52620),aK=n(52670);let aG=(0,l.jsxs)("svg",{width:"54",height:"17",viewBox:"0 0 54 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M16.1709 4.31549H14.2743L12.2137 7.42441C11.7289 8.16016 11.7289 9.11953 12.2137 9.84807L14.2743 12.957H16.1709L13.3118 8.63624L16.1709 4.31549Z",fill:"#CC7861"}),(0,l.jsx)("path",{d:"M0.69154 12.957H2.58813L4.64872 9.84807C5.13356 9.11231 5.13356 8.15295 4.64872 7.42441L2.58813 4.31549H0.69154L3.55069 8.63624L0.69154 12.957Z",fill:"#17402B"}),(0,l.jsx)("path",{d:"M12.7056 16.4698V14.5511L9.63257 12.4664C8.9053 11.9759 7.95701 11.9759 7.23687 12.4664L4.16382 14.5511V16.4698L8.43472 13.5773L12.7056 16.4698Z",fill:"#7D9C8C"}),(0,l.jsx)("path",{d:"M4.16382 0.809753V2.72848L7.23687 4.81312C7.96414 5.30362 8.91243 5.30362 9.63257 4.81312L12.7056 2.72848V0.809753L8.43472 3.70227L4.16382 0.809753Z",fill:"#E3BAAD"}),(0,l.jsx)("path",{d:"M21.2763 10.4358H23.1531C23.1531 10.9686 23.6798 11.3851 24.3213 11.3851C24.9629 11.3851 25.3938 11.0751 25.3938 10.5229C25.3938 9.97078 25.2118 9.89328 24.4841 9.65111L23.5074 9.3508C21.6881 8.85676 21.3434 7.72337 21.3434 6.93872C21.3434 5.43721 22.6073 4.38132 24.2543 4.38132C25.9013 4.38132 27.0407 5.34034 27.0407 6.95809H25.1639C25.1639 6.46405 24.8671 6.03781 24.216 6.03781C23.5649 6.03781 23.2489 6.43498 23.2489 6.89997C23.2489 7.36495 23.2968 7.44244 24.0628 7.66525L24.9246 7.94617C26.0928 8.31428 27.2993 8.91489 27.2993 10.4261C27.2993 11.9373 25.7672 13.0222 24.2543 13.0222C22.7414 13.0222 21.2763 11.976 21.2763 10.4454V10.4358Z",fill:"black"}),(0,l.jsx)("path",{d:"M33.5712 4.52637H35.448V12.867H33.5712V9.57335H30.8518V12.867H28.975V4.52637H30.8518V7.86842H33.5712V4.52637Z",fill:"black"}),(0,l.jsx)("path",{d:"M37.1136 8.69207C37.1136 6.32842 38.9712 4.38132 41.3268 4.38132C43.6823 4.38132 45.5303 6.32842 45.5303 8.69207C45.5303 11.0557 43.6536 13.0125 41.3268 13.0125C38.9999 13.0125 37.1136 11.0557 37.
8861136 8.69207ZM43.6344 8.69207C43.6344 7.29713 42.6865 6.17343 41.3172 6.17343C39.9479 6.17343 39.0095 7.29713 39.0095 8.69207C39.0095 10.087 39.9287 11.2204 41.3172 11.2204C42.7056 11.2204 43.6344 10.0773 43.6344 8.69207Z",fill:"black"}),(0,l.jsx)("path",{d:"M50.5768 4.52637C52.4918 4.52637 53.3536 5.90194 53.3536 7.28719C53.3536 8.67245 52.4918 10.0383 50.5768 10.0383H49.0543V12.867H47.1775V4.52637H50.5768ZM50.4906 8.37215C51.1991 8.37215 51.4577 7.8103 51.4577 7.28719C51.4577 6.76409 51.1896 6.18286 50.5001 6.18286H49.0543V8.37215H50.4906Z",fill:"black"})]});function aW({adNoticeStyle:e,AdDivider:t,AdLogo:n}){return e?(0,l.jsxs)(l.Fragment,{children:["ad"===e.divider?(0,l.jsx)(t,{placement:"top",visible:!0}):"shop"===e.divider?(0,l.jsx)(t,{placement:"top",visible:!0,text:aG}):null,"shop"===e.logo?(0,l.jsx)(n,{children:(0,l.jsx)(e1.default,{width:133,height:30,src:"https://assets.kotona.com/u8qcultfeckn/7h7oBXcn19pVnzD8X0gwM1/c7f070f8d9c7d770048f7c6e830daafe/kotona-shop-logo-big_Xcq1j.avif",style:{marginInline:"auto"},unoptimized:!0,alt:""})}):null]}):null}function aY({adNoticeStyle:e,AdDivider:t}){return e?.divider!=="ad"?null:(0,l.jsx)(t,{placement:"bottom",visible:!0})}function a_(e){let t=(0,d.useContext)(y.A),n=(0,d.useContext)(F.A),{data:i,loading:o}=(0,a$.A)({query:`
887      query Collection(
888        $collectionId: ID!
889      ) {
890        collection(
891          id: $collectionId
892        ) {
893          products(
894            first: 24
895          ) {
896            nodes {
897              ...ProductFull
898            }
899          }
900        }
901      }
902      ${aH.zh}
903    `,variables:{collectionId:`gid://shopify/Collection/${e.collectionId}`},skip:!!e._preloaded}),a=e._preloaded||i?.collection,r=(0,aK.PQ)(e.notice,t,n.content),s=(0,i3.A)();return!a&&o?(0,l.jsx)(aJ,{...e}):a&&a.products?(0,l.jsxs)(E.A,{"data-nosnippet":!0,align:"full",backgroundColor:r?"var(--kaupat-color-primary-lighten-secondary)":void 0,children:[(0,l.jsx)(aW,{adNoticeStyle:r,AdDivider:aX.AdDivider,AdLogo:aX.AdLogo}),(0,l.jsxs)(aX.Component,{className:ts()(!0===s&&"no-media"),children:[e.title&&(0,l.jsx)(aX.Heading,{children:e.title}),(0,l.jsx)(iw.A,{items:a.products.nodes,renderItem:t=>(0,l.jsx)(aX.Slide,{children:(0,l.jsx)(aV.A,{product:t,utmParam:e.utmParam,clickTrack:e.clickTrack,noMedia:!0===s},t.id)})})]}),(0,l.jsx)(aY,{adNoticeStyle:r,AdDivider:aX.AdDivider})]}):null}function aJ(e){let t=(0,d.useContext)(y.A),n=(0,d.useContext)(F.A),i=(0,aK.PQ)(e.notice,t,n.content),o=(0,d.useMemo)(()=>[...[,,,,].fill()],[]);return(0,l.jsxs)(E.A,{"data-nosnippet":!0,align:"full",backgroundColor:i?"var(--kaupat-color-primary-lighten-secondary)":void 0,children:[(0,l.jsx)(aW,{adNoticeStyle:i,AdDivider:aX.AdDivider,AdLogo:aX.AdLogo}),(0,l.jsxs)(aX.Component,{children:[e.title&&(0,l.jsx)(aX.Heading,{children:e.title}),(0,l.jsx)(iw.A,{items:o,renderItem:(e,t)=>(0,l.jsx)(aX.Slide,{children:(0,l.jsx)(aV.U,{},t)})})]}),(0,l.jsx)(aY,{adNoticeStyle:i,AdDivider:aX.AdDivider})]})}a_.canLazyLoad=!1;let aX={Component:S.Ay.div.withConfig({componentId:"sc-d7c1aadc-0"})(["--promo--title-min-lines:2;padding-top:var(--spacing-xl);padding-bottom:var(--spacing-2xl);@media (min-width:","){max-width:calc(var(--width-extra-wide) + 2 * 16px);margin-inline:auto;}&.no-media{--promo--media-display:none;}"],e=>e.theme["breakpoint-desktop"]),Heading:S.Ay.h2.attrs({className:"is-heading-kaupat_xl"}).withConfig({componentId:"sc-d7c1aadc-1"})(["margin-bottom:var(--spacing-lg);padding-inline:var(--spacing-xl);text-align:center;"]),Slide:S.Ay.div.withConfig({componentId:"sc-d7c1aadc-2"})(["width:var(--width-258);"]),AdDivider:(0,S.Ay)(aq.A).withConfig({componentId:"sc-d7c1aadc-3"})([""," "," > *{width:100%;}svg{display:block;}"],e=>"top"===e.placement&&`
904      top: -22px;
905    `,e=>"bottom"===e.placement&&`
906      top: 22px;
907    `),AdLogo:S.Ay.div.withConfig({componentId:"sc-d7c1aadc-4"})(["text-align:center;padding:var(--spacing-sm) var(--spacing-lg);margin-top:var(--spacing-md);margin-bottom:calc(var(--spacing-sm) - var(--spacing-xl));"])};function aZ(e){let t=(0,d.useContext)(y.A),n=(0,d.useContext)(F.A),i=(0,d.useMemo)(()=>`gid://shopify/Product/${e.productId}`,[e.productId]),{data:o,loading:a}=(0,a$.A)({query:`
908      query Product(
909        $productId: ID!
910      ) {
911        product(
912          id: $productId
913        ) {
914          ...ProductFull
915        }
916      }
917      ${aH.zh}
918    `,variables:{productId:i},skip:!!e._preloaded}),r=e._preloaded||o?.product,s=(0,aK.PQ)(e.notice,t,n.content),c=!!s,u=(0,i3.A)();return!r&&a?(0,l.jsx)(aQ,{...e}
918):r?(0,l.jsxs)(E.A,{"data-nosnippet":!0,backgroundColor:c?"var(--kaupat-color-primary-lighten-secondary)":void 0,children:[(0,l.jsx)(aW,{adNoticeStyle:s,AdDivider:a0.AdDivider,AdLogo:a0.AdLogo}),(0,l.jsxs)(a0.Component,{className:ts()(c&&"has-background",!0===u&&"no-media"),children:[e.title&&(0,l.jsx)(a0.Heading,{children:e.title}),(0,l.jsx)(aV.A,{product:r,isBig:!0,utmParam:e.utmParam,clickTrack:e.clickTrack,noMedia:!0===u})]}),(0,l.jsx)(aY,{adNoticeStyle:s,AdDivider:a0.AdDivider})]}):null}function aQ(e){let t=(0,d.useContext)(y.A),n=(0,d.useContext)(F.A),i=(0,aK.PQ)(e.notice,t,n.content),o=!!i;return(0,l.jsxs)(E.A,{"data-nosnippet":!0,backgroundColor:o?"var(--kaupat-color-primary-lighten-secondary)":void 0,children:[(0,l.jsx)(aW,{adNoticeStyle:i,AdDivider:a0.AdDivider,AdLogo:a0.AdLogo}),(0,l.jsxs)(a0.Component,{className:o?"has-background":"",children:[e.title&&(0,l.jsx)(a0.Heading,{children:e.title}),(0,l.jsx)(aV.U,{isBig:!0})]}),(0,l.jsx)(aY,{adNoticeStyle:i,AdDivider:a0.AdDivider})]})}aZ.canLazyLoad=!1;let a0={Component:S.Ay.div.withConfig({componentId:"sc-f58bc07c-0"})(["&.has-background{padding-top:var(--spacing-xl);padding-bottom:var(--spacing-2xl);}&.no-media{--promo--media-display:none;}"]),Heading:S.Ay.h2.attrs({className:"is-heading-kaupat_xl"}).withConfig({componentId:"sc-f58bc07c-1"})(["margin-bottom:var(--spacing-lg);padding-inline:var(--spacing-xl);text-align:center;"]),AdDivider:(0,S.Ay)(aq.A).withConfig({componentId:"sc-f58bc07c-2"})([""," "," > *{width:100%;}svg{display:block;}"],e=>"top"===e.placement&&`
919    top: -22px;
920  `,e=>"bottom"===e.placement&&`
921    top: 22px;
922  `),AdLogo:S.Ay.div.withConfig({componentId:"sc-f58bc07c-3"})(["text-align:center;padding:var(--spacing-sm) var(--spacing-lg);margin-top:var(--spacing-md);margin-bottom:calc(var(--spacing-sm) - var(--spacing-xl));"])};var a1=n(67658),a2=n(61413);function a3(){let{content:e}=(0,d.useContext)(F.A),{getLinkUrl:t}=(0,d.useContext)(R.A),n=e?.category,i=e?.themes?.edges.map(e=>e.node);
922if(n||i)return(0,l.jsx)(E.A,{children:(0,l.jsxs)(a5.Component,{children:[n&&(0,l.jsx)(a2.A,{linkUrl:t(n),children:n.title}),i&&i.map(e=>(0,l.jsx)(a2.A,{title:e.title,linkUrl:t(e),children:e.title},e.slug))]})})}a3.canLazyLoad=!1;let a5={Component:S.Ay.div.withConfig({componentId:"sc-b7a0fa32-0"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-sm);"])},a4="https://tunnus.a-lehdet.fi",a8="meillakotona";function a7({label:e,image:t,linkLabel:n,linkUrl:i,linkOnClick:o,disabled:a}){let{Link:r}=(0,d.useContext)(R.A);return(0,l.jsx)(a6.Component,{as:r,href:i,"data-click-element-name":"DataListLink",onClick:o,disabled:a,children:(0,l.jsxs)(a6.Container,{children:[(0,l.jsxs)(a6.ImageAndLabel,{children:[t?(0,l.jsx)(a6.ImageContainer,{children:t}):null,e?(0,l.jsx)(a6.Label,{children:e}):null]}),(0,l.jsx)(a6.LinkLabel,{children:n})]})})}let a6={Component:S.Ay.a.withConfig({componentId:"sc-3538c500-0"})(["color:var(--color-on-surface-primary);display:flex;flex-direction:column;padding:var(--spacing-lg) 0;border-bottom:1px solid var(--color-outline-secondary);text-decoration:none;&[disabled]{color:var(--color-on-surface-disabled);}"]),Container:S.Ay.div.withConfig({componentId:"sc-3538c500-1"})(["color:var(--color-on-surface);display:flex;justify-content:space-between;align-items:center;"]),ImageAndLabel:S.Ay.div.withConfig({componentId:"sc-3538c500-2"})(["display:flex;align-items:center;gap:var(--spacing-sm);"]),Label:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-3538c500-3"})([""]),ImageContainer:S.Ay.div.withConfig({componentId:"sc-3538c500-4"})(["flex-grow:0;"]),LinkLabel:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-3538c500-5"})(["appearance:none;background:none;border:0;outline:none;text-decoration:underline;"])};function a9(){let e,t,n,i,o,a=(0,d.useContext)(er.Ay),r=(0,d.useContext)(tA.A),s=(e=(0,d.useContext)(tA.A),t=(0,tC.usePathname)(),n=(0,N.A)(e=>e.consent),i=(0,N.A)(e=>e.hasConsentForGoogleAnalytics),o=(0,N.A)(e=>e.getConsentedPurposesString),{url:(0,d.useMemo)(()=>`${a4}/oma-tunnus?`+(0,ai.Ws)({from:a8,return:"tunnus:/oma-tunnus",state:t,ga:i?"1":"0",purposes:o(),consent:n||""}),[t,i,o]),urlWithLogin:(0,d.useMemo)(()=>{if(e.tokens?.refreshToken)return`${a4}/kirjaudu/sso?`+(0,ai.Ws)({from:a8,return:"tunnus:/oma-tunnus",state:t,ga:i?"1":"0",purposes:o(),consent:n||"",refreshToken:e.tokens.refreshToken})},[t,i,o,e.tokens?.refreshToken])}),c=a.customer?.isImpersonated;return r.user?(0,l.jsxs)(ef.A,{children:[(0,l.jsxs)(ev.A,{children:["A-tunnus",c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:"has-universal-danger-color is-label-l",style:{display:"block",marginTop:"var(--spacing-sm)"},children:"Huom! A-tunnuksen tiedot ovat admink\xe4ytt\xe4j\xe4n, eiv\xe4t asiakkaan!"})]})]}),(0,l.jsx)(ey.A,{label:"Nimi",value:[r.user.firstName,r.user.lastName].filter(e=>!!e).join(" ")||void 0}),(0,l.jsx)(ey.A,{label:"S\xe4hk\xf6postiosoite",value:r.user.email}),(0,l.jsx)(ey.A,{label:"Puhelinnumero",value:r.user.phoneNumber}),(0,l.jsx)(ey.A,{label:"Syntym\xe4vuosi",value:r.user.birthYear?.toString()}),(0,l.jsx)(a7,{label:"Muokkaa A-tunnus-palvelussa",linkUrl:s.urlWithLogin||s.url,linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"external-link",style:"light"})})})]}):(0,l.jsx)(re,{})}function re(){let e=(0,d.useContext)(S.Dx);return(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ev.A,{children:"A-tunnus"}),(0,l.jsx)(ey.A,{label:"Nimi",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]})}),(0,l.jsx)(ey.A,{label:"S\xe4hk\xf6postiosoite",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]})}),(0,l.jsx)(ey.A,{label:"Puhelinnumero",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]})}),(0,l.jsx)(ey.A,{label:"Syntym\xe4vuosi",value:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-xs-line-height"]})}),(0,l.jsx)(a7,{label:"Muokkaa A-tunnus-palvelussa",linkLabel:(0,l.jsx)(V.g,{icon:(0,H.K)({name:"external-link",style:"light"})})})]})}function rt(){return(0,l.jsx)(E.A,{children:(0,l.jsx)(a9,{})})}rt.canLazyLoad=!1;var rn=n(28066);let ri={Component:S.Ay.div.withConfig({componentId:"sc-be2425ae-0"})(["padding:var(--spacing-2xl) var(--spacing-xl);text-align:center;border-radius:12px;border:1px solid var(--color-primary);background-color:var(--color-surface);"]),Heading:S.Ay.h2.withConfig({componentId:"sc-be2425ae-1"})(["margin-bottom:var(--spacing-md);"]),CtaText:S.Ay.p.withConfig({componentId:"sc-be2425ae-2"})(["margin-top:var(--spacing-md);"]),SocialLinks:S.Ay.div.withConfig({componentId:"sc-be2425ae-3"})(["display:flex;flex-wrap:wrap;justify-content:center;gap:var(--spacing-md);margin-top:var(--spacing-lg);"]),SocialLink:(0,S.Ay)(ed.A).withConfig({componentId:"sc-be2425ae-4"})(["flex-basis:calc(50% - var(--spacing-md) / 2);display:flex;align-items:center;gap:var(--spacing-xs);color:#fff;&:not(.is-hide-name){min-width:calc(50% - var(--spacing-md) / 2);}&.is-hide-name{flex-basis:40px;width:40px;height:40px;border-radius:50%;padding:0;}&.facebook{background-color:#1877f2;}&.instagram{background-color:#e4405f;}&.whatsapp{background-color:#25d366;}&.pinterest{background-color:#bd081c;}&.threads{background-color:#000;}&.bluesky{background-color:#1877f2;}"]),Icon:(0,S.Ay)(V.g).withConfig({componentId:"sc-be2425ae-5"})(["width:18px;height:18px;"]),Name:S.Ay.span.withConfig({componentId:"sc-be2425ae-6"})(["position:relative;top:var(--follow-us-block--label-adjustment);"])};var ro=n(12660);let ra=(0,d.createContext)(void 0),rr=e=>{let[t,n]=(0,d.useState)({}),i=(0,d.useCallback)(e=>t[e]?.blockId,[t]),o=(0,d.useCallback)((e,t)=>i(e)===t,[i]),a=(0,d.useCallback)((e,i,o)=>{let a=t[e];return!(a?.priority<=o)&&(t[e]={groupId:e,blockId:i,priority:o},n({...t}),!0)},[t]),r=(0,d.useMemo)(()=>({getShownBlock:i,isBlockShown:o,maybeShowBlock:a}),[i,o,a]);return(0,l.jsx)(ra.Provider,{value:r,children:e.children})};var rs=n(51145);let rl=`
923  mutation RequestNonAuthCreditCardUpdate(
924    $customerNumber: ID!
925    $returnUrl: String!
926  ) {
927    requestNonAuthCreditCardUpdate(
928      customerNumber: $customerNumber
929      returnUrl: $returnUrl
930    )
931  }
932`;function rc(){let e=(0,d.useContext)(em.A),t=(0,tC.useSearchParams)(),n=(0,d.useMemo)(()=>t.get("asiakasnumero"),[t]),i=(0,d.useMemo)(()=>
932{if(n)return"https://www.meillakotona.fi/luottokorttivahvistus?asiakasnumer="+n},[n]),o=(0,eu.A)({api:e.aspaApi,query:rl}),a=(0,d.useMemo)(()=>o.errors?.find(e=>e.extensions?.code==="CustomerNotExists"),[o.errors]),r=(0,d.useMemo)(()=>o.errors?.find(e=>e.extensions?.code==="CustomerCreditCardNotExists"),[o.errors]);return(0,l.jsx)(E.A,{children:(0,l.jsxs)("div",{style:{textAlign:"center"},children:[(0,l.jsx)(ed.A,{disabled:!i||!n||o.loading,onClick:async()=>{let e=await o.mutate({variables:{customerNumber:n,returnUrl:i}}),t=e?.requestNonAuthCreditCardUpdate;t&&(window.location.href=t)},children:"P\xe4ivit\xe4 luottokorttitietosi klikkaamalla t\xe4st\xe4"}),(o.error||o.errors?.length>0)&&(0,l.jsx)("p",{className:"has-universal-danger-color is-body-s",style:{marginTop:"var(--spacing-lg)"},children:a?"Asiakastietoja ei l\xf6ytynyt. Olethan yhteydess\xe4 asiakaspalveluun.":r?"Luottokorttitietoja ei l\xf6ytynyt. Olethan yhteydess\xe4 asiakaspalveluun.":"Jotain meni vikaan. Yrit\xe4 uudestaan."})]})})}let rd=`
933  mutation RequestNonAuthCreditCardUpdate(
934    $customerNumber: ID!
935    $returnUrl: String!
936  ) {
937    requestNonAuthCreditCardUpdate(
938      customerNumber: $customerNumber
939      returnUrl: $returnUrl
940    )
941  }
942`,ru=`
943  mutation RequestCreditCardUpdate(
944    $viewerId: ID!
945    $returnUrl: String!
946  ) {
947    requestCreditCardUpdate(
948      viewerId: $viewerId
949      returnUrl: $returnUrl
950    )
951  }
952`,rm=`
953  mutation SendNonAuthCreditCardUpdateNotification(
954    $customerNumber: ID!
955  ) {
956    sendNonAuthCreditCardUpdateNotification(
957      customerNumber: $customerNumber
958    )
959  }
960`,rp=`
961  mutation SendCreidtCardUpdateNotification(
962    $viewerId: ID!
963  ) {
964    sendCreditCardUpdateNotification(
965      viewerId: $viewerId
966    )
967  }
968`;function rg(){let[e,t]=(0,d.useState)(!1),n=(0,d.useContext)(em.A),i=(0,d.useContext)(tA.A),o=(0,tC.useSearchParams)(),a=(0,d.useMemo)(()=>o.get("RETURN_CODE"),[o]),r=(0,d.useMemo)(()=>o.get("viewer"),[o]),s=(0,d.useMemo)(()=>o.get("asiakasnumero"),[o]),c=(0,eu.A)({api:n.aspaApi,query:rd}),u=(0,eu.A)({api:n.aspaApiAuthenticated,query:ru}),m=(0,eu.A)({api:n.aspaApi,query:rm}),p=(0,eu.A)({api:n.aspaApiAuthenticated,query:rp}),g=(0,d.useMemo)(()=>c.loading||u.loading||m.loading||p.loading||!1,[c.loading,u.loading,m.loading,p.loading]),h=(0,d.useMemo)(()=>c.error||c.errors?.length>0||u.error||u.errors?.length>0||m.error||m.errors?.length>0||p.error||p.errors?.length>0,[c,u,m,p]),x=(0,d.useMemo)(()=>{if(s||r)return"https://www.meillakotona.fi/luottokorttivahvistus?"+[s?"asiakasnumero="+s:void 0,r?"viewer="+r:void 0].filter(Boolean).join("&")},[r,s]);return((0,d.useEffect)(()=>{e||"0"===a&&(r&&n.aspaApiAuthenticated?(t(!0),p.mutate({variables:{viewerId:r}})):s&&(t(!0),m.mutate({variables:{customerNumber:s}})))},[e,n.aspaApiAuthenticated,m,p,a,r,s]),"0"!==a)?(0,l.jsxs)(E.A,{children:[(0,l.jsx)("div",{className:"is-heading-m",children:"Hups! Jotain meni pieleen."}),(0,l.jsx)("p",{style:{marginTop:"var(--spacing-lg)"},children:"Luottokorttitietojasi ei ole viel\xe4 p\xe4ivitetty. Tarkistathan antamasi tiedot ja yrit\xe4t uudelleen."}),x&&s?(0,l.jsx)(ed.A,{disabled:g,onClick:async()=>{let e=await c.mutate({variables:{customerNumber:s,returnUrl:x}}),t=e?.requestNonAuthCreditCardUpdate;t&&(window.location.href=t)},children:"Yrit\xe4 uudelleen"}):x&&r&&n.aspaApiAuthenticated&&(0,l.jsx)(ed.A,{disabled:g,onClick:async()=>{let e=await u.mutate({variables:{viewerId:r,returnUrl:x}}),t=e?.requestCreditCardUpdate;t&&(window.location.href=t)},children:"Yrit\xe4 uudelleen"}),h&&(0,l.jsx)("p",{className:"has-universal-danger-color is-body-s",style:{marginTop:"var(--spacing-lg)"},children:"Jotain meni vikaan. Yrit\xe4 uudestaan."})]}):(0,l.jsxs)(E.A,{children:[(0,l.jsxs)("div",{className:"is-heading-m",children:[(0,l.jsx)(V.g,{className:"has-universal-success-color",icon:(0,H.K)({name:"circle-check",style:"regular"})})," ","Muutos onnistui"]}),(0,l.jsxs)("p",{style:{marginTop:"var(--spacing-lg)"},children:["Kiitos! Olemme vastaanottaneet p\xe4ivitetyt luottokorttitiedot. Tilauksesi jatkuu normaalisti."," ",(0,l.jsx)("strong",{children:"Mukavia lukuhetki\xe4!"})]}),i.user&&(0,l.jsx)(ed.A,{href:"/laskut",children:"Jatka"})]})}let rh=eF.A;function rx(e){let t=e.pricingText!==e.originalPricingText,n=e.termLength?`${e.termLength} kk,`:void 0;return(0,l.jsx)(ry.Component,{children:(0,l.jsx)(tT.A,{style:"vertical_product_promo",target:"_blank",image:{url:e.productImageUrl},title:e.slogan,kicker:e.productTitle,extraContent:(0,l.jsxs)(l.Fragment,{children:["ribbon"===e.pullElement&&(0,l.jsx)(ry.Badge,{children:e.pullElementText}),(0,l.jsxs)(ry.ExtraContent,{children:[(0,l.jsxs)(ry.PriceContainer,{children:[(0,l.jsx)(ry.TermLength,{children:n}),(0,l.jsxs)(ry.Price,{$isOnSale:t,children:["alk. ",e.pricingText," €"]}),t&&(0,l.jsxs)(ry.OriginalPrice,{children:[e.originalPricingText," €"]})]}),(0,l.jsx)(ry.Button,{href:e.url,target:"_blank",children:"Osta"})]})]})})})}function rf(){return(0,l.jsx)(tT.A,{placeholder:!0,style:"vertical_product_promo",title:(0,l.jsx)(rh,{alignCenter:!0,length:"medium",lines:2}),kicker:(0,l.jsx)(rh,{alignCenter:!0,length:"short",style:{width:"60px",height:"16px"}}),extraContent:(0,l.jsxs)(ry.ExtraContent,{children:[(0,l.jsx)(ry.Price,{$isOnSale:!1,children:(0,l.jsx)(rh,{alignCenter:!0,length:"short",style:{marginTop:"var(--spacing-sm)",marginBottom:"var(--spacing-lg)"}})}),(0,l.jsx)(ry.Button,{placeholder:!0,children:"Osta"})]})})}let ry={Component:S.Ay.div.withConfig({componentId:"sc-831e7a15-0"})(["border:1px solid var(--color-primary-lighten);border-radius:var(--radius-rounded);"]),ExtraContent:S.Ay.div.withConfig({componentId:"sc-831e7a15-1"}
968)([""]),OriginalPrice:S.Ay.div.withConfig({componentId:"sc-831e7a15-2"})(["color:var(--color-universal-gray-800);text-decoration:line-through;text-align:center;"]),Price:S.Ay.div.withConfig({componentId:"sc-831e7a15-3"})(["color:var(--color-universal-gray-800);",""],e=>e.$isOnSale&&`
969    color: var(--color-universal-success);
970    `),Button:(0,S.Ay)(ed.A).withConfig({componentId:"sc-831e7a15-4"})(["width:100%;"]),PriceContainer:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-831e7a15-5"})(["display:flex;align-items:center;justify-content:center;gap:var(--spacing-sm);margin-top:var(--spacing-sm);margin-bottom:var(--spacing-lg);"]),TermLength:S.Ay.div.withConfig({componentId:"sc-831e7a15-6"})(["color:var(--color-universal-gray-800);"]),SmallPrint:S.Ay.div.attrs({className:"is-label-s"}).withConfig({componentId:"sc-831e7a15-7"})(["margin-top:var(--spacing-md);color:var(--color-on-container-dim-secondary);"]),Badge:S.Ay.div.attrs({className:"is-label-l"}).withConfig({componentId:"sc-831e7a15-8"})(["position:absolute;top:0;right:0;display:flex;gap:var(--spacing-xs);align-items:center;border:1px solid var(--color-universal-success);border-radius:0 var(--radius-md) 0 var(--radius-md);padding:var(--spacing-xs) var(--spacing-sm);color:var(--color-on-primary);background-color:var(--color-universal-success);white-space:nowrap;box-shadow:var(--shadow-lg);"])};function rv(){let e=(0,d.useContext)(er.Ay),[t,n]=(0,d.useState)(),{data:i}=nu({productId:void 0,productName:void 0}),o=(0,d.useMemo)(()=>e.offers?.map(e=>{let t=Array.isArray(i)?i.find(t=>t.magazineCode===e.productCode):i?.magazineCode===e.productCode?i:null;return{...e,slogan:t?.slogan}}),[e.offers,i]);return e.offers?.length===0||e.offersError?null:o?(0,l.jsx)(E.A,{align:"full",backgroundColor:"var(--color-container)",children:(0,l.jsxs)(rb.Component,{children:[(0,l.jsx)(rb.Carousel,{ref:e=>{n(e)},children:o.map((e,t)=>(0,l.jsx)(rb.Slide,{children:(0,l.jsx)(rx,{...e})},t))}),(0,l.jsx)(rb.PaginationContainer,{children:(0,l.jsx)(G.A,{carouselEl:t})})]})}):(0,l.jsx)(E.A,{align:"full",backgroundColor:"var(--color-container)",children:(0,l.jsxs)(rb.Component,{children:[(0,l.jsx)(rb.Carousel,{ref:e=>{n(e)},children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(rb.Slide,{children:(0,l.jsx)(rf,{})},t))}),(0,l.jsx)(rb.PaginationContainer,{children:(0,l.jsx)(G.A,{carouselEl:t})})]})})}rv.canLazyLoad=!1;let rb={Component:S.Ay.div.withConfig({componentId:"sc-3c44015b-0"})(["position:relative;padding:var(--spacing-xl) 0;--content-card--media-aspect-ratio:3/2;--content-card--border-radius:var(--radius-rounded);@media (min-width:","){max-width:calc(var(--width-extra-wide) + 2 * 16px);margin-inline:auto;}&:not(.is-card-style-horizontal-author):not(.is-card-style-vertical-author){--promo--title-min-lines:2;}&.is-horoscope{padding:var(--spacing-2xl) 0;}"],e=>e.theme["breakpoint-desktop"]),Carousel:S.Ay.div.withConfig({componentId:"sc-3c44015b-1"})(["display:flex;align-items:stretch;gap:16px;max-width:100%;padding-top:4px;padding-bottom:4px;overflow-y:hidden;overflow-x:auto;scroll-padding:16px;scroll-behavior:smooth;scroll-snap-type:x mandatory;.is-card-style-author &{gap:var(--spacing-md);}scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),Slide:S.Ay.div.withConfig({componentId:"sc-3c44015b-2"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);flex-grow:0;flex-shrink:0;width:258px;max-width:calc(100vw - 4 * 16px);scroll-snap-align:start;&:first-child{padding-left:16px;}&:last-child{padding-right:16px;}> *{height:100%;}"]),PaginationContainer:S.Ay.div.withConfig({componentId:"sc-3c44015b-3"})(["margin-top:var(--spacing-lg);@media (min-width:","){margin-top:var(--spacing-xl);}"],e=>e.theme["breakpoint-tablet"])};function rC(e){let t=(0,d.useContext)(er.Ay),n=(0,d.useMemo)(()=>!!e.agreement.endDate,[e.agreement]),i=tZ(e.agreement);return(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:e.agreement.productText,image:e.agreement.productImageUrl?{url:e.agreement.productImageUrl}:null,"data-click-element-name":"AgreementDetailsPromo","data-agreement-id":e.agreement.i
970d,"data-product-code":e.agreement.product,"data-product-name":e.agreement.productText,"data-term-number":null,extraContent:(0,l.jsx)(rk.ExtraContent,{children:(0,l.jsx)(rk.StatusText,{className:["is-label-l","is-color-"+i].join(" "),children:e.agreement.endDate?(0,l.jsxs)(l.Fragment,{children:["Tilauksesi p\xe4\xe4ttyy ",(0,eU.Yq)(e.agreement.endDate)]}):(0,l.jsx)(l.Fragment,{children:e.agreement.status})})}),afterContent:(0,l.jsxs)(rk.AfterContent,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Saaja",value:e.agreement.recipientText||t.customerDisplayName}),!n&&e.agreement.orderDate&&(0,l.jsx)(ey.A,{label:"Tilauksen alkup\xe4iv\xe4",value:(0,eU.Yq)(e.agreement.orderDate)}),!n&&e.agreement.nextPaymentDate&&(0,l.jsx)(ey.A,{label:"Seuraava maksup\xe4iv\xe4",value:(0,eU.Yq)(e.agreement.nextPaymentDate)}),!n&&e.agreement.pricingText&&(0,l.jsx)(ey.A,{label:"Hinta",value:e.agreement.pricingText}),e.agreement.endDate&&(0,l.jsx)(ey.A,{label:"Tilauksen p\xe4\xe4ttymisp\xe4iv\xe4",value:(0,eU.Yq)(e.agreement.endDate)})]}),(0,l.jsx)(rk.ActionButtons,{children:!n&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartCancelAgreementButton",href:`/digitilaukset/${e.agreement.id}/peruuta`,type:"secondary",size:"medium",children:"Peruuta tilaus"})})]})})}function rA(){let e=(0,d.useContext)(S.Dx);return(0,l.jsx)(tT.A,{placeholder:!0,style:"horizontal_subscription",title:(0,l.jsx)(eF.A,{length:"short",lineHeight:e["heading-m-line-height"]}),extraContent:(0,l.jsx)(rk.ExtraContent,{children:(0,l.jsx)("div",{style:{flex:"1 1 auto"},children:(0,l.jsx)(eF.A,{length:"medium",lineHeight:e["label-l-line-height"]})})}),afterContent:(0,l.jsxs)(rk.AfterContent,{children:[(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:"Saaja",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Tilauksen alkup\xe4iv\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Seuraava maksup\xe4iv\xe4",value:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(ey.A,{label:"Hinta",value:(0,l.jsx)(eF.A,{length:"short"})})]}),(0,l.jsxs)(rk.ActionButtons,{children:[(0,l.jsx)(ed.A,{size:"medium",placeholder:!0}),(0,l.jsx)(ed.A,{size:"medium",placeholder:!0})]})]})})}let rk={ExtraContent:S.Ay.div.withConfig({componentId:"sc-9504126f-0"})(["flex-grow:1;display:flex;align-items:flex-end;color:var(--color-on-surface-secondary);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),StatusText:S.Ay.div.withConfig({componentId:"sc-9504126f-1"})(["margin-top:var(--spacing-xs);&.is-color-positive{color:var(--color-universal-success);}&.is-color-negative{color:var(--color-universal-danger);}"]),AfterContent:S.Ay.div.withConfig({componentId:"sc-9504126f-2"})(["margin-top:var(--spacing-lg);border-top:1px solid var(--color-outline-secondary);"]),ActionButtons:S.Ay.div.withConfig({componentId:"sc-9504126f-3"})(["display:flex;flex-direction:column;gap:var(--spacing-md);margin-top:var(--spacing-xl);&:empty{display:none;}"])},rj={Container:S.Ay.div.withConfig({componentId:"sc-76365e72-0"})(["border-radius:var(--radius-lg);border:1px solid var(--color-outline-secondary);padding:var(--spacing-md);box-shadow:0 0 4px 0 rgba(32,32,32,0.1);"]),PlaceholderWrapper:S.Ay.div.withConfig({componentId:"sc-76365e72-1"})(["--promo--media-ratio:3/4;"])},rw={Component:S.Ay.div.withConfig({componentId:"sc-30433822-0"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);"])},rI=`
971  mutation SendCustomerServiceMessage(
972    $senderEmail: String!
973    $firstName: String!
974    $lastName: String!
975    $messageText: String!
976    $postalCode: String!
977    $city: String!
978    $viewerId: ID
979    $customerNumber: String
980    $answerRequired: Boolean!
981  ) {
982    sendCustomerServiceMessage(
983      senderEmail: $senderEmail
984      firstName: $firstName
985      lastName: $lastName
986      messageText: $messageText
987      postalCode: $postalCode
988      city: $city
989      viewerId: $viewerId
990      customerNumber: $customerNumber
991      answerRequired: $answerRequired
992    )
993  }
994`;var rN=n(64147),rS=n(97107);let rE={[er.AW.Expensive]:"En pysty maksamaan juuri nyt",[er.AW.NotInterested]:"Kiinnostuksen kohteeni ovat muuttuneet",[er.AW.NoTime]:"En ehdi lukemaan",[er.AW.BadContent]:"Tuotteeseen liittyv\xe4 syy",[er.AW.Other]:"Muu syy, mik\xe4?"};function rT(e){let[t,n]=(0,d.useState)(void 0),[i,o]=(0,d.useState)("");return(0,l.jsxs)(rL.Container,{children:[(0,l.jsx)("div",{className:"is-heading-m",children:"Ik\xe4v\xe4\xe4, ett\xe4 olet p\xe4\xe4tt\xe4nyt lopettaa tilauksen. Haluaisimme 
994kuulla, miksi."}),(0,l.jsx)(rL.Reasons,{children:[er.AW.Expensive,er.AW.NotInterested,er.AW.NoTime,er.AW.BadContent,er.AW.Other].map(a=>(0,l.jsx)(rP,{reason:a,subscription:e.subscription,isActive:t===a,onSelect:()=>n(a),message:i,setMessage:e=>o(e),onStartChangeInvoiceDueDate:e.onStartChangeInvoiceDueDate,onStartChangeSubscriptionProduct:e.onStartChangeSubscriptionProduct,onStartChangeSubscriptionRecipient:e.onStartChangeSubscriptionRecipient,onStartPauseSubscription:e.onStartPauseSubscription},a))}),(0,l.jsxs)(rL.Buttons,{children:[(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitCancelSubscriptionReasonButton",type:"secondary",disabled:!t,onClick:()=>{e.onFinish(t,i)},children:"Jatka"}),(0,l.jsx)(ed.A,{"data-click-element-name":"CancelCancelSubscriptionReasonButton",type:"primary",onClick:()=>{e.onCancel()},children:"Takaisin"})]})]})}function rP(e){return(0,l.jsxs)(rL.Reason,{children:[(0,l.jsxs)("label",{htmlFor:`reason${e.reason}`,children:[(0,l.jsx)("input",{id:`reason${e.reason}`,type:"radio",checked:e.isActive,onChange:()=>{e.onSelect?.()}}),rE[e.reason]]}),e.isActive&&(0,l.jsxs)(rL.ReasonDetails,{children:[e.reason===er.AW.Expensive&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Jos tarvitset lis\xe4\xe4 maksuaikaa, kerrothan siit\xe4 meille. Voimme siirt\xe4\xe4 laskusi er\xe4p\xe4iv\xe4\xe4."}),e.subscription.activeInvoiceId&&(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeInvoiceDueDateCancelSubscriptionReasonButton",size:"medium",onClick:()=>e.onStartChangeInvoiceDueDate(),children:"Pyyd\xe4 er\xe4p\xe4iv\xe4n siirtoa"})]}),e.reason===er.AW.NotInterested&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Vaihda lehte\xe4, saat sen samaan hintaan."}),(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeSubscriptionProductCancelSubscriptionReasonButton",size:"medium",onClick:()=>e.onStartChangeSubscriptionProduct(),children:"Vaihda lehte\xe4"})]}),e.reason===er.AW.NoTime&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"V\xe4lill\xe4 aikaa ei j\xe4\xe4 lehdille. Antaisitko siis lopun tilauksesi lahjaksi? N\xe4in s\xe4ilyt\xe4t saman hinnan ja ilahdutat jotakuta toista. Lehden saajan vaihtaminen ei aiheuta kustannuksia."}),(0,l.jsx)(ed.A,{"data-click-element-name":"StartChangeSubscriptionRecipientCancelSubscriptionReasonButton",size:"medium",onClick:()=>e.onStartChangeSubscriptionRecipient(),children:"Vaihda lehden saajaa"}),(0,l.jsx)("div",{children:"Voit j\xe4tt\xe4\xe4 lehden hetkeksi tauolle ja jatkaa, kun lukuaikaa taas l\xf6ytyy. N\xe4in lehden edullinen hinta pysyy my\xf6s ennallaan."}),(0,l.jsx)(ed.A,{"data-click-element-name":"StartPauseSubscriptionCancelSubscriptionReasonButton",size:"medium",onClick:()=>e.onStartPauseSubscription(),children:"J\xe4t\xe4 tilaus tauolle"})]}),e.reason===er.AW.BadContent&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Haluaisimme kuulla, miten voisimme parantaa lehtemme sis\xe4lt\xf6\xe4."}),(0,l.jsx)("textarea",{placeholder:"Viestisi",rows:10,maxLength:4e3,value:e.message||"",onChange:t=>e.setMessage(t.target.value)})]}),e.reason===er.AW.Other&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Kerrothan meille, miten voisimme parantaa tarjoamaamme."}),(0,l.jsx)("textarea",{placeholder:"Viestisi",rows:10,maxLength:4e3,value:e.message||"",onChange:t=>e.setMessage(t.target.value)})]})]})]})}let rL={Container:S.Ay.div.withConfig({componentId:"sc-e6b4e543-0"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);"]),Reasons:S.Ay.div.withConfig({componentId:"sc-e6b4e543-1"})(["display:flex;flex-direction:column;gap:var(--spacing-md);"]),Reason:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-e6b4e543-2"})(["border:1px solid var(--color-outline-secondary);border-radius:var(--radius-md);> label{display:block;padding:var(--spacing-3xl) var(--spacing-lg);}input[type='radio']{margin-right:var(--spacing-md);}"]),ReasonDetails:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-e6b4e543-3"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);align-items:flex-start;border-top:1px solid var(--color-outline-secondary);padding:var(--spacing-lg) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);&:empty{display:none;}"]),Buttons:S.Ay.div.withConfig({componentId:"sc-e6b4e543-4"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);> *{flex-basis:100%;}"])};function rM(e){let[t,n]=(0,d.useState)(void 0),i=(0,d.useId)(),o=(0,d.useMemo)(()=>{var t;return t=e.subscription,t.suspendOptions?.find(e=>e.code===er.Eq.payAndChooseFreeItem)},[e.subscription]),a=e.variant||"panel",r=e.onFreeItemChange?e.freeItem:t,s=!!e.subscription.activeInvoiceId||!1===e.requireActiveInvoiceId;return o?(0,l.jsxs)(rR.Component,{$variant:a,children:[e.heading&&(0,l.jsx)(rR.Heading,{className:"is-heading-m",children:e.heading}),e.description&&(0,l.jsx)(rR.Description,{className:"is-body-s",children:e.description}),e.benefits?.length>0&&(0,l.jsxs)(rR.Benefits,{children:[e.benefitsHeading&&(0,l.jsx)("div",{className:"is-heading-xs",children:e.benefitsHeading}),(0,l.jsx)("ul",{className:"is-body-s",children:e.benefits.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),e]},t))})]}),e.fairPriceText&&(0,l.jsx)(rR.FairPriceText,{className:"is-body-s",children:e.fairPriceText}),(0,l.jsx)(rB,{idPrefix:`${i}-magazine-selection`,title:e.magazineSelectionTitle||"Valitse lehti",items:o.freeItems||[],value:r,onChange:e.onFreeItemChange||n}),(0,l.jsx)(rR.Buttons,{children:(0,l.jsx)(ed.A,{"data-click-element-name":e.buttonClickElementName||"SubmitCancelSubscriptionRetentionOfferButton",disabled:e.isDisabled||!r||!s,t
994ype:"primary",onClick:()=>{r&&s&&e.onPayFreeItemTotal(e.subscription.activeInvoiceId,r)},children:e.buttonText||"Lunasta etu ja pid\xe4 tilaus voimassa"})})]}):e.emptyText?(0,l.jsx)(rR.EmptyText,{className:"is-body-s",children:e.emptyText}):null}function rB(e){return e.items.length?(0,l.jsxs)(rR.MagazineSelection,{children:[(0,l.jsx)(rR.MagazineSelectionTitle,{children:e.title}),e.items.map((t,n)=>(0,l.jsxs)(rR.MagazineSelectionOptionLabel,{htmlFor:`${e.idPrefix}-${n}`,children:[(0,l.jsx)("input",{id:`${e.idPrefix}-${n}`,name:e.idPrefix,type:"radio",checked:e.value===t.productCode,onChange:()=>{e.onChange(t.productCode)}}),(0,l.jsx)("img",{src:t.imageUrl,alt:t.productName}),(0,l.jsx)("div",{className:"is-heading-l",children:t.productName})]},t.productCode))]}):null}let rR={Component:S.Ay.div.withConfig({componentId:"sc-2a331b8-0"})(["box-sizing:border-box;display:flex;flex-direction:column;gap:var(--spacing-lg);min-width:0;width:100%;",""],e=>"panel"===e.$variant&&`
995        border: 1px solid var(--color-outline-secondary);
996        border-radius: var(--radius-md);
997        padding: var(--spacing-xl);
998        box-shadow: 0 0 4px 0 rgba(32, 32, 32, 0.1);
999      `),Heading:S.Ay.div.withConfig({componentId:"sc-2a331b8-1"})([""]),Description:S.Ay.div.withConfig({componentId:"sc-2a331b8-2"})([""]),Benefits:S.Ay.div.withConfig({componentId:"sc-2a331b8-3"})(["ul{margin-top:var(--spacing-md);margin-bottom:0;padding:0;list-style:none;svg{margin-right:var(--spacing-sm);color:var(--color-universal-success);}li + li{margin-top:var(--spacing-xs);}}"]),FairPriceText:S.Ay.div.withConfig({componentId:"sc-2a331b8-4"})(["color:var(--color-on-surface-secondary);"]),Buttons:S.Ay.div.withConfig({componentId:"sc-2a331b8-5"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);width:100%;> *{flex-basis:100%;}"]),MagazineSelection:S.Ay.div.withConfig({componentId:"sc-2a331b8-6"})(["width:100%;"]),MagazineSelectionTitle:S.Ay.div.attrs({className:"is-heading-xs"}).withConfig({componentId:"sc-2a331b8-7"})(["margin-bottom:var(--spacing-md);border-bottom:2px solid var(--color-outline-secondary);padding-bottom:var(--spacing-md);"]),MagazineSelectionOptionLabel:S.Ay.label.attrs({className:"is-heading-l"}).withConfig({componentId:"sc-2a331b8-8"})(["display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;gap:var(--spacing-md);min-width:0;margin-bottom:var(--spacing-md);border-bottom:1px solid var(--color-outline-secondary);padding-bottom:var(--spacing-md);input{flex-shrink:0;margin:0;}img{flex-shrink:0;border-radius:var(--radius-sm);width:80px;height:auto;}div{min-width:0;overflow-wrap:anywhere;}"]),EmptyText:S.Ay.div.withConfig({componentId:"sc-2a331b8-9"})(["color:var(--color-on-surface-secondary);"])},rD={[er.Eq.periodEnd]:"Lopeta tilaus laskutusjakson loppuun.",[er.Eq.charge]:"Lopeta tilaus ja maksa heti verkossa.",[er.Eq.noCharge]:"Lopeta tilaus heti ilman lis\xe4maksuja.",[er.Eq.payAndChooseFreeItem]:"Pid\xe4 tilaus voimassa ja maksa lasku heti, saat valitsemasi erikoislehden.",[er.Eq.none]:""};function rO(e){let[t,n]=(0,d.useState)(void 0),[i,o]=(0,d.useState)(void 0),a=(0,d.useMemo)(()=>e.subscription.suspendOptions?.some(e=>"ImmediateCharge"===e.code),[e.subscription]);return(0,l.jsxs)(rz.Container,{children:[(0,l.jsx)(rz.Options,{children:e.subscription.suspendOptions?.map(r=>(0,l.jsxs)(rz.Option,{children:[(0,l.jsxs)("label",{htmlFor:`option_${r.code}`,children:[(0,l.jsx)("input",{id:`option_${r.code}`,type:"radio",disabled:e.isDisabled,checked:t===r.code,onChange:()=>{n(r.code)}}),"PeriodEnd"===r.code?(0,l.jsxs)(l.Fragment,{children:["Lopeta tilaus"," ",r.periodEndDate?`${(0,eU.Yq)(r.periodEndDate)} p\xe4\xe4ttyv\xe4n`:""," ","laskutusjakson loppuun."]}):rD[r.code]||null]}),t===r.code&&(0,l.jsxs)(rz.OptionDetails,{children:["PeriodEnd"===r.code&&(0,l.jsxs)(l.Fragment,{children:[a&&r.pricingText&&(0,l.jsxs)(l.Fragment,{children:["Jos lopetat tilauksesi laskutusjakson loppuun, saat koko jakson lehdet hintaan",r.pricingText&&(0,l.jsx)(rz.PriceText,{$isGreen:!0,children:r.pricingText}),r.pricingTotalText&&(0,l.jsxs)(l.Fragment,{children:[r.pricingTotalText," + mahdolliset huomautus- ja maksutapalis\xe4t"]})]}),(0,l.jsx)(rz.Buttons,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitCancelSubscriptionOptionPeriodEndButton",disabled:e.isDisabled,type:"danger",onClick:()=>{e.onFinish(er.Eq.periodEnd)},children:"Lopeta tilaus laskutuskauden loppuun"})})]}),"ImmediateCharge"===r.code&&(0,l.jsxs)(l.Fragment,{children:["Jos lopetat tilauksesi heti, laskutamme toimitetuista lehdist\xe4. Huomioithan, ett\xe4 viimeisin lehti voi olla viel\xe4 matkalla.",r.pricingText&&(0,l.jsx)(rz.PriceText,{$isRed:!0,children:r.pricingText}),r.pricingTotalText&&(0,l.jsxs)(l.Fragment,{children:[r.pricingTotalText," + mahdolliset huomautus- ja maksutapalis\xe4t"]}),(0,l.jsx)(rz.Buttons,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitCancelSubscriptionOptionImmediateChargeButton",disabled:e.isDisabled,type:"primary",onClick:()=>{e.onPayFinal(e.subscription.id)},children:"Maksa lasku ja lopeta tilaus"})})]}),"ImmediateNotCharge"===r.code&&(0,l.jsxs)(l.Fragment,{children:["Lopetat tilauksesi heti. Jos sinulla on maksettuja lehti\xe4, ne toimitetaan viel\xe4 normaalisti.",(0,l.jsx)(rz.Buttons,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitCancelSubscriptionOptionImmediateNotChargeButton",disabled:e.isDisabled,type:"danger",onClick:()=>
999{e.onFinish(er.Eq.noCharge)},children:"Lopeta tilaus"})})]}),"PayAndChooseFreeItem"===r.code&&(0,l.jsx)(rM,{subscription:e.subscription,variant:"inline",description:"Saat valitsemasi lehden noin viikon kuluessa.",magazineSelectionTitle:"Valitse lehti",buttonText:"Lunasta etu ja pid\xe4 tilaus voimassa",isDisabled:e.isDisabled,freeItem:i,onFreeItemChange:o,requireActiveInvoiceId:!1,buttonClickElementName:"SubmitCancelSubscriptionOptionPayAndChooseFreeItemButton",onPayFreeItemTotal:e.onPayFreeItemTotal})]})]},r.code))}),(0,l.jsx)(rz.Buttons,{children:(0,l.jsx)(ed.A,{"data-click-element-name":"CancelCancelSubscriptionOptionButton",disabled:e.isDisabled,onClick:()=>e.onCancel(),type:"primary",children:"Takaisin"})})]})}let rz={Container:S.Ay.div.withConfig({componentId:"sc-12af378d-0"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);"]),Options:S.Ay.div.withConfig({componentId:"sc-12af378d-1"})(["display:flex;flex-direction:column;gap:var(--spacing-md);"]),Option:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-12af378d-2"})(["border:1px solid var(--color-outline-secondary);border-radius:var(--radius-md);> label{display:block;padding:var(--spacing-2xl) var(--spacing-lg);> input[type='radio']{margin-right:var(--spacing-md);}}"]),OptionDetails:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-12af378d-3"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);align-items:flex-start;border-top:1px solid var(--color-outline-secondary);padding:var(--spacing-lg) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);&:empty{display:none;}"]),Buttons:S.Ay.div.withConfig({componentId:"sc-12af378d-4"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);width:100%;> *{flex-basis:100%;}"]),PriceText:S.Ay.div.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-12af378d-5"})([""," ",""],e=>e.$isGreen&&`
1000        color: var(--color-universal-success);
1001      `,e=>e.$isRed&&`
1002        color: #b2252b;
1003      `),PaidTag:S.Ay.div.attrs({className:"is-label-m"}).withConfig({componentId:"sc-12af378d-6"})(["border-radius:var(--radius-lg);padding:var(--spacing-xs) var(--spacing-sm);background-color:var(--color-container);color:var(--color-secondary);"])},rF=`
1004  mutation InvoicePaymentRedirectUrl(
1005    $itemReference: ID!
1006    $returnUrl: String!
1007    $paymentOption: PaymentOption!
1008    $reason: CancelSubscriptionReason
1009    $reasonMessage: String
1010    $freeItem: String
1011  ) {
1012    invoicePaymentRedirectUrl(
1013      itemReference: $itemReference
1014      returnUrl: $returnUrl
1015      paymentOption: $paymentOption
1016      reason: $reason
1017      reasonMessage: $reasonMessage
1018      freeItem: $freeItem
1019    )
1020  }
1021`,rU=`
1022  mutation CancelSubscription(
1023    $viewerId: ID!
1024    $subscriptionId: ID!
1025    $reason: CancelSubscriptionReason!
1026    $reasonMessage: String
1027    $suspendOption: CancelSubscriptionOption!
1028  ) {
1029    cancelSubscription(
1030      viewerId: $viewerId
1031      subscriptionId: $subscriptionId
1032      reason: $reason
1033      reasonMessage: $reasonMessage
1034      option: $suspendOption
1035    ) {
1036      ...Subscription
1037    }
1038  }
1039  ${eb.yU}
1040`,r$=`
1041  query GetProductBenefitsConfiguration {
1042    configurationCollection(
1043      limit: 1
1044      where: {
1045        key: "product-benefits"
1046      }
1047    ) {
1048      items {
1049        key
1050        value
1051      }
1052    }
1053  }
1054`,rH={Buttons:S.Ay.div.withConfig({componentId:"sc-e0fccc1c-0"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);> *{flex-basis:100%;}"]),Container:S.Ay.div.withConfig({componentId:"sc-e0fccc1c-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);"]),SubscriptionBenefitsAfterContent:S.Ay.div.withConfig({componentId:"sc-e0fccc1c-2"})(["border-top:1px solid var(--color-outline-secondary);margin-top:var(--spacing-xl);padding-top:var(--spacing-xl);color:var(--color-on-surface);"]),Benefits:S.Ay.div.withConfig({componentId:"sc-e0fccc1c-3"})(["ul{margin-top:var(--spacing-md);margin-bottom:0;padding:0;list-style:none;svg{margin-right:var(--spacing-sm);color:var(--color-universal-success);}"," li + li{margin-top:var(--spacing-xs);}}"],e=>e.$isNegative&&`
1055        svg {
1056        color: var(--color-universal-danger);
1057        }
1058      `)};
1058function rV(e){return e?[e.street,[e.postalCode,e.city].filter(Boolean).join(" "),e.countryCode].filter(Boolean).join(", "):""}function rq(e){return e?e.displayName?e.displayName:[e.firstName,e.lastName].filter(Boolean).join(" "):""}let rK=`
1059  mutation SubmitFeedback($feedback: FeedbackInput!) {
1060    submitFeedback(feedback: $feedback)
1061  }
1062`,rG=`
1063  mutation InvoicePaymentRedirectUrl(
1064    $itemReference: ID!
1065    $returnUrl: String!
1066    $paymentOption: PaymentOption!
1067    $reason: CancelSubscriptionReason
1068    $reasonMessage: String
1069    $freeItem: String
1070  ) {
1071    invoicePaymentRedirectUrl(
1072      itemReference: $itemReference
1073      returnUrl: $returnUrl
1074      paymentOption: $paymentOption
1075      reason: $reason
1076      reasonMessage: $reasonMessage
1077      freeItem: $freeItem
1078    )
1079  }
1080`;function rW(e){let t=(0,tC.useParams)(),n=(0,d.useContext)(er.Ay),i=(0,d.useContext)(em.A),o=(0,d.useRef)(!1),a=(0,d.useId)(),r=(0,d.useMemo)(()=>{let e=t?.subscriptionId;return Array.isArray(e)?e[0]:e},[t]),s=(0,d.useMemo)(()=>r?`/tilaukset/${r}`:void 0,[r]),c=(0,d.useMemo)(()=>{if(r&&n.subscriptions)return n.subscriptions.find(e=>e.id===r)},[n.subscriptions,r]),u=(0,d.useMemo)(()=>{if(n.customer)return{id:n.customer.id,customerNumber:n.customerNumber,firstName:n.customer.firstName,lastName:n.customer.lastName,displayName:n.customerDisplayName,emailAddress:n.customer.emailAddress,phoneNumber:n.customer.phoneNumber,primaryAddress:n.customer.primaryAddress}},[n.customer,n.customerDisplayName,n.customerNumber]),m=e.mockCustomer||u,p=e.mockSubscription||c,g=(!e.mockCustomer||!e.mockSubscription)&&(n.customerLoading||n.subscriptionsLoading||!m||!p),h=(0,d.useMemo)(()=>({subscription_reference:p?.id||null,product_code:p?.productCode||null,product_name:p?.productTitle||null}),[p]),[x,f]=(0,d.useState)(!1),[y,v]=(0,d.useState)({phoneNumber:"",email:"",preferredCallTime:"",message:e.form?.defaultMessage||""}),[b,C]=(0,d.useState)("idle"),[A,k]=(0,d.useState)(""),j=!!e.mockCustomer&&!!e.mockSubscription&&(e.retention?.paymentMode==="mock"||!!e.retention?.mockPaymentSuccessText),w=i.aspaApiAuthenticated,I=e.form?.preferredCallTimeLabel?.trim(),N=(0,eu.A)({api:i.contentApi,query:rK});(0,d.useEffect)(()=>{x||v({phoneNumber:m?.phoneNumber||"",email:m?.emailAddress||"",preferredCallTime:"",message:e.form?.defaultMessage||""})},[m?.emailAddress,m?.phoneNumber,x,e.form?.defaultMessage]),(0,d.useEffect)(()=>{!o.current&&p&&(o.current=!0,(0,n1.Z9)({...h,action:"view"}))},[h,p]);let S=(0,d.useMemo)(()=>e.form?.title?e.form.title:function({template:e,customer:t,subscription:n}){let i={customerNumber:t?.customerNumber||"",customerName:rq(t),productTitle:n?.productTitle||"",productCode:n?.productCode||"",subscriptionId:n?.id||""};return e.replace(/\{(\w+)\}/g,(e,t)=>i[t]||"")}({template:e.form?.titleTemplate||"Peruutus asnro {customerNumber} lehti {productTitle}",customer:m,subscription:p}),[m,e.form?.title,e.form?.titleTemplate,p]),T=e.form?.description?e.form.description.replace(/\\n
1080/g,"\n").split("\n"):void 0,P=(e.form?.successDescription||"Kiitos. Asiakaspalvelumme ottaa sinuun yhteytt\xe4 mahdollisimman pian.").replace(/\\n/g,"\n").split("\n"),L=!!y.phoneNumber&&!!m&&!!p,M=(e,t)=>{f(!0),v(n=>({...n,[e]:t}))},B=async e=>{if(e.preventDefault(),!L||"loading"===b)return;let t=function({customer:e,subscription:t,formValues:n,title:i,includePreferredCallTime:o=!0}){let a=rq(e),r=rV(e?.primaryAddress),s=["Peruutuslomake:",i,""];return o&&s.push("Toivottu soittoaika:",n.preferredCallTime||"",""),s.push("Lis\xe4tiedot:",n.message||"","","Puhelinnumero:",n.phoneNumber||"","","Asiakasnumero:",e?.customerNumber||"","","Nimi:",a,"","Lehti:",t?.productTitle||"","","Osoite:",r,"","S\xe4hk\xf6posti:",n.email||""),{topic:"Peruutuslomake",name:a,email:n.email||"",body:s.join("\n")}}({customer:m,subscription:p,formValues:y,title:S,includePreferredCallTime:!!I});(0,n1.Z9)({...h,action:"submit"});try{C("loading"),k("");let e=await N.mutate({variables:{feedback:t}});if(!e?.submitFeedback)throw Error("submitFeedback failed");C("success"),(0,n1.Z9)({...h,action:"submit_success"})}catch(t){let e=t instanceof Error?t.message:"Unknown error";C("error"),k(e),(0,n1.Z9)({...h,action:"submit_error",error_message:e})}};return(0,l.jsx)(E.A,{align:e.align||"wide",backgroundColor:e.backgroundColor,"data-click-element-name":"CancelSubscriptionCallRequestBlock","data-subscription-reference":p?.id||null,"data-product-code":p?.productCode||null,"data-product-name":p?.productTitle||null,"data-term-number":null,children:(0,l.jsxs)(rX.Container,{children:[(0,l.jsxs)(rX.Main,{children:[(0,l.jsx)(q,{crumbs:[{label:"Tilauksen tiedot",href:s}]}),g?(0,l.jsxs)(rX.LoadingPlaceholder,{"aria-busy":"true","aria-label":"Ladataan",children:[(0,l.jsx)(eF.A,{length:"medium",lineHeight:32}),(0,l.jsx)(eF.A,{lines:2,lineHeight:24}),(0,l.jsx)(rX.LoadingField,{}),(0,l.jsx)(rX.LoadingField,{}),(0,l.jsx)(rX.LoadingField,{$isMultiline:!0})]}):"success"===b?(0,l.jsxs)(rX.Success,{children:[(0,l.jsx)("h2",{className:"is-heading-m",children:e.form?.successTitle||"Soittopyynt\xf6 on vastaanotettu"}),(0,l.jsx)(rX.Description,{className:"is-body-s",children:P.map((e,t)=>(0,l.jsx)("span",{children:e},t))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(rX.Header,{children:[(0,l.jsx)("h2",{className:"is-heading-m",children:S}),T&&(0,l.jsx)(rX.Description,{className:"is-body-s",children:T.map((e,t)=>(0,l.jsx)("span",{children:e},t))})]}),(0,l.jsxs)(rX.Details,{children:[e.details?.heading&&(0,l.jsx)("div",{className:"is-heading-s",children:e.details.heading}),(0,l.jsxs)(ef.A,{children:[(0,l.jsx)(ey.A,{label:e.details?.customerNumberLabel||"Asiakasnumero",value:m?.customerNumber||"-"}),(0,l.jsx)(ey.A,{label:e.details?.nameLabel||"Nimi",value:rq(m)}),(0,l.jsx)(ey.A,{label:e.details?.addressLabel||"Osoite",value:rV(m?.primaryAddress)}),(0,l.jsx)(ey.A,{label:e.details?.productLabel||"Peruutettava lehti",value:p?.productTitle||"-"})]})]}),(0,l.jsxs)(el.wp,{onSubmit:B,children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsx)(es.A,{id:`${a}-cancel-call-request-phone-number`,disabled:"loading"===b,label:e.form?.phoneNumberLabel||"Puhelinnumero",value:y.phoneNumber,onChange:e=>M("phoneNumber",e.target.value),required:!0}),(0,l.jsx)(es.A,{id:`${a}-cancel-call-request-email`,disabled:"loading"===b,label:e.form?.emailLabel||"S\xe4hk\xf6posti",value:y.email,onChange:e=>M("email",e.target.value)}),I&&(0,l.jsx)(es.A,{id:`${a}-cancel-call-request-preferred-call-time`,disabled:"loading"===b,label:I,value:y.preferredCallTime,onChange:e=>M("preferredCallTime",e.target.value)}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"is-heading-xs",htmlFor:`${a}-cancel-call-request-message`,children:e.form?.messageLabel||"Lis\xe4tiedot"}),(0,l.jsx)(rX.Textarea,{id:`${a}-cancel-call-request-message`,disabled:"loading"===b,rows:5,maxLength:4e3,placeholder:e.form?.messagePlaceholder,value:y.message,onChange:e=>M("message",e.target.value)})]})]}),"error"===b&&(0,l.jsxs)(rX.ErrorText,{className:"is-body-s",children:[e.form?.errorText||"Soittopyynn\xf6n l\xe4hetys ep\xe4onnistui."," ",A]}),(0,l.jsx)(ed.A,{buttonType:"submit",disabled:!L||"loading"===b,"data-click-element-name":"SubmitCancelSubscriptionCallRequestButton",children:"loading"===b?"L\xe4hetet\xe4\xe4n...":e.form?.submitButtonText||"J\xe4t\xe4 soittopyynt\xf6"})]})]})]}),!g&&e.retention?.enabled!==!1&&p&&(0,l.jsx)(l.Fragment,{children:j?(0,l.jsx)(rY,{subscription:p,retention:e.retention,isDisabled:"loading"===b,eventAttrs:h}):w?(0,l.jsx)(r_,{paymentApi:w,subscription:p,retention:e.retention,returnUrl:e.retention?.returnUrl,isDisabled:"loading"===b,eventAttrs:h}):(0,l.jsx)(rJ,{subscription:p,retention:e.retention,isDisabled:!0,onPayFreeItemTotal:()=>void 0})})]})})}function rY(e){let[t,n]=(0,d.useState)(""),i=async(t,i)=>{(0,n1.Z9)({...e.eventAttrs,action:"retention_payment_start",selected_option:i}),n(e.retention?.mockPaymentSuccessText||"Demo: maksun ohjaus k\xe4
1080ynnistyisi nyt.")};return(0,l.jsx)(rJ,{subscription:e.subscription,retention:e.retention,isDisabled:e.isDisabled,statusText:t,onPayFreeItemTotal:i})}function r_(e){let[t,n]=(0,d.useState)(""),i=(0,eu.A)({api:e.paymentApi,query:rG}),o=async(t,o)=>{(0,n1.Z9)({...e.eventAttrs,action:"retention_payment_start",selected_option:o});try{n("");let a=await i.mutate({variables:function({invoiceId:e,freeItem:t,baseUrl:n,returnUrl:i}){let o=new URL(`${n.replace(/\/$/,"")}/bambora`);return i&&o.searchParams.set("returnUrl",i),{itemReference:e,returnUrl:o.toString(),paymentOption:"Total",freeItem:t}}({invoiceId:t,freeItem:o,baseUrl:"https://www.meillakotona.fi",returnUrl:function(e,t){let n=e?.trim()||`${window.location.pathname}${window.location.search}${window.location.hash}`;if(!n)return;let i={subscriptionId:t.id||"",productCode:t.productCode||"",productTitle:t.productTitle||""};return n.replace(/\{(\w+)\}/g,(e,t)=>i[t]||"")}(e.returnUrl,e.subscription)})}),r=a?.invoicePaymentRedirectUrl;if(!r)throw Error("invoicePaymentRedirectUrl failed");(0,n1.Z9)({...e.eventAttrs,action:"retention_payment_redirect",selected_option:o}),window.location.href=r}catch(i){let t=i instanceof Error?i.message:"Unknown error";n(t),(0,n1.Z9)({...e.eventAttrs,action:"retention_payment_error",selected_option:o,error_message:t})}};return(0,l.jsx)(rJ,{subscription:e.subscription,retention:e.retention,isDisabled:e.isDisabled||i.loading,isLoading:i.loading,errorText:t,onPayFreeItemTotal:o})}function rJ(e){return(0,l.jsxs)(rX.Retention,{children:[(0,l.jsx)(rM,{subscription:e.subscription,heading:e.retention?.heading,description:e.retention?.description,benefitsHeading:e.retention?.benefitsHeading,benefits:e.retention?.benefits,fairPriceText:e.retention?.fairPriceText,magazineSelectionTitle:e.retention?.magazineSelectionTitle,buttonText:e.isLoading?e.retention?.paymentLoadingText||"Siirryt\xe4\xe4n maksuun...":e.retention?.buttonText,emptyText:e.retention?.emptyText,isDisabled:e.isDisabled,onPayFreeItemTotal:e.onPayFreeItemTotal}),e.errorText&&(0,l.jsxs)(rX.RetentionError,{className:"is-body-s",children:[e.retention?.paymentErrorText||"Maksuun siirtyminen ep\xe4onnistui."," ",e.errorText]}),e.statusText&&(0,l.jsx)(rX.RetentionStatus,{className:"is-body-s",children:e.statusText})]})}rW.canLazyLoad=!1;let rX={Container:S.Ay.div.withConfig({componentId:"sc-8902fcab-0"})(["box-sizing:border-box;display:grid;gap:var(--spacing-3xl);padding-inline:var(--block-gutter);@media (min-width:","){grid-template-columns:minmax(0,1fr) minmax(320px,420px);align-items:start;}"],e=>e.theme["breakpoint-desktop"]),Main:S.Ay.div.withConfig({componentId:"sc-8902fcab-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);min-width:0;input,textarea{background-color:var(--color-surface);color:var(--color-on-surface);}"]),Header:S.Ay.div.withConfig({componentId:"sc-8902fcab-2"})(["display:flex;flex-direction:column;gap:var(--spacing-md);h2,p{margin:0;}p{color:var(--color-on-surface-secondary);}"]),Description:S.Ay.p.withConfig({componentId:"sc-8902fcab-3"})(["display:flex;flex-direction:column;span + span{margin-top:4px;}"]),Details:S.Ay.div.withConfig({componentId:"sc-8902fcab-4"})(["display:flex;flex-direction:column;gap:var(--spacing-md);"]),LoadingPlaceholder:S.Ay.div.withConfig({componentId:"sc-8902fcab-5"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);max-width:var(--width-column);"]),LoadingField:S.Ay.div.withConfig({componentId:"sc-8902fcab-6"})(["border:1px solid var(--color-placeholder);border-radius:var(--radius-md);height:",";background-color:var(--color-placeholder);"],e=>e.$isMultiline?"126px":"54px"),Textarea:S.Ay.textarea.withConfig({componentId:"sc-8902fcab-7"})(["margin-top:var(--spacing-xs);width:100%;"]),ErrorText:S.Ay.div.withConfig({componentId:"sc-8902fcab-8"})(["color:var(--color-universal-danger);"]),Success:S.Ay.div.withConfig({componentId:"sc-8902fcab-9"})(["display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-lg);h2,p{margin:0;}"]),Retention:S.Ay.div.withConfig({componentId:"sc-8902fcab-10"})(["display:flex;flex-direction:column;gap:var(--spacing-md);min-width:0;> *{box-sizing:border-box;max-width:100%;}"]),RetentionStatus:S.Ay.div.withConfig({componentId:"sc-8902fcab-11"})(["color:var(--color-universal-success);"]),RetentionError:S.Ay.div.withConfig({componentId:"sc-8902fcab-12"})(["color:var(--color-universal-danger);"])},rZ={[er.AW.Expensive]:"En pysty maksamaan juuri nyt",[er.AW.NotInterested]:"Kiinnostuksen kohteeni ovat muuttuneet",[er.AW.NoTime]:"En ehdi lukemaan",[er.AW.BadContent]:"Tuotteeseen liittyv\xe4 syy",[er.AW.Other]:"Muu syy, mik\xe4?"};function rQ(e){let[t,n]=(0,d.useState)(void 0),[i,o]=(0,d.useState)("");return(0,l.jsxs)(r1.Container,{children:[(0,l.jsx)("div",{className:"is-heading-m",children:"Ik\xe4v\xe4\xe4, ett\xe4 olet p\xe4\xe4tt\xe4nyt lopettaa tilauksen. Haluaisimme 
1080kuulla, miksi."}),(0,l.jsx)(r1.Reasons,{children:[er.AW.Expensive,er.AW.NotInterested,er.AW.NoTime,er.AW.BadContent,er.AW.Other].map(a=>(0,l.jsx)(r0,{reason:a,agreement:e.agreement,isActive:t===a,onSelect:()=>n(a),message:i,setMessage:e=>o(e)},a))}),(0,l.jsxs)(r1.Buttons,{children:[(0,l.jsx)(ed.A,{"data-click-element-name":"SubmitCancelAgreementReasonButton",type:"danger",disabled:!t,onClick:()=>{e.onFinish(t,i)},children:"Peruuta tilaus"}),(0,l.jsx)(ed.A,{"data-click-element-name":"CancelCancelAgreementReasonButton",type:"primary",onClick:()=>{e.onCancel()},children:"Takaisin"})]})]})}function r0(e){let t=(0,d.useContext)(tA.A),n=(0,d.useMemo)(()=>{let e="https://www.apu.fi",n="/tilaa-apu360?choice=K&resubscribe=yes",i=t.tokens;if(!i)return`${e}${n}`;let o=(0,ai.Ws)({refreshToken:i.refreshToken,redirect:`${n}`});return`${e}/sso?${o}`},[t.tokens]);return(0,l.jsxs)(r1.Reason,{children:[(0,l.jsxs)("label",{htmlFor:`reason${e.reason}`,children:[(0,l.jsx)("input",{id:`reason${e.reason}`,type:"radio",checked:e.isActive,onChange:()=>{e.onSelect?.()}}),rZ[e.reason]]}),e.isActive&&(0,l.jsxs)(r1.ReasonDetails,{children:[e.reason===er.AW.Expensive&&(0,l.jsxs)(l.Fragment,{children:["Tarjoamme tilauksen sinulle hintaan -50% 3 kk ajan.",(0,l.jsx)(ed.A,{"data-click-element-name":"CancelAgreementReasonApu360OfferLink",size:"medium",href:n,target:"_self",disabled:!n,children:"Lunasta etusi"})]}),e.reason===er.AW.BadContent&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Haluaisimme kuulla, miten voisimme parantaa tuotteemme sis\xe4lt\xf6\xe4."}),(0,l.jsx)("textarea",{placeholder:"Viestisi",rows:10,maxLength:4e3,value:e.message||"",onChange:t=>e.setMessage(t.target.value)})]}),e.reason===er.AW.Other&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{children:"Kerrothan meille, miten voisimme parantaa tarjoamaamme."}),(0,l.jsx)("textarea",{placeholder:"Viestisi",rows:10,maxLength:4e3,value:e.message||"",onChange:t=>e.setMessage(t.target.value)})]})]})]})}let r1={Container:S.Ay.div.withConfig({componentId:"sc-c5116ce-0"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);"]),Reasons:S.Ay.div.withConfig({componentId:"sc-c5116ce-1"})(["display:flex;flex-direction:column;gap:var(--spacing-md);"]),Reason:S.Ay.div.attrs({className:"is-heading-s"}).withConfig({componentId:"sc-c5116ce-2"})(["border:1px solid var(--color-outline-secondary);border-radius:var(--radius-md);> label{display:block;padding:var(--spacing-3xl) var(--spacing-lg);}input[type='radio']{margin-right:var(--spacing-md);}"]),ReasonDetails:S.Ay.div.attrs({className:"is-body-s"}).withConfig({componentId:"sc-c5116ce-3"})(["display:flex;flex-direction:column;gap:var(--spacing-lg);align-items:flex-start;border-top:1px solid var(--color-outline-secondary);padding:var(--spacing-lg) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);&:empty{display:none;}"]),Buttons:S.Ay.div.withConfig({componentId:"sc-c5116ce-4"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);> *{flex-basis:100%;}"])},r2=`
1081  mutation CancelAgreement(
1082    $viewerId: ID!
1083    $agreementId: ID!
1084    $reasonCode: CancelAgreementReason!
1085    $reasonMessage: String
1086    $optionCode: CancelAgreementOption!
1087  ) {
1088    cancelAgreement(
1089      viewerId: $viewerId
1090      agreementId: $agreementId
1091      reasonCode: $reasonCode
1092      reasonMessage: $reasonMessage
1093      optionCode: $optionCode
1094    )
1095  }
1096`,r3=`
1097  query GetProductBenefitsConfiguration {
1098    configurationCollection(
1099      limit: 1
1100      where: {
1101        key: "product-benefits"
1102      }
1103    ) {
1104      items {
1105        key
1106        value
1107      }
1108    }
1109  }
1110`,r5={Buttons:S.Ay.div.withConfig({componentId:"sc-7349005e-0"})(["display:flex;flex-wrap:wrap;gap:var(--spacing-md);> *{flex-basis:100%;}"]),Container:S.Ay.div.withConfig({componentId:"sc-7349005e-1"})(["display:flex;flex-direction:column;gap:var(--spacing-xl);"]),BenefitsAfterContent:S.Ay.div.withConfig({componentId:"sc-7349005e-2"})(["border-top:1px solid var(--color-outline-secondary);margin-top:var(--spacing-xl);padding-top:var(--spacing-xl);color:var(--color-on-surface);"]),Benefits:S.Ay.div.withConfig({componentId:"sc-7349005e-3"})(["ul{margin-top:var(--spacing-md);margin-bottom:0;padding:0;list-style:none;svg{margin-right:var(--spacing-sm);color:var(--color-universal-success);}"," li + li{margin-top:var(--spacing-xs);}}"],e=>e.$isNegative&&`
1111        svg {
1112        color: var(--color-universal-danger);
1113        }
1114      `)};var r4=n(41463);let r8="kotona.com",r7="Kotona.com";function r6(){return!!r9()&&window.location.pathname.includes("/demo/blocks/gist")}function r9(){return r4.env.NEXT_PUBLIC_GIST_API_KEY||null}function se(e,t){if(t)return t;let n="https://www.meillakotona.fi".replace(/\/$/,"");if(!n)return null;let i=e||r4.env.NEXT_PUBLIC_GIST_ANSWERS_PATH||"/haku";return`${n}${i.startsWith("/")?i:`/${i}`}`}function st({variant:e}){let t="search"===e;return(0,l.jsxs)(sn.Card,{$padding:t?16:32,"aria-hidden":"true",children:[t&&(0,l.jsx)(sn.Title,{}),(0,l.jsx)(sn.Input,{}),t&&(0,l.jsxs)(sn.Pills,{children:[(0,l.jsx)(sn.Pill,{style:{width:240}}),(0,l.jsx)(sn.Pill,{style:{width:190}}),(0,l.jsx)(sn.Pill,{style:{width:220}})]})]})}let sn={Card:S.Ay.div.withConfig({componentId:"sc-b650426a-0"})(["width:100%;max-width:826px;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:","px;background:#fff;border-radius:20px;"],e=>e.$padding),Title:S.Ay.div.withConfig({componentId:"sc-b650426a-1"})(["width:160px;height:36px;margin:0 auto;border-radius:8px;background:var(--color-placeholder);"]),Input:S.Ay.div.withConfig({componentId:"sc-b650426a-2"})(["width:100%;height:49px;border-radius:24px;background:var(--color-placeholder);"]),Pills:S.Ay.div.withConfig({componentId:"sc-b650426a-3"})(["display:flex;gap:8px;padding-top:4px;overflow:hidden;"]),Pill:S.Ay.div.withConfig({componentId:"sc-b650426a-4"})(["flex-shrink:0;height:40px;border-radius:24px;background:var(--color-placeholder);"])};function si(e,t,n){let[i,o]=(0,d.useState)(!1);return(0,d.useEffect)(()=>
1114{if(!t||!n)return void o(!1);let i=()=>{let t=document.getElementById(e),n=t?.shadowRoot?.querySelector(".widget-container, .chat-container");return!!n&&n.offsetHeight>0};if(i())return void o(!0);let a=window.setInterval(()=>{i()&&(o(!0),window.clearInterval(a))},50);return()=>window.clearInterval(a)},[e,t,n]),i}function so(e){let t=e.widgetId||"kotona-widget-1",{translate:n}=(0,Z.B)(),i=(0,tp.qn)(),o=r9(),a=!!o&&!0===i,{loaded:r,error:s}=(0,tg.A)({url:a?"https://cdn.gist.ai/searchWidget.js":void 0,async:!0,attributes:{type:"module"}}),[c,u]=(0,d.useState)(!1);(0,d.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>u(!0),1e4);return()=>clearTimeout(e)},[a]);let m=!0===i,p=si(t,m,r);if(!o)return null;if(!1===i)return(0,l.jsx)(tx.A,{title:e.noConsentTitle||n("GistWidget.noConsentTitle"),description:e.noConsentDescription||n("GistWidget.noConsentDescription")});let g=void 0===i||m&&(!r||!p)&&!s&&!c,h=!s&&!c&&(g||m&&!p);return(0,l.jsxs)(sa.Container,{$minHeight:h?177:void 0,children:[m&&(0,l.jsx)(sa.WidgetHost,{$visible:p,children:(0,l.jsx)("gist-search-widget",{"api-key":o,"user-id":r7,"target-url":e.answersUrl,"ref-name":r8,theme:e.theme||"light","default-placeholder":e.defaultPlaceholder||"Ask Kotona...",id:t})}),g&&(0,l.jsx)(st,{variant:"search"})]})}let sa={Container:S.Ay.div.withConfig({componentId:"sc-de534a41-0"})(["width:100%;",""],e=>e.$minHeight&&`min-height: ${e.$minHeight}px;`),WidgetHost:S.Ay.div.withConfig({componentId:"sc-de534a41-1"})(["",""],e=>!e.$visible&&`
1115      height: 0;
1116      overflow: hidden;
1117      visibility: hidden;
1118    `)};function sr(e){if(!r6())return null;let t=se(e.answersPath,e.answersUrl);return t?(0,l.jsx)(E.A,{align:e.align||"column",children:(0,l.jsx)(so,{answersUrl:t,widgetId:e.widgetId,theme:e.theme,defaultPlaceholder:e.defaultPlaceholder,noConsentTitle:e.noConsentTitle,noConsentDescription:e.noConsentDescription})}):null}function ss(e){let t=e.widgetId||"chat-widget-1",{translate:n}=(0,Z.B)(),i=(0,tp.qn)(),o=r9(),a=!!o&&!0===i,{loaded:r,error:s}=(0,tg.A)({url:a?"https://cdn.gist.ai/chatWidget.js":void 0,async:!0,attributes:{type:"module"}}),[c,u]=(0,d.useState)(!1);(0,d.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>u(!0),1e4);return()=>clearTimeout(e)},[a]);let m=!0===i,p=si(t,m,r);if(!o)return null;if(!1===i)return(0,l.jsx)(tx.A,{title:e.noConsentTitle||n("GistWidget.noConsentTitle"),description:e.noConsentDescription||n("GistWidget.noConsentDescription")});let g=void 0===i||m&&(!r||!p)&&!s&&!c,h=!s&&!c&&(g||m&&!p);return(0,l.jsxs)(sl.Container,{$minHeight:h?113:void 0,children:[m&&(0,l.jsx)(sl.WidgetHost,{$visible:p,children:(0,d.createElement)("gist-chat-widget",{"api-key":o,"user-id":r7,"ref-name":r8,"share-base-url":e.answersUrl,theme:e.theme||"light","default-placeholder":e.defaultPlaceholder||"Ask Kotona...",id:t,"sticky-prompt":""})}),g&&(0,l.jsx)(st,{variant:"chat"})]})}sr.canLazyLoad=!1;let sl={Container:S.Ay.div.withConfig({componentId:"sc-7d3e3612-0"})(["width:100%;",""],e=>e.$minHeight&&`min-height: ${e.$minHeight}px;`),WidgetHost:S.Ay.div.withConfig({componentId:"sc-7d3e3612-1"})(["",""],e=>!e.$visible&&`
1119      height: 0;
1120      overflow: hidden;
1121      visibility: hidden;
1122    `)};function sc(e){if(!r6())return null;let t=se(e.answersPath,e.answersUrl);return t?(0,l.jsx)(E.A,{align:e.align||"column",children:(0,l.jsx)(ss,{answersUrl:t,widgetId:e.widgetId,theme:e.theme,defaultPlaceholder:e.defaultPlaceholder,noConsentTitle:e.noConsentTitle,noConsentDescription:e.noConsentDescription})}):null}sc.canLazyLoad=!1;let sd=function(){return null},su=(0,c.default)(()=>n.e(3687).then(n.bind(n,3687)),{loadableGenerated:{webpack:()=>[3687]},loading:sd,ssr:!1}),sm=(0,c.default)(()=>Promise.resolve().then(n.bind(n,46276)),{loadableGenerated:{webpack:()=>[46276]},loading:sd,ssr:!1}),sp=(0,c.default)(()=>n.e(3665).then(n.bind(n,63665)),{loadableGenerated:{webpack:()=>[63665]},loading:sd,ssr:!1}),sg=(0,c.default)(()=>n.e(6224).then(n.bind(n,86224)),{loadableGenerated:{webpack:()=>[86224]},loading:sd,ssr:!1}),sh=(0,c.default)(()=>n.e(8622).then(n.bind(n,58622)),{loadableGenerated:{webpack:()=>[58622]},loading:sd,ssr:!0}),sx=(0,c.default)(()=>Promise.resolve().then(n.bind(n,74971)),{loadableGenerated:{webpack:()=>[74971]},loading:sd,ssr:!1}),sf=(0,c.default)(()=>n.e(9272).then(n.bind(n,19272)),{loadableGenerated:{webpack:()=>[19272]},loading:sd,ssr:!1}),sy=(0,c.default)(()=>Promise.all([n.e(4428),n.e(9288)]).then(n.bind(n,79288)),{loadableGenerated:{webpack:()=>[79288]},loading:sd,ssr:!0}),sv=(0,c.default)(()=>n.e(8089).then(n.bind(n,88089)),{loadableGenerated:{webpack:()=>[88089]},loading:sd,ssr:!1}),sb=(0,c.default)(()=>n.e(4008).then(n.bind(n,34008)),{loadableGenerated:{webpack:()=>[34008]},loading:sd,ssr:!0}),sC=(0,c.default)(()=>n.e(1510).then(n.bind(n,31510)),{loadableGenerated:{webpack:()=>[31510]},loading:sd,ssr:!0}),sA=(0,c.default)(()=>n.e(6850).then(n.bind(n,76850)),{loadableGenerated:{webpack:()=>[76850]},loading:sd,ssr:!0}),sk=(0,c.default)(()=>n.e(6353).then(n.bind(n,46353)),{loadableGenerated:{webpack:()=>[46353]},loading:sd,ssr:!1}),sj=(0,c.default)(()=>n.e(1298).then(n.bind(n,51298)),{loadableGenerated:{webpack:()=>[51298]},loading:sd,ssr:!1}),sw=(0,c.default)(()=>n.e(8464).then(n.bind(n,66083)),{loadableGenerated:{webpack:()=>[66083]},loading:sd,ssr:!0});sy.canLazyLoad=!1;let sI={AccordionBlock:P,AgreementDetailsBlock:function(){let e=(0,tC.useParams)(),t=(0,d.useContext)(er.Ay),n=(0,d.useMemo)(()=>
1122{if(t.agreements)return t.agreements.find(t=>t.id===e.agreementId)||null},[e.agreementId,t.agreements]);return void 0===n?(0,l.jsx)(E.A,{children:(0,l.jsx)(rj.Container,{children:(0,l.jsx)(rj.PlaceholderWrapper,{children:(0,l.jsx)(rA,{})})})}):n?(0,l.jsx)(E.A,{children:(0,l.jsx)(rj.Container,{children:(0,l.jsx)(rC,{agreement:n})})}):null},AppBannerBlock:function(e){let t=(0,B.A)(),{Link:n}=(0,d.useContext)(R.A),i=(0,d.useMemo)(()=>t.isProbablyIos?e.linkUrlIos:t.isProbablyAndroid?e.linkUrlAndroid:void 0,[e.linkUrlIos,e.linkUrlAndroid,t.isProbablyIos,t.isProbablyAndroid]),o=(0,d.useMemo)(()=>!t.isProbablyIos&&!t.isProbablyAndroid,[t.isProbablyIos,t.isProbablyAndroid]);return(0,l.jsx)(D.Block,{align:"full",className:o?"is-unknown-device":"",hasBackground:!0,children:(0,l.jsxs)(D.Component,{children:[(0,l.jsxs)(D.LogoAndText,{children:[e.logoUrl&&(0,l.jsx)(D.Logo,{url:e.logoUrl,unoptimized:!0}),(0,l.jsx)(D.Text,{dangerouslySetInnerHTML:{__html:e.text}}),(0,l.jsxs)(D.StoreBadges,{children:[(0,l.jsx)(D.StoreLink,{as:n,href:e.linkUrlIos,children:(0,l.jsx)(D.StoreBadge,{url:e.appStoreBadgeUrl,alt:"",unoptimized:!0})}),(0,l.jsx)(D.StoreLink,{as:n,href:e.linkUrlAndroid,children:(0,l.jsx)(D.StoreBadge,{url:e.playStoreBadgeUrl,alt:"",unoptimized:!0})})]})]}),i&&(0,l.jsx)(D.MainLink,{as:n,href:i})]})})},AppHeadingBlock:function(e){return(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)(O.Heading,{className:"is-heading-xl",children:e.text})})},ArticleCoverBlock:function(e){let{content:t}=(0,d.useContext)(F.A);
1122return t&&"no-cover"!==t.coverType?(0,l.jsx)(E.A,{align:"full",pageSection:t?.slug,children:(0,l.jsx)(z.A,{article:t,recipeDietUrls:e.recipeDietUrls,sponsorshipLogoUrl:e.sponsorshipLogoUrl,sponsorshipColor:e.sponsorshipColor,disableSharing:e.disableSharing})}):null},ArticleFooterBlock:U.A,Apu360SubscriptionConfirmBlock:sk,Apu360SubscriptionFormBlock:sj,AdditionalCustomerBenefitsListBlock:function(e){let t=(0,d.useContext)(er.Ay),n="contain"===e.imageFit?"contain":void 0,i=(0,d.useMemo)(()=>(function(e){if(Array.isArray(e))return e;if(!e?.trim())return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return p.A.error("AdditionalCustomerBenefitsListBlock: Failed to parse configured promotions",e),[]}})(e.promotions),[e.promotions]),o=(0,d.useMemo)(()=>{let e=new Date;return i.filter(n=>(function(e,t,n){var i,o,a;let r,s;if(i=e,o=n,r=oq(i.start_date,"start"),s=oq(i.end_date,"end"),i.start_date&&!r?(p.A.error("AdditionalCustomerBenefitsListBlock: Invalid promotion start_date",i.start_date),!!1):i.end_date&&!s?(p.A.error("AdditionalCustomerBenefitsListBlock: Invalid promotion end_date",i.end_date),!!1):!!(r&&r.getTime()>o.getTime()||s&&s.getTime()<o.getTime()))return!1;let l=(a=e.product_code)?a.split(/[,\s;|]+/).map(oV).filter(Boolean):[];if(l.includes("ALL"))return!0;if(!l.length||!t?.length)return!1;let c=new Set(t.flatMap(oH));return l.some(e=>c.has(e))})(n,t.subscriptions,e))},[i,t.subscriptions]);if(!o.length)return null;let a=e.heading?.trim(),r=e.blockName||"AdditionalCustomerBenefitsListBlock",s=e.placementName||"additional_customer_benefits";return(0,l.jsxs)(E.A,{children:[a?(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:a}):null,(0,l.jsx)(o$,{children:o.map((t,i)=>{let o=oV(t.product_code);return(0,l.jsx)(oO.A,{title:t.title,description:t.description,buttonCta:t.link_url?t.cta_text:void 0,linkUrl:t.link_url,image:t.image_url?{url:t.image_url}:void 0,imageFit:n,metadata:oU,commercialLabel:"","data-element-name":r,"data-click-element-name":"AdditionalCustomerBenefitLink","data-placement-name":s,"data-product-id":e.productId||o,"data-product-code":o,"data-product-name":t.title},`${o||"promotion"}-${t.link_url||t.title||i}`)})})]})},BlockQuoteBlock:function(e){let t=(0,d.useContext)(S.Dx);if(!e.children&&!e.text&&!e.html)return null;let n=t["blockquote--heading-size"];return(0,l.jsx)(E.A,{align:e.align,className:`is-heading-${n}`,children:(0,l.jsx)($.Component,{dangerouslySetInnerHTML:e.html?{__html:e.html}:void 0,children:e.html?null:e.children||e.text})})},BreadcrumbsBlock:function(){let e=(0,d.useContext)(F.A),t=(0,d.useMemo)(()=>e.breadcrumbs||[{label:"Etusivu",href:"/"}],[e.breadcrumbs]);return t?.length?(0,l.jsx)(E.A,{"data-element-name":"Breadcrumbs",children:(0,l.jsx)(q,{crumbs:t})}):null},CancelAgreementBlock:function(){let e=(0,d.useRef)(void 0),t=(0,d.useContext)(em.A),n=(0,tC.useParams)(),i=(0,d.useContext)(er.Ay),o=(0,d.useMemo)(()=>(0,rS.A)(),[]),a=(0,rN.A)({api:o,query:r3}),r=(0,d.useMemo)(()=>a.data?a.data.configurationCollection.items[0]?.value||null:a.loading?void 0:null,[a.data,a.loading]),s=(0,d.useMemo)(()=>n.agreementId,[n.agreementId]),c=(0,d.useMemo)(()=>{if(i.agreements)return i.agreements.find(e=>e.id===s)||null},[s,i.agreements]),u=(0,d.useMemo)(()=>`/digitilaukset/${s}`,[s]),m=(0,eu.A)({api:t.aspaApiAuthenticated,query:r2}),p=(0,d.useMemo)(()=>!!m.data?.cancelAgreement,[m.data]);(0,d.useEffect)(()=>{p&&(window.location.href="/tilaukset")},[p]);let g=(0,d.useMemo)(()=>{if(c)return{subscription_reference:null,agreement_id:c.id,term_number:null,product_code:c.product,product_name:c.productText}},[c]),h=(0,d.useCallback)(async(e,t,n)=>{await m.mutate({variables:{viewerId:i.customer.id,agreementId:s,reasonCode:e,reasonMessage:t,optionCode:n}})},[i.customer,s,m]);return c&&void 0!==r?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(E.A,{"data-click-element-name":"CancelAgreementBlock","data-agreement-id":c.id,"data-product-code":c.product,"data-product-name":c.productText,"data-term-number":null,children:(0,l.jsx)("div",{ref:e,children:(0,l.jsxs)(r5.Container,{children:[(0,l.jsx)(q,{crumbs:[{label:"Digitilauksen tiedot",href:u}]}),(0,l.jsx)(t0,{agreement:c,afterContent:(0,l.jsx)(r5.BenefitsAfterContent,{children:r?.apu360&&(0,l.jsxs)(r5.Benefits,{children:[(0,l.jsx)("div",{className:"is-heading-s",children:"Tilaukseen kuuluu:"}),(0,l.jsx)("ul",{className:"is-body-s",children:r.apu360.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),e]},t))})]})})}),(0,l.jsx)(rQ,{agreement:c,onCancel:()=>{(0,n1.gY)({...g,cancel_action:"back",cancel_progress_step:"reason_selection"}),window.location.href=u},onFinish:(e,t)=>{(0,n1.gY)({...g,cancel_action:"continue",cancel_progress_step:"reason_selection",selected_option:(0,rn.uc)(e),selected_option_text:rZ[e]}),h(e,t,er.Lf.periodEnd)}})]})})})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(E.A,{children:(0,l.jsxs)(r5.Container,{children:[(0,l.jsx)(q,{crumbs:[{label:"Digitilauksen tiedot"}]}),(0,l.jsx)(t5,{afterContent:(0,l.jsx)(r5.BenefitsAfterContent,{children:(0,l.jsxs)(r5.Benefits,{children:[(0,l.jsx)("div",{className:"is-heading-s",children:"Tilaukseen kuuluu:"}),(0,l.jsx)("ul",{className:"is-body-s",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)("li",{children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),(0,l.jsx)(eF.A,{length:"medium",style:{flexGrow:1}})]})},t))})]})})})]})})})},CancelSubscriptionCallRequestBlock:rW,CancelSubscriptionBlock:function(){let e=(0,d.useRef)(void 0),t=(0,d.useContext)(em.A),n=(0,tC.useParams)(),i=(0,d.useContext)(er.Ay),o=(0,d.useMemo)(()=>(0,rS.A)(),[]),[a,r]=(0,d.useState)(!1),[s,c]=(0,d.useState)(!1),[u,m]=(0,d.useState)(!1),[p,g]=(0,d.useState)(!1),h=(0,rN.A)({api:o,query:r$}),x=(0,d.useMemo)(()=>h.data?h.data.configurationCollection.items[0]?.value||null:h.loading?void 0:null,[h.data,h.loading]),f=(0,d.useMemo)(()=>n.subscriptionId,[n.subscriptionId]),[y,v]=(0,d.useState)(void 0),[b,C]=(0,d.useState)(void 0),A=(0,d.useMemo)(()=>
1122{if(i.subscriptions)return i.subscriptions.find(e=>e.id===f)||null},[f,i.subscriptions]),k=(0,d.useMemo)(()=>`/tilaukset/${f}`,[f]),[j,w]=(0,d.useState)("reason");(0,d.useEffect)(()=>{e.current?.scrollIntoView()},[j]);let I=(0,eu.A)({api:t.aspaApiAuthenticated,query:rU}),N=(0,d.useMemo)(()=>!!I.data?.cancelSubscription,[I.data]),S=(0,eu.A)({api:t.aspaApiAuthenticated,query:rF}),T=S.data?.invoicePaymentRedirectUrl;(0,d.useEffect)(()=>{N&&(window.location.href="/peruutuskysely")},[N]);let P=(0,d.useMemo)(()=>{if(A)return{subscription_reference:A.id,agreement_id:null,term_number:null,product_code:A.productCode,product_name:A.productTitle}},[A]),L=(0,d.useCallback)(async e=>{await I.mutate({variables:{viewerId:i.customer.id,subscriptionId:f,reason:y,reasonMessage:b,suspendOption:e}})},[i.customer,f,y,b,I]),M=(0,d.useCallback)(async(e,t,n)=>{let i=(await S.mutate({variables:{itemReference:e,returnUrl:"https://www.meillakotona.fi/bambora",paymentOption:t,reason:y,reasonMessage:b,freeItem:n}})).invoicePaymentRedirectUrl;i&&(window.location.href=i)},[S,y,b]);return A&&void 0!==x?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(E.A,{"data-click-element-name":"CancelSubscriptionBlock","data-subscription-reference":A.id,"data-product-code":A.productCode,"data-product-name":A.productTitle,"data-term-number":null,children:[(0,l.jsx)(ni,{invoiceId:A.activeInvoiceId,isOpen:a,onClose:()=>r(!1),onCloseAfterSuccess:()=>{r(!1),window.location.href=`/tilaukset/${A.id}`}}),(0,l.jsx)(oa,{subscriptionId:A.id,productCode:A.productCode,isOpen:s,onClose:()=>c(!1),onCloseAfterSuccess:()=>{c(!1),window.location.href=`/tilaukset/${A.id}`}}),(0,l.jsx)(ot,{subscriptionId:A.id,isOpen:u,onClose:()=>m(!1),onCloseAfterSuccess:()=>{m(!1),window.location.href=`/tilaukset/${A.id}`}}),(0,l.jsx)(oc,{subscriptionId:A.id,isOpen:p,onClose:()=>g(!1),onCloseAfterSuccess:()=>{g(!1),window.location.href=`/tilaukset/${A.id}`}}),(0,l.jsx)("div",{ref:e,children:"reason"===j?(0,l.jsxs)(rH.Container,{children:[(0,l.jsx)(q,{crumbs:[{label:"Tilauksen tiedot",href:k}]}),(0,l.jsx)(t2,{subscription:A,afterContent:(0,l.jsx)(rH.SubscriptionBenefitsAfterContent,{children:x?.magazines&&(0,l.jsxs)(rH.Benefits,{children:[(0,l.jsx)("div",{className:"is-heading-s",children:"Tilaukseen kuuluu:"}),(0,l.jsx)("ul",{className:"is-body-s",children:x.magazines.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),e]},t))})]})})}),(0,l.jsx)(rT,{subscription:A,onStartChangeInvoiceDueDate:()=>r(!0),onStartChangeSubscriptionProduct:()=>c(!0),onStartChangeSubscriptionRecipient:()=>m(!0),onStartPauseSubscription:()=>g(!0),onCancel:()=>{(0,n1.gY)({...P,cancel_action:"back",cancel_progress_step:"reason_selection"}),window.location.href=k},onFinish:(e,t)=>{(0,n1.gY)({...P,cancel_action:"continue",cancel_progress_step:"reason_selection",selected_option:(0,rn.uc)(e),selected_option_text:rE[e]}),v(e),C(t),w("option")}})]}):"option"===j?(0,l.jsxs)(rH.Container,{children:[(0,l.jsx)(q,{crumbs:[{label:"Peruutuksen syyt",onClick:()=>w("reason")}]}),(0,l.jsx)(t2,{subscription:A}),x?.magazines&&(0,l.jsxs)(rH.Benefits,{$isNegative:!0,children:[(0,l.jsx)("div",{className:"is-heading-m",children:"Huomaathan, ett\xe4 seuraavat edut lakkaavat heti irtisanomisen j\xe4lkeen"}),(0,l.jsx)("ul",{className:"is-body-s",children:x.magazines.map((e,t)=>(0,l.jsxs)("li",{children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),e]},t))})]}),(0,l.jsx)(rO,{subscription:A,isDisabled:I.loading||S.loading||N||T,onCancel:()=>{(0,n1.gY)({...P,cancel_action:"back",cancel_progress_step:"cancel_confirmation"}),w("reason")},onFinish:e=>{(0,n1.gY)({...P,cancel_action:"continue",cancel_progress_step:"cancel_confirmation",selected_option:(0,rn.uc)(e),selected_option_text:rD[e]}),L(e)},onPayFinal:e=>M(e,"Final",void 0),onPayFreeItemTotal:(e,t)=>M(e,"Total",t)})]}):null})]})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(E.A,{children:(0,l.jsxs)(rH.Container,{children:[(0,l.jsx)(q,{crumbs:[{label:"Tilauksen tiedot"}]}),(0,l.jsx)(t5,{afterContent:(0,l.jsx)(rH.SubscriptionBenefitsAfterContent,{children:(0,l.jsxs)(rH.Benefits,{children:[(0,l.jsx)("div",{className:"is-heading-s",children:"Tilaukseen kuuluu:"}),(0,l.jsx)("ul",{className:"is-body-s",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)("li",{children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,l.jsx)(V.g,{icon:(0,H.K)({name:"circle-check",style:"solid"})}),(0,l.jsx)(eF.A,{length:"medium",style:{flexGrow:1}})]})},t))})]})})})]})})})},CardCarouselBlock:function(e){return(0,l.jsx)(E.A,{align:"full",backgroundColor:e.backgroundColor,children:(0,l.jsxs)(J.Container,{className:e.backgroundColor?"has-background":"",children:[e.title&&(0,l.jsx)(J.Title,{$color:e.color,children:e.title}),e.ingress&&(0,l.jsx)(J.Description,{$color:e.color,children:e.ingress}
1122),(0,l.jsx)(Y,{items:e.items,isOnBackground:!!e.backgroundColor})]})})},CommentsBlock:o2,ContentBlock:X.A,CookingModeBlock:ea,CustomerInfoBlock:function(){let e=(0,d.useContext)(er.Ay);return e.customer?e.customer.customerNumbers?.length?(0,l.jsx)(E.A,{children:(0,l.jsx)(e$,{})}):(0,l.jsx)(E.A,{children:(0,l.jsx)(eh,{})}):(0,l.jsx)(E.A,{children:(0,l.jsx)(eH,{})})},CustomerInvoiceOptionsBlock:function(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=(0,d.useContext)(em.A),[o,a]=(0,d.useState)(!1),r=(0,d.useMemo)(()=>t.customer?.invoiceMethod||t.customer?.latestInvoiceMethod,[t.customer]),s=(0,eu.A)({api:i.aspaApiAuthenticated,query:tR}),c=(0,d.useMemo)(()=>t.customer?.creditCard,[t.customer]),u=(0,d.useMemo)(()=>{if(c)return"MobilePay"===c.brand},[c]),m=(0,d.useMemo)(()=>{if(!c)return!1;let e=new Date;return e.setFullYear(Number(c.expirationYear)),e.setMonth(Number(c.expirationMonth)),e.setDate(0),e.getTime()-Date.now()<5184e6},[c]),p=(0,d.useMemo)(()=>{if(t.customer)return"https://www.meillakotona.fi/luottokorttivahvistus?"+["viewer="+t.customer.id].filter(Boolean).join("&")},[t.customer]);return null===t.customerNumber?null:(0,l.jsxs)(E.A,{children:[(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:"Laskutus"}),t.customer?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tL,{isOpen:o,onClose:()=>a(!1)}),(0,l.jsxs)(tN,{children:[(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:r&&tD[r]||"Maksutapa",image:{url:e.invoiceImageUrl},onClick:()=>{a(!0)},extraContent:(0,l.jsx)(tO.ExtraContent,{children:(0,l.jsx)(tO.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"pen-to-square",style:"light"})})})})})}),c&&(0,l.jsx)(l.Fragment,{children:u?(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:"MobilePay",image:{url:e.mobilePayImageUrl}})}):(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:"Luottokortti",image:{url:e.creditCardImageUrl},extraContent:(0,l.jsxs)(tO.ExtraContent,{children:[m&&(0,l.jsxs)("div",{className:"is-label-l has-universal-danger-color",children:["Vanhenee ",c.expirationMonth,"/",c.expirationYear]}),(0,l.jsx)("div",{children:(0,l.jsx)(ed.A,{size:"small",type:"primary",disabled:s.loading||!p,onClick:async()=>{let e=await s.mutate({variables:{viewerId:t.customer.id,returnUrl:p}}),n=e?.requestCreditCardUpdate;n&&(window.location.href=n)},children:"P\xe4ivit\xe4 luottokortti"})})]})})})}),e.links?.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsxs)(tO.ExtraLink,{as:n,href:e.url,children:[e.label,(0,l.jsx)(tO.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"light"})})})]})},t))||null]})]}):t.customerError?(0,l.jsx)("p",{className:"has-universal-danger-color",children:"Jotain meni vikaan."}):(0,l.jsx)("div",{style:{marginTop:"var(--block-spacing)",marginBottom:"var(--block-spacing)"},children:(0,l.jsx)(tB.A,{})})]})},CustomerInvoicesListBlock:function(){let e=(0,d.useContext)(er.Ay),t=(0,d.useMemo)(()=>e.openInvoices?e.openInvoices.sort((e,t)=>e.dueDate.localeCompare(t.dueDate)):e.openInvoices,[e.openInvoices]),n=(0,d.useMemo)(()=>e.paidInvoices?e.paidInvoices.sort((e,t)=>t.dueDate.localeCompare(e.dueDate)):e.paidInvoices,[e.paidInvoices]);return(0,l.jsxs)(E.A,{children:[t?(0,l.jsx)(t_.Invoices,{children:t.map((e,t)=>(0,l.jsx)(tG,{invoice:e},t))}):e.openInvoicesError?(0,l.jsx)(t_.ErrorMessage,{children:"Jotain meni vikaan"}):(0,l.jsx)("div",{style:{marginTop:"var(--block-spacing)",marginBottom:"var(--block-spacing)"},children:(0,l.jsx)(t_.Invoices,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(tW,{},t))})}),n?(0,l.jsx)(t_.Invoices,{children:n.map((e,t)=>(0,l.jsx)(tG,{invoice:e},t))}):e.paidInvoicesError?(0,l.jsx)(t_.ErrorMessage,{children:"Jotain meni vikaan"}):(0,l.jsx)("div",{style:{marginTop:"var(--block-spacing)",marginBottom:"var(--block-spacing)"},children:(0,l.jsx)(t_.Invoices,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(tW,{},t))})})]})},CustomerInvoicesSummaryBlock:function(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=(0,d.useContext)(em.A),o=(0,eu.A)({api:i.aspaApiAuthenticated,query:tz}),a=(0,d.useMemo)(()=>
1122t.customer?.creditCard,[t.customer]),r=(0,d.useMemo)(()=>{if(a)return"MobilePay"===a.brand},[a]),s=(0,d.useMemo)(()=>{if(!a)return!1;let e=new Date;return e.setFullYear(Number(a.expirationYear)),e.setMonth(Number(a.expirationMonth)),e.setDate(0),e.getTime()-Date.now()<5184e6},[a]),c=(0,d.useMemo)(()=>{if(t.openInvoices)return t.openInvoices.find(e=>"Open"===e.statusCode)||null},[t.openInvoices]),u=(0,d.useMemo)(()=>{if(t.customer)return"https://www.meillakotona.fi/luottokorttivahvistus?"+["viewer="+t.customer.id].filter(Boolean).join("&")},[t.customer]);return(0,l.jsxs)(E.A,{children:[(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:"Laskutus"}),(0,l.jsxs)(tN,{children:[(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:"Seuraava lasku",image:{url:e.invoiceImageUrl},as:n,href:c?`/laskut/${c.id}`:"/laskut",children:(0,l.jsxs)(tF.ExtraContent,{children:[null===c?"Ei avoimia laskuja":c?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"is-label-l",children:[c.amountDueText," • ",(0,eU.Yq)(c.dueDate)]}),(0,l.jsx)("div",{children:(0,l.jsx)(ed.A,{size:"small",children:"Siirry maksamaan"})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eF.A,{length:"short"})}),(0,l.jsx)(tF.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"light"})})})]})})}),a&&(0,l.jsx)(l.Fragment,{children:r?(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:"MobilePay",image:{url:e.mobilePayImageUrl}})}):(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:"Luottokortti",image:{url:e.creditCardImageUrl},extraContent:(0,l.jsxs)(tF.ExtraContent,{children:[s&&(0,l.jsxs)("div",{className:"is-label-l has-universal-danger-color",children:["Vanhenee ",a.expirationMonth,"/",a.expirationYear]}),(0,l.jsx)("div",{children:(0,l.jsx)(ed.A,{size:"small",type:"primary",disabled:o.loading||!u,onClick:async()=>{let e=await o.mutate({variables:{viewerId:t.customer.id,returnUrl:u}}),n=e?.requestCreditCardUpdate;n&&(window.location.href=n)},children:"P\xe4ivit\xe4 luottokortti"})})]})})})}),e.links?.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsxs)(tF.ExtraLink,{as:n,href:e.url,children:[e.label,(0,l.jsx)(tF.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"light"})})})]})},t))||null]})]})},CustomerSubscriptionsListBlock:function(){let e=(0,d.useContext)(er.Ay);return(0,l.jsxs)(E.A,{children:[(0,l.jsx)("h2",{className:"is-heading-m",children:"Omat tilaukset"}),(0,l.jsx)(t8.PromoList,{children:e.subscriptionsError||e.agreementsError?(0,l.jsx)(tJ.A,{children:e.subscriptionsError?.message||e.agreementsError?.message}):e.subscriptions&&e.agreements?(0,l.jsx)(l.Fragment,{children:0===e.subscriptions.length&&0===e.agreements.length?(0,l.jsx)("p",{className:"is-body-s",children:"Ei voimassaolevia tilauksia."}):(0,l.jsxs)(l.Fragment,{children:[e.subscriptions.map(e=>(0,l.jsx)(t8.PromoListItem,{children:(0,l.jsx)(t2,{subscription:e})},e.id)),e.agreements.map(e=>(0,l.jsx)(t8.PromoListItem,{children:(0,l.jsx)(t0,{agreement:e})},e.id))]})}):(0,l.jsx)(l.Fragment,{children:[,,,,,].fill(null).map((e,t)=>(0,l.jsx)(t8.PromoListItem,{children:(0,l.jsx)(t8.PlaceholderWrapper,{children:(0,l.jsx)(t5,{},t)})},t))})}),(0,l.jsx)("h2",{className:"is-heading-m",children:"P\xe4\xe4ttyneet tilaukset"}),(0,l.jsx)(t8.PromoList,{children:e.endedSubscriptionsError?(0,l.jsx)(tJ.A,{children:e.endedSubscriptionsError?.message}):e.endedSubscriptions?(0,l.jsx)(l.Fragment,{children:0===e.endedSubscriptions.length?(0,l.jsx)("p",{className:"is-body-s",children:"Ei p\xe4\xe4ttyneit\xe4 tilauksia."}):(0,l.jsx)(l.Fragment,{children:e.endedSubscriptions.map(e=>(0,l.jsx)(t8.PromoListItem,{children:(0,l.jsx)(t2,{subscription:e})},e.id))})}):(0,l.jsx)(l.Fragment,{children:[,,,,,].fill(null).map((e,t)=>(0,l.jsx)(t8.PromoListItem,{children:(0,l.jsx)(t8.PlaceholderWrapper,{children:(0,l.jsx)(t5,{},t)})},t))})})]})},CustomerSubscriptionsSummaryBlock:function(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A);return(0,l.jsxs)(E.A,{children:[(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:"Tilaustesi tiedot"}),(0,l.jsxs)(tN,{children:[t.subscriptionsError||t.agreementsError?(0,l.jsx)(tJ.A,{children:t.subscriptionsError?.message||t.agreementsError?.message}):t.subscriptions&&t.agreements?(0,l.jsxs)(l.Fragment,{children:[t.subscriptions.map(e=>(0,l.jsx)(tS,{children:(0,l.jsx)(t2,{subscription:e})},e.id)),t.agreements.map(e=>(0,l.jsx)(tS,{children:(0,l.jsx)(t0,{agreement:e})},e.id)),t.digitalArchive&&(0,l.jsx)(tS,{children:(0,l.jsx)(t7.DigitalArchivePromoWrapper,{children:(0,l.jsx)(t3,{title:"N\xe4k\xf6islehtiarkisto",imageUrl:t.digitalArchive.subscriptions[0].productImageUrl,href:t.digitalArchive.url,statusText:"Sis\xe4ltyy lehtitilaukseesi"})})})]}):(0,l.jsx)(l.Fragment,{children:[,,,,,].fill(null).map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsx)(t7.PlaceholderWrapper,{children:(0,l.jsx)(t5,{},t)})},t))}),e.links?.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsxs)(t7.ExtraLink,{as:n,href:e.url,children:[e.label,(0,l.jsx)(t7.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})},t))||null]})]})},CustomerBenefitsListBlock:function(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=(0,d.useMemo)(()=>t.premiums?t.premiums.filter(e=>!t6(e)):t.premiums,[t.premiums]),o=(0,d.useMemo)(()=>
1122{if(t.premiums)return t.premiums.find(t6)},[t.premiums]),a=(0,d.useMemo)(()=>t.submittedPremiums?t.submittedPremiums.filter(e=>!t6(e)):t.submittedPremiums,[t.submittedPremiums]),r=(0,d.useMemo)(()=>{if(t.subscriptions)return t.subscriptions.map(e=>e.freePremiumUrl).filter(e=>!!e)},[t.subscriptions]);return(0,l.jsxs)(E.A,{children:[(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:"Tilaajalahjat"}),(0,l.jsx)(tN,{children:t.premiumsError?(0,l.jsx)(tJ.A,{children:t.premiumsError.message}):t.premiums?(0,l.jsxs)(l.Fragment,{children:[i.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsx)(tU,{premium:e})},t)),(0,l.jsx)(tS,{children:(0,l.jsxs)(tT.A,{style:"horizontal_subscription",title:"Tilaajien arvonnat. Voita jopa 5\xa0000 €!",href:"/arvonnat",image:{url:e.arvonnatImageUrl},as:n,children:[(0,l.jsx)(t9.BenefitStatus,{children:"Etu voimassa"}),(0,l.jsx)(t9.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})}),o&&(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:o.productTitle,image:{url:e.reiluhintaImageUrl},children:(0,l.jsx)(t9.BenefitStatus,{children:"Etu voimassa"})})}),r.map((t,i)=>(0,l.jsx)(tS,{children:(0,l.jsxs)(tT.A,{style:"horizontal_subscription",title:"Lahjalehti ilmaiseksi",href:t,as:n,image:{url:e.lahjalehtiImageUrl},children:[(0,l.jsx)(t9.BenefitStatus,{children:"Etu k\xe4ytt\xe4m\xe4tt\xe4"}),(0,l.jsx)(t9.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})},i))]}):(0,l.jsx)(tB.A,{})}),(0,l.jsx)("div",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:"Aiemmat tilaajalahjat"}),(0,l.jsx)(tN,{children:t.submittedPremiumsError?(0,l.jsx)(tJ.A,{children:t.submittedPremiumsError.message}):t.submittedPremiums?(0,l.jsx)(l.Fragment,{children:a.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsx)(tU,{premium:e})},t))}):(0,l.jsx)(tB.A,{})})]})},CustomerBenefitsSummaryBlock:function(e){let t=(0,d.useContext)(er.Ay),{Link:n}=(0,d.useContext)(R.A),i=(0,d.useMemo)(()=>t.premiums?t.premiums.filter(e=>!ne(e)):t.premiums,[t.premiums]),o=(0,d.useMemo)(()=>{if(t.premiums)return t.premiums.find(ne)},[t.premiums]),a=(0,d.useMemo)(()=>t.subscriptions?t.subscriptions.map(e=>e.freePremiumUrl).filter(e=>!!e):t.subscriptions,[t.subscriptions]);return(0,l.jsxs)(E.A,{children:[(0,l.jsx)(e6.A,{title:"Asiakasedut",titleUrl:"/edut",className:"is-heading-m","data-click-element-name":"CustomerBenefitsLink",style:{marginBottom:"var(--spacing-md)"}}),(0,l.jsx)(tN,{children:t.premiumsError?(0,l.jsx)(tJ.A,{children:t.premiumsError.message}):t.premiums?(0,l.jsxs)(l.Fragment,{children:[i.map((e,t)=>(0,l.jsx)(tS,{children:(0,l.jsx)(tU,{premium:e})},t)),(0,l.jsx)(tS,{children:(0,l.jsxs)(tT.A,{style:"horizontal_subscription",title:"Tilaajien arvonnat. Voita jopa 5\xa0000 €!",href:"/arvonnat",image:{url:e.arvonnatImageUrl},as:n,children:[(0,l.jsx)(nt.BenefitStatus,{children:"Etu voimassa"}),(0,l.jsx)(nt.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})}),o&&(0,l.jsx)(tS,{children:(0,l.jsx)(tT.A,{style:"horizontal_subscription",title:o.productTitle,image:{url:e.reiluhintaImageUrl},children:(0,l.jsx)(nt.BenefitStatus,{children:"Etu voimassa"})})}),a.map((t,i)=>(0,l.jsx)(tS,{children:(0,l.jsxs)(tT.A,{style:"horizontal_subscription",title:"Lahjalehti ilmaiseksi",image:{url:e.lahjalehtiImageUrl},href:t,as:n,children:[(0,l.jsx)(nt.BenefitStatus,{children:"Etu k\xe4ytt\xe4m\xe4tt\xe4"}),(0,l.jsx)(nt.LinkIcon,{children:(0,l.jsx)(V.g,{fontSize:20,icon:(0,H.K)({name:"angle-right",style:"regular"})})})]})},i))]}):(0,l.jsx)(tB.A,{})})]})},CustomerOffersBlock:rv,CustomerServiceMessageFormBlock:function(){let e=(0,d.useContext)(em.A),t=(0,d.useContext)(er.Ay),[n,i]=(0,d.useState)(!1),[o,a]=(0,d.useState)(""),[r,s]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(""),[g,h]=(0,d.useState)(""),[x,f]=(0,d.useState)(""),[y,v]=(0,d.useState)(""),[b,C]=(0,d.useState)(!1),A=(0,eu.A)({api:e.aspaApiAuthenticated||e.aspaApi,query:rI}),k=(0,d.useMemo)(()=>A.data?.sendCustomerServiceMessage,[A.data]);(0,d.useEffect)(()=>{(o||r||c||m||g||x||b)&&i(!0)},[o,r,c,m,g,x,b]),(0,d.useEffect)(()=>{!t.customer||n||(a(t.customer.emailAddress||""),s(t.customer.firstName||""),u(t.customer.lastName||""),p(t.customer.primaryAddress?.postalCode||""),h(t.customer.primaryAddress?.city||""),f(t.customerNumber||""))},[t.customer,t.customerNumber,n]);let j=(0,d.useMemo)(()=>!t.customerNumber||t.customerNumber!==x,[t.customerNumber,x]),w=(0,d.useMemo)(()=>!t.customer?.emailAddress||t.customer?.emailAddress!==o,[t.customer,o]),I=(0,d.useMemo)(()=>t.customer?.id,[t.customer]),N=(0,d.useMemo)(()=>!!o&&!!y,[o,y]);return(0,l.jsx)(E.A,{children:k?(0,l.jsx)("div",{className:"is-body-l",children:"Viestisi on l\xe4hetetty."}):(0,l.jsxs)(el.wp,{onSubmit:async e=>{e.preventDefault(),await A.mutate({variables:{senderEmail:o,firstName:r,lastName:c,messageText:y,postalCode:m,city:g,viewerId:I,customerNumber:x,answerRequired:b}})},children:[(0,l.jsxs)(el.wu,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"is-heading-xs",children:"Viesti"}),(0,l.jsx)("textarea",{onChange:e=>v(e.target.value),rows:4,id:"message",value:y})]}),(0,l.jsx)(es.A,{id:"firstName",disabled:t.customerLoading||A.loading,label:"Etunimi",value:r,maxLength:40,onChange:e=>s(e.target.value)}),(0,l.jsx)(es.A,{id:"lastName",disabled:t.customerLoading||A.loading,label:"Sukunimi",value:c,maxLength:40,onChange:e=>u(e.target.value)}),(0,l.jsx)(es.A,{id:"postalCode",disabled:t.customerLoading||A.loading,type:"text",minLength:5,maxLength:5,label:"Postinumero",value:m,onChange:e=>{let t=e.target.value;(!t||ep(t))&&p(e.target.value)}}),(0,l.jsx)(es.A,{id:"city",disabled:t.customerLoading||A.loading,label:"Kaupunki",value:g,onChange:e=>h(e.target.value)}),(0,l.jsx)(es.A,{id:"city",readOnly:!j,disabled:t.customerLoading||A.loading,label:"Asiakasnumero",value:x,onChange:e=>f(e.target.value)}),(0,l.jsx)(es.A,{id:"email",readOnly:!w,disabled:t.customerLoading||A.loading,label:"S\xe4hk\xf6posti",value:o,onChange:e=>a(e.target.value)}),(0,l.jsx)(oN.A,{id:"answerRequired",disabled:t.customerLoading||A.loading,label:"Haluan vastauksen viestiini",helpText:"K\xe4sittelemme kaikki palautteet ja vastaamme viestiisi niin halutessasi.",value:b,onChange:()=>C(e=>!e)})]}),(0,l.jsx)(ed.A,{buttonType:"submit",disabled:!N||t.customerLoading||A.loading,children:"L\xe4het\xe4"})]})})}
1122,DailyTarotBlock:su,DiscussionBlock:function(){let e=(0,d.useContext)(tA.A),{content:t}=(0,d.useContext)(F.A),[n,i]=(0,d.useState)(!1),o=(0,N.A)(e=>e.clientIdentifier),[a,r]=(0,d.useState)(),s=(0,d.useContext)(em.A),{value:c,loading:u}=(0,iN.A)(["discussion"]),{data:m,refetch:p}=(0,eG.A)({api:s.contentApi,query:aB,variables:{id:t?.id,clientIdentifier:o},skip:!o||!t?.id}),g=(0,d.useMemo)(()=>{if(!t?.slug)return;if(!c)return!1;let e=c[t.slug];return!!e&&!!e.openUntil&&Date.now()>Date.parse(e.openUntil)},[c]),h=(0,d.useMemo)(()=>{if(!m)return null;let e=m?.node?.articleComments||m?.node?.questionComments||m?.node?.videoComments;return e?.edges?e.edges.reduce((e,t)=>(e.push(t.node),t.node.children?.edges&&t.node.children.edges.forEach(n=>{e.push({...n.node,parent:t.node})}),e),[]).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)):null},[m]);return((0,d.useEffect)(()=>{let e=setInterval(()=>{p()},3e4);return()=>clearInterval(e)},[p]),(c||!u)&&h&&t&&t.metadata?.commentsEnabled!==!1)?(0,l.jsx)(E.A,{id:`comments-block-${t.id}`,align:"full",children:(0,l.jsxs)(aR.Component,{children:[(0,l.jsx)(eK.pL,{rootMargin:"500px 0px 0px 0px",onChange:i,children:({ref:t})=>h.length>0?(0,l.jsx)("div",{ref:t,children:(0,l.jsx)(aS,{messages:h,onReply:e=>{r(e)},canReply:!g&&!!e.user})}):(0,l.jsxs)(aR.NoMessages,{ref:t,children:[(0,l.jsx)("strong",{children:"Onnea!"})," Jonkun on oltava ensimm\xe4inen ja nyt se olet sin\xe4. \xc4l\xe4 j\xe4nnit\xe4 tai kursaile vaan kerro, mit\xe4 ajattelet."]})}),(0,l.jsx)(aP,{hidden:!n,nodeId:t.id,messageBeingRepliedTo:a,onCommentCreated:p,onClearQuote:()=>r(),discussionEnded:g})]})}):null},DownloadsBlock:function(){let{content:e}=(0,d.useContext)(F.A),{translate:t}=(0,Z.B)(),n=e?.downloads?.edges||[];return n?.length?(0,l.jsx)(E.A,{id:`downloads-block-${e.id}`,align:"column",children:(0,l.jsxs)(aD.Component,{children:[(0,l.jsx)(aD.Title,{className:"is-heading-l",children:t("DownloadsBlock.downloadsTitle")}),n&&n.map(({node:e},n)=>(0,l.jsxs)(aD.DownloadItem,{children:[(0,l.jsxs)(aD.FileName,{className:"is-heading-m",children:[e.name,(0,l.jsxs)(aD.Filetype,{children:["(",e.url.split(".").pop().toUpperCase(),")"]})]}),(0,l.jsxs)(aD.Button,{href:e.url,target:"_blank",rel:"noopener noreferrer",size:"medium",children:[t("DownloadsBlock.downloadButtonLabel"),(0,l.jsx)(V.g,{icon:(0,H.K)({style:"solid",name:"arrow-down-to-bracket"})})]})]},n))]})}):null},DynamicTextBlock:eZ,EmbedBlock:sm,FeedbackFormBlock:function({title:e,description:t,buttonText:n,feedbackTopics:i,forceFeedbackTopic:o,forceFromEmail:a}){return(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)(oW,{title:e,description:t,buttonText:n,feedbackTopics:i,forceFeedbackTopic:o,forceFromEmail:a})})},FollowUsBlock:function({title:e="",ctaText:t="",platforms:n=[],hidePlatformNames:i=!1}){return(0,l.jsx)(E.A,{children:(0,l.jsxs)(ri.Component,{children:[(0,l.jsx)(ri.Heading,{className:"is-heading-xl",children:e}),(0,l.jsx)(ri.CtaText,{className:"is-body-l",children:t}),(0,l.jsx)(ri.SocialLinks,{children:n.map(({platform:e,name:t,url:n})=>(0,l.jsx)(ri.SocialLink,{"data-click-element-name":`FollowUsBlock-${(0,rn.o9)(t)}`,size:"medium",type:"social",href:n,target:"_blank",rel:"noopener noreferrer",className:`${e} ${i?"is-hide-name":""}`,children:i?(0,l.jsx)(ri.Icon,{icon:(0,H.K)({name:"facebook"===e?"facebook":e,style:"brands"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ri.Icon,{icon:(0,H.K)({name:"facebook"===e?"facebook-f":e,style:"brands"})}),(0,l.jsx)(ri.Name,{children:t})]})},e))})]})})},GalleryBlock:sp,GameBlock:function(e){return(0,l.jsx)(E.A,{children:(0,l.jsx)(e5,{game:e.games[0],chapterOverrides:e.chapterOverrides||[]})})},GamePortalBlock:function(e){let t=(0,d.useContext)(S.Dx);if(e.games)return"carousel"===e.layout?(0,l.jsx)(E.A,{align:"full",backgroundColor:t["swiper-carousel--background-color"],children:(0,l.jsx)(e9,{games:e.games,title:e.title,titleUrl:e.titleUrl})}):(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)(tt,{games:e.games})})},GetsitecontrolModalBlock:sg,GistChatBlock:sc,GistSearchBlock:sr,GreetingBlock:sh,GridBlock:function(e){return(0,l.jsx)(E.A,{align:"full",backgroundColor:e.backgroundColor,children:(0,l.jsxs)(ta.Container,{className:e.backgroundColor?"has-background":"",children:[e.title&&(0,l.jsx)(ta.Title,{$color:e.color,children:e.title}),e.ingress&&(0,l.jsx)(ta.Description,{$color:e.color,children:e.ingress}),"carousel"===e.style?(0,l.jsx)(Y,{cta:e.cta,items:e.items,isOnBackgroun
1122d:!!e.backgroundColor}):(0,l.jsx)(ti,{cta:e.cta,items:e.items,isOnBackground:!!e.backgroundColor})]})})},HeadingBlock:tl,IframeBlock:sx,ImageBlock:tc,ImageCoverBlock:function(){let{content:e}=(0,d.useContext)(F.A);return e?.coverType==="no-cover"?null:(0,l.jsx)(E.A,{align:"full",children:(0,l.jsx)(tu,{article:e})})},InstagramEmbedBlock:sf,InvoiceDetailsBlock:function(){let e=(0,tC.useParams)(),t=(0,d.useContext)(er.Ay),n=(0,d.useMemo)(()=>{if(t.openInvoices&&t.paidInvoices)return[...t.openInvoices,...t.paidInvoices].find(t=>t.id===e.invoiceId)||null},[e.invoiceId,t.openInvoices,t.paidInvoices]);return void 0===n?(0,l.jsx)(E.A,{children:(0,l.jsx)(nr,{})}):n?(0,l.jsx)(E.A,{children:(0,l.jsx)(na,{invoice:n})}):null},KeesingGameBlock:function(e){let t=(0,tp.qn)(),[n,i]=(0,d.useState)(null),o=(0,B.A)();return(0,d.useEffect)(()=>{e.gameType&&e.gameTitle&&(0,tf.sq)({event:"onLoadGame",payload:{gameType:e.gameType,gameTitle:e.gameTitle}})},[e.gameType,e.gameTitle]),(({url:e,className:t,element:n})=>{let[i,o]=(0,d.useState)(!1),[a,r]=(0,d.useState)(!1),s=void 0===n;return(0,d.useEffect)(()=>{if(!e||!s&&!n||i)return;if(th[e])return void th[e].then(()=>{r(!0)});o(!0);let a=new Promise(i=>{let o=document.createElement("link");o.rel="stylesheet",o.onload=()=>{r(!0),i()},o.href=e,t&&(o.className=t),(n||document.head).appendChild(o)});s&&(th[e]=a)},[e,n,r])})({url:"https://web.keesing.com/pub/config/alehdet/css/custom_client.css"}),(0,tg.A)({id:"keesing-bundle-loader",url:t?"https://web.keesing.com/pub/bundle-loader/bundle-loader.js":void 0,async:!0,attributes:{"data-wlpp-bundle":"player"},element:n}),(0,d.useEffect)(()=>{if("wordsearch"!==e.gameType||!o.isNativeApp||window.alehdet?.appVersionInfo?.os!=="ios")return;let t=0,n=setInterval(function(){t++;let e={top:0,left:0,x:0,y:0},i=document.querySelector(".clue-items");if(!i){t>10&&clearInterval(n);return}function o(t){let n=t.pageX-e.x,o=t.pageY-e.y;i.scrollTop=e.top-o,i.scrollLeft=e.left-n}function a(){document.removeEventListener("touchmove",o),document.removeEventListener("touchend",a)}i.addEventListener("touchstart",function(t){e={left:i.scrollLeft,top:i.scrollTop,x:t.pageX,y:t.pageY},document.addEventListener("touchmove",o),document.addEventListener("touchend",a)})},200);return()=>clearInterval(n)},[e.gameType,o.isNativeApp]),(0,l.jsx)(E.A,{align:"full",hasBackground:!0,children:(0,l.jsx)(ty.Container,{children:t?(0,l.jsx)("div",{ref:e=>i(e),"data-login":!0,id:"puzzle-portal","data-customerid":"alehdet","data-gametype":e.gameType,"data-puzzleid":e.puzzleId,...e.forceMobileMode?{"data-forcemode":"mobile"}:{}}):!1===t?(0,l.jsx)(ty.NoConsent,{children:(0,l.jsx)(tx.A,{title:"Pelit k\xe4ytt\xe4v\xe4t ev\xe4steit\xe4",description:"A-lehtien palveluissa k\xe4ytett\xe4v\xe4t pelit ker\xe4\xe4v\xe4t tilastodataa pelien k\xe4yt\xf6st\xe4. Datan ker\xe4\xe4minen toimii ev\xe4steiden avulla. Pelataksesi pelej\xe4, sinun on hyv\xe4ksytt\xe4v\xe4 pelikumppanimme ev\xe4steet."})}):null})})},ListBlock:tv.A,LoginButtonsBlock:function(){return(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(tk,{})})},LogoStripBlock:function(e){return(0,l.jsx)(E.A,{align:"full",hasBackground:!0,children:(0,l.jsx)(tw.Grid,{$background:e.background,children:e.logos?.map((e,t)=>(0,l.jsx)(tw.Logo,{src:e.url,$width:e.width,$widthMobile:e.widthMobile},t))})})},LyytiSignUpFormBlock:nc,MagazinePromoBlock:nx,MegaQuoteBlock:function(e){if(!e.quote)return null;let t=!!e.backgroundImageUrl||!!e.backgroundVideoUrl,n=!!e.color,
1122i=e.align;return e.fullHeight&&(i="full"),(0,l.jsx)(E.A,{align:i,children:(0,l.jsxs)(nC.Component,{className:ts()(e.fullHeight&&"full-height",t?"with-media-background":"without-media-background",e.color?"with-color":"without-color"),$backgroundColor:e.backgroundColor,$color:e.color,children:[e.backgroundImageUrl&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(nv,{src:e.backgroundImageUrl,zIndex:1,fixedAttachment:!0===e.fullHeight})}),e.backgroundVideoUrl&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eY,{src:e.backgroundVideoUrl,zIndex:1})}),t&&!n&&(0,l.jsx)(nC.Overlay,{}),(0,l.jsxs)(nC.Text,{children:[(0,l.jsx)(nC.Quote,{className:"is-heading-xxl",children:e.quote}),e.author&&(0,l.jsx)(nC.Author,{className:"is-body-s",children:e.author})]})]})})},MemoryGameBlock:sy,MemoryGamesPortalBlock:function({baseUrl:e="/muistipelit",gameUrls:t,align:n="wide"}){return(0,l.jsx)(E.A,{align:n,hasBackground:!0,children:(0,l.jsx)("div",{className:"memory-games",lang:"fi",children:(0,l.jsx)(nA.A,{name:"MemoryGamesPortalBlock",children:(0,l.jsx)(nS,{baseUrl:e,gameUrls:t})})})})},NewsletterSubscription:oj,NewsletterSubscriptionBlock:oj,BrazeNewsletterSubscriptionBlock:function({title:e,description:t,buttonText:n,lists:i,listId:o,listBrazeSubscriptionGroupId:a,brandName:r,logoUrl:s,unsubscribe:c,email:d,onConversion:u}){let m;if(i)m=i;else{if(!o||!a)return p.A.error("BrazeNewsletterSubscriptionBlock: No lists specified"),null;m=[{id:o,label:o,brazeSubscriptionGroupId:a}]}return(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)(oS,{title:e,description:t,buttonText:n,lists:m,brandName:r,logoUrl:s,unsubscribe:c,email:d,onConversion:u})})},BrazeNewsletterSubscriptionManagerBlock:function({title:e,description:t,imageUrl:n,newsletters:i}){let{translate:o}=(0,Z.B)(),a=(0,d.useContext)(tA.A),[r,s]=(0,d.useState)(null),[c,u]=(0,d.useState)(!1),m=a?.isSignedIn,p=a?.userId,g=a?.user?.email;return(0,d.useEffect)(()=>{m&&p&&g?(async()=>{u(!0);try{let e=new URL("/api/braze/subscriptions",window.location.origin);e.searchParams.append("external_id",p),g&&e.searchParams.append("email",g);let t=await fetch(e.toString(),{method:"GET",headers:{"Content-Type":"application/json"}});if(t.ok){let e=await t.json();if(e.success&&e.data?.users?.[0]?.subscription_groups){let t={subscription_groups:e.data.users[0].subscription_groups.map(e=>({subscription_group_id:e.id,subscription_state:e.status.toLowerCase()}))};s(t)}}}catch(e){console.error("Error fetching subscriptions:",e)}finally{u(!1)}})():s(null)},[m,p,g]),(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsxs)(oT.Component,{children:[(0,l.jsxs)(oT.HeaderContent,{children:[n&&(0,l.jsx)(oT.HeaderImage,{src:n,alt:""}),e&&(0,l.jsx)(oT.Title,{children:e}),t&&(0,l.jsx)(oT.Description,{children:t})]}),(0,l.jsx)(oT.NewsletterList,{children:c?(0,l.jsx)(oT.LoadingMessage,{children:"Ladataan tilauksia..."}):i.map((e,t)=>{let n=(e=>{if(!m||!p||!r?.subscription_groups)return e;let t=e.lists.some(e=>{if(!e.brazeSubscriptionGroupId)return!1;let t=r.subscription_groups?.find(t=>t.subscription_group_id===e.brazeSubscriptionGroupId);return t?.subscription_state==="subscribed"});return{...e,unsubscribe:t,buttonText:t?o("NewsletterSubscription.unsubscribeButtonText"):e.buttonText||o("NewsletterSubscription.subscribeButtonText"),externalId:p}})(e);return(0,l.jsx)(oS,{title:n.title,description:n.description,buttonText:n.buttonText,lists:n.lists,brandName:n.brandName,logoUrl:n.logoUrl,unsubscribe:n.unsubscribe,email:g,externalId:p},t)})})]})})},BrazeContentCardBlock:function({id:e}){let t=(0,N.A)(e=>e.getContentCardForPlacement),i=(0,N.A)(e=>e.brazeInitialized),o=(0,d.useRef)(null),[a,r]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!i)return;let n=t(e);n&&r(n)},[t,e,i]);let s=!!a?.extras?.block;return((0,d.useEffect)(()=>{let e=o.current;e&&a&&!s&&(async()=>{try{(await n.e(1808).then(n.bind(n,11808))).showContentCards(e,e=>e.filter(e=>e.id===a.id&&(e.subscribeToDismissedEvent(()=>{p.A.debug("BrazeContentCardBlock: Card dismissed",e.id)}),e.subscribeToClickedEvent(()=>{p.A.debug("BrazeContentCardBlock: Card clicked",e.id)}),!0)))}catch(e){p.A.error("BrazePlacementBlock: Failed to render SDK card",e)}})()},[a,s]),a)?s?(p.A.debug("ContentCardPlacementBlock: Rendering as custom block",e,a),(0,l.jsx)(oR,{card:a})):(p.A.debug("ContentCardPlacementBlock: Rendering with SDK",e,a),(0,l.jsx)(n0.A.Provider,{value:{configuration:{blockName:"ContentCardPlacementBlock",placementName:e}},children:(0,l.jsx)(E.A,{id:e,children:(0,l.jsx)(oB,{ref:o})})})):null},BrazeBannerBlock:function({id:e}){let t=(0,N.A)(t=>t._brazeBanners[e]??null),n=(0,N.A)(e=>e.insertBanner),i=(0,d.useRef)(null),o=(0,d.useRef)(!1);return((0,d.useEffect)(()=>{let a=i.current;
1122a&&t&&!o.current&&(o.current=!0,n(t,a),p.A.debug("BrazeBannerBlock: Inserted banner",e,t))},[t,n,e]),t)?(p.A.debug("BrazeBannerBlock: Rendering banner",e,t),(0,l.jsx)(n0.A.Provider,{value:{configuration:{blockName:"BrazeBannerBlock",placementName:e}},children:(0,l.jsx)(E.A,{id:e,children:(0,l.jsx)(oD,{ref:i})})})):null},BrazeCustomerBenefitsListBlock:function(e){let t=(0,d.useContext)(er.Ay),n=(0,N.A)(e=>e._brazeBanners.digiaspa_promos??null),i=(0,N.A)(e=>e.refreshBrazeBanners),o=(0,d.useRef)(null),a=(0,d.useRef)(null),r="contain"===e.imageFit?"contain":void 0,s=(0,d.useMemo)(()=>Array.isArray(e.promos)?e.promos:[],[e.promos]),c=(0,d.useMemo)(()=>(function(e){if(!e||e.isControl)return[];let t=e.getStringProperty("promotions");if(p.A.debug("BrazeCustomerBenefitsListBlock: Promotions from banner",t),!t?.trim())return[];try{let e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(e){return p.A.error("BrazeCustomerBenefitsListBlock: Failed to parse banner promotions",e),[]}})(n),[n]),u=(0,d.useMemo)(()=>[...s,...c],[c,s]);if((0,d.useEffect)(()=>{let e=t.customerNumber;if(!e){o.current=null;return}if(c.length>0||o.current===e||a.current===e)return;o.current=e,p.A.debug("BrazeCustomerBenefitsListBlock: Scheduling delayed banner refresh");let n=window.setTimeout(()=>{i().then(()=>{a.current=e,p.A.debug("BrazeCustomerBenefitsListBlock: Refreshed banners after customer update delay")}).catch(e=>{p.A.error("BrazeCustomerBenefitsListBlock: Failed to refresh banners",e)}).finally(()=>{o.current===e&&(o.current=null)})},5e3);return()=>{window.clearTimeout(n),o.current===e&&(o.current=null)}},[c.length,t.customerNumber,i]),!u.length)return null;let m=e.heading?.trim();return(0,l.jsxs)(E.A,{children:[m?(0,l.jsx)("h2",{className:"is-heading-m",style:{marginBottom:"var(--spacing-md)"},children:m}):null,(0,l.jsx)(oF,{children:u.map((e,t)=>(0,l.jsx)(oO.A,{title:e.promo_title,description:e.promo_description,buttonCta:e.promo_link_url?e.promo_cta_text:void 0,linkUrl:e.promo_link_url,image:e.promo_image_url?{url:e.promo_image_url}:void 0,imageFit:r,metadata:oz,commercialLabel:""},"promo-"+t))})]})},PageCoverBlock:nT,ParagraphBlock:nL.A,PasswordProtectionBlock:nB,PayWallBlock:function(e){return(0,l.jsx)(E.A,{align:"full",children:(0,l.jsx)(nD.A,{hasFade:!1,hideRecommendations:!0,placementName:e.placementName,title:e.title,description:e.description,subscribeButtonLabel:e.subscribeButtonLabel,children:e.blocks?(0,l.jsx)(sS,{blocks:e.blocks}):null})})},PlacementBlock:nV,PromoCoverBlock:av,PodcastCoverBlock:function(){let{content:e}=(0,d.useContext)(F.A);return(0,l.jsx)(E.A,{align:"full",children:(0,l.jsx)(nq,{podcast:e})})},PodcastEpisodeBlock:function(e){let[t,n]=(0,d.useState)(),i=(0,nZ.Pl)(e.episodeId);return((0,d.useEffect)(()=>{i&&e();async function e(){let{getEpisode:e}=await (0,nG.P)({query:nQ,variables:{episodeId:i}});n(e)}},[i]),t)?(0,l.jsx)(nM.default,{className:"is-block",children:(0,l.jsx)(nJ,{episode:t,hideDescription:!0})}):null},PodcastEpisodeCoverBlock:function(){let{content:e}=(0,d.useContext)(F.A);return(0,l.jsx)(E.A,{align:"column",children:(0,l.jsx)(nJ,{episode:e,isH1:!0})})},PollBlock:function(){let[e,t]=(0,d.useState)({}),[n,i]=(0,d.useState)(null),[o,a]=(0,d.useState)(!1),[r,s]=(0,d.useState)(null),[c,u]=(0,d.useState)(!1),[m,g]=(0,d.useState)(!0),[h,x]=(0,d.useState)(!1),{configuration:f}=(0,d.useContext)(n0.A),{content:y,isEmbedded:v,unlockedBy:b}=(0,d.useContext)(F.A),{Link:C}=(0,d.useContext)(R.A),A=f?.id,k=f?.title||f?.title||"Poll",j=f?.description||"",w=f?.options,I=f?.showVotes,N=c?f?.footerAfter:f?.footerBefore;(0,d.useEffect)(()=>{let e=async()=>{g(!0);try{let e=await fetch(`/api/poll/get?id=${A}`,{method:"GET",credentials:"same-origin",next:{revalidate:300}});if(!e.ok)throw Error(`Failed to fetch poll data: ${e.status}`);let n=await e.json(),o=new Set(w.map(e=>e.id)),a={};n.votes.forEach(e=>{o.has(e.option_id)&&(a[e.option_id]=e.vote_count)});let r=localStorage.getItem(`poll_vote_${A}`);r&&(i(r),u(!0)),t(a),g(!1),setTimeout(()=>{x(!0)},200)}catch(e){p.A.error("Error fetching poll:",e),s("Jokin meni pieleen. Yrit\xe4 uudelleen my\xf6hemmin."),g(!1)}};return A&&w.length>0&&e(),()=>{x(!1)}},[A,w]);let S=(0,d.useCallback)(async n=>{if(n&&!o){(0,n1.VR)({element_text:w?.find(e=>e.id===n)?.label,element_name:"PollBlock",element_click_name:"PollOption"},y,{content_embedded:v,content_unlocked_by:b}),i(n),a(!0),s(null);try{let i={...e};i[n]=(i[n]||0)+1,x(!1),t(i),u(!0),setTimeout(()=>{x(!0)},100),localStorage.setItem(`poll_vote_${A}`,n),fetch("/api/poll/set",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pollId:A,optionId:n}),credentials:"same-origin"}).then(e=>{if(!e.ok)throw Error(`Failed to submit vote: ${e.status}`)})}catch(e){p.A.error("Error submitting vote:",e),s("Jokin meni pieleen. Yrit\xe4 uudelleen my\xf6hemmin.")}finally{a(!1)}}},[A,o,e,w,y,v,b]);if(r)return(0,l.jsx)(n2.ErrorMessage,{className:"poll-error is-body-s",children:r});
1122if(!w||0===w.length)return p.A.error("No poll options found",f),null;let T=((e,t)=>{let n=0;for(let i of t)n+=e[i]||0;let i={};if(0===n){for(let e of t)i[e]=0;return i}let o=0;for(let a of t){let t=Math.round((e[a]||0)/n*100);i[a]=t,o+=t}let a=100-o;if(0!==a){let e=a>0?1:-1,n=Math.abs(a);for(let o=0;o<n;o++)i[t[o]]+=e}return i})(e,w.map(e=>e.id));return(0,l.jsx)(E.A,{"data-element-name":"PollBlock",children:(0,l.jsxs)(n2.Container,{children:[(0,l.jsxs)(n2.TextContainer,{children:[(0,l.jsx)("h2",{className:"is-heading-xl",style:{margin:0},children:k}),j&&(0,l.jsx)("div",{className:"is-body-s",children:j})]}),(0,l.jsx)(n2.OptionsContainer,{children:w.map(t=>{let i=e[t.id]||0,o=T[t.id]||0,a=n===t.id,r=h?o:0;return(0,l.jsx)(n2.Option,{className:ts()({selected:a&&c,animate:h,placeholder:m,voted:c}),onClick:()=>{c||m||S(t.id)},isDisabled:c&&!a||m,percentage:r,isLoading:m,children:(0,l.jsxs)(n2.OptionInfo,{children:[(0,l.jsx)(n2.OptionText,{className:"is-body-s",children:t.label}),c&&!m&&(0,l.jsxs)(n2.OptionCount,{className:"is-body-s",children:[o,"%",I?` (${i})`:""]})]})},t.id)})}),!m&&!!(N?.text||N?.linkLabel&&N?.linkUrl)&&(0,l.jsxs)(n2.Footer,{className:ts()("poll-footer",{voted:c}),children:[N?.text&&(0,l.jsx)(n2.FooterText,{className:"is-body-s",children:N.text}),N?.linkUrl&&N?.linkLabel&&(0,l.jsx)(n2.FooterLink,{as:C,href:N.linkUrl,className:"is-body-s","data-click-element-name":"PollFooterLink",children:N.linkLabel})]})]})})},ProfileCardBlock:function(e){let t=(0,d.useContext)(tA.A),n=(0,d.useContext)(er.Ay),i=(0,d.useMemo)(()=>n.customer?.isImpersonated,[n.customer?.isImpersonated]),o=(0,d.useMemo)(()=>{if(n.customer?.isImpersonated&&n.customer.lastActivity)return`A-tunnusta k\xe4ytetty viimeksi ${n.customer.lastActivity}`},[n.customer?.isImpersonated,n.customer?.lastActivity]),a=(0,d.useMemo)(()=>n.customer&&(n.customer.firstName||n.customer.lastName)?[n.customer.firstName,n.customer.lastName].filter(e=>!!e).join(" "):t.user?t.user.firstName||t.user.lastName?[t.user.firstName,t.user.lastName].filter(e=>!!e).join(" "):t.user.email||t.user.phoneNumber:void 0,[n.customer,t.user]);return t.user?(0,l.jsx)(E.A,{children:(0,l.jsx)(tI.A,{isImpersonated:i,username:a,imageUrl:null,linkLabel:e.linkLabel,linkUrl:e.linkUrl,extraInfo:o})}):(0,l.jsx)(E.A,{children:(0,l.jsx)(tI.S,{})})},PromoCodeFormBlock:function(){let[e,t]=(0,d.useState)("");return(0,l.jsx)(E.A,{children:(0,l.jsxs)(rw.Component,{children:[(0,l.jsx)("h2",{className:"is-heading-m",style:{margin:0},children:"Tarjouskoodi"}),(0,l.jsx)("div",{className:"is-body-s",children:"Saitko houkuttelevan tarjouksen? Sy\xf6t\xe4 tarjouksen mukana ollut tarjouskoodi t\xe4h\xe4n ja tee tilaus!"}),(0,l.jsx)(es.A,{id:"promoCode",placeholder:"Sy\xf6t\xe4 koodi",value:e,onChange:e=>t(e.target.value)}),(0,l.jsx)(ed.A,{disabled:!e,href:`https://lehtitilaukset.a-lehdet.fi/tarjouskoodi/${e}`,target:"_blank",children:"L\xe4het\xe4"})]})})},PuzzlePlayzGameBlock:function(e){return(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(n5,{...e})})},RecipeFiltersBlock:function(){let{configuration:e}=(0,d.useContext)(n0.A),t=(0,d.useRef)(null),n=(0,d.useRef)(null),[i,o]=(0,d.useState)([]),[a,r]=(0,d.useState)([]),[s,c]=(0,d.useState)([]),[u,m]=(0,d.useState)([]),[p,g]=(0,d.useState)([]),[h,x]=(0,d.useState)(null),[f,y]=(0,d.useState)(null),[v,b]=(0,d.useState)(null),[C,A]=(0,d.useState)(null),[k,j]=(0,d.useState)(null),[w,I]=(0,d.useState)(0),{translate:N}=(0,Z.B)(),S=(0,d.useContext)(em.A),T=e?.imageUrl,P=(0,d.useMemo)(()=>e?.filters||{},[e?.filters]),L=(0,d.useMemo)(()=>e?.pills||[],[e?.pills]),M=e?.filterButtonColumns||2,B=(0,d.useMemo)(()=>e?.buttons||[],[e?.buttons]),R=e?.randomizeOrder??!1,D=e=>{let t=[];return e.diets&&t.push(...e.diets.map(e=>({field:"diets",value:e}))),e.not_diets&&t.push(...e.not_diets.map(e=>({NOT:{field:"diets",value:e}}))),e.cuisines&&t.push({OR:e.cuisines.map(e=>({field:"cuisine",value:e}))}),e.not_cuisines&&t.push(...e.not_cuisines.map(e=>({NOT:{field:"cuisine",value:e}}))),e.mainIngredients&&t.push(...e.mainIngredients.map(e=>({field:"mainIngredients",value:e}))),e.not_mainIngredients&&t.push(...e.not_mainIngredients.map(e=>({NOT:{field:"mainIngredients",value:e}}))),e.themes&&t.push({OR:e.themes.map(e=>({field:"themes.slug",value:e}))}),e.not_themes&&t.push(...e.not_themes.map(e=>({NOT:{field:"themes.slug",value:e}}
1122))),e.dishTypes&&t.push(...e.dishTypes.map(e=>({field:"dishTypes",value:e}))),e.not_dishTypes&&t.push(...e.not_dishTypes.map(e=>({NOT:{field:"dishTypes",value:e}}))),t},O=[...D(P),...i.flatMap(e=>D(L[e]?.filters||{})),...null!==k?D(B[k]?.filters||{}):[],...a.length>0?[{OR:a.map(e=>({field:"cuisine",value:e}))}]:[],...s.length>0?s.map(e=>({field:"mainIngredients",value:e})):[],...u.length>0?[{OR:u.map(e=>({field:"themes.slug",value:e}))}]:[],...p.length>0?p.map(e=>({field:"dishTypes",value:e})):[]],z=i.length>0||a.length>0||s.length>0||u.length>0||p.length>0||null!==h||null!==f||null!==v||null!==C||null!==k,{data:F,loading:U}=(0,eG.A)({api:S.contentApi,query:ie,variables:{filters:O},skip:!z}),$=(0,d.useMemo)(()=>U?[]:F?.feed?.edges?.map(e=>e.node)||[],[F?.feed?.edges,U]),H=(0,d.useMemo)(()=>{let e=$.filter(e=>{var t;let n,o,a,r,s,l,c=i.reduce((e,t)=>{let n=L[t];return n?.filters?{...e,...n.filters}:e},{}),d=null!==k&&B[k]?.filters||{};return t={...P,...c,...d},n=e=>{if(!e)return 0;let[t,n]=e.split(":").map(Number);return 60*(t||0)+(n||0)},o=!t.activeTime||!e.activeTime||n(e.activeTime)<=t.activeTime,a=!t.passiveTime||!e.passiveTime||n(e.passiveTime)<=t.passiveTime,s=!t.totalTime||(r=n(e.activeTime),r+n(e.passiveTime)<=t.totalTime),l=!t.notOlderThan||e.publishedAt>=t.notOlderThan,o&&a&&s&&l});return R?[...e].sort(()=>Math.random()-.5).slice(0,16):e},[$,P,i,L,k,B,R]),V=H.length>=4,q=e=>{let n;if(!t.current)return;let i=Math.ceil(H.length/3)-1,o=t.current.scrollWidth-t.current.clientWidth;n=e===i?o:Math.min(274*e*3,o),t.current.scrollTo({left:n,behavior:"smooth"}),I(e)};return(0,d.useEffect)(()=>{t.current&&(t.current.scrollTo({left:0,behavior:"smooth"}),I(0))},[i,a,s,u,p,h,f,v,C,k]),(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsxs)(it.Component,{ref:n,$shouldFetchRecipes:z,children:[T&&(0,l.jsx)(it.ImageSection,{children:(0,l.jsx)(it.ImageWrapper,{children:(0,l.jsx)(e1.default,{src:T,alt:"Recipe filters illustration",width:460,height:0,priority:!0})})}),L.length>0&&(0,l.jsx)(it.FilterSection,{children:(0,l.jsxs)(it.FilterPills,{children:[(0,l.jsx)(it.FilterPill,{disabled:z&&U,onClick:()=>{o([])},type:0===i.length?"primary":"secondary",size:"small","data-click-element-name":"RecipeFiltersBlock-allButton",children:N("RecipeFiltersBlock.all")}),L.map((e,t)=>(0,l.jsx)(it.FilterPill,{disabled:z&&U,onClick:()=>{o(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},type:i.includes(t)?"primary":"secondary",size:"small","data-click-element-name":`RecipeFiltersBlock-pillFilter-${e.label}`,children:e.label},t))]})}),B.length>0&&(0,l.jsx)(it.FilterSection,{children:(0,l.jsx)(it.FilterButtons,{columns:M,children:B.map((e,t)=>(0,l.jsx)(it.FilterButton,{disabled:z&&U,onClick:()=>(e.filters,void(k===t?j(null):j(t))),type:null===k||k===t?"primary":"secondary",size:"large","data-click-element-name":`RecipeFiltersBlock-button-${e.label.replace(/\s+/g,"-").toLowerCase()}`,children:e.label},t))})}),z&&(0,l.jsxs)(it.CarouselContainer,{children:[(0,l.jsx)(it.Carousel,{ref:t,children:U?Array.from({length:4},(e,t)=>(0,l.jsx)(it.RecipeCardWrapper,{children:(0,l.jsxs)(it.RecipeCardPlaceholder,{children:[(0,l.jsx)(it.PlaceholderImage,{}),(0,l.jsxs)(it.PlaceholderContent,{children:[(0,l.jsx)(eF.A,{lines:1,length:"medium",lineHeight:"16px"}),(0,l.jsx)(eF.A,{lines:4,lineHeight:"19px"})]})]})},`placeholder-${t}`)):H.map((e,t)=>(0,l.jsx)(it.RecipeCardWrapper,{children:(0,l.jsx)(n8.A,{content:e,linkUrl:e.canonicalUrl,style:"vertical_m_fixed",imageSizes:"258px"})},t))}),!U&&H.length>0&&(0,l.jsxs)(it.PaginationContainer,{children:[(0,l.jsx)(it.EmptySpace,{}),(0,l.jsx)(it.PaginationWrapper,{children:V&&(0,l.jsx)(n9.A,{numPages:Math.ceil(H.length/3),currentPage:w,onSelectIndex:q,onNextPage:()=>{w<Math.ceil(H.length/3)-1&&q(w+1)},onPreviousPage:()=>{w>0&&q(w-1)}})}),z&&(0,l.jsxs)(it.StartOverButton,{onClick:()=>{if(o([]),r([]),c([]),m([]),g([]),x(null),y(null),b(null),A(null),j(null),I(0),n.current){let e=n.current.getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:e-20,behavior:"smooth"})}},disabled:z&&U,type:"secondary",size:"medium","data-click-element-name":"RecipeFiltersBlock-startOverButton",children:[N("RecipeFiltersBlock.startOver"),(0,l.jsx)(n6.A,{name:"xmark",style:"solid"})]})]})]}),z&&0===H.length&&!U&&(0,l.jsx)(it.NoResults,{children:N("RecipeFiltersBlock.noRecipesFound")})]})})},RecipeSearchBlock:ir,RecipeFooterBlock:il,RecipeIngredientsBlock:ic,RecipeInstructionPhasesBlock:function(e){let t=(0,d.useContext)(en.A),[n,i]=(0,d.useState)(0),o=t?.isEnabled;return(0,l.jsxs)(E.A,{children:[(0,l.jsx)(iC.CookingModeContainer,{children:(0,l.jsx)(ei,{})}),(0,l.jsx)(iC.Phases,{className:(o?"is-enabled":"is-disabled")+" "+(t?.isSupported?"is-supported":""),children:e.nodes.map((e,t)=>(0,l.jsx)(ib,{number:t+1,nodes:e.nodes,isCurrent:o&&n===t,isPast:o&&n>t,isEnabled:o,onComplete:o?()=>{t===n?i(e=>e+1):i(t)}:void 0},t))})]})},RecipeNutritionsBlock:function(){let{content:e}=(0,d.useContext)(F.A),[t,n]=(0,d.useState)(!1),i=(0,d.useRef)(null),[o,a]=(0,d.useState)(!1);return((0,d.useEffect)(()=>{let e=setTimeout(()=>{i.current&&a(i.current.scrollHeight>68)},100);return()=>clearTimeout(e)},[e?.nutritionInfo]),e?.nutritionInfo)?(0,l.jsx)(E.A,{pageSection:e?.slug,children:(0,l.jsxs)(ij.Box,{children:[(0,l.jsx)(ij.Title,{children:"Reseptin ravintosis\xe4lt\xf6 | 100 g"}),(0,l.jsxs)(ij.CollapsibleContainer,{isExpanded:t,children:[(0,l.jsx)(ij.RowsContainer,{ref:i,children:iA.map(([t,n,i,o])=>(0,l.jsx)(ik,{label:n,value:e.nutritionInfo.per100g[t],unit:i,children:o&&(0,l.jsx)(ik,{label:o[1],value:e.nutritionInfo.per100g[o[0]],unit:o[2],isSubRow:!0},o[0])},t))}),!t&&o&&(0,l.jsx)(ij.FadeEffect,{})]}),o&&(0,l.jsxs)(ij.ToggleButton,{onClick:()=>n(e=>
1122!e),children:[(0,l.jsx)("span",{children:t?"Piilota":"N\xe4yt\xe4 kaikki"}),(0,l.jsx)(ij.ToggleIcon,{name:t?"chevron-up":"chevron-down"})]})]})}):null},RecipePhasesBlock:function(){let{content:e}=(0,d.useContext)(F.A);return e.phases?.length?(0,l.jsx)(E.A,{align:"full",backgroundColor:"var(--color-container)",pageSection:e?.slug,children:(0,l.jsxs)(iI.Component,{children:[(0,l.jsx)(iI.Heading,{children:"Valmistus vaihe vaiheelta"}),(0,l.jsx)(iw.A,{items:e.phases,renderItem:(e,t)=>(0,l.jsxs)(iI.Phase,{children:[(0,l.jsx)(iI.PhaseImage,{...e.image,crop:"3-4-vertical"}),(0,l.jsxs)(iI.PhaseContent,{children:[(0,l.jsx)(iI.PhaseIndex,{children:t+1}),e.description]})]})})]})}):null},RichTextBlock:iL,ReusableBlock:iS,SmartFeedBlock:i8,ShopifyCollectionBlock:a_,ShopifyProductBlock:aZ,ShowHeroesBlock:function(e){let t=(0,tp.Jy)(),[n,i]=(0,d.useState)(null);return((0,i7.A)({zid:e.id,element:n,skip:!t,adSlotId:e.adSlotId}),!1===t)?null:(0,l.jsx)(E.A,{align:"column",backgroundColor:"#e9e9e9",children:(0,l.jsx)(i6.Container,{$backgroundColor:e.backgroundColor,children:(0,l.jsx)(i6.Component,{children:t?(0,l.jsxs)(l.Fragment,{children:[e.title&&(0,l.jsx)(i6.Title,{children:e.title}),(0,l.jsx)(i6.VideoContainer,{ref:e=>i(e)})]}):null})})})},ShowHeroesVideoBlock:function(e){return e.cid?(0,l.jsx)(E.A,{align:e.align,margin:e.margin,children:(0,l.jsx)(i9.A,{cid:e.cid,zid:e.zid,orientation:e.orientation})}):null},StorifyMeBlock:sv,StripeBannerBlock:a1.A,SubscriptionDetailsBlock:function(){let e=(0,tC.useParams)(),t=(0,d.useContext)(er.Ay),n=(0,d.useMemo)(()=>{if(t.subscriptions){let n=t.subscriptions.find(t=>t.id===e.subscriptionId)||null;if(n)return n}if(t.endedSubscriptions){let n=t.endedSubscriptions.find(t=>t.id===e.subscriptionId)||null;if(n)return n}},[e.subscriptionId,t.subscriptions,t.endedSubscriptions]);return void 0===n?(0,l.jsx)(E.A,{children:(0,l.jsx)(of.Container,{children:(0,l.jsx)(of.PlaceholderWrapper,{children:(0,l.jsx)(oh,{})})})}):n?(0,l.jsx)(E.A,{children:(0,l.jsx)(of.Container,{children:(0,l.jsx)(og,{subscription:n})})}):null},TabBarBlock:function(e){return(0,l.jsx)(E.A,{align:"full",hasBackground:!0,children:(0,l.jsx)(oy,{tabs:e.tabs})})},TaxonomiesBlock:a3,TeamBlock:sb,TextBlock:sC,TextCoverBlock:nT,TipBoxBlock:ob,TwoColumnLinkBlock:sw,UpdateCreditCardConfirmBlock:function(){return(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(rg,{})})},UpdateCreditCardFormBlock:function(){return(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(rc,{})})},UserInfoBlock:rt,QuestionFormBlock:function({title:e,description:t,buttonText:n,questionTopics:i,themes:o}){return(0,l.jsx)(E.A,{align:"wide",children:(0,l.jsx)(oJ,{title:e,description:t,buttonText:n,questionTopics:i,themes:o})})},QuestionQuestionBlock:aO,QuestionResponseBlock:aF,VariantsBlock:function(){let{content:e}=(0,d.useContext)(F.A),{Link:t}=(0,d.useContext)(R.A),n=(0,d.useMemo)(()=>{if(e?.variants)return(0,oA.zt)(e.variants,"fi-FI")},[e]),i=(0,d.useMemo)(()=>{if(n?.publishDate)return new Date(n.publishDate).toLocaleDateString("en",{month:"long",day:"numeric",year:"numeric"})},[n]),o=(0,d.useMemo)(()=>n?.url,[n]);return!(90>(0,d.useMemo)(()=>{if(!n?.publishDate||!e?.publishedAt)return;let t=new Date(n.publishDate);return(new Date(e.publishedAt).getTime()-t.getTime())/864e5},[n,e]))&&n&&i?(0,l.jsx)(E.A,{children:(0,l.jsxs)(ok.Component,{children:["This content was originally published in Finnish"," ",(0,l.jsx)("time",{dateTime:n.publishDate,children:i})," on"," ",(0,l.jsx)(t,{href:o,children:"Kotona"}),"."]})}):null},VideoBlock:sA};function sN({configuration:e,...t}){let n=(0,d.useMemo)(()=>({configuration:t}),[t]);if(e){let[t,n]=Object.entries(e)?.[0]||[];return t?(0,l.jsx)(sN,{blockName:t,...n}):null}if(t.blockName){let e=sI[t.blockName];return e?(0,l.jsx)(n0.A.Provider,{value:n,children:(0,d.createElement)(e,t)}):(console.info("[Block] Unknown block",t.blockName),null)}return null}function sS(e){let{isApp:t}=(0,d.useContext)(y.A),{content:n}=(0,d.useContext)(F.A),i=!(0,nE.yF)(n),o=(0,d.useMemo)(()=>{var o;let a,r=e.blocks;a={},r=o=r.filter(e=>{var t,i;let o=Object.values(e)[0];if(!o)return!1;if(!o.displayConditions)return!0;let r=!!((t=o.displayConditions).slugs||t.not?.slugs||t.commercialTypes||t.not?.commercialTypes||t.coverTypes||t.not?.coverTypes||t.categories||t.not?.categories||t.themes||t.not?.themes||t.brands||t.not?.brands||t.restrictAccessBy||t.not?.restrictAccessBy);if(r&&!n)return!1;if(!r&&((i=o.displayConditions).apu360Subscription||i.experimentationVariants?.length>0))return!0;let s=function(e,t){try{I(t.slug,e.slugs,A),I(t.slug,e.not?.slugs,j),I(t.metadata?.commercialType,e.commercialTypes,A),I(t.metadata?.commercialType,e.not?.commercialTypes,j),I(t.coverType,e.coverTypes,A),I(t.coverType,e.not?.coverTypes,j),I(t.category?.slug,e.categories,A),I(t.category?.slug,e.not?.categories,j),I(t.themes?.edges.map(e=>e.node.slug),e.themes,C),I(t.themes?.edges.map(e=>
1122e.node.slug),e.not?.themes,k),I(t.brand?.slug,e.brands,A),I(t.brand?.slug,e.not?.brands,j),I(t.restrictAccessBy,e.restrictAccessBy,A),I(t.restrictAccessBy,e.not?.restrictAccessBy,j)}catch(e){if(e===w)return!1;throw p.A.error("checkDisplayConditions error",e.message||e),e}return!0}(o.displayConditions,n);if(s&&o.displayConditions.group){if(!0===a[o.displayConditions.group])return!1;a[o.displayConditions.group]=!0}return!0===s}),i||t||(r=(e=>{let t;if(e.length<=2)return e;let n=[];p.A.debug("injectAdsToBlocks: originalBlocks=",e?.length,"globalPlacementCounter=",h);for(var i=0;i<e.length;i++){let o=e[i],a=!0;if(t||(a=!1),f(o)||(a=!1),t&&!f(t)&&(a=!1),a){let e={PlacementBlock:{slotId:`ad-blocks-${h++}`}};n.push(e),n.push(o)}else n.push(o);t=o}return n})(r));let s=0,c=r.map((t,n)=>{let[i,o]=Object.entries(t)[0],a={blockIndex:n,blockName:i,...o},r=sI[i];if(!r)return console.info("[Blocks] Unknown block",i),null;!["PlacementBlock"].includes(i)&&s++;let c=(e.isFooterBlocks||s>4)&&!1!==r.canLazyLoad,u=(0,ro.n)(0,Number.MAX_SAFE_INTEGER,{name:i,blockProps:a});return(0,l.jsx)(n0.A.Provider,{value:{configuration:a},children:c?(0,l.jsx)(v.A,{rootMargin:e.lazyLoaderRootMargin||"100% 0px 200% 0px",placeholder:r.lazyPlaceholder?(0,d.createElement)(r.lazyPlaceholder,{isPlaceholder:!0,...a}):void 0,children:(0,l.jsx)(sE,{blockComponent:r,blockProps:a})}):(0,l.jsx)(sE,{blockComponent:r,blockProps:a})},`${n}_${u}`)});return(0,l.jsx)(rr,{children:c})},[t,i,e.blocks,e.isFooterBlocks,e.lazyLoaderRootMargin,n]);return(0,l.jsx)(l.Fragment,{children:o})}function sE({blockComponent:e,blockProps:t}){return t.displayConditions?(0,l.jsx)(sT,{blockComponent:e,blockProps:t}):(0,d.createElement)(e,t)}function sT({blockComponent:e,blockProps:t}){var n;let i=(0,d.useMemo)(()=>(0,rs.V)(),[]),o=t.displayConditions.group,{getShownBlock:a,isBlockShown:r,maybeShowBlock:s}=(0,d.useContext)(ra),l=(n=t.displayConditions,function(e,t){if(!e)return!0;let{apu360:n}=t;if(void 0!==e.apu360Subscription){if(!n||!n.isEnabled||void 0===n.hasOngoingSubscription)return;return n.hasOngoingSubscription===e.apu360Subscription}if(void 0!==e.not?.apu360Subscription){if(!n||!n.isEnabled||void 0===n.hasOngoingSubscription)return;return n.hasOngoingSubscription!==e.not.apu360Subscription}if(e.experimentationVariants?.length>0){let n=t.experimentationVariants;for(let t of e.experimentationVariants){let[e,i]=t.split(":");if(n[e]?.id===i)return!0}return!1}return!0}(n,{apu360:(0,d.useContext)(b.A),experimentationVariants:(0,N.A)(e=>e.experimentationVariants)}));return((0,d.useEffect)(()=>{!o||l&&(p.A.debug("BlockRenderer: Maybe showing block",o,i,t.blockIndex),s(o,i,t.blockIndex))},[o,i,t.blockIndex,l]),(0,d.useMemo)(()=>!!l&&!(!(!o||r(o,i))&&(!t.displayConditions.isDefault||a(o))),[l,a,r,t.isDefault]))?(0,d.createElement)(e,t):(p.A.debug("BlockRenderer: Block filtered out by user data or group",t),null)}},98308:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(95155),o=n(84731),a=n(12115),r=n(8395),s=n(64208);function l(e){let[t,n]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{e.isOpen?setTimeout(()=>n(!0)):setTimeout(()=>n(!1),250)},[e.isOpen]),e.isOpen||t)?(0,i.jsxs)(i.Fragment,{children:[e.isBlocking&&(0,i.jsx)(c.Overlay,{className:t&&e.isOpen&&"isOpen"}),(0,i.jsxs)(c.Component,{className:t&&e.isOpen&&"isOpen",children:[(0,i.jsxs)(c.Title,{children:[e.title,(0,i.jsx)(c.CloseButton,{"data-click-element-name":"CloseModal",icon:(0,s.K)({name:"xmark",style:"light"}),onClick:e.onClose})]}),(0,i.jsx)(c.ContentContainer,{children:e.children})]})]}):null}let c={Overlay:r.Ay.div.withConfig({componentId:"sc-8b57437f-0"})(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);opacity:0;pointer-events:none;z-index:2;&.isOpen{pointer-events:all;opacity:1;}"]),Component:r.Ay.div.withConfig({componentId:"sc-8b57437f-1"})(["box-sizing:border-box;position:fixed;top:0;bottom:0;left:0;width:var(--sidebar--width);max-width:100%;background-color:var(--modal--background-color);box-shadow:rgba(0,0,0,0.2) 8px 0px 16px 0px;z-index:2147483647;overflow-y:auto;transform:translateX(calc(-100% - 16px));opacity:0;transition:transform 0.25s ease-out,opacity 0.25s linear,width 0.25s ease;&.isOpen{transform:translateX(0);opacity:1;}top:auto;bottom:0;left:calc(50% - var(--sidebar--bottom-width) / 2);width:var(--sidebar--bottom-width);right:auto;transform:translateY(calc(100% + 16px));box-sizing:border-box;max-height:calc(100% - var(--block-gutter));overflow-y:auto;border-top-left-radius:20px;border-top-right-radius:20px;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),Title:r.Ay.div.attrs({className:"is-heading-m"}).withConfig({componentId:"sc-8b57437f-2"})(["position:sticky;top:0;padding:var(--spacing-xl) calc(var(--spacing-xl) + 25px);border-bottom:1px solid var(--color-outline-secondary);text-align:center;background-color:var(--modal--background-color);z-index:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--color-on-surface);"]),CloseButton:(0,r.Ay)(o.g).withConfig({componentId:"sc-8b57437f-3"})(["position:absolute;top:calc(var(--spacing-xl) + var(--heading-m-line-height) / 2);right:var(--spacing-xl);font-size:20px;width:20px;color:var(--color-on-surface-secondary);cursor:pointer;transform:translateY(-50%);"]),ContentContainer:r.Ay.div.withConfig({componentId:"sc-8b57437f-4"})(["padding:var(--spacing-xl);padding-bottom:var(--spacing-5xl);"])}},99934:(e,t,n)=>{"use strict";n.d(t,{bb:()=>u,kF:()=>o,nD:()=>c,ok:()=>s,pV:()=>i,qO:()=>d,yU:()=>l});let i=`
1123  fragment Address on Address {
1124    street
1125    postalCode
1126    city
1127    countryCode
1128  }
1129`,o=`
1130  fragment TemporaryAddress on TemporaryAddress {
1131    street
1132    postalCode
1133    city
1134    countryCode
1135    startDate
1136    endDate
1137    isEnabled
1138    inProgress
1139  }
1140`,a=`
1141  fragment CreditCard on CreditCard {
1142    lastFourDigits
1143    expirationYear
1144    expirationMonth
1145    brand
1146  }
1147`,r=`
1148  fragment MarketingPermission on MarketingPermission {
1149    header
1150    description
1151    statusCode
1152    isDeletable
1153    isCredential
1154  }
1155`,s=`
1156  fragment Premium on Premium {
1157    productTitle
1158    productImageUrl
1159    deliveryStatus
1160    valueText
1161    statusButtonText
1162    notificationText
1163    selectSiteUrl
1164    deliveryStatusText
1165    itemVoucher
1166    isDigitalMagazineUrlVisible
1167  }
1168`,l=`
1169  fragment Subscription on Subscription {
1170    id
1171    role
1172    productCode
1173    productTitle
1174    digitalMagazineProductText
1175    productImageUrl
1176    isShippedToBillingAddress
1177    shipToName
1178    pricingText
1179    termLengthText
1180    orderDate
1181    nextShipDate
1182    periodStartDate
1183    isLocked
1184    isActive
1185    digitalMagazineUrl
1186    isDigitalMagazine
1187    # isAutoRenewed
1188    isCreditCardCharged
1189    isPremium
1190    subscriptionStatusText
1191    processingStatusText
1192    extraContent {
1193      id
1194    }
1195    activeInvoiceId # the invoice number
1196    editOptions {
1197      code
1198    }
1199    suspendOptions {
1200      code
1201      pricingText
1202      pricingTotalText
1203      periodEndDate
1204      freeItems {
1205        productCode
1206        productName
1207        imageUrl
1208      }
1209    }
1210    redirectUrl
1211    freePremiumUrl
1212  }
1213`,c=`
1214  fragment Customer on Customer {
1215    id
1216    customerType
1217    firstName
1218    lastName
1219    companyName
1220    department
1221    emailAddress
1222    invoiceEmailAddress
1223    invoiceMethod
1224    latestInvoiceMethod
1225    phoneNumber
1226    customerNumbers
1227    primaryAddress {
1228      ...Address
1229    }
1230    temporaryAddress {
1231      ...TemporaryAddress
1232    }
1233    creditCard {
1234      ...CreditCard
1235    }
1236    marketingPermissions {
1237      ...MarketingPermission
1238    }
1239    isAdmin
1240    isImpersonated
1241    lastActivity
1242    invoiceMethodCreditCardInfo
1243    invoiceMethodSubscriptions
1244    freePremiumNextDate
1245  }
1246  ${i}
1247  ${o}
1248  ${a}
1249  ${r}
1250`,d=`
1251  fragment Invoice on Invoice {
1252    id
1253    statusCode
1254    dueDate
1255    latestPaymentDate
1256    totalText
1257    amountPaidText
1258    feesText
1259    amountDueText
1260    totalOpenAmountText
1261    totalOpenAmountForPaymentText
1262    totalInstallmentCount
1263    currentInstallmentNumber
1264    isPaymentAvailable
1265    isCreditCardPayment
1266    rows {
1267      productCode
1268      productTitle
1269      subscriptionId
1270      startDate
1271      endDate
1272      pricingText
1273      termLengthText
1274    }
1275    premiums {
1276      productTitle
1277      productImageUrl
1278      valueText
1279      statusButtonText
1280      notificationText
1281      selectSiteUrl
1282      deliveryStatus
1283      deliveryStatusText
1284      itemVoucher
1285      isDigitalMagazineUrlVisible
1286    }
1287  }
1288`,u=`
1289  fragment Offer on Offer {
1290    url
1291    productCode
1292    productTitle
1293    productImageUrl
1294    pricingText
1295    originalPricingText
1296    termLength
1297    pullElement
1298    pullElementColor
1299    pullElementText
1300  }
1301`}}]);

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.