1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9375],{1349:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BOTTOM_NAV_HEIGHT:()=>x,SiteChrome:()=>eo,headerHeightMediumLarge:()=>f,topBannerHeightMediumLarge:()=>b,topBannerHeightSmall:()=>g});var a=r(85465);r(2785);var l=r(43209),n=r(56493),s=r(63164),i=r(76277),o=r(10100),d=r(95596),c=r(25512),h=r(45510);let u={"en-CA":{navBarLabel:"Site",weather:{label:"Weather",linkUrl:"/",highlightUrlPattern:/(^\/en\/[a-z-]+\/[a-z]{2}\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+)|(^\/[a-z]{2}\/(forecasts|weather|hourly-weather-forecast|36-hour-weather-forecast|14-day-weather-trend|historical)\/)/i},maps:{label:"Maps",linkUrl:"/en/maps/radar",highlightUrlPattern:/^\/en\/maps\//i},news:{label:"News",linkUrl:"/en/news",highlightUrlPattern:/^\/en\/news/i},video:{label:"Video",linkUrl:"/en/video",highlightUrlPattern:/^\/en\/video/i},vacation:{label:"Vacation",linkUrl:"/en/vacation",highlightUrlPattern:/^\/en\/vacation/i}},"fr-CA":{navBarLabel:"Site web",weather:{label:"M\xe9t\xe9o",linkUrl:"/",highlightUrlPattern:/(^\/fr\/[a-z-]+\/[a-z]{2}\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+)|(^\/[a-z]{2}\/(previsions|meteo|previsions-meteo-horaires|previsions-meteo-36-heures|tendance-meteo-14-jours|historique)\/)/i},maps:{label:"Cartes",linkUrl:"/fr/cartes/radar",highlightUrlPattern:/^\/fr\/cartes\//i},news:{label:"Nouvelles",linkUrl:"/fr/nouvelles",highlightUrlPattern:/^\/fr\/nouvelles/i},video:{label:"Vid\xe9os",linkUrl:"/fr/video",highlightUrlPattern:/^\/fr\/video/i},vacation:{label:"Vacances",linkUrl:"/fr/vacances",highlightUrlPattern:/^\/fr\/vacances/i}}};var m=r(92617);let p="1.71875rem",x="3.95rem",f="3.875rem",g="50px",b="90px",v=({children:e})=>(0,a.jsx)("ul",{className:(0,m.cn)("w-full flex md:justify-end xl:justify-between md:gap-2 md:pr-4","max-md:justify-between max-md:items-center max-md:list-none","max-md:[background-color:var(--theme-prop-primary-nav-background-color)]",`max-md:h-[${x}] max-md:border-t max-md:border-t-[rgba(0,0,0,0.2)]`,"max-md:px-4 max-md:py-0 max-md:ml-[1.2rem]"),children:e});var w=r(68799);let j=({isHighlighted:e=!1,showIconInHorizontalNav:t=!1,children:r})=>(0,a.jsx)("div",{"data-highlighted":e?"true":void 0,className:(0,m.cn)("flex flex-col items-center text-xs font-normal max-md:p-[0.5em]","text-nav-text-light fill-nav-text-light dark:text-nav-text-dark dark:fill-nav-text-dark","md:block md:w-fit md:uppercase md:box-content md:text-base","md:[&_span]:px-1.5","md:relative md:inline-block","md:[font-variation-settings:'wght'_400]","md:transition-[font-variation-settings,font-weight]","md:[transition-duration:450ms] md:[transition-timing-function:cubic-bezier(0.19,1,0.22,1)]","md:after:content-[''] md:after:absolute md:after:block","md:after:left-0 md:after:top-full md:after:mt-[0.67rem]","md:after:h-1.5 md:after:bg-[#F6DA07]",{"max-md:text-night-blue max-md:fill-night-blue":e,"dark:max-md:text-brand-yellow dark:max-md:fill-brand-yellow":e,"md:[&_i]:hidden md:[&_svg]:hidden":!t},e?"md:[font-variation-settings:'wght'_600] md:font-bold md:after:w-full":"md:after:w-0 md:after:transition-[width] md:after:[transition-duration:450ms] md:after:[transition-timing-function:cubic-bezier(0.19,1,0.22,1)] md:hover:[font-variation-settings:'wght'_600] md:hover:font-bold md:hover:after:w-full"),children:r}),y=({highlightUrlPattern:e,showIconInHorizontalNav:t,children:r})=>{let[l,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{s(!!window.location.pathname.match(e))},[e]),(0,a.jsx)(j,{isHighlighted:l,showIconInHorizontalNav:t,children:r})};var k=r(523),N=r(41210),S=r(86454),C=r(54951);let A=({linkUrl:e,highlightUrlPattern:t,children:r,dataTestId:n,disabled:s,showIconInHorizontalNav:i,moduleSubProduct:o})=>{let{viewPortSize:d}=(0,C.wo)();if(s)return null;let c=d===l.i.SMALL?S.Oe.NavigationTabBar:S.Oe.NavigationTopNav;return(0,a.jsx)(N.W,{href:e,"data-testid":n,className:(0,m.cn)("inline-block h-full rounded-sm","keyboard-focus-link"),children:(0,a.jsx)(k.xM,{ga4ModuleParameters:{[S.L8.ModuleName]:c,[S.L8.ModuleSubProduct]:o},children:(0,a.jsx)(y,{highlightUrlPattern:t,showIconInHorizontalNav:i,children:r})})})};var I=r(21273),E=r(59522);let P=({locale:e})=>
1{let t=u[e].weather,[r,l]=(0,n.useState)(t.linkUrl),s=(0,I._U)();return(0,n.useEffect)(()=>{l(s?.path??t.linkUrl)},[s]),(0,a.jsxs)(A,{linkUrl:r,highlightUrlPattern:t.highlightUrlPattern,dataTestId:"header-nav-item-weather",disabled:t.disabled,moduleSubProduct:E.Yt.Current,children:[(0,a.jsx)(w.WeatherIcon,{size:p}),(0,a.jsx)("span",{children:t.label})]})},R=({locale:e})=>{let[t,r]=(0,n.useState)(new URLSearchParams),l=(0,I._U)(),s=u[e].maps;(0,n.useEffect)(()=>{if(l){let e=new URLSearchParams;e.set("lat",`${l.lat}`),e.set("lng",`${l.long}`),r(e)}},[l?.lat,l?.long]);let i=t.toString()?`?${t.toString()}`:"",o=`${s.linkUrl}${i}`;return(0,a.jsxs)(A,{linkUrl:o,highlightUrlPattern:s.highlightUrlPattern,dataTestId:"header-nav-item-maps",disabled:s.disabled,moduleSubProduct:E.Yt.Maps,children:[(0,a.jsx)(w.RadarIcon,{size:p}),(0,a.jsx)("span",{children:s.label})]})},T=({locale:e})=>{let t=u[e].news;return(0,a.jsxs)(A,{linkUrl:t.linkUrl,highlightUrlPattern:t.highlightUrlPattern,dataTestId:"header-nav-item-news",disabled:t.disabled,moduleSubProduct:E.Yt.News,children:[(0,a.jsx)(w.NewsIcon,{size:p}),(0,a.jsx)("span",{children:t.label})]})},L=({locale:e})=>{let t=u[e].video;return(0,a.jsxs)(A,{linkUrl:t.linkUrl,highlightUrlPattern:t.highlightUrlPattern,dataTestId:"header-nav-item-videos",disabled:t.disabled,moduleSubProduct:E.Yt.Videos,children:[(0,a.jsx)(w.VideoIcon,{size:p}),(0,a.jsx)("span",{children:t.label})]})},U=()=>(0,a.jsx)(A,{linkUrl:"/en/gta-live",highlightUrlPattern:/^\/en\/gta-live/i,dataTestId:"header-nav-item-watch-live",moduleSubProduct:"watchLive",showIconInHorizontalNav:!0,children:(0,a.jsxs)("div",{className:"flex items-center flex-row-reverse w-max sm:flex-col",children:[(0,a.jsx)(w.PlayButtonIcon,{size:p,className:"md:hidden"}),(0,a.jsx)("span",{children:"Watch Live"})]})});var B=r(85113);let M=({locale:e})=>{let t=(0,B.Br)("watch-live","not_in_experiment"),[r,l]=(0,n.useState)(!1);(0,n.useEffect)(()=>
1{l("live_stream_with_sign_in"===t||"live_stream_without_sign_in"===t)},[t]);let s=u[e];return(0,a.jsx)("nav",{className:"w-full","aria-label":s.navBarLabel,"data-testid":"header-navigation-bar",children:(0,a.jsxs)(v,{children:[(0,a.jsx)("li",{children:(0,a.jsx)(P,{locale:e})}),(0,a.jsx)("li",{children:(0,a.jsx)(R,{locale:e})}),(0,a.jsx)("li",{children:(0,a.jsx)(T,{locale:e})}),(0,a.jsx)("li",{children:(0,a.jsx)(L,{locale:e})}),r&&(0,a.jsx)("li",{children:(0,a.jsx)(U,{locale:e})})]})})},$=({children:e,dataTestId:t})=>(0,a.jsx)("div",{"data-testid":t,className:(0,m.cn)("z-[100] fixed bottom-0 w-full","md:static md:self-end md:top-[27.5px]","md:w-[87%] lg:w-[87%]"),children:e}),_=({children:e})=>(0,a.jsx)("div",{className:"flex flex-row items-center gap-4 justify-end md:gap-1 xl:gap-4 md:w-[70%] xl:w-1/2",children:e}),H=({children:e})=>(0,a.jsx)("div",{className:"w-[7.5rem] md:w-[10.5rem]",children:e}),z={"en-CA":{welcome:"Welcome"},"fr-CA":{welcome:"Bienvenue"}};var F=r(10),O=r(10024);let W=({locale:e,firebaseOptions:t})=>{let{user:r,loading:l}=(0,F.t7)({locale:e,firebaseOptions:t});return(0,a.jsx)(o.W,{href:O.XF[e].signInPath,"data-testid":"account-button",children:(0,a.jsxs)("div",{className:`flex items-center ${r&&!l?"text-night-blue":""}`,children:[(0,a.jsx)(w.UserIcon,{size:29}),(0,a.jsx)("span",{className:(0,m.cn)("max-w-[5.375rem] overflow-hidden text-ellipsis whitespace-nowrap text-body-sm font-normal","md:max-w-[3.875rem]","xl:max-w-[7.875rem]"),children:r&&!l?r.displayName:z[e].welcome})]})})},D=({children:e,className:t=""})=>(0,a.jsx)("div",{className:(0,m.cn)("w-full shadow-header dark:shadow-none -mt-[1px]","bg-white dark:bg-near-black","text-nav-text-light dark:text-nav-text-dark","[&_a]:text-nav-text-light dark:[&_a]:text-nav-text-dark",t),children:e}),V=({children:e,className:t=""})=>(0,a.jsx)("div",{className:(0,m.cn)("flex items-center justify-between w-full h-[2.375rem]","md:h-[3.875rem]",t),children:e}),G=({locale:e,searchBaseUrl:t,hideHeaderAndNavigation:r,headerText:l,disableSearch:n,disableAccount:s,firebaseOptions:i})=>(0,a.jsx)(D,{children:(0,a.jsxs)(d.ResponsiveContainer,{children:[!r&&(0,a.jsxs)(V,{children:[(0,a.jsx)(H,{children:(0,a.jsx)(o.W,{href:"/",className:(0,m.cn)("inline-block rounded-sm","keyboard-focus-link"),children:(0,a.jsx)(c.P,{size:"100%",locale:e})})}),(0,a.jsxs)(_,{children:[(0,a.jsx)($,{dataTestId:"navigation-container",children:(0,a.jsx)(M,{locale:e})}),(0,a.jsxs)("div",{className:"flex items-center gap-2 xl:gap-4",children:[!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.t,{locale:e,searchBaseUrl:t})," |"]}),!s&&(0,a.jsx)(W,{firebaseOptions:i,locale:e})]})]})]}),l&&(0,a.jsx)("div",{className:"py-4",children:(0,a.jsx)("h1",{className:"text-xl font-bold",children:l})})]})}),Y=n.forwardRef(({disableSticky:e,className:t,children:r,...l},n)=>(0,a.jsx)("div",{ref:n,className:(0,m.cn)(!e&&"sticky top-0 z-[100]",t),...l,children:r}));Y.displayName="StickyItem";let K=n.forwardRef(({disableSticky:e,className:t,children:r,...l},n)=>(0,a.jsx)("div",{ref:n,className:(0,m.cn)({"site-chrome-header-sticky-item sticky z-[100]":!e,"top-[var(--header-sticky-top)]":!e},t),...l,children:r}));K.displayName="HeaderStickyItem";var q=r(3381);let J=({children:e,isAdPushedDownRef:t,adWrapperRef:r})=>(0,a.jsx)("div",{ref:r,className:(0,m.cn)("bg-white dark:bg-near-black","empty:min-h-[90px] [&_div:empty]:min-h-[90px]","max-md:empty:min-h-[50px] max-md:empty:h-[50px]","max-md:[&_div:empty]:min-h-[50px] max-md:[&_div:empty]:h-[50px]",{"bg-transparent":t.current}),"data-testid":"header-ad-content",children:e}),X={"en-CA":{siteName:"The Weather Network",installApp:"Install App",closeBanner:"Close banner"},"fr-CA":{siteName:"M\xe9t\xe9oM\xe9dia",installApp:"Installer l'application",closeBanner:"Fermer la banni\xe8re"}};var Q=r(18586),Z=r(93886),ee=r(59420);let et=({children:e})=>(0,a.jsx)("div",{"data-testid":"app-install-banner",className:"w-full pb-2 text-body-md font-[sans-serif] bg-background font-normal",children:(0,a.jsx)("div",{className:"flex flex-col gap-2 px-4 py-2 border-b border-[#9a9a9a]",children:e})});var er=r(21154);let ea=({locale:e,setBeforeInstallEvent:t})=>(0,a.jsx)("div",{className:"w-full flex justify-end pb-2",children:(0,a.jsx)("button",{type:"button",className:(0,m.cn)("m-0 inline-flex items-center justify-center border-0","bg-transparent p-0"),"aria-label":X[e].closeBanner,onClick:()=>{t(null),(0,Z.Sp)(Q.A.APP_INSTALL_BANNER_SEEN,"true",{path:"/","max-age":30*Z.N_})},children:(0,a.jsx)(er.U,{size:20,stroke:"currentColor"})})}),el=({locale:e})=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(w.SwirlLogoIcon,{styling:"tailwind",size:"2rem"}),(0,a.jsx)("div",{children:X[e].siteName})]}),en=({onClick:e,label:t})=>(0,a.jsx)("button",{className:"bg-[#13A31A] text-white px-4 py-2 m-0",onClick:e,children:t}),es=({locale:e,beforeInstallEvent:t,setBeforeInstallEvent:r})=>{let l={[S.L8.ModuleName]:S.Oe.Smartbanner};return(0,a.jsx)(ee.SW,{ga4ModuleParameters:l,children:(0,a.jsxs)(et,{children:[(0,a.jsx)(ee.xM,{ga4ModuleParameters:{...l,[S.L8.ModuleSubProduct]:S.kO.Close},children:(0,a.jsx)(ea,{locale:e,setBeforeInstallEvent:r})}),(0,a.jsxs)("div",{className:"w-full flex justify-between",children:[(0,a.jsx)(el,{locale:e}),(0,a.jsx)(ee.xM,{ga4ModuleParameters:{...l,[S.L8.ModuleSubProduct]:S.kO.Install},children:(0,a.jsx)(en,{label:X[e].installApp,onClick:()=>{t.prompt(),t.userChoice.then(e=>{(0,Z.Sp)(Q.A.APP_INSTALL_BANNER_SEEN,"true",{path:"/","max-age":30*Z.N_}),r(null),"accepted"===e.outcome&&ee.Ay.sendClickEvent({...l,[S.L8.ModuleSubProduct]:S.kO.InstallModal})})}})})]})]})})};r(84683);let ei=({disable:e})=>{let t=(0,B.Br)("watch-live","not_in_experiment");return e||"not_in_experiment"===t||"control_no_live_stream"===t?null:(0,a.jsx)(k.xM,{ga4ModuleParameters:{[S.L8.ModuleName]:"watchLiveBanner",[S.L8.ModuleSubProduct]:"watchLive"},children:(0,a.jsxs)("a",{href:"/en/gta-live",className:`slideIn bg-[#A0D4D8] text-[#203C73] w-full
2 fixed flex items-center justify-around gap-0 z-[100] h-[2.5rem] px-[0.75rem] bottom-[3.95rem] 3 md:relative md:h-[5rem] md:flex-col md:bottom-0 md:justify-center md:gap-2 md:px-4 4 xl:h-[8rem] xl:gap-[0.75rem]`,children:[(0,a.jsx)("div",{className:"flex text-sm font-normal gap-[0.375rem]\n md:gap-2 xl:font-medium xl:text-[18px] xl:gap-[0.75rem]",children:"Watch The Weather Network Live"}),(0,a.jsx)("div",{className:"bg-[#203C73] text-white h-[1.625rem] rounded-full\n px-4 flex items-center justify-center text-xs md:text-sm font-normal",children:"live_stream_with_sign_in"===t?"Sign in":"Stream Now"})]})})},eo=({locale:e,searchBaseUrl:t,firebaseOptions:r,isTopBannerBelowHeader:o,hideHeaderAndNavigation:d,showPostHeaderContent:c,stickinessDurationInMs:h=7e3,isPostHeaderAdContentSticky:u,headerText:p,disableSticky:f,disableTopBanner:g,disableSearch:b,disableAccount:v,disableWatchLiveBanner:w,postHeaderContent:j,adContent:y,children:k})=>{let N=(0,n.useRef)(null),S=(0,n.useRef)(null),A=(0,n.useRef)(null),{hasTakeover:I}=(0,i.p)(),{beforeInstallEvent:E,setBeforeInstallEvent:P}=(0,C.AJ)(),R=o||I,T=(0,n.useRef)(R);T.current=R;let[L,U]=(0,n.useState)(!1);(0,n.useLayoutEffect)(()=>{if(!N.current)return;let e=new ResizeObserver(()=>{A.current&&N.current&&!L&&!T.current&&(A.current.style.top=`${N.current.clientHeight}px`)});return e.observe(N.current),()=>e.disconnect()},[N.current]),(0,n.useLayoutEffect)(()=>{A.current&&g&&(A.current.style.top="0")},[A.current,g]),(0,n.useEffect)(()=>{if(!L)return;let e=0;N.current&&!T.current&&(e+=N.current.clientHeight),A.current&&(e+=A.current.clientHeight),N.current&&!T.current&&(N.current.style.transition="top 0.5s",N.current.style.top=`-${e+1}px`),A.current&&(A.current.style.transition="top 0.5s",A.current.style.top=`-${e+1}px`)},[L]),(0,n.useLayoutEffect)(()=>{let e=setTimeout(()=>U(!0),h);return()=>{clearTimeout(e)}},[h]);let{viewPortSize:B}=(0,C.wo)();(0,n.useEffect)(()=>{let e;if(!B)return;let t=t=>{t.slot.getSlotElementId()===s.tS.TOP_BANNER&&(e=setTimeout(()=>U(!0),B===l.i.SMALL?2e3:500))};return globalThis.window.googletag=globalThis.window.googletag||{cmd:[]},globalThis.window.googletag.cmd.push(()=>{globalThis.window.googletag.pubads().addEventListener("impressionViewable",t)}
4),()=>{globalThis.window.googletag.cmd.push(()=>{globalThis.window.googletag.pubads().removeEventListener("impressionViewable",t)}),clearTimeout(e)}},[B]),(0,n.useLayoutEffect)(()=>{if(!L)return;let e=setTimeout(()=>{N.current&&(N.current.style.position="static"),A.current&&(A.current.style.position="static")},500);return()=>{clearTimeout(e)}},[L]),(0,n.useLayoutEffect)(()=>{T.current&&N.current&&S.current&&A.current&&(N.current.style.order="1",S.current.style.backgroundColor="transparent",A.current.style.top="0")},[T.current]);let M=f||T.current&&!u;return(0,a.jsxs)("div",{className:(0,m.cn)("min-h-full","flex flex-col","font-sans","[&_input]:font-sans"),"data-testid":"site-chrome",children:[(0,a.jsxs)("header",{className:"contents",children:[E&&!(0,q.R)(q.A.APP_INSTALL_BANNER_SEEN)&&(0,a.jsx)(es,{locale:e,beforeInstallEvent:E,setBeforeInstallEvent:P}),!g&&y&&(0,a.jsx)(Y,{ref:N,disableSticky:M,"data-testid":"ad-content-wrapper",className:M?"":"z-[101]",children:(0,a.jsx)(J,{isAdPushedDownRef:T,adWrapperRef:S,children:y})}),(0,a.jsxs)(K,{ref:A,disableSticky:f,"data-testid":"site-chrome-header",children:[(0,a.jsx)(G,{firebaseOptions:r,locale:e,searchBaseUrl:t,hideHeaderAndNavigation:d,headerText:p,disableSearch:b,disableAccount:v}),(!d||c)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ei,{disable:w}),(0,a.jsx)(Y,{children:(0,a.jsx)("div",{className:"w-full shadow-header dark:shadow-none",children:j})})]})]})]}),(0,a.jsx)("div",{className:(0,m.cn)("h-full order-2",d?"pb-0":`pb-[${x}] md:pb-0`),children:k})]})}},2785:()=>{},3381:(e,t,r)=>{"use strict";r.d(t,{A:()=>a.A,R:()=>l.Ri});var a=r(18586),l=r(93886)},18427:(e,t,r)=>{"use strict";r.d(t,{E:()=>a.EK,N:()=>l.Nw});var a=r(10122),l=r(96190)},19155:(e,t,r)=>{"use strict";r.d(t,{P:()=>o,formatUrlParameters:()=>i});var a=r(1471),l=r(56493),n=r(58795),s=r(78175);let i=(e,t=!1)=>{let r=Object.entries(e||{}).map(([e,t])=>`${e}=${t}`).join("&");return t?encodeURIComponent(r):r},o=e=>{let{iuPrefix:t}=(0,s.Y)(),[r,o]=(0,l.useState)([]),{adParams:d,isLoading:c}=(0,n.b)();return(0,l.useEffect)(()=>{if(!c){let r=Math.floor(1e13+9e8*Math.random());Promise.all(e.map(async e=>{let l=new URL("https://securepubads.g.doubleclick.net/gampad/adx");l.searchParams.set("sz",e.size),l.searchParams.set("d_imp","1"),l.searchParams.set("d_imp_hdr","1"),l.searchParams.set("iu",`${t}${e.iu}`),l.searchParams.set("tile",e.tile?.toString()||"1"),l.searchParams.set("t",i(d,!1)),l.searchParams.set("c",r.toString());let n=await (0,a.I)(l.toString());return e.adDataResponseKey?n?.data?.[e.adDataResponseKey]?.[0]:n?.data?.[0]})).then(e=>o(e.filter(e=>!!e)))}},[e,t,d,c]),r}},21769:(e,t,r)=>{"use strict";r.d(t,{m:()=>a.mg});var a=r(93103)},34601:(e,t,r)=>{"use strict";r.d(t,{v:()=>a.ChevronRightIcon});var a=r(68799)},35054:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AddLocationSearch:()=>d,LocationSearchInPage:()=>o,SearchInOverlay:()=>c,inPageSearchCommonStyles:()=>i});var a=r(63600),l=r(67571),n=r(20279),s=r(66957);let i=(0,a.AH)` 5 z-index: 99; 6 7 #InputTitle { 8 margin: 0; 9 } 10 11 #InputField { 12 background-color: transparent; 13 } 14 15 #SearchResultsWrapper { 16 max-height: 40vh; 17 ${s.DynamicBorderBottomRadius} 18 19 border: 1px solid ${e=>e.theme.textColor}; 20 border-top: none; 21 ${s.ShadowBox} 22 23 z-index: 99; 24 position: absolute; 25 26 overflow-y: scroll; 27 scrollbar-width: thin; 28 } 29 30 .SearchResultCategory { 31 margin: 0; 32 } 33`,o=(0,a.Ay)(l.SearchInputWithResults)` 34 &, #SearchResultsWrapper { 35 @media ${n.j[n.i.SMALL]} { 36 width: ${e=>e.width?.[n.i.SMALL]??"100%"}; 37 } 38 @media ${n.j[n.i.MEDIUM]} { 39 width: ${e=>e.width?.[n.i.MEDIUM]??"66%"}; 40 } 41 @media ${n.j[n.i.LARGE]} { 42 width: ${e=>e.width?.[n.i.LARGE]??"50%"}; 43 } 44 } 45 46 ${i} 47`,d=(0,a.Ay)(l.SearchInputWithResults)` 48 &, #SearchResultsWrapper { 49 width: 100%; 50 } 51 52 ${i} 53`,c=(0,a.Ay)(l.SearchInputWithResults)` 54 #InputTitle { 55 margin: 1rem; 56 } 57 58 #InputBox { 59 margin: 1rem; 60 background-color: white; 61 } 62 63 #InputField { 64 background-color: white; 65 } 66`},39516:(e,t,r)=>{"use strict";r.d(t,{W:()=>a.SearchIcon});var a=r(68799)},42631:(e,t,r)=>{"use strict";r.d(t,{TwSearchInputWithResults:()=>S});var a=r(85465),l=r(45333),n=r(56493),s=r(63726),i=r(92617),o=r(45389),d=r(39516);let c=({flattenBottom:e,disabled:t,children:r,onClick:l})=>(0,a.jsx)("div",{id:"InputBox",onClick:l,className:`w-full flex flex-row gap-[5px] font-normal 67 ${t?"opacity-50 cursor-not-allowed pointer-events-none":""} 68 ${e?"rounded-b-none":""} 69 `,children:r}),h=({disabled:e,value:t,name:r,onChange:l,placeholder:n})=>(0,a.jsx)("input",{disabled:e,type:"text",value:t,name:r,onChange:l,placeholder:n,"data-testid":"search-input-field",autoComplete:"off",autoFocus:!0,"aria-describedby":"search-results-count",className:(0,i.cn)("w-full bg-white border-none text-[1.2rem] text-dark-grey-500","focus:outline-none","placeholder:text-[#757575]","disabled:cursor-not-allowed disabled:opacity-50")}),u=({resultsText:e})=>(0,a.jsx)("output",{className:"w-full bg-white dark:bg-near-black",i
69d:"search-results-count",htmlFor:"InputField","data-testid":"search-results-count","aria-live":"polite",children:(0,a.jsx)("label",{className:"pl-4 text-body-md font-light text-primary-foreground",children:e})});var m=r(523),p=r(18427),x=r(34601),f=r(86454);let g=e=>{let{searchItem:t,profileType:r,locale:l,onItemClick:n}=e,s=t.path??(0,p.N)(l,r,t),o=((...e)=>{let t=e.pop();return t.countryDisplayCode?(0,p.E)(t.name,t.provName,t.countryDisplayCode):`${t.name}, ${t.provName||t.countryName}`})(t),d=(0,i.cn)("m-4 p-0 py-[5px] pr-[5px] flex whitespace-nowrap justify-between","border-b border-border cursor-pointer hover:text-highlight");return Object.keys(t).length?(0,a.jsx)("li",{children:(0,a.jsx)(m.xM,{ga4ModuleParameters:{[f.L8.ModuleName]:f.Oe.Search},children:n?(0,a.jsx)("button",{"data-testid":"search-result-item",onClick:()=>{n&&n(t,r)},type:"button",className:(0,i.cn)(d,"bg-transparent border-0 text-inherit font-inherit no-underline"),children:o}):(0,a.jsxs)("a",{href:s,"data-testid":"search-result-item",className:d,children:[o,(0,a.jsx)(x.v,{size:"16px"})]})})}):null};var b=r(21769),v=r(34325),w=r(68799);let j=({isShowingPointer:e,onClick:t,className:r,children:l,dataTestId:n})=>(0,a.jsx)("div",{onClick:t,"data-testid":n,className:(0,i.cn)(r,"outline-none","bg-[#175489] mb-4 py-[15px] px-[20px] text-white flex flex-row items-center gap-4 h-[2.8em]",e?"cursor-pointer":""),children:l}),y=({ariaLabel:e,icon:t})=>(0,a.jsx)("button",{className:"bg-transparent border-none cursor-pointer","aria-label":e,children:t}),k=({profile:e,startExpanded:t=!1,expandCount:r=10,collapseCount:s=5,locale:i,onItemClick:o})=>{let[d,c]=(0,n.useState)(t),h=l.B[i],u=!1;if(!e||!e.name)return null;let m=(0,b.m)(e.name);m||(u=!0);let p=e.location.length>s,x=e.location.slice(0,d?r:s).filter(e=>{if(e.friendlyURL||e.path)return!0;if(Array.isArray(e.name)&&e.name.length>0){let t=e.name.find(e=>e.locale===i);if(t?.friendlyURL)return!0}return!1});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(j,{className:"SearchResultCategory",dataTestId:`search-location-heading-${e.name}`,onClick:()=>{p&&c(e=>!e)},"data-testid":`search-location-heading-${e.name}`,isShowingPointer:p,children:[(0,a.jsx)("h2",{className:"font-semibold",children:u?e.name.toUpperCase():h.profileType[`${e.name}`].searchHeading.toUpperCase()}
69),p&&!d&&(0,a.jsx)(y,{ariaLabel:l.B[i].showMore,icon:(0,a.jsx)(w.PlusIcon,{size:10})}),p&&d&&(0,a.jsx)(y,{ariaLabel:l.B[i].showLess,icon:(0,a.jsx)(w.MinusIcon,{size:10})})]}),(0,a.jsx)("ul",{"data-testid":`search-location-panel-${e.name}`,children:x.map(e=>(0,a.jsx)(g,{searchItem:e,profileType:m||v.E.CITY,locale:i,onItemClick:o},e.row))})]})},N=e=>{let{searchProfileList:t,startExpanded:r=!1,locale:l,onItemClick:n}=e;return t.profile.map(e=>(0,a.jsx)(k,{profile:e,startExpanded:r,expandCount:e.location.length,locale:l,onItemClick:n},e.name))},S=({locale:e,searchBaseUrl:t,profileTypes:r,hideRecentLocations:m,className:p,hasAttachedResults:x,onItemClick:f,disabled:g,onDisabledClick:b})=>{let v=l.B[e],[w,j]=n.useState(""),[y,k]=n.useState(""),[S,C]=n.useState(),[A,I]=n.useState(!1),E=async a=>{I(!0);let l=await (0,s.H)(t,e,a,999,r);l?.profile?.[0]?.location?.[0]?C(l):C(null),I(!1)},P=n.useCallback((0,o.sg)(E,200),[]),R=(0,n.useMemo)(()=>(0,s.p)(e,m),[e,m]),T=(0,n.useMemo)(()=>{if(A)return l.B[e].searching;if(!S||S.profile[0].name===l.B[e].recent||""===S.profile[0].name)return null;let t=S.profile.reduce((e,t)=>e+t.rowCount,0),r=t>1?l.B[e].resultsFor:l.B[e].resultFor;return`${t} ${r} ${w}`},[S,w,A,e]);n.useEffect(()=>{w.length<3?(m?C(void 0):C(R),k("")):null===S?k(v.noSearchResultsFound):k("")},[v.noSearchResultsFound,w,R,S,m]),n.useEffect(()=>{w.length>=3&&P(w)},[w,P]);let L=()=>{j(""),C(m?void 0:R),k("")},U=!!T||!!S||!!y;return(0,a.jsxs)("div",{id:"SearchInputWithResults",className:p,children:[(0,a.jsx)("div",{className:(0,i.cn)("p-3 m-4 rounded-sm md:rounded-md lg:rounded-lg border border-black","shadow-search-input bg-white text-dark-grey-500"),children:(0,a.jsxs)(c,{flattenBottom:U&&!!x,disabled:g,onClick:g?b:void 0,children:[(0,a.jsx)(d.W,{size:20}),(0,a.jsx)(h,{disabled:g,value:w,name:"search",onChange:e=>{j(e.target.value)},placeholder:v.searchPlaceholder,"data-testid":"search-input-field","aria-describedby":"search-results-count"}),w&&(0,a.jsx)("button",{"aria-label":v.clearSearch,className:"mr-1 text-black",onClick:L,children:"â"})]})}),U&&(0,a.jsxs)("div",{className:"bg-white dark:bg-near-black",id:"SearchResultsWrapper",children:[T&&(0,a.jsx)(u,{resultsText:T}),!!S&&(0,a.jsx)(N,{searchProfileList:S,locale:e,onItemClick:f?(e,t)=>{f(e,t),L()}:void 0}),!!y&&(0,a.jsx)("div",{className:"my-[1rem] mx-[1.2rem]","data-testid":"search-error",children:y})]})]})}},45333:(e,t,r)=>{"use strict";r.d(t,{B:()=>l});var a=r(34325);let l={"en-CA":{searchTitle:"Search for your weather",searchPlaceholder:"Enter location",clearSearch:"Clear search",showMore:"Show more results",showLess:"Show fewer results",recent:"Recent",resultsFor:"results for",resultFor:"result for",searching:"searching...",profileType:{[a.E.CITY]:{searchHeading:"Locations"},[a.E.GOLF]:{searchHeading:"Golf Courses"},[a.E.SCHOOL]:{searchHeading:"Schools"},[a.E.AIRPORT]:{searchHeading:"Airports"},[a.E.BEACH]:{searchHeading:"Beach Report"},[a.E.CAMPGROUND]:{searchHeading:"Camping Report"},[a.E.COTTAGE]:{searchHeading:"Cottage Report"},[a.E.MARINE]:{searchHeading:"Marine"},[a.E.PARK]:{searchHeading:"Parks"},[a.E.SKI]:{searchHeading:"Ski Resorts"},[a.E.ATTRACTION]:{searchHeading:"Attractions"},[a.E.VACATION]:{searchHeading:"Vacation destinations"}},noSearchResultsFound:"No locations found. Please try again."},"fr-CA":{searchTitle:"Rechercher votre pr\xe9vision m\xe9t\xe9o",searchPlaceholder:"Entrer un endroit",clearSearch:"Effacer la recherche",showMore:"Montrer plus de r\xe9sultats",showLess:"Montrer moins de r\xe9sultats",recent:"R\xe9cents",resultsFor:"r\xe9sultats pour",resultFor:"r\xe9sultat pour",searching:"recherche...",profileType:{[a.E.CITY]:{searchHeading:"Emplacements"},[a.E.GOLF]:{searchHeading:"Cours de golf"},[a.E.SCHOOL]:{searchHeading:"\xc9coles"},[a.E.AIRPORT]:{searchHeading:"A\xe9roports"},[a.E.BEACH]:{searchHeading:"Bulletin plage"},[a.E.CAMPGROUND]:{searchHeading:"Bulletin camping"},[a.E.COTTAGE]:{searchHeading:"Bulletin chalet"},[a.E.MARINE]:{searchHeading:"Maritimes"},[a.E.PARK]:{searchHeading:"Parcs"},[a.E.SKI]:{searchHeading:"Stations de ski"},[a.E.ATTRACTION]:{searchHeading:"Attractions"},[a.E.VACATION]:{searchHeading:"Destinations vacances"}},noSearchResultsFound:"Aucun endroit disponible - Veuillez r\xe9essayer."}}},45510:(e,t,r)=>{"use strict";r.d(t,{t:()=>c});var a=r(85465),l=r(41997),n=r(65336),s=r(68799);r(56493);let i=({children:e})=>(0,a.jsx)("div",{className:"pt-4 pl-[1.15rem] font-semibold",children:e});r(67571);var o=r(42631);r(35054);let d={"en-CA":{title:"Search",heading:"Search for your weather"},"fr-CA":{title:"Rechercher",heading:"Rechercher votre pr\xe9vision m\xe9t\xe9o"}},c=({locale:e,searchBaseUrl:t,overrideTriggerElement:r,profileTypes:c,hideRecentLocations:h,overlayTitle:u})=>(0,a.jsxs)(n.gy,{locale:e,triggerElement:r??(0,a.jsx)(l.BasicButton,{"aria-label":d[e].title,"data-testid":"search-overlay-default-trigger-element",children:(0,a.jsx)(s.SearchIcon,{size:20})}),children:[(0,a.jsx)(i,{children:u??d[e].heading}),(0,a.jsx)(o.TwSearchInputWithResults,{locale:e,searchBaseUrl:t,profileTypes:c,hideRecentLocations:h})]})},59522:(e,t,r)=>{"use strict";r.d(t,{Yt:()=>a.Yt});var a=r(86454)},63726:(e,t,r)=>{"use strict";r.d(t,{H:()=>a.Hu,p:()=>a.pc});var a=r(40456)},67571:(e,t,r)=>{"use strict";r.d(t,{SearchInputWithResults:()=>_});var a=r(85465),l=r(80943),n=r(66957),s=r(63600),i=r(20279);let o=s.Ay.div` 70 display: flex; 71 flex-flow: row wrap; 72 justify-content: space-between; 73`,d=(0,s.AH)` 74 @media ${i.j[i.i.SMALL]}, ${i.j[i.i.MEDIUM]}, ${i.j[i.i.LARGE]} { 75 border-bottom-left-radius: 0; 76 border-bottom-right-radius: 0; 77 } 78`,c=s.Ay.div` 79 width: 100%; 80 display: flex; 81 flex-direction: row; 82 gap: 5px; 83 font-weight: 400; 84 85 ${n.FloatingBox} 86 ${({flattenBottom:e})=>e?d:""} 87 ${({disabled:e})=>e&&` 88 opacity: 0.5;
89 cursor: not-allowed; 90 > * { 91 pointer-events: none; 92 } 93 `} 94`,h=s.Ay.input` 95 width: 100%; 96 background-color: #FFFFFF; 97 color: #4C5353; 98 border: none; 99 font-size: 1.2rem; 100 &:focus{ 101 outline: none; 102 } 103 &::placeholder { 104 color: revert; 105 } 106 &:disabled { 107 cursor: not-allowed; 108 opacity: 0.5; 109 } 110`,u=s.Ay.div` 111 background-color: ${e=>e.theme.backgroundColor}; 112`,m=s.Ay.div` 113 margin: 1rem 1.2rem; 114 color: ${e=>e.theme.textColor}; 115`,p=s.Ay.output` 116 width: 100%; 117 background-color: ${e=>e.theme.backgroundColor}; 118`,x=s.Ay.label` 119 padding-left: 1rem; 120 font-size: 1rem; 121 font-weight: 300; 122 color: ${e=>e.theme.textColor}; 123`,f=s.Ay.button` 124 background: none; 125 margin-right: 4px; 126 margin-top: 0px; 127 margin-bottom: 0px; 128 border: none; 129 cursor: pointer; 130 color: ${l.A.primaryBlack}; 131`;var g=r(45333),b=r(56493),v=r(63726),w=r(523),j=r(18427);let y=(0,s.AH)` 132 margin: 1em; 133 padding: 5px 5px 5px 0px; 134 color: ${e=>e.theme.headerTextColor}; 135 display: flex; 136 flex-flow: row nowrap; 137 justify-content: space-between; 138 border-bottom: 1px solid #e9e7e7; 139 cursor: pointer; 140 141 &:hover { 142 color: ${e=>e.theme.highlightColor}; 143 } 144 div { 145 width:90%; 146 } 147`,k=s.Ay.a` 148 ${y} 149`,N=s.Ay.button` 150 text-decoration: none; 151 background: none; 152 border: none; 153 font-size: inherit; 154 font-family: inherit; 155 ${y} 156`;var S=r(34601),C=r(86454);let A=e=>{let{searchItem:t,profileType:r,locale:l,onItemClick:n}=e,s=t.path??(0,j.N)(l,r,t),i=((...e)=>{let t=e.pop();return t.countryDisplayCode?(0,j.E)(t.name,t.provName,t.countryDisplayCode):`${t.name}, ${t.provName||t.countryName}`})(t);return Object.keys(t).length?(0,a.jsx)("li",{children:(0,a.jsx)(w.xM,{ga4ModuleParameters:{[C.L8.ModuleName]:C.Oe.Search},children:n?(0,a.jsx)(N,{"data-testid":"search-result-item",onClick:()=>{n&&n(t,r)},type:"button",children:i}):(0,a.jsxs)(k,{href:s,"data-testid":"search-result-item",children:[i,(0,a.jsx)(S.v,{size:"16px"})]})})}):null};var I=r(21769),E=r(34325),P=r(41997),R=r(68799);let T=s.Ay.div` 157 background-color: #175489; 158 margin-bottom: 1em; 159 padding: 15px 20px; 160 color: #ffffff; 161 display: flex; 162 flex-flow: row nowrap; 163 align-items: center; 164 gap: 1rem; 165 outline: none; 166 font-weight: 600; 167 height: 2.8em; 168 &:focus { 169 outline: none; 170 } 171 ${({isShowingPointer:e})=>e?"cursor: pointer;":""} 172 173 h2 { 174 font-size: 16px; 175 font-weight: 600; 176 margin: 0; 177 padding: 0; 178 } 179 180 svg { 181 fill: #ffffff; 182 } 183`,L=s.Ay.ul` 184 margin: 0; 185 padding: 0; 186 list-style: none; 187`,U=({profile:e,startExpanded:t=!1,expandCount:r=10,collapseCount:l=5,locale:n,onItemClick:s})=>{let[i,o]=(0,b.useState)(t),d=g.B[n],c=!1;if(!e||!e.name)return null;let h=(0,I.m)(e.name);h||(c=!0);let u=e.location.length>l,m=e.location.slice(0,i?r:l).filter(e=>{if(e.friendlyURL||e.path)return!0;if(Array.isArray(e.name)&&e.name.length>0){let t=e.name.find(e=>e.locale===n);if(t?.friendlyURL)return!0}return!1});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(T,{className:"SearchResultCategory",onClick:()=>{u&&o(e=>!e)},"data-testid":`search-location-heading-${e.name}`,isShowingPointer:u,children:[(0,a.jsx)("h2",{children:c?e.name.toUpperCase():d.profileType[`${e.name}`].searchHeading.toUpperCase()}),u&&!i&&(0,a.jsx)(P.BasicButton,{"aria-label":g.B[n].showMore,children:(0,a.jsx)(R.PlusIcon,{size:10})}),u&&i&&(0,a.jsx)(P.BasicButton,{"aria-label":g.B[n].showLess,children:(0,a.jsx)(R.MinusIcon,{size:10})})]}),(0,a.jsx)(L,{"data-testid":`search-location-panel-${e.name}`,children:m.map(e=>(0,a.jsx)(A,{searchItem:e,profileType:h||E.E.CITY,locale:n,onItemClick:s},e.row))})]})},B=e=>{let{searchProfileList:t,startExpanded:r=!1,locale:l,onItemClick:n}=e;return t.profile.map(e=>(0,a.jsx)(U,{profile:e,startExpanded:r,expandCount:e.location.length,locale:l,onItemClick:n},e.name))};var M=r(45389),$=r(39516);let _=({locale:e,searchBaseUrl:t,profileTypes:r,hideRecentLocations:l,className:n,hasAttachedResults:s,onItemClick:i,disabled:d,onDisabledClick:w})=>{let j=g.B[e],[y,k]=b.useState(""),[N,S]=b.useState(""),[C,A]=b.useState(),[I,E]=b.useState(!1),P=
187async a=>{E(!0);let l=await (0,v.H)(t,e,a,999,r);l?.profile?.[0]?.location?.[0]?A(l):A(null),E(!1)},R=b.useCallback((0,M.sg)(P,200),[]),T=(0,b.useMemo)(()=>(0,v.p)(e,l),[e,l]),L=(0,b.useMemo)(()=>{if(I)return g.B[e].searching;if(!C||C.profile[0].name===g.B[e].recent||""===C.profile[0].name)return null;let t=C.profile.reduce((e,t)=>e+t.rowCount,0),r=t>1?g.B[e].resultsFor:g.B[e].resultFor;return`${t} ${r} ${y}`},[C,y,I,e]);b.useEffect(()=>{y.length<3?(l?A(void 0):A(T),S("")):null===C?S(j.noSearchResultsFound):S("")},[j.noSearchResultsFound,y,T,C,l]),b.useEffect(()=>{y.length>=3&&R(y)},[y,R]);let U=()=>{k(""),A(l?void 0:T),S("")},_=!!L||!!C||!!N;return(0,a.jsxs)("div",{id:"SearchInputWithResults",className:n,children:[(0,a.jsx)(o,{children:(0,a.jsxs)(c,{id:"InputBox",flattenBottom:_&&!!s,disabled:d,onClick:d?w:void 0,children:[(0,a.jsx)($.W,{size:20}),(0,a.jsx)(h,{disabled:d,id:"InputField",type:"text",value:y,name:"search",onChange:e=>{k(e.target.value)},placeholder:j.searchPlaceholder,"data-testid":"search-input-field",autoComplete:"off",autoFocus:!0,"aria-describedby":"search-results-count"}),y&&(0,a.jsx)(f,{onClick:U,"aria-label":j.clearSearch,children:"â"})]})}),_&&(0,a.jsxs)(u,{id:"SearchResultsWrapper",children:[L&&(0,a.jsx)(p,{id:"search-results-count",htmlFor:"InputField","data-testid":"search-results-count","aria-live":"polite",children:(0,a.jsx)(x,{children:L})}),!!C&&(0,a.jsx)(B,{searchProfileList:C,locale:e,onItemClick:i?(e,t)=>{i(e,t),U()}:void 0}),!!N&&(0,a.jsx)(m,{"data-testid":"search-error",children:N})]})]})}},76277:(e,t,r)=>{"use strict";r.d(t,{TakeoverProvider:()=>o,p:()=>i});var a=r(85465),l=r(56493);let n={hasTakeover:!1,takeoverImageUrl:"",trackingPixelUrl:""},s=(0,l.createContext)(void 0);function i(){let e=(0,l.useContext)(s);if(void 0===e)throw Error("Takeover Provider is not present");return e}let o=({children:e})=>{let[t,r]=(0,l.useState)(n);return(0,l.useEffect)(()=>(globalThis.pelmorex={...globalThis.pelmorex??{},runTakeOverReact:(e,t)=>{e&&r({hasTakeover:!0,takeoverImageUrl:e,trackingPixelUrl:t})}},()=>{"function"==typeof globalThis.pelmorex?.runTakeOverReact&&delete globalThis.pelmorex.runTakeOverReact}),[]),(0,a.jsx)(s.Provider,{value:t,children:e})}},84683:()=>{}}]);
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.