PageSourceSearch

https://yle.fi/ukko/assets/build/259.1c69485e5a380e6af90e.js

js yle.fi collected 2026-09-24 07:29:20 UTC 128,938 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkukko||=[]).push([[259],{48296(e,t,i){i.d(t,["$",0,{subjectPageShowMoreButton:e=>`subject-page.show-more.page-${e.currentPageNumber}`,editorProfilePageShowMoreButton:e=>`editor-profile-page.show-more.page-${e.currentPageNumber}`,fetchMorePageShowMoreButton:e=>`fetch-more-page.show-more.page-${e.currentPageNumber}`,tuoreimmatPageShowMoreButton:"tuoreimmat-page.show-more",tuoreimmatPageSettingsMenu:"tuoreimmat-page.settings-menu",tuoreimmatPageSettingsViewDefault:"tuoreimmat-page.settings-view-default",tuoreimmatPageSettingsViewCompact:"tuoreimmat-page.settings-view-compact",tuoreimmatPageSettingsContentLogin:"tuoreimmat-page.settings-content.login",tuoreimmatPageSettingsContent:e=>`tuoreimmat-page.settings-content.${e.subject.toLowerCase()}.${e.enabled?"enabled":"disabled"}`,tuoreimmatPageSettingsLanguagesLogin:"tuoreimmat-page.settings-languages.login",tuoreimmatPageSettingsLanguagesSettings:"tuoreimmat-page.settings-languages.settings",tuoreimmatPageRefreshButton:"tuoreimmat-page.refresh",weatherWidgetUpcomingHours:"weather-widget-upcoming-hours",weatherWidgetUpcomingDays:"weather-widget-upcoming-days",weatherWidgetRainMap:"weather-widget-rainmap",weatherWidgetWindMap:"weather-widget-windmap",weatherWidgetWarnings:"weather-widget-warnings",pollenWidget:"pollen-widget",localNewsLocation:"local-news-location",videoFeedWidget:"video-feed-widget"}])},45008(e,t,i){i.d(t,{A:()=>s});var n=i(11684),o=i(44832),a=i(38905);const r=new Set(["activity","alarm-clock","ambulance","anchor","angry","aperture","apple","armchair","asterisk","at-sign","atom","audio-lines","audio-waveform","award","axe","baby","ban","bandage","barcode","bed","beer","bell","biceps-flexed","bike","binary","binoculars","bird","bitcoin","bone","book-open-text","bottle-wine","bow-arrow","box","brain","brick-wall","briefcase","briefcase-business","brush","brush-cleaning","bug","building","building2","bus","cable","cake","calculator","calendar-days","camera","candy","candy-cane","cannabis","car","carrot","castle","cat","cctv","chart-line","chef-hat","church","cigarette","circle-alert","circle-parking","circle-question-mark","clapperboard","clock","cloud-drizzle","cloud-sun","coffee","cog","coins","construction","cookie","cross","cuboid","cup-soda","cylinder","dices","disc3","dog","dollar-sign","drama","drill","droplet","drum","dumbbell","ear","earth","egg","equal-approximately","euro","ev-charger","expand","eye","eye-closed","factory","feather","ferris-wheel","file-chart-column-increasing","files","film","fingerprint","fingerprint-pattern","fire-extinguisher","fish","fish-symbol","flag","flag-triangle-right","flame","flask-conical","flower","flower2","footprints","frame","frown","fuel","funnel","gamepad2","gauge","gavel","gem","ghost","gift","git-compare","glass-water","glasses","globe","grape","graduation-cap","grid2-x2","guitar","hamburger","hammer","hand","hand-coins","hand-helping","hand-metal","handbag","handshake","hat-glasses","haze","headphones","heart","helicopter","hourglass","hotel","ice-cream-cone","infinity","key-round","keyboard","lamp-desk","laptop","laugh","layout-grid","leaf","life-buoy","lightbulb","loader-pinwheel","lock","mail","map-pin","mars","megaphone","meh","message-circle-question-mark","message-circle-warning","messages-square","mic","mic-vocal","microscope","milestone","milk","minimize2","moon","music4","navigation","network","octagon-x","paint-roller","palette","paperclip","party-popper","paw-print","pen-tool","percent","phone","piano","pickaxe","piggy-bank","pin","pizza","plane","pocket-knife","popcorn","pound-sterling","puzzle","rabbit","radio-tower","recycle","refresh-cw","rocket","roller-coaster","sailboat","scale","search","settings","share2","shield-half","ship-wheel","shirt","shopping-basket","shopping-cart","shrink","shuffle","signal","signpost-big","siren","skull","sliders-horizontal","smile","snail","snowflake","sofa","soup","sparkle","sparkles","speech","spline","spotlight","sprout","square-activity","squirrel","star","star-filled","stethoscope","sun","swatch-book","sword","syringe","tag","target","telescope","tent","thermometer","thumbs-down","thumbs-up","timer","tractor","train-track","tram-front","trash2","tree-palm","tree-pine","trending-down","trending-up","triangle-alert","trophy","truck","tv","tv-minimal-play","type","umbrella","unplug","user","users","utensils","utensils-crossed","venus","venus-and-mars","volleyball","volume2","wand","wand-sparkles","waves","waves-horizontal","wheat","wine","wrench","zap"]);
1const l=o.I4.span.withConfig({displayName:"LucideIcon__Icon",componentId:"sc-e10cc614-0"})(["display:inline-block;width:100%;height:100%;background-color:currentcolor;mask-image:url(",");mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-image:url(",");-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;"],e=>{let{$url:t}=e;return t},e=>{let{$url:t}=e;return t});function s(e){let{iconName:t,ariaLabel:i}=e;var o;const s=(0,a.h)()(`img/lucide-icons/${o=t,r.has(o)?o:"circle-question-mark"}.svg`);return(0,n.jsx)(l,{role:"img","aria-hidden":!i,"aria-label":i,$url:s})}},59684(e,t,i){i.d(t,{A:()=>w});var n=i(11684),o=i(74338),a=i(87647),r=i(12888),l=i(44832),s=i(39012),d=i(49086),c=i(85063),p=i(61631),u=i(33606);function m(e){let{defaultOptions:t,loadOptions:i,placeholder:o,noResults:a,onSelect:r,onBlur:l,initialIsOpen:s,autoFocus:d,label:c,debounceDelay:p=300,loadingThreshold:u=0}=e;return i?(0,n.jsx)(h,{defaultOptions:t,loadOptions:i,placeholder:o,noResults:a,onSelect:r,onBlur:l,initialIsOpen:s,autoFocus:d,label:c,debounceDelay:p,loadingThreshold:u}):(0,n.jsx)(g,{defaultOptions:t,placeholder:o,noResults:a,onSelect:r,onBlur:l,initialIsOpen:s,autoFocus:d,label:c})}function h(e){let{defaultOptions:t,loadOptions:i,placeholder:o,noResults:a,onSelect:l,onBlur:s,initialIsOpen:d,autoFocus:c,label:p,debounceDelay:m,loadingThreshold:h}=e;const[g,x]=(0,r.useState)(!1),[f,y]=(0,r.useState)(t),b=function(e,t){const i=(0,r.useRef)(null);return(0,r.useCallback)(function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];i.current&&clearTimeout(i.current),i.current=window.setTimeout(()=>e(...o),t)},[e,t])}(i,m),w=(0,r.useCallback)(e=>{y(e),x(!1)},[]);return(0,n.jsx)(u.s,{placeholder:o,items:f,controlledItems:f,label:p,labelOptions:{isHidden:!0},showLoadingIndicator:!1,loading:g,initialIsOpen:d,noResultsText:a,autoFocus:c,onBlur:s,handleInputValueChange:e=>{x(e.length>=h),b(e,w)},handleSelectedItemChange:e=>{l(e)}})}function g(e){let{defaultOptions:t,placeholder:i,noResults:o,onSelect:a,onBlur:r,initialIsOpen:l,autoFocus:s,label:d}=e;return(0,n.jsx)(u.s,{placeholder:i,items:t,label:d,labelOptions:{isHidden:!0},noResultsText:o,autoFocus:s,onBlur:r,handleSelectedItemChange:e=>{a(e)},initialIsOpen:l})}const x=l.I4.div.withConfig({displayName:"LocationSelect__LocationRow",componentId:"sc-d07b4152-0"})(["width:100%;display:flex;justify-content:space-between;min-height:","px;align-items:center;cursor:pointer;padding:4px 0;"],40),f=(0,l.I4)(x).withConfig({displayName:"LocationSelect__InputRow",componentId:"sc-d07b4152-1"})(["display:block;padding:0;> div{width:100%;}"]),y=l.I4.span.withConfig({displayName:"LocationSelect__Location",componentId:"sc-d07b4152-2"})(["",";display:flex;border:0;line-height:","px;align-items:center;overflow:hidden;svg{font-size:1.5em;margin-right:8px;}"],d.R7[d.PT.YleLHeavy],40),b=l.I4.div.withConfig({displayName:"LocationSelect__OverflowText",componentId:"sc-d07b4152-3"})(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:","px;",""],s.sh.mobile,d.R7[d.PT.YleLBold]);function w(e){let{defaultOptions:t,loadOptionsAsync:i,selectedOption:l=null,onSelect:s,initialIsOpen:d=!1,buttonText:u,accessibleButtonText:h,placeholder:g,noResults:w,debounceDelay:v,loadingThreshold:I,trackClick:k}=e;const[$,C]=(0,r.useState)(!1),{translate:j}=(0,c.xy)(),A=()=>{C(!$)},T=e=>{s(e);const t=(0,p.X)(e);k&&k({itemTitle:t}),A()};return $?(0,n.jsx)(f,{children:(0,n.jsx)(m,{defaultOptions:t,loadOptions:i,onSelect:T,onBlur:A,placeholder:g,noResults:w,initialIsOpen:d,autoFocus:!0,label:j("location.changeLong"),debounceDelay:v,loadingThreshold:I})}):(0,n.jsxs)(x,{onClick:A,children:[(0,n.jsxs)(y,{children:[(0,n.jsx)(a.aZn,{height:24,width:24,title:"Valittu paikkakunta"}),(0,n.jsx)(b,{"data-testid":"selected-location",children:l?l.displayName||l.value:""})]}),(0,n.jsxs)(o.$,{size:"sm",variant:"secondary",onClick:A,children:[h&&(0,n.jsx)("span",{className:"sr-only",children:h}),(0,n.jsx)("span",{"aria-hidden":!!h||void 0,children:u})]})]})}},83143(e,t,i){i.d(t,{A:()=>b});var n=i(11684),o=i(12888),a=i(44832),r=i(66166),l=i(25942),s=i(74922),d=i(38783),c=i(39012),p=i(70221),u=i(18188),m=i(29528),h=i(7906),g=i(91588),x=i(91171),f=i(43421);const y=a.I4.div.withConfig({displayName:"GridItem__HorizontalLineContainer",componentId:"sc-f4a3f73a-0"})(["background:",";",";",""],e=>
1{let{$isDarkGroupBackground:t}=e;return u.sB.getGroupBackgroundColor(t)},f.lJ,e=>e.$hasPadding?(0,a.AH)(["padding:0 ","px;@media (min-width:","px){padding:0 ","px;}@media (min-width:","px){padding:0 ","px;}"],c.sh.mobile,c.aq.tablet,c.sh.tablet,c.aq.desktop,c.sh.desktop):null);function b(e){let{item:t,level:i=r.F.h3,minimumBottomMargin:a,mobileBottomMargin:c,tabletBottomMargin:u,desktopBottomMargin:f,lazyLoadMedia:b=!0,header:w,group:v,children:I,applyVisitedLinkStyles:k,separatorBorder:$=!0}=e;const C=!!w?.title,j=C&&t&&(0,d.y2)(t,w),A=(0,o.useContext)(s.R),T=C&&A===s.G.Grey,_=!(v?.isSingle??!0),B=(0,p.YH)(C,_),S={mobile:B,tablet:B};return(0,n.jsxs)(m.LX,{$minimum:24,$tablet:15,$minimumBreakGap:!0,$mobileBreakGap:!0,$minimumBottomMargin:a??8,$mobileBottomMargin:c??8,$tabletBottomMargin:u??16,$desktopBottomMargin:f??16,children:[C&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.A,{header:w,level:i,ariaHidden:!0,separatorBorder:$}),j&&(0,n.jsx)(y,{$hasPadding:T,$isDarkGroupBackground:v?.isDark,$roundedCorners:{mobile:p.FY.none,tablet:p.FY.none},$separatorBorder:$,children:(0,n.jsx)(g.H,{separatorBorder:$,isDarkAmbient:w.isDark,showInLightMode:j.showInLightMode,showInDarkMode:j.showInDarkMode})})]}),t&&(0,n.jsx)(x.A,{item:t,level:C?(0,l.g)(i):i,group:v,roundedCorners:S,lazyLoadMedia:b,applyVisitedLinkStyles:k}),I]})}},75521(e,t,i){var n=i(44832),o=i(39012);const a=n.I4.div.withConfig({displayName:"GroupButtonRow",componentId:"sc-a46706e8-0"})(["display:flex;flex-direction:row;justify-content:center;margin-top:","px;margin-bottom:","px;@media (min-width:","px){margin-top:","px;margin-bottom:","px;}@media (prefers-color-scheme:dark){margin-top:","px;margin-bottom:","px;@media (min-width:","px){margin-top:","px;margin-bottom:","px;}}button{margin:0 ","px;}"],e=>{let{$buttonGaps:t}=e;return t.lightTheme.top?o.sh.mobile:0},e=>{let{$buttonGaps:t}=e;return t.lightTheme.bottom?o.sh.mobile:0},o.aq.desktop,e=>{let{$buttonGaps:t}=e;return t.lightTheme.top?o.sh.desktop:0},e=>{let{$buttonGaps:t}=e;return t.lightTheme.bottom?o.sh.desktop:0},e=>{let{$buttonGaps:t}=e;return t.darkTheme.top?o.sh.mobile:0},e=>{let{$buttonGaps:t}=e;return t.darkTheme.bottom?o.sh.mobile:0},o.aq.desktop,e=>{let{$buttonGaps:t}=e;return t.darkTheme.top?o.sh.desktop:0},e=>{let{$buttonGaps:t}=e;return t.darkTheme.bottom?o.sh.desktop:0},8);i.d(t,["A",0,a])},7906(e,t,i){i.d(t,{A:()=>y});var n=i(11684),o=i(12888),a=i(44832),r=i(74922),l=i(39012),s=i(70221),d=i(49086),c=i(18188),p=i(85063),u=i(59834),m=i(42756),h=i(43421);const g=a.I4.div.withConfig({displayName:"GroupHeader__Header",componentId:"sc-5deed2de-0"})(["display:flex;align-items:center;justify-content:space-between;background:",";color:",";",";padding:","px;padding-bottom:","px;@media (min-width:","px){padding-top:","px;padding-left:","px;padding-right:","px;}@media (min-width:","px){padding-left:","px;padding-right:","px;}"],e=>{let{$isExceptional:t,$isDark:i}=e;return t?c.sB.groupHeaderEmphasisBackground:c.sB.getGroupBackgroundColor(i)},e=>{let{$isExceptional:t,$isDark:i}=e;return c.sB.getTextColor(t||i)},h.lJ,l.sh.mobile,16,l.aq.tablet,e=>{let{$hasAmbientContrast:t}=e;return t?16:0},e=>{let{$hasAmbientContrast:t}=e;return t?l.sh.tablet:0},e=>{let{$hasAmbientContrast:t}=e;return t?l.sh.tablet:0},l.aq.desktop,e=>{let{$hasAmbientContrast:t}=e;return t?l.sh.desktop:0},e=>{let{$hasAmbientContrast:t}=e;return t?l.sh.desktop:0}),x=a.I4.div.withConfig({displayName:"GroupHeader__BrandLogoAndTitle",componentId:"sc-5deed2de-1"})(["display:flex;flex-wrap:wrap;align-items:center;row-gap:","px;@media (min-width:","px){flex-direction:row;}"],12,l.aq.tablet),f=(0,a.I4)(u.A).withConfig({displayName:"GroupHeader__StyledAreenaLogo",componentId:"sc-5deed2de-2"})(["margin-right:","px;"],16);function y(e){let{className:t,level:i,ariaHidden:a=!1,header:l,children:c,ariaLabelId:u,isDarkCarousel:h,separatorBorder:y=!0}=e;const{site:b}=(0,p.xy)(),w=(0,o.useContext)(r.R),{title:v,ariaTitle:I,isDark:k,isExceptional:$,showAreenaLogo:C}=l;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(g,{className:t,$isDark:k,$isExceptional:$,$hasAmbientContrast:w===r.G.Grey||$||Boolean(h),$roundedCorners:{mobile:s.FY.top,tablet:s.FY.top},$separatorBorder:y,children:[(0,n.jsxs)(x,{"aria-hidden":a,children:[C&&
1(0,n.jsx)(f,{lang:b.lang,height:14}),(0,n.jsxs)(m.o,{as:`h${i}`,$mobile:d.PT.YleLHeavy,$desktop:d.PT.YleXLHeavy,children:[(0,n.jsx)("span",{"aria-hidden":!0,children:v}),!a&&(0,n.jsx)("span",{id:u,className:"sr-only",children:I})]})]}),c]}),l.plugins?.packageSubHeader]})}},91588(e,t,i){i.d(t,{H:()=>s});var n=i(11684),o=i(44832),a=i(18188);const r=o.I4.div.withConfig({displayName:"HorizontalLine__Container",componentId:"sc-6c5e31ea-0"})(["height:1px;display:",";@media (prefers-color-scheme:dark){display:",";}"],e=>{let{$showInLightMode:t}=e;return t?"block":"none"},e=>{let{$showInDarkMode:t}=e;return t?"block":"none"}),l=o.I4.div.withConfig({displayName:"HorizontalLine__Line",componentId:"sc-6c5e31ea-1"})(["border-top:1px solid ",";width:100%;"],e=>{let{$separatorBorder:t}=e;return t?a.sB.cardBorder:a.sB.separator});function s(e){let{isDarkAmbient:t,showInLightMode:i=!0,showInDarkMode:o=i,separatorBorder:s=!1}=e;const d=t?a.q_:a.sf;return(0,n.jsx)(r,{className:d,$showInLightMode:i,$showInDarkMode:o,children:(0,n.jsx)(l,{$separatorBorder:s})})}},91171(e,t,i){i.d(t,{A:()=>s});var n=i(11684),o=i(72529),a=i(52108),r=i(62374),l=i(53306);function s(e){let{item:t,level:i,roundedCorners:s,lazyLoadMedia:d=!0,group:c,applyVisitedLinkStyles:p}=e;return(0,o.mV)(t)?(0,n.jsx)(l.A,{story:t,level:i,roundedCorners:s,lazyLoadMedia:d,group:c,applyVisitedLinkStyles:p}):(0,o.Xs)(t)?(0,n.jsx)(r.A,{banner:t,level:i,group:c,roundedCorners:s,lazyLoadMedia:d}):(0,o.p4)(t)?(0,n.jsx)("div",{role:c?.role,children:(0,n.jsx)(a.A,{widget:t,level:i,group:c,roundedCorners:s})}):null}},65847(e,t,i){var n=i(11684),o=i(79971),a=i(12888),r=i(44832),l=i(97641),s=i(39012),d=i(70221),c=i(18188),p=i(46832),u=i(29528);const m=(0,r.i7)(["0%{background-color:",";}100%{background-color:",";}"],c.sB.placeholderColor1,c.sB.placeholderColor2),h=(0,r.AH)(["background-color:",";animation:"," "," infinite "," alternate;@media (prefers-reduced-motion){animation:none;}"],c.sB.placeholderColor1,m,o.kY.DURATION_XXL,o.kY.EASING_DEFAULT),g=(0,r.I4)(u.LX).withConfig({displayName:"Placeholder__GridCellContainer",componentId:"sc-af50ae57-0"})([""]),x=r.I4.div.withConfig({displayName:"Placeholder__Card",componentId:"sc-af50ae57-1"})(["display:flex;flex-direction:column;overflow:hidden;background-color:",";padding:","px;border-radius:","px;border:1px solid ",";--gridCardBorderInset:2px;@media (min-width:","px){padding:","px;}
1"],c.sB.getItemBackgroundColor(!1),16,d.FF.normal,c.sB.cardBorder,s.aq.desktop,24),f=r.I4.div.withConfig({displayName:"Placeholder__Content",componentId:"sc-af50ae57-2"})(["display:flex;flex-direction:column;gap:",";width:100%;",""],e=>{let{$size:t}=e;return"l"===t?"16px":"36px"},e=>{let{$size:t}=e;return"l"===t&&(0,r.AH)(["margin-top:","px;@media (min-width:","px){margin-top:","px;}@media (min-width:","px){margin-top:","px;}"],s.sh.mobile,s.aq.tablet,s.sh.tablet,s.aq.desktop,s.sh.desktop)}),y=r.I4.div.withConfig({displayName:"Placeholder__TextRow",componentId:"sc-af50ae57-3"})(["border-radius:999px;height:",";width:",";",";animation-delay:calc("," * ",");@media (min-width:","px){height:",";}"],e=>{let{$size:t}=e;return"l"===t?"18px":"12px"},e=>{let{$width:t}=e;return t},h,e=>{let{$delayStep:t}=e;return t},o.kY.DELAY_L,s.aq.desktop,e=>{let{$size:t}=e;return"l"===t?"21px":"12px"}),b=r.I4.div.withConfig({displayName:"Placeholder__TextContainer",componentId:"sc-af50ae57-4"})(["display:flex;flex-wrap:wrap;gap:","px ","px;padding:","px 0;"],8,12,4),w=r.I4.div.withConfig({displayName:"Placeholder__Image",componentId:"sc-af50ae57-5"})(["align-self:stretch;margin:-","px -","px 0;aspect-ratio:",";",";@media (min-width:","px){margin:-","px -","px 0;}"],16,16,(e=>{let{aspectRatioKey:t}=e;return t.replace(":"," / ")})(l.l.Landscape),h,s.aq.desktop,24,24),v=r.I4.div.withConfig({displayName:"Placeholder__TwoColumns",componentId:"sc-af50ae57-6"})(["display:flex;flex-direction:column;gap:","px;@media (min-width:","px){gap:","px;}@media (min-width:","px){flex-direction:row;}"],s.sh.mobile,s.aq.desktop,s.sh.desktop,s.aq.mobile),I=r.I4.div.withConfig({displayName:"Placeholder__SmallImage",componentId:"sc-af50ae57-7"})(["flex-shrink:0;order:0;",";",";",";@media (min-width:","px){order:1;",";",";border-radius:","px;}@media (min-width:","px){",";",";}@media (min-width:","px){",";",";",";",";}
1"],h,(0,p.u5)({span:24,gap:s.sh.minimum,breakGap:!0}),(0,p.xf)({span:24,gap:s.sh.minimum,breakGap:!0,aspectRatio:16/9}),s.aq.mobile,(0,p.u5)({span:8,gap:s.sh.mobile}),(0,p.xf)({span:8,gap:s.sh.mobile,aspectRatio:1}),d.FF.normal,s.aq.tablet,(0,p.u5)({span:5,gap:s.sh.tablet}),(0,p.xf)({span:5,gap:s.sh.tablet,aspectRatio:16/9}),s.aq.desktop,(0,p.u5)({span:5,gap:s.sh.desktop}),(0,p.xf)({span:5,gap:s.sh.desktop,aspectRatio:16/9}),(0,p.mR)({span:5,gap:s.sh.desktop}),(0,p.$k)({span:5,gap:s.sh.desktop,aspectRatio:16/9})),k=r.I4.div.withConfig({displayName:"Placeholder__TextColumn",componentId:"sc-af50ae57-8"})(["min-width:0;flex-grow:1;display:flex;order:1;@media (min-width:","px){order:0;}"],s.aq.mobile),$=(0,a.forwardRef)((e,t)=>{let{size:i="M"}=e;return(0,n.jsx)(g,{ref:t,"data-testid":"layout-placeholder",$minimum:24,$tablet:15,$minimumBreakGap:!0,$mobileBreakGap:!0,$minimumBottomMargin:8,$mobileBottomMargin:8,$tabletBottomMargin:"XS"===i?8:16,$desktopBottomMargin:"XS"===i?8:16,children:(0,n.jsxs)(x,{children:["XS"===i&&(0,n.jsx)(f,{$size:"s",children:(0,n.jsxs)(b,{children:[(0,n.jsx)(y,{$width:"100%",$size:"l",$delayStep:1}),(0,n.jsx)(y,{$width:"60%",$size:"l",$delayStep:1})]})}),"S"===i&&(0,n.jsxs)(v,{children:[(0,n.jsx)(k,{children:(0,n.jsxs)(f,{$size:"s",children:[(0,n.jsxs)(b,{children:[(0,n.jsx)(y,{$width:"80%",$size:"l",$delayStep:1}),(0,n.jsx)(y,{$width:"60%",$size:"l",$delayStep:1})]}),(0,n.jsxs)(b,{children:[(0,n.jsx)(y,{$width:"96px",$size:"s",$delayStep:2}),(0,n.jsx)(y,{$width:"32px",$size:"s",$delayStep:2})]})]})}),(0,n.jsx)(I,{})]}),"M"===i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{}),(0,n.jsxs)(f,{$size:"l",children:[(0,n.jsxs)(b,{children:[(0,n.jsx)(y,{$width:"80%",$size:"l",$delayStep:1}),(0,n.jsx)(y,{$width:"33%",$size:"l",$delayStep:1})]}),(0,n.jsxs)(b,{children:[(0,n.jsx)(y,{$width:"96px",$size:"s",$delayStep:2}),(0,n.jsx)(y,{$width:"32px",$size:"s",$delayStep:2})]})]})]})]})})});$.displayName="Placeholder",i.d(t,["O",0,$])},60259(e,t,i){i.d(t,{A:()=>G});var n=i(11684),o=i(12888),a=i(92624),r=i(1495),l=i(72529),s=i(18686),d=i(54288),c=i(18188),p=i(85063),u=i(10791);function m(e){let{lastItem:t,isDarkGroupBackground:i}=e;return!!t&&(!(0,l.Xs)(t)&&(!i&&(0,d.O$)(t)))}function h(e){let{lastItem:t}=e;return!!t&&(!(0,l.Xs)(t)&&(0,l.jd)(t))}function g(e,t,i,n){const o=i===c.mY.DefaultGroupLight,a=i===c.mY.DefaultGroupDark||i===c.mY.DarkGroupDark;if(!t)return!1;const r=(0,d.O$)(e),s=(0,d.O$)(t),p=(s||r)&&o,m=(0,l.jd)(t),h=(0,u.uc)(e).showWideOnTop,g=0===n&&(0,l.Xs)(t);return!(g&&!r)&&(!(a&&g&&r)&&(!(a&&m&&(0,l.Xs)(e))&&(!(!a||!(0,l.Xs)(e))||(!(0,l.Xs)(t)||!h)&&(!!((0,l.Xs)(e)&&!m&&!s||(0,l.Xs)(t)&&!r)||!p&&(!m&&!h)))))}function x(e,t,i,n){if(!t)return!1;const o=i===c.mY.DefaultGroupLight,a=i===c.mY.DefaultGroupDark||i===c.mY.DarkGroupDark,r=(0,d.O$)(e),s=(0,d.O$)(t),p=(0,l.jd)(t),m=(0,l.D0)(t),h=(0,u.uc)(e).showWideOnTop,g=s&&r&&o,x=(0,l.Xs)(t),f=0===n&&x;return!(0,l.Xs)(e)&&(!(a&&f&&r)&&(!(!f||!r)||!x&&(!!g||(!a||!(0,l.D0)(t)||!(0,l.D0)(e)&&!h)&&!!(s&&h&&(o||p||m)))))}function f(e){let{lastItem:t,isGroupWithSingleItem:i,isDarkGroupBackground:n}=e;const o=(0,l.jd)(t),a=(0,l.Xs)(t),r=!n&&(0,d.O$)(t),s=i&&o;return{lightTheme:{top:!a&&(o||r),bottom:!m({lastItem:t,isDarkGroupBackground:n})||s},darkTheme:{top:!a&&o,bottom:!h({lastItem:t})||s}}}var y=i(83565),b=i(44832),w=i(31470),v=i(25942),I=i(74922),k=i(38783),$=i(39012),C=i(70221),j=i(21525),A=i(83143),T=i(97983),_=i(22765),B=i(38928),S=i(75521);const L=b.I4.div.withConfig({displayName:"GroupLink__Line",componentId:"sc-e46706d5-0"})(["display:block;padding-top:","px;border-top:1px solid ",";width:100%;@media (prefers-color-scheme:light){display:",";}@media (min-width:","px){padding-top:","px;}"],$.sh.mobile,c.sB.cardBorder,e=>{let{$isLastItemDarkOnLightMode:t}=e;return t?"none":"block"},$.aq.desktop,$.sh.desktop);function P(e){let{link:t,lastItem:i,isGroupWithSingleItem:o,isDarkGroupBackground:a}=e;const r=!(0,l.jd)(i);return(0,n.jsxs)("div",{children:[r&&(0,n.jsx)(L,{$isDarkGroupBackground:a,$isLastItemDarkOnLightMode:(0,d.O$)(i)}),(0,n.jsx)(S.A,{$buttonGaps:f({lastItem:i,isGroupWithSingleItem:o,isDarkGroupBackgroun
1d:a}),children:(0,n.jsx)(y.A,{className:a?c.q_:c.sf,forwardedAs:"a",href:t.url,variant:"secondary",text:t.text})})]})}function N(e){let{link:t,lastItem:i,groupUuid:o,isGroupWithSingleItem:a,isDarkGroupBackground:r}=e;const l=(0,_.G)(e=>e.consent.consent);return(0,T.FT)(l)?(0,n.jsx)(j.Xk,{element:j.GX.GroupLinkButton,layoutItemUuid:o,itemTitle:t.text,children:(0,n.jsx)(B.A,{children:(0,n.jsx)(P,{link:t,lastItem:i,isGroupWithSingleItem:a,isDarkGroupBackground:r})})}):(0,n.jsx)(P,{link:t,lastItem:i,isGroupWithSingleItem:a,isDarkGroupBackground:r})}var W=i(91171),M=i(43421);const D=b.I4.div.withConfig({displayName:"Group__Container",componentId:"sc-922dae9c-0"})(["display:flex;flex-direction:column;margin-bottom:","px;@media (min-width:","px){margin-bottom:","px;}@media (min-width:","px){margin-bottom:","px;}"],8,$.aq.tablet,$.sh.tablet,$.aq.desktop,16),q=(0,b.I4)(M.Ss).withConfig({displayName:"Group__GroupBottomFrame",componentId:"sc-922dae9c-1"})(["",";@media (prefers-color-scheme:dark){",";}"],e=>{let{$isDarkGroupBackground:t,$contrastPadding:i,$lastItem:n}=e;const o=m({lastItem:n,isDarkGroupBackground:t});return(0,b.AH)(["background:",";padding:0 ","px;padding-bottom:","px;@media (min-width:","px){padding:0 ","px;padding-bottom:","px;}@media (min-width:","px){padding:0 ","px;padding-bottom:","px;}"],c.sB.getGroupBackgroundColor(t),$.sh.mobile,o?$.sh.mobile:0,$.aq.tablet,i?$.sh.tablet:0,o?$.sh.tablet:0,$.aq.desktop,i?$.sh.desktop:0,o?$.sh.desktop:0)},e=>{let{$lastItem:t}=e;const i=h({lastItem:t});return(0,b.AH)(["padding-bottom:","px;@media (min-width:","px){padding-bottom:","px;}@media (min-width:","px){padding-bottom:","px;}"],i?$.sh.mobile:0,$.aq.tablet,i?$.sh.tablet:0,$.aq.desktop,i?$.sh.desktop:0)}),R=b.I4.div.withConfig({displayName:"Group__ItemContainer",componentId:"sc-922dae9c-2"})(["",";@media (prefers-color-scheme:dark){",";}"],e=>{let{$item:t,$previousItem:i,$isDarkGroupBackground:n,$index:o}=e;const a=n?c.mY.DarkGroupDark:c.mY.DefaultGroupLight,r=g(t,i,a,o),l=x(t,i,a,o);return(0,b.AH)(["border-top:",";padding-top:","px;@media (min-width:","px){padding-top:","px;}"],r?`1px solid ${c.sB.cardBorder}`:"none",l?16:0,$.aq.desktop,l?24:0)},e=>{let{$item:t,$previousItem:i,$index:n}=e;const o=g(t,i,c.mY.DefaultGroupDark,n),a=x(t,i,c.mY.DefaultGroupDark,n);return(0,b.AH)(["border-top:",";padding-top:","px;@media (min-width:","px){padding-top:","px;}"],o?`1px solid ${c.sB.cardBorder}`:0,a?8:0,$.aq.desktop,a?24:0)}),z=b.I4.div.withConfig({displayName:"Group__SrHeading",componentId:"sc-922dae9c-3"})([""]);function F(e){let{group:t,level:i,lazyLoadMedia:a=!0,children:r,noSpecialFirstItem:s,separatorBorder:c=!0}=e;const{site:{lang:u}}=(0,p.xy)(),m=(0,o.useContext)(I.R);if(!(0,l.Go)(t))return null;const h=(0,d.wL)(t),g=m===I.G.Grey,[x,...f]=t.children,y=s?t.children:f,b=s?0:1,$=y.at(-1),T=$||x,_=!!t.content?.title,B=_?(0,k.WF)(t,u):void 0,S=1===t.children.length,L=S?void 0:"list",P=t.content?.link,M=y.some(l.WZ)||Boolean(r)||Boolean(P),F={isFirst:!0,isSingle:S&&!P,role:S?void 0:"listitem",hasContrast:!1,isExternalAreena:(0,l.XD)(t),isDark:h},G=e=>s||0!==e?e>0?y[e-1]:null:x;return(0,n.jsxs)(n.Fragment,{children:[_&&(0,n.jsx)(z,{as:`h${i}`,className:"sr-only",children:B?.ariaTitle}),(0,n.jsx)(D,{role:L,"aria-label":L&&B?.title,children:(0,n.jsx)(j.Xk,{itemPosition:0,uiElementGroupTitle:B?.title??"<untitled group>",groupNumItems:t.children.length,children:(0,n.jsx)(A.A,{item:s?void 0:x,level:i,mobileBottomMargin:0,tabletBottomMargin:0,desktopBottomMargin:0,lazyLoadMedia:a,header:B,group:F,separatorBorder:c,children:(0,n.jsxs)(q,{$contrastPadding:g,$roundedCorners:{mobile:C.FY.bottom,tablet:C.FY.bottom},$separatorBorder:c&&M,$isDarkGroupBackground:h,$lastItem:$,children:[y.filter(e=>(0,l.WZ)(e)).map((e,o)=>(0,n.jsx)(j.Xk,{itemPosition:o+b,children:(0,n.jsx)(R,{$item:e,$previousItem:G(o),$isDarkGroupBackground:h,"data-testid":"item-container",$index:o,children:(0,n.jsx)(W.A,{item:e,level:_?(0,v.g)(i):i,group:{isFirst:!1,isSingle:!1,role:"listitem",hasContrast:g,isExternalAreena:(0,l.XD)(t),isDark:h},roundedCorners:{mobile:C.FY.all,tablet:C.FY.all},lazyLoadMedia:a})})},(0,w.Dh)(e))),r,P&&(0,n.jsx)(N,{link:P,lastItem:T,groupUuid:t.uuid,isGroupWithSingleItem:S,isDarkGroupBackgroun
1d:h})]})})})})]})}function G(e){let{group:t,level:i,lazyLoadMedia:u=!0,buttonTexts:m,noSpecialFirstItem:h,separatorBorder:g=!0}=e;const x=(0,o.useRef)(null),{translate:b}=(0,p.xy)(),w=t.content?.showMore?.size??3,v=2*w-1,I=t.children.length,{size:k,renewSize:$,showMoreButton:C,showHideButton:j}=(0,s.U)(t.uuid,w,I),[A,T]=(0,o.useState)(!1);if((0,o.useEffect)(()=>{A&&(x.current?.scrollIntoView({behavior:"smooth",block:"center"}),T(!1))},[A]),!(0,l.Go)(t))return null;const _={...t,children:(0,a.s)(t.children,k)},B=(0,r.H)(_.children),L=(0,d.wL)(t),P=C?{accessibleText:m?.showMoreA11y,text:m?.showMore??b("phrases.showMore")}:{text:b("phrases.hide")};return(0,n.jsx)(F,{group:_,level:i,lazyLoadMedia:u,noSpecialFirstItem:h,separatorBorder:g,children:(j||C)&&(0,n.jsx)(S.A,{ref:x,"data-testid":"button-row",$buttonGaps:f({lastItem:B,isGroupWithSingleItem:!1,isDarkGroupBackground:L}),children:(0,n.jsx)(y.A,{className:L?c.q_:c.sf,variant:"secondary",onClick:()=>{C?$(k+v):($(w),T(!0))},...P})})})}},65078(e,t,i){i.d(t,{A:()=>be});var n=i(11684),o=i(31225),a=i(12888),r=i(44832),l=i(31811),s=i(66166),d=i(97641),c=i(44428),p=i(24962),u=i(72529),m=i(71855);function h(e){return e.children.every(e=>e.playableMedia.type===c.z.Audio)?c.z.Audio:c.z.Video}var g=i(97983),x=i(74922),f=i(22765),y=i(38783),b=i(39012),w=i(70221),v=i(18188),I=i(85063),k=i(99597),$=i(90620),C=i(52108),j=i(29528),A=i(21525),T=i(38928),_=i(83565),B=i(75521),S=i(7906),L=i(43421),P=i(23849),N=i(90181),W=i(87647),M=i(33705),D=i(61526),q=i(11407),R=i(36024),z=i(91047),F=i(49086),G=i(51380),H=i(32772),E=i(39107),Y=i(62778),X=i(42756),O=i(95821),K=i(59312),V=i(14090);const{Portrait:U}=d.l,J=(0,r.AH)(["pointer-events:none;"]),Q=r.I4.div.withConfig({displayName:"FeatureCarouselContent__TextOverlay",componentId:"sc-10e78a79-0"})(["will-change:opacity;"," ",";position:absolute;display:flex;width:100%;height:100%;background:",";align-items:center;flex-direction:column;justify-content:flex-end;text-align:",";padding:20% ","px "," ","px;@media (min-width:","px){padding:20% ","px "," ","px;}@media (min-width:","px){padding:20% ","px "," ","px;}"],e=>{let{$renderAsVideoPlaylist:t}=e;return t&&J},L.lJ,K.J,e=>{let{$renderAsVideoPlaylist:t}=e;return t?"left":"center"},b.sh.mobile,e=>{let{$renderAsVideoPlaylist:t}=e;return te(t,16)},b.sh.mobile,b.aq.tablet,b.sh.tablet,e=>{let{$renderAsVideoPlaylist:t}=e;return te(t,20)},b.sh.tablet,b.aq.desktop,16,e=>{let{$renderAsVideoPlaylist:t}=e;return te(t,20)},16),Z=r.I4.div.withConfig({displayName:"FeatureCarouselContent__TagWrapper",componentId:"sc-10e78a79-1"})(["display:none;@media (min-width:","px){display:block;}"],b.aq.tablet),ee=(0,r.I4)(H.Lc).withConfig({displayName:"FeatureCarouselContent__StyledCardHeading",componentId:"sc-10e78a79-2"})(["color:",";margin:0 0 ","px 0;width:100%;text-overflow:ellipsis;overflow:hidden;display:-webkit-box;text-wrap:balance;-webkit-line-clamp:5;-webkit-box-orient:vertical;"],e=>{let{$color:t}=e;return t},8);function te(e,t){return`${e?56:t}px`}function ie(e){let{story:t,headingText:i,renderAsVideoPlaylist:o}=e;const a=o?void 0:function(e){if(e.concepts?.[0])return{conceptTagLink:{label:e.concepts[0].text,showOnFooter:!0}}}(t);return(0,n.jsxs)(Q,{$roundedCorners:{mobile:w.FY.all},$renderAsVideoPlaylist:o,children:[(0,n.jsx)(ee,{level:s.F.h3,href:t.url,mobile:o?F.PT.YleLHeavy:F.PT.YleXLCondensedHeavy,desktop:o?F.PT.YleLHeavy:F.PT.Yle2XLCondensedHeavy,$color:v.sB.featureStoryText,applyVisitedLinkStyles:!1,children:i}),a&&(0,n.jsx)(Z,{children:(0,n.jsx)(V.A,{tagSection:a,isInFooter:!0})})]})}const ne=e=>{let{minimum:t,mobile:i,tablet:o,image:a,video:r,playlist:l,lazyLoadMedia:s,isVideoPlaylist:d,headingText:c,story:p}=e;const u=U.aspectRatio,m=U.aspectRatioKey;return(0,n.jsx)(E.Ay,{image:a,video:r,playlist:l,minimum:{span:t,aspectRatio:u,aspectRatioKey:m},mobile:{span:i,aspectRatio:u,aspectRatioKey:m},tablet:{span:o,aspectRatio:u,aspectRatioKey:m},desktop:{span:o,aspectRatio:u,aspectRatioKey:m},lazy:s,noGridSystem:!0,roundedCorners:{mobile:w.FY.all},children:(0,n.jsx)(ie,{story:p,headingText:c,renderAsVideoPlaylist:d})})},{Square:oe}
1=d.l,ae=(0,r.I4)(H.Lc).withConfig({displayName:"CarouselStory__CarouselStoryHeading",componentId:"sc-4e1e35e-0"})(["order:2;color:",";margin:","px 0 ","px 0;flex-grow:1;"],v.sB.getTextColor(),e=>{let{reduceTopMarginToFitStartAndEndTime:t}=e;return t?0:16},8),re=r.I4.div.withConfig({displayName:"CarouselStory__MediaInfoContainer",componentId:"sc-4e1e35e-1"})(["display:flex;flex-flow:row nowrap;gap:","px;align-items:center;order:3;z-index:",";margin-top:","px;"],8,b.fw.story.controlLayer,8),le=r.I4.div.withConfig({displayName:"CarouselStory__StartAndEndTimeContainer",componentId:"sc-4e1e35e-2"})(["display:flex;flex-flow:row nowrap;align-items:center;order:1;z-index:",";margin-top:","px;"],b.fw.story.controlLayer,8),se=r.I4.div.withConfig({displayName:"CarouselStory__Wrapper",componentId:"sc-4e1e35e-3"})(["display:flex;flex-direction:column;height:100%;"]),de=r.I4.div.withConfig({displayName:"CarouselStory__PublishedDate",componentId:"sc-4e1e35e-4"})(["margin-top:","px;"],4),ce=r.I4.div.withConfig({displayName:"CarouselStory__OnAirKicker",componentId:"sc-4e1e35e-5"})(["position:absolute;z-index:1;top:","px;left:","px;"],8,8),pe=e=>{let{kickerText:t}=e;return(0,n.jsx)(ce,{children:(0,n.jsx)(N.v,{variant:"live","data-testid":"tag-section-tag",children:t})})};function ue(e){let{story:t,playlist:i,aspectRatio:o,aspectRatioKey:a,renderAsFeature:r,minimum:l,mobile:d,tablet:p,lazyLoadMedia:h}=e;const{openPlaylist:g}=(0,R.Q)(),{translate:x,site:f,ssrDetails:{ssrTime:y}}=(0,I.xy)(),{texts:b,image:v,playableMedia:k,startTime:$,endTime:C}=t,T=!!i&&i.mediaType===c.z.Video,_=!!i&&i.mediaType===c.z.Audio,B=_?oe.aspectRatio:o,S=_?oe.aspectRatioKey:a,L=b.headline.text,P=!(r||(0,u.D0)(t)||(0,u.Be)(t)),N=!(!$||!C),H=(0,u.D0)(t)&&(0,u.Vd)(t)&&N,K=!!H&&((0,M.dS)(y,$)&&(0,M.Y8)(y,C)),V=k&&{...k,title:L,playMode:(0,m.aH)(k.playMode,(0,u.BG)(t),T||_),standAlone:!1,showPlayButton:!1},U=(0,z.F3)(t,{},x,f,!1),J=(0,u.D0)(t)&&!N;return(0,n.jsx)(A.Xk,{element:A.GX.CarouselStory,...(0,q.I)(t,void 0,{omitSize:!0}),children:(0,n.jsx)(G.A,{as:"div",flexDirection:"column",isFullHeight:!0,children:(0,n.jsxs)(se,{onClick:e=>{(T||_)&&void 0!==V&&(e.preventDefault(),g({playlist:i,selectedProgramId:V.id,playMode:V.playMode}))},children:[r?(0,n.jsx)(ne,{minimum:l,mobile:d,tablet:p,image:v,video:V,playlist:i,lazyLoadMedia:h,isVideoPlaylist:T,headingText:L,story:t}):(0,n.jsxs)(j.LX,{$minimum:l,$mobile:d,$tablet:p,$desktop:p,$noGridSystem:!0,children:[(0,n.jsx)(ae,{level:s.F.h3,href:t.url,mobile:F.PT.YleSBold,tablet:F.PT.YleMBold,desktop:F.PT.YleMBold,applyVisitedLinkStyles:!1,addSpaceToBottomForPlayButton:!0,reduceTopMarginToFitStartAndEndTime:H,children:L}),H&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(le,{children:(0,n.jsx)(X.o,{as:"span",$mobile:F.PT.YleXS,children:(0,M.uL)($,C,y,f.lang)})}),K&&(0,n.jsx)(pe,{kickerText:x("kicker.onAir")})]}),J&&(0,n.jsxs)(re,{children:[(0,u.mT)(t)&&(0,n.jsx)(W.fP5,{height:18,width:18}),(0,n.jsx)(X.o,{as:"span",$mobile:F.PT.YleS,children:(0,D.a)(V?.duration)})]}),_&&(0,n.jsx)(re,{children:(0,n.jsx)(Y.A,{type:Y.L.AudioWithPlay,duration:V?.duration,showDurationOutside:!0,buttonTheme:"default",durationSize:"s"})}),(0,n.jsx)(E.Ay,{image:v,video:_?void 0:V,playlist:i,minimum:{span:l,aspectRatio:B,aspectRatioKey:S},mobile:{span:d,aspectRatio:B,aspectRatioKey:S},tablet:{span:p,aspectRatio:B,aspectRatioKey:S},desktop:{span:p,aspectRatio:B,aspectRatioKey:S},lazy:h,noGridSystem:!0,roundedCorners:{mobile:w.FY.all}})]}),P&&(0,n.jsx)(de,{children:(0,n.jsx)(O.A,{story:t,url:U.url})})]})})})}const me=(0,r.AH)([".swiper-wrapper{list-style:none;transform:translate3d(","px,0,0);@media (min-width:","px){transform:translate3d(","px,0,0);}@media (min-width:","px){transform:translate3d(","px,0,0);}}"],b.sh.mobile,b.aq.tablet,b.sh.tablet,b.aq.desktop,b.sh.desktop),he=(0,r.AH)([".swiper-slide{width:auto;margin-right:","px;@media (min-width:","px){margin-right:","px;}@media (min-width:","px){margin-right:","px;}}"],b.sh.mobile,b.aq.tablet,b.sh.tablet,b.aq.desktop,b.sh.desktop),ge=(0,r.I4)(j.LX).withConfig({displayName:"Carousel__Container",componentId:"sc-49b96e0a-0"})([""," "," "," background:",";padding-bottom:","px;@media (min-width:","px){padding-bottom:","px;}@media (min-width:","px){padding-bottom:","px;}"],e=>{let{$hasAmbientContrast:t}=e;return t?me:""}
1,he,L.lJ,v.sB.getGroupBackgroundColor(),e=>{let{$hasAmbientContrast:t}=e;return t?b.sh.mobile:0},b.aq.tablet,e=>{let{$hasAmbientContrast:t}=e;return t?b.sh.tablet:0},b.aq.desktop,e=>{let{$hasAmbientContrast:t}=e;return t?b.sh.desktop:0}),xe=r.I4.div.withConfig({displayName:"Carousel__Body",componentId:"sc-49b96e0a-1"})(["display:flex;flex-direction:row;"]),fe=r.I4.div.withConfig({displayName:"Carousel__SpinnerContainer",componentId:"sc-49b96e0a-2"})(["display:flex;justify-content:center;align-items:center;padding:","px;padding-bottom:","px;min-height:235px;@media (min-width:","px){min-height:300px;padding:","px;padding-bottom:","px;}"],16,24,b.aq.tablet,24,32);function ye(e){let{group:t}=e;const i=(0,f.G)(e=>e.consent.consent),o=(0,g.FT)(i),a=t.content?.link;if(!a)return null;const r=(0,n.jsx)(B.A,{$buttonGaps:{lightTheme:{top:!0,bottom:!1},darkTheme:{top:!0,bottom:!1}},children:(0,n.jsx)(_.A,{forwardedAs:"a",size:"md",variant:"secondary",text:a.text,href:a.url})});return o?(0,n.jsx)(A.Xk,{element:A.GX.CarouselLinkButton,layoutItemUuid:t.uuid,uiElementGroupTitle:t.content?.title,itemTitle:a.text,children:(0,n.jsx)(T.A,{children:r})}):r}function be(e){let{group:t,lazyLoadMedia:i,loadingText:r,isLoading:g=!1}=e;const{site:{lang:f}}=(0,I.xy)(),v=(0,a.useRef)(null),j=(0,a.useContext)(x.R)===x.G.Grey;if(!g&&!(0,u.Go)(t))return null;const T=t.children[0],_=T?.widgetType===p.x.Notification,B=t.children.filter(u.mV),L=(0,y.o3)(t,f),N=(0,u.vq)(t)||(0,u.dM)(t)||(0,u.GA)(t)?function(e){return{title:e.content?.title,mediaType:h(e),items:e.children.map(e=>{const{contentId:t,playableMedia:i,texts:n}=e;return{contentId:t,aspectRatio:i?.aspectRatio??m.M$,title:n.headline.text,story:e}})}}(t):void 0,W=B.every(u.cc)||N?.mediaType===c.z.Video,M=function(e){const t=e.content?.carousel?.aspectRatio;return Object.values(d.l).find(e=>e.aspectRatioKey===t)??d.l.Landscape}(t),D={minimum:23,mobile:16,tablet:N?.mediaType===c.z.Video?6:W?9:6},q=new k.M(i?0:3),R={1:{freeMode:$.g4.mobile,slidesOffsetBefore:b.sh.mobile,slidesOffsetAfter:0},[b.aq.tablet]:{freeMode:$.g4.tablet,slidesOffsetBefore:j?b.sh.tablet:0,slidesOffsetAfter:j?0:-b.sh.tablet},[b.aq.desktop]:{freeMode:$.g4.desktop,slidesOffsetBefore:j?b.sh.desktop:0,slidesOffsetAfter:j?0:-b.sh.desktop}};return(0,n.jsxs)(ge,{as:"section",$minimum:24,$tablet:15,$minimumBreakGap:!0,$mobileBreakGap:!0,$minimumBottomMargin:8,$mobileBottomMargin:8,$tabletBottomMargin:16,$desktopBottomMargin:16,$hasAmbientContrast:j,$roundedCorners:{mobile:w.FY.all,tablet:w.FY.all},$separatorBorder:!0,"aria-labelledby":`carousel-${t.uuid}`,"data-testid":"carousel-container",children:[(0,n.jsx)(S.A,{header:L,level:s.F.h2,ariaLabelId:`carousel-${t.uuid}`,separatorBorder:!1,children:(0,n.jsx)(P.P,{carouselRef:v})}),g&&(0,n.jsx)(fe,{children:(0,n.jsx)(o.y,{label:r})}),!g&&_&&(0,n.jsx)(C.A,{widget:T,level:s.F.h3,separatorBorder:!1}),!g&&(0,n.jsx)(xe,{children:(0,n.jsx)(l.RC,{...$.xz,ref:v,breakpoints:R,children:B.map((e,i)=>(0,n.jsx)(l.qr,{tag:"li",children:(0,n.jsx)(A.Xk,{itemPosition:i,uiElementGroupTitle:L?.title??"<untitled carousel>",groupNumItems:t.children.length,children:(0,n.jsx)(ue,{story:e,playlist:N,aspectRatio:M.aspectRatio,aspectRatioKey:M.aspectRatioKey,renderAsFeature:W,minimum:D.minimum,mobile:D.mobile,tablet:D.tablet,lazyLoadMedia:q.shouldLoadLazily()})})},e.uuid||e.contentId))})}),!g&&B.length>0&&(0,n.jsx)(ye,{group:t})]})}},23849(e,t,i){var n=i(11684),o=i(87647),a=i(44832),r=i(39012),l=i(18188),s=i(90620);const d=a.I4.div.withConfig({displayName:"CarouselNavigation__Container",componentId:"sc-eb65953e-0"})(["display:none;line-height:0;white-space:nowrap;@media (min-width:","px){display:block;}"],r.aq.tablet),c=a.I4.button.withConfig({displayName:"CarouselNavigation__Button",componentId:"sc-eb65953e-1"})(["color:",";border:0;background:transparent;display:inline-block;height:","px;width:","px;border-radius:","px;cursor:pointer;outline:none;text-align:center;vertical-align:middle;&:hover{background:",";}> svg{display:inline-block;vertical-align:middle;}"],l.sB.getTextColor(),32,32,16,l.sB.carouselNavigationButtonHover),p=e=>{let{className:t,onPrev:i,onNext:a}=e;
1return(0,n.jsxs)(d,{"aria-hidden":!0,className:t,children:[(0,n.jsx)(c,{onClick:i,tabIndex:-1,"data-testid":"carousel-prev-button",children:(0,n.jsx)(o.JGc,{height:24})}),(0,n.jsx)(c,{onClick:a,tabIndex:-1,"data-testid":"carousel-next-button",children:(0,n.jsx)(o.c_$,{height:24})})]})};i.d(t,["P",0,e=>{let{className:t,carouselRef:i}=e;return(0,n.jsx)(p,{className:t,onPrev:()=>(0,s.Uc)(i),onNext:()=>(0,s.qV)(i)})},"l",0,p])},17161(e,t,i){i.d(t,{A:()=>S});var n=i(11684),o=i(12888),a=i(44832),r=(i(39012),i(67056)),l=i(3324),s=i(74338),d=i(85063);const c=a.I4.div.withConfig({displayName:"LoginPromptModal__LoginPromptModalContent",componentId:"sc-cd75da87-0"})(["max-width:300px;"]),p=e=>{let{modalRef:t,onClose:i,onDismissWithoutLogin:a}=e;const{tunnus:p,translate:u}=(0,d.xy)(),m=(0,o.useRef)(!1),h=()=>{m.current?m.current=!1:(a?.(),i())},g=u("questionAndAnswer.loginModal.title");return(0,n.jsx)(r.a,{modalRef:t,"aria-label":g,onClose:h,children:(0,n.jsx)(l.l,{size:"md",title:g,actions:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.$,{variant:"text",onClick:h,text:u("questionAndAnswer.loginModal.cancelButton")}),(0,n.jsx)(s.$,{variant:"primary",onClick:()=>{m.current=!0,i(),p?.logIn()},text:u("questionAndAnswer.loginModal.loginButton")})]}),children:(0,n.jsx)(c,{children:u("questionAndAnswer.loginModal.message")})})})};var u=i(49086),m=i(42756),h=i(94830);function g(e){let{title:t}=e;const{translate:i}=(0,d.xy)();return(0,n.jsx)(h.F,{idScope:"qa-questions-info",align:"end",label:i("questionAndAnswer.infoButtonLabel"),heading:(0,n.jsx)(m.o,{as:"h2",$mobile:u.PT.YleLHeavy,$desktop:u.PT.YleXLHeavy,children:t??i("questionAndAnswer.title")})})}var x=i(37771),f=i(18188),y=i(21525),b=i(38928),w=i(45008);const v=a.I4.div.withConfig({displayName:"QuestionItem__QuestionCard",componentId:"sc-47ebfeb5-0"})(["border:1px solid ",";border-radius:","px;background-color:",";"],f.sB.separator,8,f.sB.questionAndAnswerCardBackground),I=a.I4.button.withConfig({displayName:"QuestionItem__QuestionButton",componentId:"sc-47ebfeb5-1"})(["width:100%;border:0;background:transparent;cursor:pointer;display:flex;align-items:center;gap:","px;padding:","px;text-align:left;color:",";&:focus{"," border-radius:","px;outline-offset:4px;}&:focus:not(:focus-visible){","}"],12,12,f.sB.text,x.T7,8,x.TY),k=a.I4.span.withConfig({displayName:"QuestionItem__IconWrapper",componentId:"sc-47ebfeb5-2"})(["display:inline-flex;align-items:center;justify-content:center;width:","px;height:","px;flex:0 0 ","px;color:",";"],24,24,24,f.sB.text),$=e=>{let{question:t,isOpen:i,index:o,groupNumItems:a,onOpenQuestion:r,uiElementGroupTitle:l}=e;const{translate:s}=(0,d.xy)();return(0,n.jsx)(y.Xk,{contextName:y.Ce.QuestionAndAnswer,uiElementId:t.id,element:y.GX.PalvelijaQuestion,itemTitle:t.text,itemPosition:o,uiElementGroupTitle:l??s("questionAndAnswer.title"),groupNumItems:a,children:(0,n.jsx)(b.A,{children:(0,n.jsx)(v,{children:(0,n.jsxs)(I,{type:"button","data-testid":"question-button","aria-expanded":i,onClick:()=>{r(t)},children:[(0,n.jsx)(k,{children:(0,n.jsx)(w.A,{iconName:t.icon})}),(0,n.jsx)(m.o,{as:"span",$mobile:u.PT.YleS,children:t.text})]})})})})};var C=i(33493),j=i(22765);var A=i(22093);const T=(0,o.lazy)(()=>Promise.all([i.e(746),i.e(342),i.e(281),i.e(386)]).then(()=>i(82386))),_=a.I4.section.withConfig({displayName:"QuestionAndAnswerContent__Container",componentId:"sc-51a3258b-0"})(["display:flex;flex-direction:column;gap:","px;"],16),B=a.I4.div.withConfig({displayName:"QuestionAndAnswerContent__Questions",componentId:"sc-51a3258b-1"})(["display:flex;flex-direction:column;gap:","px;"],8);function S(e){let{questions:t,answerQueryKeyPrefix:i,ariaLabel:a,feedbackFormId:r,title:l,answersIncludedWithQuestions:s=!1}=e;const{openQuestionId:c,isLoggedIn:u,answerModalRef:m,loginPromptModalRef:h,closeLoginPromptModal:x,selectedQuestion:f,handleCloseModal:y,handleOpenQuestion:b,handleDismissWithoutLogin:w}=function(e){let{questions:t}=e;const[i,n]=(0,o.useState)(null),{modalRef:a,closeModal:r}=(0,C.h)(),{modalRef:l,openModal:s,closeModal:c}=(0,C.h)(),{tunnus:p,player:u}=(0,d.xy)(),m=(0,j.G)(e=>e.user),h=m?.loggedIn??!1;(0,o.useEffect)(()=>
1{if(i)return u.suspendForOverlay(),()=>{u.resumeAfterOverlay()}},[i,u]),(0,o.useEffect)(()=>{if(!p)return;const e=e=>{"tunnus-dialog-closed"===e.type&&"logIn"===e.name&&window.setTimeout(()=>{h||n(null)},0)};return p.addMessageListener(e),()=>{p.removeMessageListener(e)}},[h,p]);const g=t.find(e=>e.id===i);return{openQuestionId:i,isLoggedIn:h,answerModalRef:a,loginPromptModalRef:l,closeLoginPromptModal:c,selectedQuestion:g,handleCloseModal:()=>{r(),n(null)},handleOpenQuestion:e=>{n(e.id),h||s()},handleDismissWithoutLogin:()=>{n(null)}}}({questions:t}),{selectedAnswer:v}=(0,A.Bw)({questions:t,answerQueryKeyPrefix:i,openQuestionId:c,isLoggedIn:u,answersIncludedWithQuestions:s});return(0,n.jsxs)(_,{"aria-label":a,children:[(0,n.jsx)(g,{title:l}),(0,n.jsx)(B,{children:t.map((e,i)=>(0,n.jsx)($,{index:i,question:e,isOpen:c===e.id,groupNumItems:t.length,onOpenQuestion:b,uiElementGroupTitle:l},e.id))}),(0,n.jsx)(p,{modalRef:h,onClose:x,onDismissWithoutLogin:w}),(0,n.jsx)(o.Suspense,{children:(0,n.jsx)(T,{modalRef:m,isLoggedIn:u,selectedQuestion:f,selectedAnswer:v,feedbackFormId:r,onClose:y})})]})}},94830(e,t,i){i.d(t,{F:()=>w});var n=i(11684),o=i(12888),a=i(44832),r=i(39012),l=i(85063),s=i(48506),d=i(87647),c=i(37771),p=i(49086),u=i(18188),m=i(42756);const h=a.I4.button.withConfig({displayName:"QuestionAndAnswerInfoButton__InfoButton",componentId:"sc-4f95a86f-0"})(["display:flex;align-items:center;justify-content:center;width:",";height:","px;gap:",";padding:0;border:0;background:transparent;color:",";cursor:pointer;flex-shrink:0;&:focus{","}&:focus:not(:focus-visible){","}"],e=>{let{$showLabel:t}=e;return t?"auto":"24px"},24,e=>{let{$showLabel:t}=e;return t?"8px":"0"},u.sB.text,c.T7,c.TY);function g(e){let{ref:t,isOpen:i,onToggle:o,buttonId:a,tooltipId:r,tooltipContentId:l,label:s,showLabel:c=!1}=e;return(0,n.jsxs)(h,{ref:t,id:a,type:"button",$showLabel:c,"aria-expanded":i,"aria-controls":i?r:void 0,"aria-describedby":i?l:void 0,"aria-label":s,onClick:o,children:[(0,n.jsx)(d.R2D,{"aria-hidden":"true"}),c&&(0,n.jsx)(m.o,{as:"span",$mobile:p.PT.YleS,children:s})]})}const x=a.I4.div.withConfig({displayName:"QuestionAndAnswerInfoTooltip__Root",componentId:"sc-78110b53-0"})(["position:relative;z-index:",";"],e=>{let{$tooltipOpen:t}=e;return t?2:"auto"}),f=a.I4.div.withConfig({displayName:"QuestionAndAnswerInfoTooltip__TopRow",componentId:"sc-78110b53-1"})(["display:flex;align-items:center;justify-content:space-between;gap:","px;width:100%;"],8),y=a.I4.div.withConfig({displayName:"QuestionAndAnswerInfoTooltip__TooltipStrip",componentId:"sc-78110b53-2"})(["position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:1;pointer-events:none;[role='dialog']{pointer-events:auto;}"]),b=a.I4.div.withConfig({displayName:"QuestionAndAnswerInfoTooltip__TooltipStripInner",componentId:"sc-78110b53-3"})(["display:flex;justify-content:",";width:100%;position:relative;[role='dialog']{position:relative;top:auto;margin-top:0;@media (max-width:","px){margin-top:0;}}"],e=>{let{$align:t}=e;return"end"===t?"flex-end":"flex-start"},r.aq.mobile-1);function w(e){let{idScope:t,align:i,label:a,showLabel:r=!1,heading:d,className:c}=e;const[p,u]=(0,o.useState)(!1),m=(0,o.useRef)(null),h=(0,o.useRef)(null),w=`${(0,o.useId)()}-${t}`,v=`${w}-tooltip`,I=`${v}-content`,{translate:k}=(0,l.xy)();return(0,o.useEffect)(()=>{if(!p)return;const e=()=>{u(!1),h.current?.focus()},t=m.current?.closest("dialog");if(t){const i=t=>{t.preventDefault(),e()};return t.addEventListener("cancel",i),()=>t.removeEventListener("cancel",i)}const i=t=>{"Escape"===t.key&&e()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[p]),(0,o.useEffect)(()=>{if(!p)return;const e=e=>{m.current?.contains(e.target)||u(!1)};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},[p]),(0,n.jsxs)(x,{ref:m,className:c,$tooltipOpen:p,children:[(0,n.jsxs)(f,{children:[d,(0,n.jsx)(g,{ref:h,isOpen:p,onToggle:()=>u(e=>!e),buttonId:w,tooltipId:v,tooltipContentId:I,label:a,showLabel:r})]}),p&&(0,n.jsx)(y,{children:(0,n.jsx)(b,{$align:i,children:(0,n.jsx)(s.A,{id:v,contentId:I,labelledBy:w,align:i,hideCloseButton:!0,clampWidthTo:"parent",children:k("questionAndAnswer.infoTooltip")})})})]})}}
1,22093(e,t,i){i.d(t,{Bw:()=>p,bL:()=>c});var n=i(91831),o=i(90549),a=i(55744),r=i(12888),l=i(92253),s=i(85063);const d=(e,t)=>[e,"answer",t];function c(e){let{articleId:t,language:i,queryKeyPrefix:n}=e;const{config:r}=(0,s.xy)(),c=(0,a.jE)(),p=Boolean(t),{data:u,isPending:m,isSuccess:h}=(0,o.I)({queryKey:[n,"questions",t,i],queryFn:()=>async function(e){let{config:t,queryClient:i,articleId:n,language:o,queryKeyPrefix:a}=e;const{questions:r,answers:s}=await(0,l.q_)({config:t,params:{id:n,language:o}});return s.forEach(e=>{i.setQueryData(d(a,e.question.id),e)}),r}({config:r,queryClient:c,articleId:t,language:i,queryKeyPrefix:n}),enabled:p});return{questions:u,showSkeleton:p&&m,showContent:p&&h&&void 0!==u&&u.length>0}}function p(e){let{questions:t,answerQueryKeyPrefix:i,openQuestionId:a,isLoggedIn:c,answersIncludedWithQuestions:p=!1}=e;const{config:u}=(0,s.xy)(),m=e=>(0,l.$3)({config:u,params:{id:e}});(0,n.E)({queries:t.map(e=>({queryKey:d(i,e.id),queryFn:()=>m(e.id),enabled:c&&Boolean(t.length)&&!p,staleTime:"static"}))});const h=c&&Boolean(a),{data:g,isFetching:x,isError:f,refetch:y}=(0,o.I)({queryKey:d(i,a??""),queryFn:()=>m(a),enabled:h,staleTime:"static"});return(0,r.useEffect)(()=>{h&&f&&!x&&y()},[h,f,x,y]),{selectedAnswer:c?g:void 0}}},48506(e,t,i){i.d(t,{A:()=>b});var n=i(11684),o=i(87647),a=(i(12888),i(44832)),r=i(39012),l=i(37771),s=i(49086),d=i(18188),c=i(85063),p=i(42756);const u={start:(0,a.AH)(["left:0;right:auto;transform:none;"]),center:(0,a.AH)(["left:50%;transform:translateX(-50%);@media (max-width:","px){left:auto;right:16px;transform:none;}"],r.aq.tablet-1),end:(0,a.AH)(["left:auto;right:0;transform:none;"])},m={start:(0,a.AH)(["justify-content:flex-start;padding-left:6px;"]),center:(0,a.AH)(["@media (min-width:","px) and (max-width:","px){justify-content:flex-end;padding-right:16px;}"],r.aq.mobile,r.aq.tablet-1),end:(0,a.AH)(["justify-content:flex-end;padding-right:6px;"])},h=a.I4.div.withConfig({displayName:"RelativeTooltip__TooltipRoot",componentId:"sc-b48e8cd3-0"})(["--tooltip-background-color:",";--tooltip-text-color:",";display:flex;flex-direction:column;position:absolute;top:100%;width:",";z-index:1;margin-top:-12px;"," @media (max-width:","px){margin-top:-4px;}"],d.sB.backgroundContrast,d.sB.background,e=>{let{$clampWidthTo:t}=e;return"parent"===t?"min(408px, 100%)":"min(408px, calc(100vw - 32px))"},e=>{let{$align:t}=e;return u[t]},r.aq.mobile-1),g=a.I4.div.withConfig({displayName:"RelativeTooltip__TipRow",componentId:"sc-b48e8cd3-1"})(["display:flex;height:6px;justify-content:center;",""],e=>{let{$align:t}=e;return m[t]}),x=a.I4.div.withConfig({displayName:"RelativeTooltip__Tip",componentId:"sc-b48e8cd3-2"})(["width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid var(--tooltip-background-color);"]),f=a.I4.div.withConfig({displayName:"RelativeTooltip__Bubble",componentId:"sc-b48e8cd3-3"})(["position:relative;border-radius:4px;background-color:var(--tooltip-background-color);color:var(--tooltip-text-color);padding:",";"],e=>{let{$hideCloseButton:t}=e;return t?"10px 16px 12px 16px":"10px 40px 12px 16px"}),y=a.I4.button.withConfig({displayName:"RelativeTooltip__CloseButton",componentId:"sc-b48e8cd3-4"})(["position:absolute;top:11px;right:11px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border:0;padding:0;background:transparent;color:var(--tooltip-text-color);cursor:pointer;&:focus{","}&:focus:not(:focus-visible){","}"],l.T7,l.TY);function b(e){let{children:t,id:i,contentId:a,labelledBy:r,onClose:l,align:d="center",hideCloseButton:u=!1,clampWidthTo:m="viewport"}=e;const{translate:b}=(0,c.xy)();return(0,n.jsxs)(h,{id:i,role:"dialog","aria-modal":"false","aria-labelledby":r,$align:d,$clampWidthTo:m,children:[(0,n.jsx)(g,{"aria-hidden":"true",$align:d,children:(0,n.jsx)(x,{})}),(0,n.jsxs)(f,{$hideCloseButton:u,children:[(0,n.jsx)(p.o,{as:"div",$mobile:s.PT.YleS,id:a,children:t}),!u&&(0,n.jsx)(y,{onClick:l,"aria-label":b("phrases.close"),type:"button",children:(0,n.jsx)(o.bm,{width:20,height:20})})]})]})}},18686(e,t,i){i.d(t,{U:()=>l});var n=i(12888),o=i(70068),a=i(84222);const r=e=>{const t=e.get();return"number"==typeof t?.size&&t?.expires>Date.now()?t.size:null};
1function l(e,t,i){const l=s(t,t,i),[d,c]=(0,n.useState)(()=>((e,t,i)=>{const n=new o.B(`rs-${e}`);if("undefined"!=typeof window&&window.UKKO_APP_HYDRATED&&(0,a.yl)()){const e=r(n);if(e)return e}return s(t,t,i)})(e,t,i)),p=new o.B(`rs-${e}`),u=e=>{const n=s(e,t,i);c(n),p.set({size:n,expires:Date.now()+18e5})};(0,n.useEffect)(()=>{if((0,a.yl)()){const e=r(p);e&&u(e)}});const m=d<i;return{size:d,renewSize:u,showMoreButton:m,showHideButton:!m&&d>l}}function s(e,t,i){return i<=t||e<t?Math.max(e,t):e+2>=i?i:e}},66972(e,t,i){i.d(t,{Ay:()=>d});var n=i(79959),o=i(40399),a=i(70098),r=i(12359),l=i(12888),s=i(35973);function d(e){const t=(0,l.useMemo)(()=>function(e,t,i){if(!e)return[];const n=(0,a.h)(new Date(e),{minutes:0,seconds:0,milliseconds:0}),l=(0,o.O)(new Date)<30,d=l?(0,r.j)(n,{hours:1,minutes:i}):(0,r.j)(n,{hours:1});return[...Array((l?60*t-i:60*t)/i-1).keys()].map(e=>({type:s.vp.Observation,date:(0,r.j)(d,{minutes:e*i})})).reverse()}(e,4,30),[e]),i=(0,l.useMemo)(()=>function(e,t,i){if(!e)return[];const o=(0,a.h)(new Date(e),{minutes:0,seconds:0,milliseconds:0});return[...Array(60*t/i+1).keys()].map(e=>({type:s.vp.Forecast,date:(0,n.W)(o,{minutes:e*i})}))}(e,8,30),[e]);return{slices:(0,l.useMemo)(()=>[...t,...i],[t,i]),firstSlice:t.length}}},32609(e,t,i){i.d(t,{A:()=>r});var n=i(71952),o=i(12888),a=i(85063);function r(){const{config:{weatherApiUrl:e,weatherApiAppId:t,weatherApiAppKey:i}}=(0,a.xy)();return(0,o.useCallback)((o,a)=>`${e}/map/${o}/${a.type}/${(0,n.GP)(a.date,"yyyy/MM/dd/HH/mm")}?app_id=${t}&app_key=${i}`,[t,i,e])}},38783(e,t,i){i.d(t,{o3:()=>c,WF:()=>d,y2:()=>p});var n=i(26315),o=i(72529),a=i(36164);function r(e,t){const i=e.plugins?.ariaTitle,n=i??e.content?.title,r=e.children?.length;if(!n||r<=1)return n;const l=function(e,t){if((0,o.up)(e)||(0,o.vq)(e))return t===a.JA.sv?(0,o.R3)(e)?"Arenan-karusellen":"karusellen":(0,o.R3)(e)?"Areena-karusellissa":"karusellissa";if(t===a.JA.sv)return(0,o.XD)(e)?"Arenan-paketet":"paketet";return(0,o.XD)(e)?"Areena-paketissa":"paketissa"}(e,t),s=t===a.JA.sv?"innehåller":"on",d=function(e,t){if(e.every(o.o6))return t===a.JA.sv?"videor":"videota";if(e.every(o.cc))return t===a.JA.sv?"visuellt innehåll":"visuaalista juttua";if(e.every(o.BG))return t===a.JA.sv?"artiklar":"artikkelia";return t===a.JA.sv?"innehåll":"juttua"}(e.children,t);return`${n}: ${l} ${s} ${r} ${d}`}var l=i(10791),s=i(54288);function d(e,t){return{title:e.content?.title||void 0,ariaTitle:r(e,t),isExceptional:e.content?.theme?.header.palette===n.Q.Red||!1,isDark:(0,s.wL)(e),plugins:e?.plugins,showAreenaLogo:!!(0,o.XD)(e)||void 0}}function c(e,t){const i=e.content?.title?e.content.title:void 0,n=r(e,t);return(0,o.R3)(e)?{title:i,ariaTitle:n,isDark:!1,isExceptional:!1,showAreenaLogo:!0}:(0,o.vq)(e)?{title:i,ariaTitle:n,isDark:!1,isExceptional:!1}:{title:i,ariaTitle:n,isExceptional:!1,isDark:!1,plugins:e?.plugins}}function p(e,t){if(!(0,o.mV)(e)||(0,l.uc)(e).showWideOnTop||!!t.plugins?.packageSubHeader||t.isExceptional)return{showInLightMode:!1,showInDarkMode:!1};return{showInLightMode:!(!t.isDark&&(0,s.qj)(e)),showInDarkMode:!0}}},12500(e,t,i){i.d(t,{KM:()=>s,m$:()=>a,ql:()=>d,z_:()=>l});var n=i(25362),o=i(58832);i(63841);function a(e){return!1===e?.comments?.isHidden}function r(e,t){return e?.content?.findIndex(e=>e?.type===t)>-1}function l(e){const t=function(e){const t=e?.properties?.map(e=>e.match(/^layout:(.*)$/)).map(e=>e?.[1]).filter(e=>e);return t?.[0]}(e);return{isCardStory:e.format===n.Iy.CardStory,isFeatureArticle:e.journalisticStyle===n.tK.Feature,isVerticalMultimediaArticle:e.format===n.Iy.VerticalMultimediaArticle,isDocumentArticle:e.format===n.Iy.DocumentArticle,isChatArticle:e.format===n.Iy.ChatArticle,hasLivefeed:r(e,"livefeed"),hasTopList:r(e,"toplist"),hasSlideshow:r(e,"slideshow"),hasMobileFeature:r(e,"feature"),hasWideEsiLayout:"config.article.leveaupotus"===t,hasWideLayout:"config.article.wide"===t,hasFeatureLayout:"feature"===t,hasHeadlineMedia:Boolean(e.headline?.image||e.headline?.video||e.headline?.audio)}}function s(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];const o=e?.publisher?.name;return!!o&&i.some(e=>
1e.name===o)}function d(e,t,i,n){const{rootUrl:a,interactiveTableHost:r,dataApiHost:l,dataApiAppKey:s,appId:d,isProd:c,programsApiAppKey:p,programsApiUrl:u,tehtavaEmbedUrl:m,formsApiUrl:h,formsApiAppKey:g}=e,{lang:x}=t,f=i.showConcepts??!1,y=i.showPrimarySubject??!1,{language:b}=n;return{appId:d,articlePollInterval:5e3,baseUrls:{tableApi:r,subject:`${a}/t`,livefeedDataApi:l,programsApi:u,tehtavaEmbed:m,formsApiUrl:h},includeExternalContentCss:!1,isTest:!c,livefeedDataApiAppKey:s,locale:(0,o.gG)(b||x),programsApiAppKey:p,showPrimarySubject:y,showSubjectList:f,formsApiAppKey:g}}},61631(e,t,i){i.d(t,{X:()=>o});var n=i(3192);function o(e){const t=e?.id?n.J.find(t=>t.id===e.id)?.name:void 0;return t?`${t.fi} | ${t.sv}`:void 0}},99597(e,t,i){i.d(t,{M:()=>n});class n{index;numberOfMediaToLoadEagerly;constructor(e){this.index=0,this.numberOfMediaToLoadEagerly=e}shouldLoadLazily(){return this.index+=1,this.index>this.numberOfMediaToLoadEagerly}}},63613(e,t,i){i.d(t,{A:()=>p,m:()=>u});i(97700);var n=i(11684),o=i(66166),a=i(31964),r=i(47910),l=i(65078),s=i(60259),d=i(85063),c=i(25204);function p(e){let{uuid:t,title:i,widgetConfig:r,initialSize:p=3,excludedContentIds:u=[]}=e;const{initialSize:m,excludeArticlesInLayout:h,groupLink:g,template:x=a.al.Default}=r,{translate:f,widgetAuxData:y}=(0,d.xy)(),b=y.conceptGroup,w=b?.[t],v=h?w?.filter(e=>e.contentId&&!u?.includes(e.contentId)):w;if(!v)return null;const I=x===a.al.Carousel,k=(0,c.g)({uuid:t,stories:v,size:m??p,fallbackText:f("phrases.conceptGroupNoContent"),title:i,template:x,...I&&{groupLink:g}});return I?(0,n.jsx)(l.A,{group:k,lazyLoadMedia:!1}):(0,n.jsx)(s.A,{group:k,level:o.F.h2,buttonTexts:{showMore:f("phrases.showMore"),showMoreA11y:f("phrases.showMoreConcept")}})}function u(e){return"object"==typeof e&&null!==e&&"concepts"in e&&(0,r.Bo)(e.concepts)&&(!("editorialSections"in e)||(0,r.Bo)(e.editorialSections))&&(!("initialSize"in e)||"number"==typeof e.initialSize)&&(!("maxSize"in e)||"number"==typeof e.maxSize)&&(!("excludeArticlesInLayout"in e)||"boolean"==typeof e.excludeArticlesInLayout)&&(!("includeNonJournalistic"in e)||"boolean"==typeof e.includeNonJournalistic)&&(!("template"in e)||Object.values(a.al).includes(e.template))&&(!("groupLink"in e)||"object"==typeof e.groupLink&&null!==e.groupLink&&"url"in e.groupLink&&"string"==typeof e.groupLink.url&&"text"in e.groupLink&&"string"==typeof e.groupLink.text)}},61601(e,t,i){i.d(t,{A:()=>f});i(97700),i(63773);var n=i(11684),o=i(31225),a=i(79971),r=i(12888),l=i(44832),s=i(85791),d=i(43421),c=i(70221),p=i(18188),u=i(85063),m=i(1098);const h=(0,l.I4)(s.Y).withConfig({displayName:"DatavizWidget__Container",componentId:"sc-13783ea9-0"})([""," "," "," "," background:",";"," color:",";@media (prefers-color-scheme:dark){background:",";}"],d.lJ,e=>{let{$inLayout:t}=e;return t&&"overflow: hidden;"},e=>{let{$topPadding:t}=e;return!t&&"padding-top: 0;"},e=>{let{$bottomPadding:t}=e;return!t&&"padding-bottom: 0;"},e=>{let{$forceLightMode:t}=e;
1return t?a._k.BACKGROUND:p.sB.getItemBackgroundColor()},e=>{let{$isDarkGroup:t}=e;return t&&"background: var(--ukko-dark-item-background);"},e=>{let{$forceLightMode:t}=e;return t?a._k.TEXT_DEFAULT:p.sB.getTextColor()},e=>{let{$forceLightMode:t,$useTrueBlackColorScheme:i}=e;return function(e,t){if(e)return a._k.BACKGROUND;if(t)return a.yW.GRAY_95;return p.sB.getItemBackgroundColor()}(t,i)}),g=l.I4.div.withConfig({displayName:"DatavizWidget__SpinnerContainer",componentId:"sc-13783ea9-1"})(["min-height:200px;display:flex;align-items:center;justify-content:center;"]),x=l.I4.div.withConfig({displayName:"DatavizWidget__Content",componentId:"sc-13783ea9-2"})([""]);function f(e){let{inLayout:t=!0,data:i,configuration:a,group:l,useTrueBlack:s,className:d,loadingLabel:p="phrases.loading",roundedCorners:f=c.nr}=e;const{translate:y}=(0,u.xy)(),{htmlContent:b,css:w,scripts:v,darkModeCss:I,parameters:k,supports:$}=i,{padding:C=!1}=a??{},j=(e=>{const t=e?Object.fromEntries(e.map(e=>[e.name,e.value])):void 0;return t?JSON.stringify(t):void 0})(k),A=(0,r.useRef)(!1),T=$?.includes("darkmode"),_=!T,[B,S]=(0,r.useState)(!0),L=!(l&&!l.isFirst)&&C,P=l?!l.isFirst:C,N=C,W=(0,r.useMemo)(()=>b?{__html:b}:void 0,[b]);return(0,r.useEffect)(()=>{const e=(e=>{if(e){const t=e.match(/class="plus-app plus-app-(.+)"/);if(t)return t.at(1)}return null})(b);if(!A.current){A.current=!0;const e=e=>new Promise((t,i)=>{const n=(0,m.ZH)({src:e,module:$?.includes("esmodules"),onLoad:()=>t(),onError:()=>i(new Error(`Failed to load script: ${e}`))});(0,m.QL)(n)}),t=v?.map(e)||[];Promise.allSettled(t).then(()=>{S(!1)}).catch(()=>{S(!1)})}return()=>{e&&window.plusApp?.[e]&&delete window.plusApp[e]}},[b,v,$]),(0,n.jsxs)(h,{$inLayout:t,className:d,$topPadding:P,$horizontal:{minimum:L,mobile:L,tablet:L,desktop:L},$bottomPadding:N,$forceLightMode:_,$useTrueBlackColorScheme:s,$isDarkGroup:!!l&&l.isDark,$roundedCorners:f,$separatorBorder:t,children:[B&&(0,n.jsx)(g,{children:(0,n.jsx)(o.y,{label:y(p)})}),w?.map((e,t)=>(0,n.jsx)("link",{rel:"stylesheet",type:"text/css",href:e},`stylesheet-${t}`)),I?.map((e,t)=>(0,n.jsx)("link",{rel:"stylesheet",type:"text/css",href:e,media:"screen and (prefers-color-scheme: dark)"},`stylesheet-dark-${t}`)),b&&(0,n.jsx)(x,{"data-yle-external-content-parameters":j,dangerouslySetInnerHTML:W})]})}},4705(e,t,i){i.d(t,{A:()=>_,k:()=>T});var n=i(11684),o=i(74338),a=i(12888),r=i(44832),l=i(66166),s=i(1209),d=i(58832),c=i(31964),p=i(29528),u=i(21525),m=i(85791),h=i(43421),g=i(60259),x=i(11164),f=i(42756),y=i(39012),b=i(70221),w=i(49086),v=i(18188),I=i(85063),k=i(25204);const $=(0,r.I4)(m.Y).withConfig({displayName:"HeadlinesWidget__Container",componentId:"sc-e59fa3a4-0"})(["",";padding-top:","px;padding-bottom:","px;background:",";color:",";@media (min-width:","px){padding-bottom:","px;}
1"],h.lJ,16,24,v.sB.getItemBackgroundColor(),v.sB.getTextColor(),y.aq.desktop,28),C=(0,r.I4)(f.o).withConfig({displayName:"HeadlinesWidget__Title",componentId:"sc-e59fa3a4-1"})(["padding-bottom:","px;border-bottom:solid 1px ",";margin-bottom:","px;@media (min-width:","px){margin-bottom:","px;}@media (min-width:","px){margin-bottom:","px;}"],16,v.sB.separator,20,y.aq.tablet,y.sh.tablet,y.aq.desktop,y.sh.desktop),j=r.I4.div.withConfig({displayName:"HeadlinesWidget__FooterContainer",componentId:"sc-e59fa3a4-2"})(["text-align:center;padding:","px 0 0 0;"],32);function A(e){let{uuid:t,title:i,stories:o,initialSize:a=3}=e;const{translate:r}=(0,I.xy)(),s=(0,k.g)({uuid:t,stories:o,size:a,fallbackText:r("phrases.conceptGroupNoContent"),title:i});return(0,n.jsx)(g.A,{group:s,level:l.F.h2,buttonTexts:{showMore:r("phrases.showMore"),showMoreA11y:r("phrases.showMoreConcept")}})}function T(e){return"object"==typeof e&&null!==e&&"headlinesType"in e}const _=e=>{let{uuid:t,title:i,data:r,config:l={displayDate:!1}}=e;const m=(0,a.useId)(),{site:h}=(0,I.xy)(),{displayDate:g}=l;if(!r?.items?.length)return null;const f=function(e){if("mostRecent"===e)return c.nJ.MostRecent;if("mostCommented"===e)return c.nJ.MostCommented;if("showMoreGroup"===e)return c.nJ.ShowMoreGroup;return c.nJ.MostRead}(l.headlinesType),y=f===c.nJ.MostRecent&&h.id===s._z.Live,v=(0,n.jsx)(j,{children:(0,n.jsx)(o.$,{id:"tuoreimmat-widget-read-more-link",as:"a",variant:"secondary",size:"sm",href:"/tuoreimmat",children:(0,d.$Y)(h)("phrases.showMore")})});return f===c.nJ.ShowMoreGroup?(0,n.jsx)(A,{uuid:t,stories:r.items,title:i}):(0,n.jsx)(u.Xk,{uiElementGroupTitle:i,groupNumItems:r.items.length,children:(0,n.jsx)(p.LX,{$minimum:24,$tablet:15,$minimumBreakGap:!0,$mobileBreakGap:!0,$minimumBottomMargin:8,$mobileBottomMargin:8,$tabletBottomMargin:16,$desktopBottomMargin:16,children:(0,n.jsxs)($,{$horizontal:{minimum:!0,mobile:!0,tablet:!0,desktop:!0},$roundedCorners:{mobile:b.FY.all,tablet:b.FY.all},$separatorBorder:!0,children:[(0,n.jsx)(C,{id:m,as:"h2",$mobile:w.PT.YleLHeavy,$desktop:w.PT.YleXLHeavy,children:i}),(0,n.jsx)(x.J,{stories:r.items,ariaLabelledBy:m,type:f,displayDate:g,bulletWidth:g?35:void 0}),y&&v]})})})}},77578(e,t,i){var n=i(11684),o=i(65535),a=i(65847);i(12929);i.d(t,["P",0,e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.layoutFragmentId&&"number"==typeof t.count},"Q",0,e=>{let{onInView:t}=e;const{ref:i}=(0,o.Wx)({rootMargin:"200px",triggerOnce:!0,onChange:e=>{e&&t()}});return(0,n.jsx)(a.O,{ref:i})}])},27063(e,t,i){i.d(t,{A:()=>f,o:()=>g});var n=i(11684),o=i(8298),a=i(30202),r=i(44832),l=i(24962),s=i(14845),d=i(43421),c=i(17161),p=i(39012),u=i(70221),m=i(18188),h=i(85063);function g(e){return"object"==typeof e&&null!==e&&"id"in e&&(0,a.K)(e.id)&&!(0,o.I)(e.id)}const x=r.I4.div.withConfig({displayName:"QuestionAndAnswerWidget__Container",componentId:"sc-3c0fe51-0"})(["",";background:",";padding:","px;@media (min-width:","px){padding:","px ","px ","px;}
1"],d.lJ,m.sB.getItemBackgroundColor(),16,p.aq.desktop,16,24,24);function f(e){let{uuid:t,configuration:i,roundedCorners:o=u.nr}=e;const{config:a,site:r,translate:d,widgetAuxData:p}=(0,h.xy)(),{title:m}=i;if(!a.ylePalvelijaEnabled||!(0,s.m)(r.lang))return null;const g=p?.[l.x.QuestionAndAnswer],f=g?.[t];return f?.length?(0,n.jsx)(x,{$roundedCorners:o,$separatorBorder:!0,children:(0,n.jsx)(c.A,{questions:f,answerQueryKeyPrefix:`widget-question-and-answer-${t}`,ariaLabel:m??d("questionAndAnswer.title"),title:m??d("questionAndAnswer.title"),feedbackFormId:a.ylePalvelijaWidgetFeedbackFormId})}):null}},51615(e,t,i){var n=i(11684),o=i(15955),a=i(12888),r=i(65535),l=i(44832),s=i(66166),d=i(76201),c=i(31964),p=i(48296),u=i(55814),m=i(21525),h=i(38928),g=i(23849),x=i(43421),f=i(42756),y=i(39012),b=i(70221),w=i(49086),v=i(18188),I=i(85063);const k=l.I4.div.withConfig({displayName:"VideoFeedWidget__Container",componentId:"sc-2720a402-0"})([""," --video-feed-horizontal-padding:",";--video-feed-gap:","px;background:",";padding-top:","px;padding-bottom:",";@media (min-width:","px){--video-feed-horizontal-padding:",";--video-feed-gap:","px;}@media (min-width:","px){--video-feed-horizontal-padding:",";--video-feed-gap:","px;}@media (min-width:","px){--video-feed-horizontal-padding:",";--video-feed-gap:","px;padding-bottom:",";}"],x.lJ,e=>{let{$forRecommendations:t}=e;return t?0:`${y.sh.minimum}px`}
1,y.sh.minimum,v.sB.getItemBackgroundColor(),16,e=>{let{$forRecommendations:t}=e;return t?0:"16px"},y.aq.mobile,e=>{let{$forRecommendations:t}=e;return t?0:`${y.sh.mobile}px`},y.sh.mobile,y.aq.tablet,e=>{let{$forRecommendations:t}=e;return t?0:`${y.sh.tablet}px`},y.sh.tablet,y.aq.desktop,e=>{let{$forRecommendations:t}=e;return t?0:`${y.sh.desktop}px`},y.sh.desktop,e=>{let{$forRecommendations:t}=e;return t?"16px":`${y.sh.desktop}px`}),$=l.I4.div.withConfig({displayName:"VideoFeedWidget__TitleRow",componentId:"sc-2720a402-1"})(["display:flex;justify-content:space-between;align-items:center;margin-bottom:","px;padding-left:var(--video-feed-horizontal-padding);padding-right:var(--video-feed-horizontal-padding);@media (min-width:","px){margin-bottom:","px;}@media (min-width:","px){margin-bottom:","px;}"],16,y.aq.tablet,16,y.aq.desktop,16),C=e=>{const{articleId:t,item:i,position:n,title:o,filterByChannelId:a}=e,r=i.meta?.recommendation,l=i.meta?.tests;return{element:m.GX.CarouselStory,yleId:t,layoutNodeType:c.Z6.Article,itemPosition:n,uiGroupId:p.$.videoFeedWidget,uiElementGroupTitle:o,recommendationUuid:r?.uuid,recommendationMethod:r?.method,filterByAuthorId:a,abTests:l?.length?l.map(e=>({name:e.name,group:e.group})):void 0}},j=e=>{let{title:t,configuration:i,data:l,level:c=s.F.h2,roundedCorners:p=b.nr,forRecommendations:m=!1}=e;const{config:x,site:y,tunnus:v,player:j}=(0,I.xy)(),[A,T]=(0,a.useState)(void 0),_=(0,a.useRef)(null),[B,S]=(0,r.Wx)({triggerOnce:!1,rootMargin:"400px"});(0,a.useEffect)(()=>{(async()=>{const e=await j.getSdk();T(e)})()},[j]);const L=(0,a.useCallback)(()=>{_.current?.scrollBy(-2)},[]),P=(0,a.useCallback)(()=>{_.current?.scrollBy(2)},[]),N=(0,a.useMemo)(()=>({size:i.size,languages:i.languages,channelId:i.channels?.[0]}),[i]),W=(0,a.useMemo)(()=>l?0===l.items.length?null:{type:"static",items:l.items}:{type:"fetch",contentConfig:N},[l,N]),{handleItemVisible:M,handleItemClick:D}=(e=>{const{title:t,filterByChannelId:i}=e,{trackShow:n,trackClick:o}=(0,h.K)({}),r=(0,a.useRef)(new Set),l=(0,a.useRef)(new Set),s=(0,a.useRef)(new Map);return{handleItemVisible:(0,a.useCallback)(e=>{let{item:o,index:a}=e;if("article"!==o.source.type)return void console.warn(`Skipping video feed impression for shorts item ${o.id}: source is not an article`);if(r.current.has(o.id))return;r.current.add(o.id);const l=(0,u.c)();s.current.set(o.id,l);const d=C({articleId:o.source.articleId,item:o,position:a,title:t,filterByChannelId:i});n(l,d)},[t,n,i]),handleItemClick:(0,a.useCallback)(e=>{let{item:n,index:a}=e;if("article"!==n.source.type)return void console.warn(`Skipping video feed click for shorts item ${n.id}: source is not an article`);if(l.current.has(n.id))return;const r=s.current.get(n.id);if(!r)return;l.current.add(n.id);const d=C({articleId:n.source.articleId,item:n,position:a,title:t,filterByChannelId:i});o(r,d)},[t,o,i])}})({title:t,filterByChannelId:N.channelId}),q=(0,a.useCallback)(e=>{let{item:t}=e;const i=new URLSearchParams;N.channelId&&i.set("channel",N.channelId);const n=i.size>0?`?${i.toString()}`:"";return`${x.rootUrl}${(0,d.Hu)(t.id)}${n}`},[x.rootUrl,N]);return(0,d.Qt)(y.lang)&&W?(0,n.jsxs)(k,{ref:B,$roundedCorners:p,$separatorBorder:!m,$forRecommendations:m,children:[(0,n.jsxs)($,{children:[(0,n.jsx)(f.o,{as:`h${c}`,$mobile:w.PT.YleLHeavy,$desktop:w.PT.YleXLHeavy,children:t}),(0,n.jsx)(g.l,{onPrev:L,onNext:P})]}),(0,n.jsx)(o.Xp,{ref:_,tunnus:v,enableSnapping:!0,videoShortsApiUrl:x.videoShortsApiUrl,appId:x.videoShortsApiAppId,appKey:x.videoShortsApiAppKey,dataSource:W,language:y.lang,ylePlayer:A,getVideoShortUrl:q,enabled:S,onItemVisible:M,onItemClick:D,cardWidth:"240px",gap:"var(--video-feed-gap)",insetHorizontal:"var(--video-feed-horizontal-padding)"})]}):null};i.d(t,["A",0,j])},52108(e,t,i){i.d(t,{A:()=>gi});var n=i(11684),o=i(24962),a=i(14327),r=i(85063),l=i(85606),s=i(12888),d=i(44832),c=i(66166),p=i(51149),u=i(58832),m=i(43421),h=i(83565),g=i(42756),x=i(39012),f=i(70221),y=i(49086),b=i(18188);const w=(0,d.i7)(["0%{transform:translateY(-100%);filter:blur(6px);opacity:0.7;}80%{filter:blur(2px);opacity:0.9;}100%{transform:translateY(0);filter:blur(0);opacity:1;}"]),v=(0,d.i7)(["0%{transform:translateY(0);opacity:1;}80%{filter:blur(2px);opacity:0.9;}100%{transform:translateY(100%);filter:blur(6px);opacity:0.7;}"]),I=d.I4.div.withConfig({displayName:"AnimatedDigit__DigitBox",componentId:"sc-484ce6cd-0"})(["display:flex;justify-content:center;align-items:center;background-color:",";color:",";width:","px;height:","px;font-weight:bold;position:relative;overflow:hidden;&:first-child{border-radius:8px 0 0 8px;}&:last-child{border-radius:0 8px 8px 0;}@media (max-width:","px) and (prefers-reduced-motion:no-preference){",";}"],e=>
1e.$customTheme?.digitBackground??b.sB.greyBackground,e=>{let{$customTheme:t}=e;return t?.digitColor??b.sB.getTextColor(t?.theme===p.S.Dark)},56,80,445,e=>{let{$isNarrow:t}=e;return t&&(0,d.AH)(["width:","px;"],40)}),k=d.I4.div.withConfig({displayName:"AnimatedDigit__DigitContent",componentId:"sc-484ce6cd-1"})(["position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;margin:","px ","px;@media screen and (prefers-reduced-motion:no-preference){",";}"],16,8,e=>{let{$state:t}=e;return"enter"===t?(0,d.AH)(["animation:"," 0.3s ease-in-out forwards;"],w):"exit"===t?(0,d.AH)(["animation:"," 0.3s ease-in-out forwards;"],v):""});function $(e){let{value:t,customTheme:i,useNarrowDigitBox:o}=e;const[a,r]=(0,s.useState)(!1),[l,d]=(0,s.useState)(t),[c,p]=(0,s.useState)(t),[u,m]=(0,s.useState)(!1),h=(0,s.useRef)(null);return(0,s.useEffect)(()=>(r(!0),()=>{h.current&&clearTimeout(h.current)}),[h]),(0,s.useEffect)(()=>{if(a&&t!==l)return h.current&&clearTimeout(h.current),p(l),m(!0),h.current=setInterval(()=>{d(t),m(!1)},300),()=>{h.current&&clearTimeout(h.current)}},[t,l,a]),a?(0,n.jsxs)(I,{$customTheme:i,$isNarrow:o,"data-testid":"animated-digit",children:[!u&&(0,n.jsx)(k,{children:(0,n.jsx)(g.o,{$mobile:y.PT.Yle5XLCondensedHeavy,children:l})}),u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(k,{$state:"exit",children:(0,n.jsx)(g.o,{$mobile:y.PT.Yle5XLCondensedHeavy,children:c})}),(0,n.jsx)(k,{$state:"enter",children:(0,n.jsx)(g.o,{$mobile:y.PT.Yle5XLCondensedHeavy,children:t})})]})]}):(0,n.jsx)(I,{$customTheme:i,children:(0,n.jsx)(k,{})})}const C=d.I4.div.withConfig({displayName:"CountdownWidget__CountdownWidgetContainer",componentId:"sc-a523bf08-0"})(["display:flex;flex-direction:column;align-items:center;padding:","px;",";",";"],24,m.lJ,e=>{let{$customTheme:t}=e;return{backgroundColor:t&&t.backgroundColor?t.backgroundColor:b.sB.getGroupBackgroundColor(t&&t.theme===p.S.Dark),color:b.sB.getTextColor(t&&t.theme===p.S.Dark),background:t?.customBackground?t.customBackground:void 0}}),j=d.I4.div.withConfig({displayName:"CountdownWidget__CountdownContainer",componentId:"sc-a523bf08-1"})(["display:flex;justify-content:center;gap:","px;margin-bottom:","px;flex-wrap:wrap;",";@media (min-width:","px) and (max-width:","px) and (prefers-reduced-motion:no-preference),(min-width:","px) and (max-width:","px) and (prefers-reduced-motion:no-preference){",";}"],12,16,e=>{let{$isComplete:t}=e;return{padding:t?0:"32px 0"}},461,571,x.aq.tablet,x.aq.desktop-56,e=>{let{$wrapElements:t}=e;return{width:t?"65%":"100%"}}),A=d.I4.div.withConfig({displayName:"CountdownWidget__TimeUnit",componentId:"sc-a523bf08-2"})(["display:flex;flex-direction:column;align-items:center;@media (max-width:","px) and (prefers-reduced-motion:no-preference),(min-width:","px) and (max-width:","px) and (prefers-reduced-motion:no-preference){",";}"],571,x.aq.tablet,x.aq.desktop-56,e=>{let{$wrapElements:t}=e;return{flex:t?"0 0 33%":"0 1 auto"}}),T=(0,d.I4)(A).withConfig({displayName:"CountdownWidget__TimeUnitSeconds",componentId:"sc-a523bf08-3"})(["@media screen and (prefers-reduced-motion:reduce){display:none;}"]),_=d.I4.div.withConfig({displayName:"CountdownWidget__DigitGroup",componentId:"sc-a523bf08-4"})(["display:flex;gap:","px;"],2),B=(0,d.I4)(g.o).withConfig({displayName:"CountdownWidget__TimeLabel",componentId:"sc-a523bf08-5"})(["margin-top:","px;"],8),S=d.I4.div.withConfig({displayName:"CountdownWidget__CountdownTextContainer",componentId:"sc-a523bf08-6"})(["display:flex;flex-direction:column;gap:","px;margin-bottom:","px;"],16,16),L=(0,d.I4)(g.o).withConfig({displayName:"CountdownWidget__CountdownTitle",componentId:"sc-a523bf08-7"})(["text-align:center;"]),P=(0,d.I4)(g.o).withConfig({displayName:"CountdownWidget__CountdownDescription",componentId:"sc-a523bf08-8"})(["text-align:center;"]);function N(e){let{level:t=c.F.h2,configuration:i={},roundedCorners:o=f.nr}=e;const{targetTimestamp:a,textContent:d,customTheme:p,overrideLanguage:m}=i,{translate:g}=(0,r.xy)(),x=m?(0,u.qE)(m):g,b=(0,s.useMemo)(()=>a?(0,l.H)(a):new Date,[a]),[w,v]=(0,s.useState)(()=>b.getTime()-Date.now());(0,s.useEffect)(()=>{const e=setInterval(()=>{const e=b.getTime()-Date.now();v(e>0?e:0)},1e3);return()=>clearInterval(e)},[b]);const{days:I,hours:k,minutes:N,seconds:W,isComplete:M}=(()=>
1{if(w<=0)return{days:0,hours:0,minutes:0,seconds:0,isComplete:!0};const e=Math.floor(w/1e3%60),t=Math.floor(w/6e4%60),i=Math.floor(w/36e5%24);return{days:Math.floor(w/864e5),hours:i,minutes:t,seconds:e,isComplete:!1}})(),D=I>0,q=e=>e.toString().padStart(2,"0").split("").map((e,t)=>(0,n.jsx)($,{customTheme:p,useNarrowDigitBox:!D,value:e},t));return(0,n.jsxs)(C,{$customTheme:p,$roundedCorners:o,$separatorBorder:!0,"data-testid":"countdown-widget-container",children:[M?(0,n.jsx)(j,{$isComplete:!0}):(0,n.jsxs)(j,{$wrapElements:D,children:[I>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(A,{$wrapElements:D,children:[(0,n.jsx)(_,{children:q(I)}),(0,n.jsx)(B,{$mobile:y.PT.YleXSBoldAC,children:x("common.time.static.days")})]})}),(0,n.jsxs)(A,{$wrapElements:D,children:[(0,n.jsx)(_,{children:q(k)}),(0,n.jsx)(B,{$mobile:y.PT.YleXSBoldAC,children:x("common.time.static.hours")})]}),(0,n.jsxs)(A,{$wrapElements:D,children:[(0,n.jsx)(_,{children:q(N)}),(0,n.jsx)(B,{$mobile:y.PT.YleXSBoldAC,children:x("common.time.static.minutes")})]}),(0,n.jsxs)(T,{$wrapElements:D,children:[(0,n.jsx)(_,{children:q(W)}),(0,n.jsx)(B,{$mobile:y.PT.YleXSBoldAC,children:x("common.time.static.seconds")})]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)(L,{as:`h${t}`,$desktop:y.PT.YleXLHeavy,$mobile:y.PT.YleLHeavy,children:M&&d?.completeTitle?d?.completeTitle:d?.title}),(0,n.jsx)(P,{$mobile:y.PT.YleM,children:M&&d?.completeDescription?d?.completeDescription:d?.description})]}),i.callToAction?.text&&i.callToAction?.url&&(0,n.jsx)(h.A,{forwardedAs:"a",href:i.callToAction.url,text:i.callToAction.text})]})}var W=i(61601),M=i(69813);const D=d.I4.div.withConfig({displayName:"NotificationWidget__NotificationContainer",componentId:"sc-13194447-0"})([""," background:",";padding:0 ","px ","px;@media (min-width:","px){padding:0 ","px ","px;}
1"],m.lJ,b.sB.getItemBackgroundColor(),16,16,x.aq.tablet,24,24);function q(e){let{configuration:{text:t},roundedCorners:i=f.nr,separatorBorder:o=!0}=e;return(0,n.jsx)(D,{$roundedCorners:i,$separatorBorder:o,children:(0,n.jsx)(M.E,{level:"info",variant:"secondary",children:t})})}var R=i(27063),z=i(97811),F=i(87647);const G=d.I4.div.withConfig({displayName:"SearchWidget__Container",componentId:"sc-a285598-0"})([""," background:",";padding:","px;@media (min-width:","px){padding:","px;}"],m.lJ,b.sB.getItemBackgroundColor(),16,x.aq.tablet,24),H=(0,d.I4)(g.o).withConfig({displayName:"SearchWidget__Title",componentId:"sc-a285598-1"})(["padding-bottom:","px;"],16);function E(e){let{configuration:t,onSubmit:i,roundedCorners:o=f.nr}=e;const{translate:a}=(0,r.xy)(),[l,d]=(0,s.useState)(""),{uiLang:c,title:p,service:u,placeholder:m}=t;return(0,n.jsxs)(G,{$roundedCorners:o,$separatorBorder:!0,children:[(0,n.jsx)(H,{as:"h2",$mobile:y.PT.YleLHeavy,$desktop:y.PT.YleXLHeavy,children:p}),(0,n.jsxs)("form",{action:"https://haku.yle.fi",name:"haku.yle.fi",id:"haku.yle.fi",onSubmit:i,role:"search",children:[(0,n.jsx)(z.D,{id:"haku.yle.fi-input",label:"haku.yle.fi",name:"q",placeholder:m,onCh
1ange:e=>d(e.target.value),submitButton:(0,n.jsx)(z.f,{"aria-label":a("search.ariaLabels.search")}),iconClear:l&&""!==l?{componentFn:F.yTi,ariaLabel:a("search.ariaLabels.clear"),onClick:()=>d("")}:void 0,value:l}),c&&(0,n.jsx)("input",{type:"hidden",name:"uiLanguage",value:c}),u&&(0,n.jsx)("input",{type:"hidden",name:"service",value:u})]})]})}var Y=i(51615),X=i(8298),O=i(48296),K=i(21525),V=i(38928),U=i(53457),J=i(74338);const Q=d.I4.div.withConfig({displayName:"WeatherNotificationStyles__MessageContainer",componentId:"sc-8d27fe07-0"})(["padding:0 ","px;margin-bottom:","px;@media (min-width:","px){padding:0 ","px;margin-bottom:","px;}"],16,16,x.aq.tablet,24,24),Z=(0,d.I4)(M.E).withConfig({displayName:"WeatherNotificationStyles__WeatherNotification",componentId:"sc-8d27fe07-1"})(["& > div > div{display:inline-block;& div{display:inline-block;}}"]),ee=(d.I4.a.withConfig({displayName:"WeatherNotificationStyles__Link",componentId:"sc-8d27fe07-2"})(["display:inline-block;text-decoration:underline;"]),(0,d.I4)(J.$).withConfig({displayName:"WeatherError__StyledButton",componentId:"sc-853a8fb9-0"})(["color:inherit;text-decoration:underline;min-height:auto;padding:0;"]));function te(e){let{title:t,onErrorButtonClick:i}=e;const{translate:o}=(0,r.xy)();return(0,n.jsx)(Q,{children:(0,n.jsx)(Z,{level:"error",title:o(t),variant:"primary",isMultiline:!1,children:(0,n.jsx)(ee,{size:"sm",variant:"text",removePadding:!0,onClick:i,text:o("weather.error.tryAgain"),accessibleText:o("weather.error.tryAgain"),"data-testid":"weather-error-button"})})})}var ie=i(79971),ne=i(71952),oe=i(31556);function ae(e){switch(e){case oe.V$.Alder:case oe.V$.Birch:case oe.V$.Mugwort:case oe.V$.Nut:return ie.yW.WHITE;case oe.V$.Hay:default:return ie.yW.BLACK}}const re=d.I4.div.withConfig({displayName:"PollenLevels__PollenLevelsContainer",componentId:"sc-56f91e24-0"})(["display:flex;"]),le=d.I4.div.withConfig({displayName:"PollenLevels__PollenLevelContainer",componentId:"sc-56f91e24-1"})(["display:flex;position:relative;width:calc(0.625rem * "," + 1.5rem);margin-right:","px;height:2.25rem;align-items:center;"],e=>e.$size-1,8),se=d.I4.div.withConfig({displayName:"PollenLevels__PollenLevel",componentId:"sc-56f91e24-2"})(["display:flex;justify-content:center;align-items:center;border-radius:1.5rem;width:1.5rem;height:1.5rem;border:"," 2px solid;position:absolute;left:calc(0.625rem * ",");",""],e=>
1e.$isEvenRow?b.sB.pollenEvenRowBackground:b.sB.getItemBackgroundColor(),e=>e.$index,e=>({background:(0,U.Sg)(e.$type),color:ae(e.$type)}));const de=function(e){let{levels:t,isEvenRow:i}=e;const{translate:o}=(0,r.xy)(),a=Object.entries(t).filter(e=>{let[,t]=e;return Boolean(t)});return(0,n.jsxs)(re,{"aria-hidden":"true",children:[0===a.length&&(0,n.jsx)(g.o,{$mobile:y.PT.YleXSBold,as:"div",children:"–"}),a.map(e=>{let[t,a]=e;return(0,n.jsx)(le,{$size:a,children:Array(a).fill(0).map((e,r)=>(0,n.jsx)(se,{$type:(0,U.Cf)(t),$index:r,$isEvenRow:i,children:r===a-1&&(0,n.jsx)(g.o,{$mobile:y.PT.YleXSBold,as:"div",children:o(`weather.pollen.${t}.short`)})},r))},t)})]})},ce=d.I4.div.withConfig({displayName:"WeatherPollen__PollenGrid",componentId:"sc-ba46db6c-0"})(["display:grid;grid-template-columns:33% 31% 36%;padding:0 ","px;margin-bottom:","px;@media (min-width:","px){padding:0 ","px;grid-template-columns:repeat(3,1fr);}> div{min-height:2.25rem;display:flex;flex-wrap:wrap;align-items:center;}> div:nth-child(6n + 4),> div:nth-child(6n + 5),> div:nth-child(6n + 6){background:",";}"],16,16,x.aq.tablet,24,b.sB.pollenEvenRowBackground),pe=(0,d.I4)(g.o).withConfig({displayName:"WeatherPollen__PollenGridLocationHeader",componentId:"sc-ba46db6c-1"})(["padding-left:","px;margin-bottom:","px;"],8,16),ue=(0,d.I4)(g.o).withConfig({displayName:"WeatherPollen__PollenGridHeader",componentId:"sc-ba46db6c-2"})(["margin-bottom:","px;"],16),me=(0,d.I4)(g.o).withConfig({displayName:"WeatherPollen__PollenGridHeaderDate",componentId:"sc-ba46db6c-3"})(["white-space:nowrap;"]),he=(0,d.I4)(g.o).withConfig({displayName:"WeatherPollen__PollenLocation",componentId:"sc-ba46db6c-4"})(["padding-left:","px;"],8),ge=d.I4.div.withConfig({displayName:"WeatherPollen__PollenLegend",componentId:"sc-ba46db6c-5"})(["display:flex;flex-wrap:wrap;padding:0 ","px;margin-bottom:","px;@media (min-width:","px){padding:0 ","px;}"],14,4,x.aq.tablet,24),xe=d.I4.div.withConfig({displayName:"WeatherPollen__PollenLegendItem",componentId:"sc-ba46db6c-6"})(["display:flex;align-items:center;margin-right:","px;margin-bottom:","px;"],10,4),fe=d.I4.div.withConfig({displayName:"WeatherPollen__PollenColor",componentId:"sc-ba46db6c-7"})(["width:0.875rem;height:0.875rem;border-radius:0.625rem;border:"," 2px solid;margin-right:0.375rem;
1",""],b.sB.getItemBackgroundColor(),e=>({background:(0,U.Sg)(e.$type)})),ye=d.I4.div.withConfig({displayName:"WeatherPollen__PollenLevelContainer",componentId:"sc-ba46db6c-8"})(["display:flex;position:relative;width:calc(0.5rem * "," + 0.875rem);height:0.875rem;align-items:center;margin-right:0.375rem;"],e=>e.$size),be=d.I4.div.withConfig({displayName:"WeatherPollen__PollenLevel",componentId:"sc-ba46db6c-9"})(["display:flex;justify-content:center;align-items:center;border-radius:1.5rem;width:0.875rem;height:0.875rem;border:"," 2px solid;position:absolute;left:calc(0.5rem * ",");background:",";"],b.sB.getItemBackgroundColor(),e=>e.$index,ie.yW.GRAY_50),we=d.I4.div.withConfig({displayName:"WeatherPollen__PollenFooter",componentId:"sc-ba46db6c-10"})(["display:flex;align-items:center;margin-top:","px;padding:0 ","px;@media (min-width:","px){padding:0 ","px;}"],12,16,x.aq.tablet,24),ve=(0,d.I4)(g.o).withConfig({displayName:"WeatherPollen__Copyright",componentId:"sc-ba46db6c-11"})(["margin-left:","px;display:inline-block;flex-shrink:0;align-items:center;"],8);function Ie(e){let{pollen:t}=e;const{translate:i}=(0,r.xy)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ce,{children:[(0,n.jsx)(pe,{$mobile:y.PT.YleXSBold,as:"h2",children:i("weather.pollen.location")}),(0,n.jsxs)(ue,{$mobile:y.PT.YleXSBold,as:"h2",tabIndex:0,"aria-label":t.texts.observation,children:[i("weather.pollen.observation"),"  ",(0,n.jsx)(me,{$mobile:y.PT.YleXS,as:"span",children:(0,ne.GP)((0,l.H)(t.observationDate),"d.M.")})]}),(0,n.jsxs)(ue,{$mobile:y.PT.YleXSBold,as:"h2",tabIndex:0,"aria-label":t.texts.forecast,children:[i("weather.pollen.forecast"),"  ",(0,n.jsx)(me,{$mobile:y.PT.YleXS,as:"span",children:`${(0,ne.GP)((0,l.H)(t.forecastStartDate),"d.M.")}–${(0,ne.GP)((0,l.H)(t.forecastEndDate),"d.M.")}`})]}),Object.entries(t.levels).map((e,o)=>{let[a,r]=e;return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(he,{$mobile:y.PT.YleXS,as:"div","aria-label":(0,U.py)(a,r,t.observationDate,t.forecastStartDate,t.forecastEndDate,i),tabIndex:0,children:a}),(0,n.jsx)(de,{levels:r.observation,isEvenRow:o%2==0}),(0,n.jsx)(de,{levels:r.forecast,isEvenRow:o%2==0})]},a)})]}),(0,n.jsx)(ge,{"aria-hidden":"true",children:Object.values(oe.V$).filter(e=>e!==oe.V$.Ambrosia).map(e=>(0,n.jsxs)(xe,{children:[(0,n.jsx)(fe,{$type:(0,U.Cf)(e)}),(0,n.jsx)(g.o,{$mobile:y.PT.YleXS,as:"span",children:i(`weather.pollen.${e}.long`)})]},e))}),(0,n.jsx)(ge,{"aria-hidden":"true",children:["weather.pollen.sparse","weather.pollen.moderate","weather.pollen.abundant"].map((e,t)=>(0,n.jsxs)(xe,{children:[(0,n.jsx)(ye,{$size:t,children:Array(t+1).fill(0).map((e,t)=>(0,n.jsx)(be,{$index:t},t))}),(0,n.jsx)(g.o,{$mobile:y.PT.YleXS,as:"span",children:i(e)})]},e))}),(0,n.jsxs)(we,{children:[(0,n.jsx)(J.$,{as:"a",size:"xs",variant:"text",removePadding:!0,href:"https://norkko.fi",iconAfter:(0,n.jsx)(F.GrD,{}),accessibleText:i("weather.pollen.pollenReport"),children:i("weather.pollen.pollenReport")}),(0,n.jsxs)(ve,{as:"span",$align:"left",$mobile:y.PT.YleXS,$rem:!0,children:[i("weather.pollen.copyrightHolder"),"."]})]})]})}const ke=d.I4.div.withConfig({displayName:"PollenWidget__Container",componentId:"sc-be343dde-0"})([""," display:flex;flex-direction:column;background:",";color:",";padding:0 0 ","px;
1"],m.lJ,b.sB.getItemBackgroundColor(),b.sB.text,24),$e=d.I4.div.withConfig({displayName:"PollenWidget__PollenTitle",componentId:"sc-be343dde-1"})(["padding:","px;> h2{padding-bottom:","px;border-bottom:1px solid ",";}@media (min-width:","px){padding:","px ","px;> h2{padding-bottom:","px;}}"],16,16,b.sB.separator,x.aq.tablet,16,24,16);function Ce(e){let{level:t=c.F.h2,pollen:i,uuid:o,roundedCorners:a=f.nr}=e;const{translate:l}=(0,r.xy)(),s=(0,U.bS)(i)&&!(0,X.I)(i.levels),d=!s;return(0,n.jsx)(K.Xk,{layoutItemUuid:o,element:K.GX.Widget,uiElementId:O.$.pollenWidget,children:(0,n.jsx)(V.A,{children:(0,n.jsxs)(ke,{$roundedCorners:a,$separatorBorder:!0,children:[(0,n.jsx)($e,{children:(0,n.jsx)(g.o,{as:`h${t}`,$mobile:y.PT.YleXLHeavy,$rem:!0,children:l("weather.pollen.title")})}),d&&(0,n.jsx)(te,{title:"weather.pollen.error.title",onErrorButtonClick:()=>window.location.reload()}),s&&(0,n.jsx)(Ie,{pollen:i})]})})})}i(97700);var je=i(90549),Ae=i(31225),Te=i(86325),_e=i(65535),Be=i(31811),Se=i(47910),Le=(i(12929),i(80581)),Pe=i(35973),Ne=i(66972),We=i(32609);function Me(e,t){const i=(0,We.A)(),{slices:n}=(0,Ne.Ay)(t),o=n.filter(e=>e?.type===Pe.vp.Forecast)[0];(0,s.useEffect)(()=>{var t;o&&(t=i(e,o),(new Image).src=t)},[i,o,e])}var De=i(22765),qe=i(42965),Re=i(32111),ze=i(90620),Fe=i(33705),Ge=i(71796),He=i(79225),Ee=i(91319);const Ye={N:Ge.DM,NE:Ge.yr,E:Ge.KD,SE:Ge.Sl,S:Ge.w1,SW:Ge.NI,W:Ge.KA,NW:Ge.yo};const Xe=d.I4.div.withConfig({displayName:"WeatherInfoPanel__HorizontalContainer",componentId:"sc-7e96198a-0"})(["display:flex;flex-direction:row;text-align:left;align-items:center;line-height:28px;font-weight:300;"]),Oe=d.I4.div.withConfig({displayName:"WeatherInfoPanel__VerticalContainer",componentId:"sc-7e96198a-1"})(["display:flex;flex-direction:column;padding:0 6px;border-left:2px solid ",";align-items:center;line-height:1.75rem;font-weight:300;"],e=>{let{$showDaySeparator:t}=e;return t?b.sB.text:b.sB.separator}),Ke=d.I4.div.withConfig({displayName:"WeatherInfoPanel__SmallSymbolWrapper",componentId:"sc-7e96198a-2"})(["display:flex;align-items:center;width:3.25rem;height:3.25rem;margin-bottom:1.25rem;"]),Ve=d.I4.div.withConfig({displayName:"WeatherInfoPanel__LargeSymbolWrapper",componentId:"sc-7e96198a-3"})(["display:flex;align-items:center;width:4.75rem;height:4.75rem;margin-right:","px;"],16),Ue=d.I4.div.withConfig({displayName:"WeatherInfoPanel__TemperatureContainer",componentId:"sc-7e96198a-4"})(["display:flex;align-items:center;flex-direction:column;justify-content:space-between;"," "," ",""],e=>e.$showLarge&&"margin-right: 24px;",e=>!e.$showLarge&&"margin-bottom: 16px;",e=>!e.$displayWeatherStats&&"margin-bottom: 0px;"),Je=d.I4.div.withConfig({displayName:"WeatherInfoPanel__Temperature",componentId:"sc-7e96198a-5"})(["height:","rem;font-size:","rem;font-weight:",";"],e=>e.$compactMode?2.125:2.375,e=>e.$showLarge?2.5:1.5,y.BO.Bold),Qe=(0,d.I4)(g.o).withConfig({displayName:"WeatherInfoPanel__FeelsLike",componentId:"sc-7e96198a-6"})(["text-align:center;"]),Ze=d.I4.div.withConfig({displayName:"WeatherInfoPanel__WeatherStats",componentId:"sc-7e96198a-7"})(["display:flex;flex-direction:column;align-items:flex-start;"]),et=d.I4.div.withConfig({displayName:"WeatherInfoPanel__Stat",componentId:"sc-7e96198a-8"})(["height:1rem;display:flex;margin-bottom:4px;line-height:1.125rem;white-space:nowrap;"]),tt=(0,d.I4)(g.o).withConfig({displayName:"WeatherInfoPanel__Time",componentId:"sc-7e96198a-9"})(["margin-bottom:1.375rem;"]),it=tt,nt=(0,d.I4)(Ge.RS).withConfig({displayName:"WeatherInfoPanel__StyledDroplet",componentId:"sc-7e96198a-10"})(["margin-right:4px;position:relative;top:1px;left:-2px;"]),ot=(0,d.I4)(function(e){let{direction:t,className:i}=e;if(!t)return(0,n.jsx)(Ge.Zt,{});const o=Ye[t];return(0,n.jsx)(o,{className:i})}).withConfig({displayName:"WeatherInfoPanel__StyledWindSymbol",componentId:"sc-7e96198a-11"})(["margin-right:4px;position:relative;top:1px;left:-2px;"]);function at(e){let{weatherInfo:t,horizontal:i=!1,showDaySeparator:o=!1,forecastScope:a=Pe.uK.Hours,displayWeatherStats:s=!0}=e;const{time:d,smartSymbol:c,temperature:p,feelsLike:u,probabilityPrecipitation:m,windSpeedMs:h,windCompass:x,minTemperature:f}=t,{translate:b}=(0,r.xy)(),w=(0,l.H)(d),v=i?Xe:Oe,I=i?Ve:Ke,k=(0,He.cn)(c),$=function(e,t){const{precipitation1h:i,precipitation24h:n}=t;return e===Pe.uK.Hours?i??null:n??null}(a,t),C=(0,U.$Z)(m);return(0,n.jsxs)(v,{"data-testid":"weather-info",$showDaySeparator:o,children:[!i&&a===Pe.uK.Hours&&(0,n.jsx)(tt,{as:"p",$mobile:y.PT.YleXS,$rem:!0,children:(0,n.jsx)("time",{dateTime:(0,ne.GP)(w,"HH:mm"),"aria-hidden":"true",children:(0,ne.GP)(w,"HH:mm")}
1)}),!i&&a===Pe.uK.Days&&(0,n.jsx)(it,{as:"p",$mobile:y.PT.YleXS,$rem:!0,children:(0,n.jsx)("time",{dateTime:(0,ne.GP)(w,"M-d"),"aria-hidden":"true",children:(0,ne.GP)(w,"d.M.")})}),(0,n.jsx)(I,{children:k&&(0,n.jsx)(Ee.A,{symbolInfo:k})}),(0,n.jsxs)(Ue,{$showLarge:i,$displayWeatherStats:s,children:[(0,n.jsx)(Je,{$showLarge:i,$compactMode:!s,"aria-hidden":"true","data-testid":"temperature",children:null!==p?(0,U.cH)(p):"–"}),a===Pe.uK.Hours&&(0,n.jsxs)(Qe,{as:"span",$mobile:y.PT.YleXS,$rem:!0,children:[b("weather.feelsLike")," ",(0,U.cH)(u)]}),a===Pe.uK.Days&&(0,n.jsxs)(g.o,{as:"span",$mobile:y.PT.YleXS,$rem:!0,children:[b("weather.night")," ",f&&(0,U.cH)(f)]})]}),s&&(0,n.jsxs)(Ze,{children:[(0,n.jsxs)(et,{children:[(0,n.jsx)(nt,{}),(0,n.jsxs)(g.o,{as:"span",$mobile:y.PT.YleXS,$rem:!0,children:[null!==$?` ${$.toLocaleString("fi")}`:"–"," mm"]})]}),(0,n.jsxs)(et,{children:[(0,n.jsx)(nt,{}),(0,n.jsx)(g.o,{as:"span",$mobile:y.PT.YleXS,$rem:!0,children:C})]}),(0,n.jsxs)(et,{children:[(0,n.jsx)(ot,{direction:x}),(0,n.jsxs)(g.o,{as:"span",$mobile:y.PT.YleXS,$rem:!0,children:[null!==h?` ${Math.round(h)}`:"–"," m/s"]})]})]})]})}const rt=d.I4.div.withConfig({displayName:"CurrentWeather__Container",componentId:"sc-95beb16a-0"})(["padding:0 ","px ","px ","px;@media (min-width:","px){padding:0 ","px ","px ","px;flex-wrap:nowrap;}"],16,8,16,x.aq.tablet,24,16,24),lt=d.I4.div.withConfig({displayName:"CurrentWeather__AriaContainer",componentId:"sc-95beb16a-1"})(["display:flex;flex-flow:wrap-reverse;flex-direction:row;align-items:center;justify-content:space-between;column-gap:","px;"],16),st=d.I4.div.withConfig({displayName:"CurrentWeather__DateTimeContainer",componentId:"sc-95beb16a-2"})(["height:3.75rem;display:flex;flex-direction:column;justify-content:start;align-items:flex-end;text-align:right;margin-left:auto;margin-right:0;@media (min-width:","px){position:relative;top:-5px;}"],x.aq.tablet),dt=d.I4.div.withConfig({displayName:"CurrentWeather__Day",componentId:"sc-95beb16a-3"})(["margin-bottom:2px;& + time{display:inline-block;margin-bottom:2px;}@media (min-width:","px){margin-bottom:0;margin-right:","px;display:inline-block;& + time{display:inline-block;margin-bottom:0;}}"],x.aq.tablet,4);function ct(e){let{weatherNow:t,locationName:i}=e;const{translate:o}=(0,r.xy)(),a=new Date(t?.time),s=(0,Fe.CJ)(a,o),d=(0,l.H)(t?.time);return(0,n.jsxs)(rt,{tabIndex:0,children:[(0,n.jsx)("p",{className:"sr-only",children:(0,U.RD)(Pe.uK.Days,i,t,!0,o)}),(0,n.jsxs)(lt,{"aria-hidden":"true",children:[(0,n.jsx)(at,{weatherInfo:t,horizontal:!0}),(0,n.jsxs)(st,{children:[(0,n.jsxs)(g.o,{as:"div",$mobile:y.PT.YleXSBold,$tablet:y.PT.YleMBold,$rem:!0,children:[(0,n.jsx)(dt,{children:s}),(0,n.jsx)("time",{dateTime:(0,ne.GP)(d,"yyyy-M-d"),"aria-hidden":"true",children:(0,ne.GP)(d,"d.M.yyyy")})]}),(0,n.jsx)(g.o,{as:"div",$mobile:y.PT.YleXS,$tablet:y.PT.YleM,$rem:!0,children:(0,n.jsx)("time",{dateTime:(0,ne.GP)(d,"HH:mm"),"aria-hidden":"true",children:(0,ne.GP)(d,"HH:mm")})})]})]})]})}var pt=i(1209),ut=i(23849),mt=i(33195);const ht=(0,d.I4)(g.o).withConfig({displayName:"WeatherInfoUpdated__Updated",componentId:"sc-abf80ad0-0"})(["display:inline-block;flex-shrink:0;align-items:center;"]);function gt(e){let{updated:t}=e;const{translate:i}=(0,r.xy)();return t?(0,n.jsxs)(ht,{as:"div",$align:"left",$mobile:y.PT.YleXS,$rem:!0,children:[i("weather.updated")," ",(0,n.jsx)("time",{dateTime:(0,Fe.rV)(t)("M-d HH:mm"),children:xt(i,t)}),"."]}):null}function xt(e,t){return(0,mt.c)(new Date(t))?`${e("weather.today")} ${(0,Fe.rV)(t)("HH:mm")}`:(0,Fe.rV)(t)("dd.M. HH:mm")}
1const ft=d.I4.div.withConfig({displayName:"WeatherForecastPanel__Container",componentId:"sc-a075ef6-0"})(["display:flex;flex-wrap:wrap;overflow:hidden;justify-content:space-between;margin-bottom:","px;.swiper.swiper-horizontal{padding-left:","px;","}.swiper-slide{width:5.25rem;&:last-of-type{margin-right:","px;"," ","}}@media (min-width:","px){margin-bottom:","px;.swiper.swiper-horizontal{padding-left:","px;}.swiper-slide{&:last-of-type{margin-right:","px;}}}"],16,16,e=>e.$scope===Pe.uK.Hours&&"margin-top: -24px",16,e=>e.$scope===Pe.uK.Hours&&`& > div:last-of-type { border-right: 2px solid ${b.sB.separator}; }`,e=>e.$scope===Pe.uK.Days&&`& > div { border-right: 2px solid ${b.sB.separator}; }`,x.aq.tablet,24,24,24),yt=d.I4.div.withConfig({displayName:"WeatherForecastPanel__DayName",componentId:"sc-a075ef6-1"})(["height:1.625rem;"," ",""],e=>e.$scope===Pe.uK.Days&&"padding-bottom: 8px;",e=>e.$scope===Pe.uK.Days&&`border-left: 2px solid ${b.sB.separator};`),bt=d.I4.div.withConfig({displayName:"WeatherForecastPanel__StickyDay",componentId:"sc-a075ef6-2"})(["position:relative;top:","px;left:-","px;height:","px;padding-left:","px;"],24,24,24,24),wt=d.I4.div.withConfig({displayName:"WeatherForec
1astPanel__Footer",componentId:"sc-a075ef6-3"})(["display:flex;justify-content:space-between;align-items:center;cursor:default;min-height:","px;padding-left:","px;@media (min-width:","px){padding-left:","px;}"],24,16,x.aq.tablet,24),vt=d.I4.div.withConfig({displayName:"WeatherForecastPanel__FooterLeft",componentId:"sc-a075ef6-4"})(["display:flex;flex-wrap:wrap;gap:","px;align-items:center;margin-right:","px;"],4,16),It=d.I4.div.withConfig({displayName:"WeatherForecastPanel__FooterRight",componentId:"sc-a075ef6-5"})(["align-items:center;"]),kt=(0,d.I4)(g.o).withConfig({displayName:"WeatherForecastPanel__Copyright",componentId:"sc-a075ef6-6"})(["display:inline-block;flex-shrink:0;align-items:center;"]),$t=(0,d.I4)(g.o).withConfig({displayName:"WeatherForecastPanel__WeatherPageReference",componentId:"sc-a075ef6-7"})(["flex-shrink:0;"]),Ct=(0,d.I4)(ut.P).withConfig({displayName:"WeatherForecastPanel__WeatherSwiperNavigation",componentId:"sc-a075ef6-8"})(["display:none;padding-right:","px;button{height:2rem;width:2rem;}@media (min-device-width:","px){display:block;}"],16,x.aq.tablet);function jt(e){let{forecastScope:t,weatherInfos:i,locationName:o,displayWeatherStats:a=!0,onErrorButtonClick:d,impressionElementId:c,updated:p}=e;const{translate:u,site:m}=(0,r.xy)(),h=(0,s.useRef)(null),[x,f]=(0,s.useState)((0,Fe.CJ)((0,l.H)(i?.[0]?.time??""),u));if(!i||0===i.length)return(0,n.jsx)(te,{title:"weather.error.title",onErrorButtonClick:d});const b=t===Pe.uK.Days?function(e){return[...e].slice(0,-1)}(i):i,w=m.id===pt._z.Live;return(0,n.jsx)(K.Xk,{element:K.GX.Widget,uiElementId:c,children:(0,n.jsxs)(V.A,{children:[(0,n.jsx)(ft,{$scope:t,"data-testid":"weather-forecast-panel",children:(0,n.jsxs)(Be.RC,{...ze.xz,ref:h,freeMode:ze.Zc,onSlideChange:e=>{f((0,Fe.CJ)((0,l.H)(b[e.activeIndex].time),u))},children:[t===Pe.uK.Hours&&(0,n.jsx)(bt,{slot:"container-start",children:(0,n.jsx)(g.o,{as:"div",$align:"left",$mobile:y.PT.YleXSBold,$rem:!0,children:(0,n.jsx)(yt,{$scope:t,"data-testid":"day-name",children:x})})}),b.map((e,i)=>{const r=(0,l.H)(e.time),s=0===r.getHours()||t===Pe.uK.Hours&&0===i,d=t===Pe.uK.Days?(0,Fe.CJ)(r,u):"";return(0,n.jsxs)(Be.qr,{tabIndex:0,children:[(0,n.jsx)("p",{className:"sr-only",children:(0,U.RD)(t,o,e,!1,u)}),(0,n.jsxs)("div",{"aria-hidden":"true",children:[(0,n.jsxs)(g.o,{as:"div",$align:"center",$mobile:y.PT.YleXSBold,$rem:!0,children:[(0,n.jsx)(yt,{$scope:t,children:d})," "]}),(0,n.jsx)(at,{weatherInfo:e,showDaySeparator:s,forecastScope:t,displayWeatherStats:a},e.time)]})]},e.time)})]})}),(0,n.jsxs)(wt,{children:[(0,n.jsxs)(vt,{children:[(0,n.jsxs)(kt,{as:"div",$align:"left",$mobile:y.PT.YleXS,$rem:!0,children:[u(w?"weather.copyrightCompact":"weather.copyright"),"."]}),(0,n.jsx)(gt,{updated:p}),w&&(0,n.jsx)($t,{as:"div",$align:"left",$mobile:y.PT.YleXSBold,$rem:!0,children:(0,n.jsx)("a",{href:"/saa",children:u("weather.weatherPageReference")})})]}),(0,n.jsx)(It,{children:(0,n.jsx)(Ct,{carouselRef:h})})]})]})})}var At=i(92624),Tt=i(14102),_t=i(86156),Bt=i(63829),St=i(59684);const Lt=(0,d.I4)(J.$).withConfig({displayName:"PreviousWeatherLocation__PreviousWeatherLocationButton",componentId:"sc-f1ab45bb-0"})(["padding:0;min-height:auto;border:none;"]),Pt=d.I4.div.withConfig({displayName:"PreviousWeatherLocation__Container",componentId:"sc-f1ab45bb-1"})(["display:flex;align-items:center;column-gap:","px;white-space:nowrap;"],8),Nt=d.I4.span.withConfig({displayName:"PreviousWeatherLocation__TemperaturePlaceholder",componentId:"sc-f1ab45bb-2"})(["display:block;width:2rem;"]),Wt=d.I4.div.withConfig({displayName:"PreviousWeatherLocation__SymbolWrapper",componentId:"sc-f1ab45bb-3"})(["width:2rem;height:2rem;display:flex;justify-content:center;align-items:center;overflow:hidden;"]);function Mt(e){let{locationId:t,onClick:i,hasSelectedLocation:o,placeholderWeather:a}=e;const{translate:l,config:{weatherApiUrl:s,weatherApiAppId:d,weatherApiAppKey:c},site:{lang:p}}=(0,r.xy)(),{data:u}=(0,je.I)({queryKey:["weather",{locationId:t}],queryFn:async()=>(0,oe.Zq)(s,d,c,t,p),refetchOnWindowFocus:!0,refetchOnMount:!0}),m=function(e,t,i){return t||e!==i?.geoid?t?.weatherInfos?.[0].temperature:i?.weatherInfos?.[0].temperature}(t,u?.hourlyWeather,a),h=function(e,t,i){return t||e!==i?.geoid?t?.weatherInfos?.[0].smartSymbol:i?.weatherInfos?.[0].smartSymbol}(t,u?.hourlyWeather,a),x=h?(0,He.cn)(h):null,f=function(e,t,i){return t||e!==i?.geoid?t?.locationName:i?.locationName}(t,u?.hourlyWeather,a),b=u?(0,U.qW)(u.hourlyWeather):void 0;return f&&o?(0,n.jsxs)(Lt,{size:"xs",variant:"text",removePadding:!0,onClick:()=>i(b),children:[(0,n.jsx)("span",{className:"sr-only",children:l("weather.a11y.selectPreviousLocation",(0,Se.Et)(m)?`${f} ${(0,U.rm)(m,h??null,l)}`:f)}
1),(0,n.jsxs)(Pt,{"aria-hidden":!0,children:[(0,n.jsx)(g.o,{as:"p",$mobile:y.PT.YleSBold,children:f}),(0,n.jsx)(g.o,{as:"p",$mobile:y.PT.YleSBold,children:(0,Se.Et)(m)?(0,n.jsx)(n.Fragment,{children:(0,U.cH)(m)}):(0,n.jsx)(Nt,{})}),(0,n.jsx)(Wt,{children:x&&(0,n.jsx)(Ee.A,{symbolInfo:x})})]})]}):null}const Dt=d.I4.div.withConfig({displayName:"WeatherLocationSelect__Container",componentId:"sc-b583bff6-0"})(["flex:1;min-width:0;"]),qt=d.I4.div.withConfig({displayName:"WeatherLocationSelect__LocationSelectBox",componentId:"sc-b583bff6-1"})(["margin-left:0;margin-right:0;"]),Rt=d.I4.div.withConfig({displayName:"WeatherLocationSelect__PreviousLocations",componentId:"sc-b583bff6-2"})([""," "," margin-inline:","px ","px;@media (min-width:","px){margin-inline:","px ","px;}.swiper-wrapper{display:flex;.swiper-slide{width:auto;margin-inline-end:","px;@media (min-width:","px){margin-inline-end:","px;}&:first-of-type{margin-inline-start:","px;@media (min-width:","px){margin-inline-start:","px;}}&:last-of-type{margin-inline-end:","px;@media (min-width:","px){margin-inline-end:","px;}}}}"],e=>e.$hasLocations&&e.$hasSelectedLocation&&"margin-top: 4px;",e=>e.$hasSelectedLocation&&"padding-top: 8px;",-x.sh.mobile,-x.sh.mobile,x.aq.tablet,-24,-24,16,x.aq.tablet,24,x.sh.mobile,x.aq.tablet,24,x.sh.mobile,x.aq.tablet,24);function zt(e){let{initialLocation:t,hourlyWeather:i,onChangeLocation:o,showPreviousLocations:a=!0}=e;const{translate:l,config:{weatherApiUrl:d,weatherApiAppId:c,weatherApiAppKey:p},site:u}
1=(0,r.xy)(),[m,h]=(0,s.useState)(t),[g,x]=(0,s.useState)(Re.WF),[f,y]=(0,s.useState)(),b=function(e){const{weatherLocationName:t,weatherLocationId:i}=(0,Re.CB)();return t?.[e]?{locationName:t[e],id:i}:void 0}(u.lang),w={value:(m?.locationName??b?.locationName??"").split(",")[0],id:m?.id??b?.id??-1};(0,s.useEffect)(()=>{!m&&i&&h((0,U.qW)(i))},[i,m]);const v=(0,s.useCallback)(e=>(0,oe.rr)(e,d,c,p,u.lang),[c,p,d,u.lang]),I=(0,s.useCallback)(e=>{m&&x(t=>{const i=(0,At.s)((0,Tt.g)((0,_t.A)([e.id,m.id,...t]),1),3);return(0,Re.zd)(i),i}),o(e,m),h(e)},[o,m]),k=(0,s.useCallback)(async(e,t)=>{const i=e.length>=2?await v(e):[];y(i),t(i.map(Ft))},[v]),$=(0,s.useCallback)(e=>{if(e){const t=f?.find(t=>t.id===e.id);t&&I(t)}},[I,f]),C=(0,s.useCallback)(e=>{e&&I(e)},[I]);return(0,n.jsx)(Bt.A,{children:(0,n.jsxs)(Dt,{children:[w.value&&(0,n.jsx)(qt,{$showPreviousLocations:a,children:(0,n.jsx)(St.A,{defaultOptions:[],selectedOption:w,loadOptionsAsync:k,onSelect:e=>$(e),placeholder:l("location.placeholder"),noResults:l("location.noResults"),buttonText:l("location.change"),accessibleButtonText:m?.locationName?l("weather.a11y.changeLocationWithSelectedLocation",m.locationName):l("weather.a11y.changeLocation"),debounceDelay:300,loadingThreshold:2})}),a&&(0,n.jsx)(Rt,{"data-testid":"previous-locations",$hasLocations:g?.length>0,$hasSelectedLocation:!!w.value,children:(0,n.jsx)(Be.RC,{...ze.wq,threshold:12,children:g?.map(e=>(0,n.jsx)(Be.qr,{children:(0,n.jsx)(Mt,{locationId:e,onClick:e=>C(e),hasSelectedLocation:!!w.value,placeholderWeather:i})},e))})})]})})}function Ft(e){const{id:t,finnishMunicipality:i,locationName:n,municipalityName:o,regionName:a}=e;return{id:t,value:[n,i&&o?o:a].filter(Boolean).join(", ")}}const Gt=d.I4.div.withConfig({displayName:"Panel__Footer",componentId:"sc-c25aa473-0"})(["display:flex;flex:1 1 auto;align-items:flex-end;"]),Ht=(0,d.I4)(g.o).withConfig({displayName:"Panel__Copyright",componentId:"sc-c25aa473-1"})(["margin-bottom:0.1875rem;@media (min-width:","px){margin-bottom:0.0625rem;}"],x.aq.tablet),Et=d.I4.div.withConfig({displayName:"Panel__Container",componentId:"sc-c25aa473-2"})(["display:flex;flex-direction:column;min-height:19.375rem;padding:0 ","px;@media (min-width:","px){min-height:19.75rem;padding:0 ","px;}"],16,x.aq.tablet,24),Yt=(0,s.lazy)(()=>Promise.all([i.e(946),i.e(798)]).then(()=>i(93798)));function Xt(e){let{type:t,location:i,time:o,isSupportedLocation:a,impressionElementId:l}=e;const{translate:d}=(0,r.xy)(),c=t===Pe.d1.Rain?d("weather.map.rain.unsupportedLocation"):d("weather.map.wind.unsupportedLocation");return a?o?(0,n.jsx)(K.Xk,{element:K.GX.Widget,uiElementId:l,children:(0,n.jsx)(V.A,{"data-testid":"weather-map-wrapper",children:(0,n.jsx)(s.Suspense,{children:(0,n.jsx)(Yt,{type:t,location:i,time:o})})})}):null:(0,n.jsxs)(Et,{children:[(0,n.jsx)(Z,{level:"info",title:c,variant:"primary",isMultiline:!1}),(0,n.jsx)(Gt,{children:(0,n.jsx)(Ht,{as:"div",$align:"left",$mobile:y.PT.YleXS,$rem:!0,tabIndex:0,children:d("weather.copyright")})})]})}const Ot=d.I4.div.withConfig({displayName:"WeatherWarningPanel__WarningPanel",componentId:"sc-f259e2cd-0"})(["display:flex;flex-direction:column;flex:0 1 auto;padding:","px;margin-bottom:","px;border-radius:0.25rem;gap:","px;background:",";@media (min-width:","px){padding:","px;}"],16,8,8,b.sB.weatherWarningsBackground,x.aq.tablet,24),Kt=Ot,Vt=d.I4.div.withConfig({displayName:"WeatherWarningPanel__LinkContainer",componentId:"sc-f259e2cd-1"})(["flex:0 1 auto;padding:","px ","px;margin-bottom:","px;border-radius:0.25rem;background:",";@media (min-width:","px){padding:","px ","px;}"],8,16,16,b.sB.weatherWarningsBackground,x.aq.tablet,16,24),Ut="d.M. HH:mm";function Jt(e){let{warnings:t,isSupportedLocation:i,onErrorButtonClick:o,impressionElementId:a}=e;const{translate:l}=(0,r.xy)(),s=!t||!t.warnings||0===t.warnings.length,d=s?[]:(0,U.OI)(t.warnings);return t?(0,n.jsx)(K.Xk,{element:K.GX.Widget,uiElementId:a,children:(0,n.jsx)(V.A,{children:(0,n.jsxs)(Et,{"data-testid":"weather-warning-panel",children:[!i&&(0,n.jsx)(Z,{level:"info",title:l("weather.warnings.unsupportedLocation"),variant:"primary",isMultiline:!1}),i&&s&&(0,n.jsx)(Kt,{children:(0,n.jsx)(g.o,{as:"p",$mobile:y.PT.YleS,$rem:!0,children:l("weather.warnings.noWarnings")})}),i&&!s&&(0,n.jsxs)(n.Fragment,{children:[d.map(e=>{const t=l(`weather.warnings.${e.type}`),{startTime:i,endTime:o}=e.duration,a=(0,Fe.rV)(i),r=(0,Fe.rV)(o);return(0,n.jsxs)(Ot,{tabIndex:0,children:[(0,n.jsx)(g.o,{as:"p",$mobile:y.PT.YleMBold,$rem:!0,children:t}),(0,n.jsx)(g.o,{as:"p",$mobile:y.PT.YleS,$rem:!0,children:e.description}),(0,n.jsxs)(g.o,{as:"p",$mobile:y.PT.YleS,$rem:!0,children:[(0,n.jsxs)("span",{children:[l("weather.warnings.duration")," "]}),(0,n.jsx)("time",{dateTime:i,children:a(Ut)}),(0,n.jsx)("span",{children:" – "}),(0,n.jsx)("time",{dateTime:o,children:r(Ut)})]})]},[e.type,i,o].join("-"))}),(0,n.jsx)(Vt,{children:(0,n.jsx)(J.$,{as:"a",size:"sm",variant:"text",removePadding:!0,href:"https://www.ilmatieteenlaitos.fi/varoitukset",iconAfter:(0,n.jsx)(F.GrD,{}),"aria-label":l("weather.warnings.forTheWholeCountry"),children:l("weather.warnings.forTheWholeCountry")})})]}),(0,n.jsx)(Gt,{children:(0,n.jsx)(Ht,{as:"div",$align:"left",$mobile:y.PT.YleXS,$rem:!0,tabIndex:0,children:l("weather.copyright")})})]})})}):(0,n.jsx)(te,{title:"weather.error.missingData",onErrorButtonClick:o})}const Qt="weatherTab";const Zt=["weather.hourlyForecast","weather.dailyForecast","weather.map.rain.title","weather.map.wind.title","weather.warnings.title"],ei=d.I4.div.withConfig({displayName:"WeatherWidget__WeatherWidgetContainer",componentId:"sc-e7ff75c1-0"})([""," padding:",";background:",";color:",";min-height:","rem;overflow:hidden;@media (min-width:","px){padding:",";min-height:","rem;","}"],m.lJ,e=>"weather.map.rain.title"===e.$selectedTab||"weather.map.wind.title"===e.$selectedTab?"16px 0 0":"16px 0",b.sB.getItemBackgroun
1dColor(),b.sB.getTextColor(),e=>e.$compactMode?20.25:37.9375,x.aq.tablet,e=>"weather.map.rain.title"===e.$selectedTab||"weather.map.wind.title"===e.$selectedTab||e.$compactMode?"24px 0 0":"24px 0",e=>e.$compactMode?23.4:41.6875,e=>{let{$compactMode:t}=e;return t&&"padding-bottom: 16px;"}),ti=d.I4.div.withConfig({displayName:"WeatherWidget__Loading",componentId:"sc-e7ff75c1-1"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;margin:","px;height:","rem;@media (min-width:","px){margin:","px;height:","rem;}"],e=>8*(e.$compactMode?3:2),e=>e.$compactMode?12.875:25.9375,x.aq.tablet,24,e=>e.$compactMode?13.9:27.9375),ii=d.I4.div.withConfig({displayName:"WeatherWidget__WeatherContainer",componentId:"sc-e7ff75c1-2"})(["display:flex;flex-direction:column;outline:none;"]),ni=d.I4.div.withConfig({displayName:"WeatherWidget__ViewControlsWrapper",componentId:"sc-e7ff75c1-3"})(["overflow:hidden;padding:","px 0 ","px 0;.swiper-wrapper{display:flex;.swiper-slide{width:auto;margin-inline-end:","px;[role='tab']{white-space:nowrap;}&:first-of-type{margin-inline-start:","px;@media (min-width:","px){margin-inline-start:","px;}}&:last-of-type{margin-inline-end:","px;@media (min-width:","px){margin-inline-end:","px;}}}}"],8,24,8,16,x.aq.tablet,24,16,x.aq.tablet,24),oi=(0,d.AH)(["display:flex;flex-direction:row;justify-content:left;align-items:flex-start;"]),ai=d.I4.div.withConfig({displayName:"WeatherWidget__HeadingContainer",componentId:"sc-e7ff75c1-4"})([""," margin:","px ","px ","px;padding-bottom:","px;border-bottom:1px solid ",";@media (min-width:","px){margin:","px ","px ","px;padding-bottom:","px;}"],e=>e.$compactMode?oi:null,-4,x.sh.mobile,x.sh.mobile,x.sh.mobile-4,b.sB.separator,x.aq.tablet,-4,x.sh.desktop,x.sh.desktop,x.sh.desktop-4),ri=(0,d.I4)(g.o).withConfig({displayName:"WeatherWidget__WidgetHeading",componentId:"sc-e7ff75c1-5"})(["min-height:","px;margin:","px ","px 0 0;@media (min-width:","px){line-height:1.2;}"],32,12,16,x.aq.tablet),li=d.I4.div.withConfig({displayName:"WeatherWidget__TabPanel",componentId:"sc-e7ff75c1-6"})(["outline-offset:-2px;"]);function si(e){let{uuid:t,level:i,initialLocation:o,configuration:a={updateUrl:!1,compactMode:!1},roundedCorners:l=f.nr}=e;const d=(0,De.j)(),{translate:c,config:{weatherApiUrl:p,weatherApiAppId:u,weatherApiAppKey:m},site:{lang:h}}=(0,r.xy)(),{replace:g}=(0,Le.N)(),[x,b]=(0,s.useState)(()=>o?.id??(0,Re.CB)().weatherLocationId),{updateUrl:w,compactMode:v}=a,I=(0,s.useRef)(null),k=(0,s.useRef)(!1),$=(0,s.useRef)(null),{ref:C,inView:j}=(0,_e.Wx)({triggerOnce:!0,rootMargin:"200px"}),A=v?"hourly-weather":"weather",{data:T,isLoading:_,isError:B,refetch:S}=(0,je.I)({queryKey:[A,{locationId:x}],queryFn:async()=>v?(0,oe.$c)(p,u,m,x,h):(0,oe.Zq)(p,u,m,x,h),refetchOnWindowFocus:!0,enabled:j}),[L,P]=(0,s.useState)("weather.hourlyForecast"),{updated:N,hourlyWeather:W,dailyWeather:M,warnings:D}=T??{},q=W?.weatherInfos??void 0,R=q?.[0],z=M?.weatherInfos??void 0,F=W?.location,G=W?.locationName,H="FI"===W?.countryCode;Me(Pe.d1.Rain,R?.time),Me(Pe.d1.Wind,R?.time);const E=(0,s.useCallback)((e,t)=>{if(b(e.id),d((0,qe.Yt)(Re.uG.Manual,h,e)),S(),k.current=!0,w){g({},function(e){const{search:t}=new URL(window.location.href);return`${e.friendlyUrl}${t}`}(e));const i=document.querySelector('link[rel="canonical"]');i&&(i.href=window.location.href),function(e,t,i){const n=i?.locationName&&document.title.includes(i?.locationName),o=n?document.title.replace(i?.locationName,t.locationName):`${e("weather.weather")} ${t.locationName} – ${document.title}`;document.title=o}(c,e,t)}},[d,c,w,h,S,g]),Y=(0,s.useCallback)(e=>{const t=e;P(t);const i=new URL(window.location.href);"weather.hourlyForecast"===t?i.searchParams.delete(Qt):i.searchParams.set(Qt,(0,Se.WL)(c(t)).toLowerCase()),g({},i.toString())},[c,g]),X=(0,s.useCallback)(e=>{const t=function(e,t){switch(e){case"ArrowRight":return(t+1)%Zt.length;case"ArrowLeft":return(t-1+Zt.length)%Zt.length;case"Home":return 0;case"End":return Zt.length-1;default:return}}(e.key,Zt.indexOf(e.currentTarget.id));if(void 0===t)return;e.preventDefault();const i=e.currentTarget.closest('[role="tablist"]');i?.querySelectorAll('[role="tab"]')[t]?.focus(),$.current&&(0,ze.zU)($.current,t)},[]);(0,s.useEffect)(()=>{const{searchParams:e}=new URL(window.location.href),t=e.get(Qt);t&&P(function(e,t){if(e===(0,Se.WL)(t("weather.dailyForecast")).toLowerCase())return"weather.dailyForecast";if(e===(0,Se.WL)(t("weather.map.rain.title")).toLowerCase())return"weather.map.rain.title";if(e===(0,Se.WL)(t("weather.map.wind.title")).toLowerCase())return"weather.map.wind.title";if(e===(0,Se.WL)(t("weather.warnings.title")).toLowerCase())return"weather.warnings.title";return"weather.hourlyForecast"}(t,c))},[c]),(0,s.useEffect)(()=>{const e=(0,Re.CB)();!e.weatherLocationName?.[h]&&W?.locationName&&(0,Re.Xf)(e.type,e.weatherLocationId,{...e.weatherLocationName,[h]:W.locationName})},[W,h]),(0,s.useEffect)(()=>{k.current&&T&&I.current&&(I.current.focus(),k.current=!1)},[T,k]);const V=_||!j,U=`h${i}`,J=(0,s.useId)(),Q=(0,s.useId)(),Z=U,ee=v?{}:{role:"tabpanel",id:Q,"aria-labelledby":L,tabIndex:0};return(0,n.jsx)(K.Xk,{layoutItemUuid:t,children:(0,n.jsxs)(ei,{ref:C,$selectedTab:L,$compactMode:v,$roundedCorners:l,$separatorBorder:!0,"aria-labelledby":J,children:[(0,n.jsxs)(ai,{$compactMode:v,children:[!v&&(0,n.jsx)(Z,{className:"sr-only",id:J,children:c("weather.weather")}),v&&(0,n.jsx)(ri,{as:U,id:J,$mobile:y.PT.YleLHeavy,$desktop:y.PT.YleXLHeavy,children:c("weather.weather")}),(0,n.jsx)(zt,{initialLocation:o,hourlyWeather:W,onChangeLocation:(e,t)=>E(e,t),showPreviousLocations:!v})]}),V&&(0,n.jsx)(ti,{$compactMode:v,children:(0,n.jsx)(Ae.y,{label:c("weather.loading")})}),B&&(0,n.jsx)(te,{title:"weather.error.title",onErrorButtonClick:S}),!V&&q&&F&&G&&(0,n.jsxs)(ii,{ref:I,tabIndex:-1,"data-testid":"weather-container",children:[!v&&(0,n.jsxs)(n.Fragment,{children:[R&&(0,n.jsx)(ct,{weatherNow:R,locationName:G}),(0,n.jsx)(Te.e,{value:L,onChange:Y,variant:"primary",role:"tablist","aria-labelledby":J,size:"xs",children:(0,n.jsx)(ni,{role:"presentation",children:(0,n.jsx)(Be.RC,{...ze.xz,threshold:12,freeMode:!0,role:"presentation",onSwiper:e=>{$.current=e,e.wrapperEl.setAttribute("role","presentation")},children:Zt.map(e=>(0,n.jsx)(Be.qr,{role:"presentation",children:(0,n.jsx)(Te.e.Button,{id:e,role:"tab","aria-selected":L===e,"aria-pressed":void 0,"aria-controls":Q,tabIndex:L===e?0:-1,onKeyDown:X,children:c(e)})},e))})})})]}),(0,n.jsxs)(li,{...ee,children:[(v||"weather.hourlyForecast"===L)&&(0,n.jsx)(jt,{locationName:G,forecastScope:Pe.uK.Hours,weatherInfos:q?.slice(1),displayWeatherStats:!v,onErrorButtonClick:S,updated:N,impressionElementId:O.$.weatherWidgetUpcomingHours}),"weather.dailyForecast"===L&&(0,n.jsx)(jt,{locationName:G,forecastScope:Pe.uK.Days,weatherInfos:z,onErrorButtonClick:S,updated:N,impressionElementId:O.$.weatherWidgetUpcomingDays}),"weather.warnings.title"===L&&(0,n.jsx)(Jt,{warnings:D,isSupportedLocation:H,onErrorButtonClick:S,impressionElementId:O.$.weatherWidgetWarnings}),"weather.map.rain.title"===L&&(0,n.jsx)(Xt,{type:Pe.d1.Rain,location:F,time:R?.time,isSupportedLocation:H,impressionElementId:O.$.weatherWidgetRainMap}),"weather.map.wind.title"===L&&(0,n.jsx)(Xt,{type:Pe.d1.Wind,location:F,time:R?.time,isSupportedLocation:H,impressionElementId:O.$.weatherWidgetWindMap})]})]})]})})}var di=i(85791),ci=i(74922);const pi=["plus.yle.fi","vaalit.test.yle.fi","vaalit.yle.fi"],ui=(0,d.I4)(di.Y).withConfig({displayName:"WebComponentWidget__Container",componentId:"sc-ea4fe91-0"})([""," background:",";",";@media (min-width:","px){","}@media (min-width:","px){","}
1"],m.lJ,b.sB.getItemBackgroundColor(),e=>e.$height?.mobile?`min-height: ${e.$height.mobile}px`:void 0,x.aq.tablet,e=>e.$height?.tablet?`min-height: ${e.$height.tablet}px;`:void 0,x.aq.desktop,e=>e.$height?.desktop?`min-height: ${e.$height.desktop}px;`:void 0);function mi(e){let{lang:t,level:i,group:o,config:a,roundedCorners:r=f.nr}=e;const l=(0,s.useContext)(ci.R),{tag:d,scripts:c,height:p}=a,u=d.id,[m,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{customElements.whenDefined(u).then(()=>{h(!0)})},[u]);const g=!!o?.isFirst||l===ci.G.Grey,x={...d.attributes,lang:t,level:i};return(0,n.jsxs)(ui,{$height:p,$roundedCorners:r,$separatorBorder:!0,$horizontal:{minimum:!0,mobile:!0,tablet:g,desktop:g},children:[m&&(0,n.jsx)(u,{...x,"data-testid":d.id}),c.map(hi).filter(Boolean).map(e=>(0,n.jsx)("script",{src:e},e))]})}function hi(e){try{const t=new URL(encodeURI(e));if(pi.includes(t.host))return t.toString()}catch{}}function gi(e){let{widget:t,level:i,group:l,roundedCorners:s,separatorBorder:d=!0}=e;const{widgetAuxData:c,site:p}=(0,r.xy)(),{configuration:u,widgetType:m}=t,h=c?.[m];return(0,n.jsxs)(a.A,{children:[m===o.x.WebComponent&&(0,n.jsx)(mi,{level:i,lang:p.lang,config:u,group:l,roundedCorners:s}),m===o.x.Weather&&(0,n.jsx)(si,{uuid:t.uuid,level:i,initialLocation:h,configuration:u,roundedCorners:s}),m===o.x.Pollen&&(0,n.jsx)(Ce,{uuid:t.uuid,level:i,pollen:h,roundedCorners:s}),m===o.x.Dataviz&&(0,n.jsx)(W.A,{group:l,data:t.data,configuration:u,roundedCorners:s}),m===o.x.Notification&&(0,n.jsx)(q,{configuration:u,roundedCorners:s,separatorBorder:d}),m===o.x.Search&&(0,n.jsx)(E,{roundedCorners:s,configuration:u}),m===o.x.Countdown&&(0,n.jsx)(N,{level:i,configuration:u,roundedCorners:s}),m===o.x.VideoFeed&&(0,n.jsx)(Y.A,{title:t.title,configuration:u,data:t.data,level:i,roundedCorners:s}),m===o.x.QuestionAndAnswer&&(0,n.jsx)(R.A,{uuid:t.uuid,configuration:u,roundedCorners:s})]})}},25204(e,t,i){i.d(t,{g:()=>r});var n=i(24962),o=i(26315),a=i(31964);function r(e){let{uuid:t,stories:i,size:n,fallbackText:r,title:s,ariaTitle:d,packageSubHeader:c,template:p=a.al.Default,isLoading:u=!1,groupLink:m}=e;return{uuid:t,type:a.Z6.Group,children:l(i,u,r),content:{title:s,template:p,showMore:{size:n},link:m},plugins:{allowedColors:[o.Q.White],packageSubHeader:c,ariaTitle:d}}}function l(e,t,i){return t?[]:0===e.length?[{uuid:"notification-widget",type:a.Z6.Widget,widgetType:n.x.Notification,configuration:{text:i}}]:e}},92253(e,t,i){i.d(t,{$3:()=>d,q_:()=>s,XU:()=>l,WH:()=>r,XT:()=>a});var n=i(25809);function o(e){return`${e.name}${e.group}`}async function a(e){let{config:t,params:i}=e;return(await n.A.post(`${t.layoutFrontApiUrl}/v1/layout-fragment/${i.id}`,{count:i.count,excludeContentIds:i.excludeContentIds,abTests:i.activeAbTests?.map(o)},{withCredentials:!0,params:{app_id:t.layoutFrontApiAppId,app_key:t.layoutFrontApiAppKey},timeout:2500})).data}async function r(e){let{config:t,params:i}=e;return(await n.A.get(`${t.layoutFrontApiUrl}/v1/article-read-next`,{withCredentials:!0,params:{app_id:t.layoutFrontApiAppId,app_key:t.layoutFrontApiAppKey,limit:i.limit,abTests:i.activeAbTests?.map(o),articleId:i.articleId},timeout:2500})).data}async function l(e,t,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20,a=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;return(await n.A.get(`${e.layoutFrontApiUrl}/v1/nearby/${t}/${i}`,{params:{limit:o,requiredSubjectIds:a?.join(","),profile:r,publishedAfter:l,app_id:e.layoutFrontApiAppId,app_key:e.layoutFrontApiAppKey}})).data.items}async function s(e){let{config:t,params:i}=e;const{id:o,language:a}=i;return(await n.A.get(`${t.layoutFrontApiUrl}/v1/qa/questions/article-footer/${o}`,{withCredentials:!0,params:{app_id:t.layoutFrontApiAppId,app_key:t.layoutFrontApiAppKey,language:a,includeAnswers:!0}})).data}async function d(e){let{config:t,params:i}=e;const{id:o}=i;return(await n.A.get(`${t.layoutFrontApiUrl}/v1/qa/answer/${o}`,{withCredentials:!0,params:{app_id:t.layoutFrontApiAppId,app_key:t.layoutFrontApiAppKey}})).data.answer}},66166(e,t,i){i.d(t,{F:()=>n});var n=function(e){return e[e.h1=1]="h1",e[e.h2=2]="h2",e[e.h3=3]="h3",e[e.h4=4]="h4",e}({})},24962(e,t,i){i.d(t,{x:()=>n});var n=function(e){return e.LocalNews="localNews",e.Countdown="countdown",e.WebComponent="webComponent",e.Weather="weather",e.Pollen="pollen",e.ConceptGroup="conceptGroup",e.Headlines="headlines",e.LayoutFragment="layoutFragment",e.Dataviz="dataviz",e.Notification="notification",e.Search="search",e.BrazeContentCard="brazeContentCard",e.VideoFeed="videoFeed",e.QuestionAndAnswer="palvelijaQuestions",e}({})},63841(e,t,i){i.d(t,{fS:()=>l,hu:()=>r,yv:()=>a});i(97700),i(99921);var n=i(36164),o=i(47910);
1function a(e){let{concepts:t=[],lang:i,rootUrl:n}=e;return t?t.map(e=>r({concept:e,lang:i,rootUrl:n})).filter(e=>void 0!==e):[]}function r(e){let{concept:t,lang:i,rootUrl:a}=e;const r=function(e){switch(e){case n.JA.fi:return n.JA.fi;case n.JA.se:case n.JA.smn:case n.JA.sms:return n.JA.se;case n.JA.en:return n.JA.en;case n.JA.uk:return n.JA.uk;case n.JA.ru:return n.JA.ru;case n.JA.sv:return n.JA.sv;default:return n.JA.fi}}(i);return function(e){let{concept:t,lang:i,url:n}=e;const a=t.shortTitle?.[i]??t.title?.[i];if(!a)return;const r=`${n}/${t.id}`;return{id:t.id,text:(0,o.Zb)(a),url:`${r}/${i}`}}({concept:t,lang:r,url:`${a}/t`})}function l(e){if(!e)return null;const t=e.exactMatch?.map(e=>e.match(/^wikidata:(.+)$/)).filter(Boolean)[0];return t?`https://www.wikidata.org/wiki/${t[1]}`:null}},31470(e,t,i){i.d(t,{aW:()=>M,D_:()=>W,N8:()=>D,Dh:()=>O});i(97700);var n=i(43591),o=i(8298),a=i(80161),r=i(25362),l=i(97641),s=i(44428),d=i(11945),c=i(9983),p=i(24962),u=i(36164),m=i(88200),h=i(31964),g=i(91125),x=i(4422),f=i(61526),y=i(47910),b=i(72529),w=i(26201),v=i(71855),I=i(63841);function k(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>2?arguments[2]:void 0)?(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(t=>{let{id:i="",createdAt:n="",content:o=""}=t;return{url:`${e}/${i}`,createdAt:n,content:(0,y.Ds)(o)}}).filter(e=>e.content.length>0):[]}var $=i(76201),C=i(31006),j=i(63613),A=i(4705),T=i(77578),_=i(27063);const B=e=>"object"==typeof e&&null!==e,S=e=>"object"==typeof e||null==e,L={[p.x.ConceptGroup]:j.m,[p.x.Weather]:S,[p.x.Pollen]:S,[p.x.LocalNews]:S,[p.x.Countdown]:B,[p.x.WebComponent]:B,[p.x.Headlines]:A.k,[p.x.LayoutFragment]:T.P,[p.x.Dataviz]:S,[p.x.Notification]:B,[p.x.Search]:B,[p.x.BrazeContentCard]:S,[p.x.VideoFeed]:B,[p.x.QuestionAndAnswer]:_.o},P=(e,t)=>L[e]?.(t)??!1;const{Landscape:N}=l.l;function W(e){const{articles:t,lang:i,rootUrl:n,size:o}=e;return t.map(e=>function(e){const{article:t,lang:i,rootUrl:n,size:o}
1=e,a=t.id,r=E(t),l=t.topic?{topic:t.topic}:{},c=Y(t.headline?.full)??"",p=Y(t.headline?.short)??"",u=Y(t.lead),m=(0,w.T)(t.fullUrl,n),g=F({live:t.live,baseUrl:m,hideViewerCount:!1});return{contentId:a,type:h.Z6.Article,url:m,size:o??d.vA.S,texts:{headline:{text:c},...p&&{short:{text:p}},...u&&{lead:{text:u,hidden:!1}}},...l,...X((0,x.ED)(t)),...r&&{playableMedia:{id:r,type:s.z.Video,playMode:K()}},publishedAt:t.datePublished,concepts:(0,I.yv)({concepts:t.subjects,lang:i,rootUrl:n}),publisher:t.publisher?.name,journalisticStyle:t.journalisticStyle??void 0,format:t.format,...g}}({article:e,lang:i,rootUrl:n,size:o}))}function M(e){return e.includes(g.V.A)?g.V.A:e[0]}function D(e,t,i,n){return e.filter(e=>!!e.content).map(e=>q(e,t,i,n)).filter(e=>null!==e)}function q(e,t,i,o){if(e&&!1!==e.enabled){const{type:l}=e;if(h.QW.includes(l))return function(e,t,i,n){const{uuid:o,type:l,content:p,article:g,data:x,recommendationMethod:y,recommendationUuid:k}=e,{size:j,contentId:A}=p,T=(0,w.T)(p.url,i),{variantId:_,isABTestOn:B}=G(p.variants,n),S=_?p.variants[_]:void 0,L=Y(S?.texts?.headline?.text);if(!L)return null;const{startTime:P,endTime:N}=e.type===h.Z6.Program&&x?function(e){if(!e.publications)return{};const t=e.publications?.filter(e=>{let{kind:t}=e;return i=t,[m.oL.Webcast,m.oL.Broadcast].includes(i);var i}),i=(0,a.C)(t??[],[e=>Date.parse(e.startTime),"desc"]);if(i&&i.startTime&&i.endTime)return{startTime:i.startTime,endTime:i.endTime};return{}}(x):{},W=Y(S?.texts?.lead?.text),M=S?.texts?.lead?.hidden??!1,D=g?.breakingNews??void 0,q=g?.isChatOpen??void 0,R=g?.journalistDriven??void 0,z=g?.customKicker??void 0,E=g?.format??void 0,O=(ae=e,(ae.type===h.Z6.Program&&ae.data?H(ae.data):ae?.data?.datePublished)??void 0),V=x?.dateContentModified??void 0,U=(0,b.BG)(e)?(0,I.yv)({concepts:x?.subjects||[],lang:t,rootUrl:i}):[],J=x?.specialTopic?(0,I.hu)({concept:x?.specialTopic,lang:t,rootUrl:i}):void 0,Q=x?.topic??void 0,Z=g?.byline??void 0,ee=function(e){const{authors:t,format:i,lang:n}=e;if(i!==r.Iy.VerticalMultimediaArticle)return;const o=t?.find(e=>e.type===m.E6.Channel);if(!o)return;return{name:o.name,image:o.image??void 0,url:(0,$.Uw)(o.id,(0,$.Qt)(n)?n:u.JA.fi)}}({authors:x?.authors,format:E,lang:t}),te=F({live:e?.data?.live,baseUrl:T,hideSummary:!!e.article?.hideSummary,hideViewerCount:!!e.article?.hideViewerCount}),ie=x?.journalisticStyle??void 0,ne=function(e,t){if((0,b.Vd)(e)&&e.content.contentId)return{type:e.data?.mediaType||s.z.Video,id:e.content.contentId,playMode:K(t?.video?.playMode),aspectRatio:e.data?.videoAspectRatio?(0,v.xL)(e.data?.videoAspectRatio):void 0,duration:(0,f.u)(e.data?.duration)};const i=e.data?.headline?.video;if(!i?.id)return;const n=K(t?.video?.playMode);if(n===c.e.IllustrationalDisabled)return;return{type:s.z.Video,id:i.id,playMode:n,aspectRatio:(0,v.xL)(i.aspectRatio)}}(e,S),oe=(0,C.hV)(x?.publisher?.name);var ae;return{uuid:o,type:l,url:T,size:j??d.vA.S,texts:{headline:{text:L},...W&&{lead:{text:W,hidden:M}}},...X(S?.image),isABTestOn:B,variantId:_,theme:S?.theme??void 0,contentId:A,format:E,journalisticStyle:ie,breakingNews:D,isChatOpen:q,journalistDriven:R,customKicker:z,playableMedia:ne,publisher:oe,publishedAt:O,contentModifiedAt:V,startTime:P,endTime:N,concepts:U,topic:Q,byline:Z,channel:ee,...te,specialTopic:J,recommendationMethod:y,recommendationUuid:k}}(e,t,i,o);if(l===h.Z6.Banner)return function(e,t){const{uuid:i,type:n,content:o}=e,{size:a}=o,{variantId:r,isABTestOn:l}=G(o.variants,t),s=o.variants[r],c=Y(s?.texts?.headline?.text),p=Y(s?.texts?.lead?.text),u=Y(s?.texts?.button?.text),m=a??d.vA.M,h=X(s?.image);if(!(h&&(0,d.i4)(m)||c||p||u))return null;return{uuid:i,type:n,url:o.url??void 0,size:m,texts:{...c&&{headline:{text:c}},...p&&{lead:{text:p}},...u&&{button:{text:u}}},...h,theme:s?.theme??void 0,isABTestOn:l,variantId:r}}(e,o);if(l===h.Z6.Group)return function(e,t,i,n){const{uuid:o,type:a,content:r}=e,{template:l,carousel:s,groupTheme:d,link:c}=r,p=D(e.children,t,i,n);if(0===p.length)return null;return{uuid:o,type:a,content:{title:r.title,template:l,carousel:s??void 0,theme:d,link:R(c,t)},children:p}}(e,t,i,o);if(l===h.Z6.Widget)return function(e,t,i,o){try{const{uuid:a,type:r,content:l}=e,s=l.configuration?JSON.parse(l.configuration):void 0,d=l.type,c={uuid:a,type:r,title:Y(l.title)};return d===p.x.LayoutFragment?P(d,s)?{...c,widgetType:p.x.LayoutFragment,configuration:s,data:{fallbackItems:l.data?.fallbackItems.map(e=>q(e,t,i,o)).filter(n.z)}}:null:d===p.x.Headlines?P(d,s)?{...c,widgetType:p.x.Headlines,configuration:s,data:{items:l.data?.items.map(e=>q(e,t,i,o)).filter(n.z).filter(b.mV)}}:null:d===p.x.Dataviz?P(d,s)&&l.data?{...c,configuration:s,widgetType:p.x.Dataviz,data:l.data}:null:P(d,s)?{...c,configuration:s,widgetType:d}:null}catch{return null}}(e,t,i,o);if(l===h.Z6.AreenaPackage)return function(e,t){const{uuid:i,type:n,content:o}=e,a=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.e.Theater;
1return(e||[]).filter(Boolean).map(e=>function(e,t,i,n){const o=e.id,a=Y(e.title)??"",r=Y(e.description),l=function(e){return e===u.JA.sv?"https://arenan.yle.fi":"https://areena.yle.fi"}(i);return{contentId:o,type:h.Z6.Program,url:`${l}/${o}`,size:n,texts:{headline:{text:a},...r&&{lead:{text:r,hidden:!1}}},...X((0,x.uu)(e?.image)),playableMedia:{id:o,aspectRatio:(0,v.xL)(e.videoAspectRatio),type:e.mediaType||s.z.Video,duration:(0,f.u)(e.duration),playMode:t},publishedAt:H(e),concepts:[]}}(e,i,t,d.vA.S))}(o.recommendations,t,c.e.Playlist);if(0===a.length)return null;return{uuid:i,type:n,content:{title:o.title,template:h.al.Carousel,carousel:{aspectRatio:N.aspectRatioKey}},children:a}}(e,t)}return null}function R(e,t){if(!e)return;const i=z(e.url),n=t===u.JA.sv?"Läs mer om ämnet":"Lisää aiheesta",o=z(e.text)??n;return i?{url:i,text:o}:void 0}function z(e){const t=e?.trim();return t&&t.length>0?t:void 0}function F(e){let{live:t,baseUrl:i,hideSummary:n=!1,hideViewerCount:o}=e;if(t&&i){const e=100,a=t.viewers?.count||0,r=!o&&a>=e?a:void 0;return{livefeed:{livefeedId:t.livefeedId,livemode:t.livemode,viewers:r,hideSummary:n,updates:k(t.excerpts,i,!0)}}}}function G(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.XM;const i=Object.keys(e).filter(e=>["a","b","c"].includes(e)).filter(t=>(0,n.z)(e[t])&&!(0,o.I)(e[t]));if(0===i.length)return{variantId:void 0,isABTestOn:!1};return{variantId:t(i),isABTestOn:i.length>1}}function H(e){return(0,a.C)(e.publications??[],e=>Date.parse(e.startTime))?.startTime}function E(e){const t=e?.headline?.video;return t&&"id"in t?t.id:void 0}function Y(e){return(e?(0,y.Ds)(e):e)||void 0}function X(e){return e&&e.id?{image:e}:void 0}function O(e){return(0,b.mV)(e)?e.uuid??e.contentId??void 0:e?.uuid??void 0}function K(e){return e??c.e.External}},88200(e,t,i){i.d(t,["E6",0,{Person:"person",NewsAgency:"news_agency",Channel:"channel"},"Yu",0,"youtube","f1",0,"facebook","go",0,"bluesky","oL",0,{Ondemand:"Ondemand",Webcast:"Webcast",Broadcast:"Broadcast"},"pd",0,"instagram","v8",0,"linkedin"])},25942(e,t,i){i.d(t,{g:()=>o});var n=i(66166);function o(e){const t=e.valueOf()+1;return t<=4?t:n.F.h4}},14845(e,t,i){i.d(t,{J:()=>s,m:()=>l});var n=i(12500),o=i(25362),a=i(9300),r=i(36164);function l(e){return e===r.JA.fi}function s(e){return e.format!==o.Iy.DocumentArticle&&e.journalisticStyle!==o.tK.NonJournalisticContent&&!(0,n.KM)(e,a.TZ.YleViestinta,a.TZ.YleElakesaatio,a.TZ.SvenskaBolagskommunikation)}}}]);

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.