(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1372],{6755:(e,t,o)=>{"use strict";o.d(t,{AtomHydrationBoundaries:()=>p});var s=o(31157),l=o(32887),r=o(91370),n=o(77704),a=o(78610),c=o(13578);let i=e=>{let t=(0,a.Pj)(),o=(0,a.Xr)((0,n.useMemo)(()=>(0,c.eU)(null,(o,s)=>{for(let[o,l]of e)t.get(o)!==l&&(console.debug("Atom change detected, updating - store value:",t.get(o),"new value:",l),s(o,l))}),[e,t]));(0,n.useEffect)(()=>{o()},[o])},p=e=>(i([[s.m,e.pageId],[r.X,e.pageLocale],[l.$,e.metricsArticleData],[l.g,e.metricsLocationData]]),null)},17803:(e,t,o)=>{"use strict";o.d(t,{ArticleShareButton:()=>M});var s,l=o(59716),r=o(77704),n=o(37279),a=o(97729),c=o(14039),i=o(58582),p=o(13820);let f=e=>{let{isOpen:t,setIsOpen:o,children:s,title:r}=e;return(0,l.jsx)(i.lG,{open:t,children:(0,l.jsxs)(i.ZJ,{children:[(0,l.jsx)(i.LC,{className:"bg-black/50"}),(0,l.jsxs)(i.Cf,{className:(0,p.cn)("p-0 [&>button]:hidden","fixed inset-x-0 bottom-0 top-auto z-50 flex h-auto flex-col bg-white","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:slide-out-to-bottom-[10%] data-[state=open]:slide-in-from-bottom-[10%]","left-0 w-full max-w-none translate-x-0 translate-y-0 shadow-lg duration-300","border-x-0 border-b-0","rounded-b-none rounded-t-3xl"),children:[(0,l.jsx)(i.L3,{className:"pt-4",children:(0,l.jsxs)("div",{className:"relative mb-[8px] flex items-center justify-center pb-4",children:[(0,l.jsx)(c.Ay,{variant:"Body.L",className:"font-bold",children:r}),(0,l.jsx)("button",{onClick:()=>o(!1),className:"absolute right-5 top-0 cursor-pointer text-black hover:text-gray-700",children:(0,l.jsx)(n.A,{className:"h-6 w-6"})}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[1px] bg-gray-200"})]})}),(0,l.jsx)("div",{className:"max-h-[70vh] overflow-y-auto p-4 pt-0",children:s})]})]})})};var d=["title","titleId","desc","descId"];function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onClick:t,asChild:o=!1}=e,s={className:"flex cursor-pointer items-center text-sm text-gray-500",onClick:t,"data-testid":"share-button"},r=(0,l.jsxs)("div",{className:"align-center flex items-center","data-testid":"article-share-button",children:[(0,l.jsx)(h,{width:16,height:16,className:"m-0 mr-[8px]","data-testid":"share-icon-image"}),(0,l.jsx)(c.Ay,{variant:"Body.S",color:"brandDark",className:"m-0 font-bold","data-testid":"share-button-text",children:"Share"})]});return o?(0,l.jsx)("div",{...s,children:r}):(0,l.jsx)("button",{...s,children:r})};var C=o(73581);let u=(0,C.A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);var v=o(98291);let x=(0,C.A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var F=o(95077),b=o(28445),y=o(64058),g=o(85527),w=o(7849);let j=()=>{let e=(0,w.q)(),t="content-shared",o=(0,b.G)(),s=(0,y.N)({effectiveLocation:e}),l=(0,g.A)(),n=(0,r.useCallback)(e=>{let{sharedMethod:r}=e,a={createdDate:null==l?void 0:l.createdDate,contentId:null==l?void 0:l.contentId,publishDate:null==l?void 0:l.publishDate,author:(null==l?void 0:l.author)||"",collection:null==l?void 0:l.collection,entitlements:null==l?void 0:l.entitlements,sharedMethod:r,...s};if(!o)return void console.warn("MParticle is not initialized");try{F.A.logEvent(t,F.A.EventType.Other,a),console.debug('MParticle: Content Shared Event tracked - "'.concat(t,'"'),a)}catch(e){console.error('MParticle: Failed to track Content Shared Event - "'.concat(t,'"'),e)}return n},[null==l?void 0:l.author,null==l?void 0:l.contentId,null==l?void 0:l.collection,null==l?void 0:l.createdDate,null==l?void 0:l.entitlements,null==l?void 0:l.publishDate,s,o]);return n},A=e=>{let{setIsOpen:t,setCopied:o,copied:s}=e,r=j();return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"space-y-4","data-testid":"share-options-container",children:[(0,l.jsxs)("button",{onClick:()=>{window.open("https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(window.location.href),"&text=").concat(encodeURIComponent(document.title)),"_blank"),r({sharedMethod:"twitter"}),t(!1)},className:"flex h-6 w-full cursor-pointer items-center rounded-md hover:bg-gray-50","data-testid":"share-twitter-button",children:[(0,l.jsx)("div",{className:"mr-[8px] flex h-8 w-8 items-center justify-center","data-testid":"share-twitter-icon",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",children:(0,l.jsx)("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),(0,l.jsx)(c.Ay,{variant:"Body.M","data-testid":"share-twitter-text",children:"X"})]}),(0,l.jsxs)("button",{onClick:()=>{{let e="mailto:?subject=".concat(encodeURIComponent(document.title),"&body=").concat(encodeURIComponent(window.location.href));document.body.setAttribute("data-mailto-url",e),window.location.href=e,r({sharedMethod:"email"}),t(!1)}},className:"flex h-6 w-full cursor-pointer items-center rounded-md hover:bg-gray-50","data-testid":"share-email-button",children:[(0,l.jsx)("div",{className:"mr-[8px] flex h-8 w-8 items-center justify-center","data-testid":"share-email-icon",children:(0,l.jsx)(u,{className:"h-[24px] w-[24px]"})}),(0,l.jsx)(c.Ay,{variant:"Body.M","data-testid":"share-email-text",children:"Email"})]}),(0,l.jsxs)("button",{onClick:()=>{"undefined"!=typeof navigator&&navigator.clipboard.writeText(window.location.href).then(()=>{o(!0),r({sharedMethod:"linkCopy"}),setTimeout(()=>{t(!1)},800),setTimeout(()=>{o(!1)},1e3)})},className:"flex h-6 w-full cursor-pointer items-center rounded-md hover:bg-gray-50","data-testid":"share-copy-button",children:[(0,l.jsx)("div",{className:"mr-[8px] flex h-8 w-8 items-center justify-center","data-testid":"share-copy-icon",children:s?(0,l.jsx)(v.A,{className:"h-[24px] w-[24px]"}):(0,l.jsx)(x,{className:"h-[24px] w-[24px]"})}),(0,l.jsx)(c.Ay,{variant:"Body.M","data-testid":"share-copy-text",children:s?"Copied":"Copy link"})]})]})})},M=()=>{let[e,t]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),[i,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{p(window.innerWidthwindow.removeEventListener("resize",e)},[]),(0,l.jsx)("div",{className:"flex items-center justify-between","data-testid":"article-share-container",children:i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E,{onClick:()=>s(!0)}),(0,l.jsx)(f,{title:"Share on..",isOpen:o,setIsOpen:s,"data-testid":"share-mobile-drawer",children:(0,l.jsx)(A,{setCopied:t,setIsOpen:s,copied:e})})]}):(0,l.jsxs)(a.AM,{open:o,onOpenChange:s,"data-testid":"share-popover",children:[(0,l.jsx)(a.Wv,{children:(0,l.jsx)(E,{asChild:!0})}),(0,l.jsxs)(a.hl,{arrowPadding:2,align:"end",alignOffset:-2,className:"drop-shadow-lg/25 relative z-10 h-[169px] w-[312px] rounded-2xl border-0 bg-white p-[16px]","data-testid":"share-popover-content",children:[(0,l.jsx)(a.Rp,{width:21,height:14,className:"fill-white"}),(0,l.jsxs)("div",{className:"mb-[8px] flex items-center justify-between",children:[(0,l.jsx)(c.Ay,{variant:"Body.L",className:"font-bold","data-testid":"share-title",children:"Share on.."}),(0,l.jsx)("button",{onClick:()=>s(!1),className:"cursor-pointer text-black hover:text-gray-700","data-testid":"share-close-button",children:(0,l.jsx)(n.A,{className:"h-6 w-6"})})]}),(0,l.jsx)(A,{setCopied:t,setIsOpen:s,copied:e})]})]})})}},26142:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>F});var s,l,r,n,a,c,i,p,f,d,m,h,E,C,u=o(77704),v=["title","titleId","desc","descId"];function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t{Promise.resolve().then(o.bind(o,26142)),Promise.resolve().then(o.bind(o,98167)),Promise.resolve().then(o.bind(o,14407)),Promise.resolve().then(o.bind(o,16955)),Promise.resolve().then(o.bind(o,79548)),Promise.resolve().then(o.bind(o,89063)),Promise.resolve().then(o.bind(o,77515)),Promise.resolve().then(o.bind(o,12907)),Promise.resolve().then(o.bind(o,12655)),Promise.resolve().then(o.bind(o,38033)),Promise.resolve().then(o.bind(o,84271)),Promise.resolve().then(o.bind(o,12934)),Promise.resolve().then(o.bind(o,16047)),Promise.resolve().then(o.bind(o,41495)),Promise.resolve().then(o.bind(o,26022)),Promise.resolve().then(o.bind(o,17803)),Promise.resolve().then(o.bind(o,6755)),Promise.resolve().then(o.bind(o,51045)),Promise.resolve().then(o.bind(o,36553)),Promise.resolve().then(o.bind(o,67352)),Promise.resolve().then(o.bind(o,51204))},51204:(e,t,o)=>{"use strict";o.d(t,{WeatherLocationTickerClientComponent:()=>d});var s=o(59716),l=o(77704),r=o(68899),n=o(68022),a=o(30750),c=o(96112),i=o(78610),p=o(35075),f=o(65864);function d(e){var t;let{node:o}=e,[d,m]=(0,l.useState)(null),[h,E]=(0,l.useState)(null),[C,u]=(0,l.useState)(!0),[v,x]=(0,l.useState)(null),F=(0,i.md)(p.Yt),b=null==(t=(0,f.xP)(F))?void 0:t.code,{data:y,error:g}=(0,r.Ay)(o.geocode?["currentConditions",o.geocode,b]:null,async e=>{let[t,o,s]=e;try{return await (0,n.z)({geocode:o,units:s,language:"en-US"})}catch(e){return console.error("Error fetching weather:",e),null}},{revalidateOnFocus:!1,dedupingInterval:3e5});(0,l.useEffect)(()=>{y?(m(Math.round(y.temperature)),E(c.ICON_CODE_MAP[y.iconCode]||"na"),u(!1)):g&&(x(g),u(!1))},[y,g]);let{data:w}=(0,r.Ay)(h?"icon-".concat(h):null,()=>(0,a.T)(h||"na"),{revalidateOnFocus:!1,dedupingInterval:1/0}),j=o.placeId?"/weather/today/l/".concat(o.placeId):"#";return(0,s.jsxs)("a",{href:j,className:"inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"border-b-2 border-dotted border-black",children:o.locationName}),C?(0,s.jsx)("span",{className:"text-gray-400",children:"..."}):v?(0,s.jsx)("span",{className:"text-gray-400",children:"!"}):(0,s.jsxs)("span",{className:"inline-flex items-center rounded-full bg-gray-100 px-2",children:[w&&(0,s.jsx)("span",{className:"flex items-center",children:(0,s.jsx)(w,{className:"lightBG",width:12,height:12})}),(0,s.jsxs)("span",{className:"font-medium",children:[d,"\xb0"]})]})]})}}}]);